From 03e304d1cf1611c3b28d09f019c2a239c32102a2 Mon Sep 17 00:00:00 2001 From: marnec Date: Tue, 28 Nov 2023 12:12:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20main=20from=20@=20marnec/three?= =?UTF-8?q?plot@1c9e8029caf79c4937da607f24c3706f95142ce6=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.41dfc637.js | 383 +++++++++++++++++++++++++++++++++++++ docs/index.41dfc637.js.map | 1 + docs/index.f9a4f1dc.js.map | 2 +- docs/index.html | 27 +-- 4 files changed, 386 insertions(+), 27 deletions(-) create mode 100644 docs/index.41dfc637.js create mode 100644 docs/index.41dfc637.js.map diff --git a/docs/index.41dfc637.js b/docs/index.41dfc637.js new file mode 100644 index 0000000..2cb4106 --- /dev/null +++ b/docs/index.41dfc637.js @@ -0,0 +1,383 @@ +function e(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var t=globalThis,n={},r={},i=t.parcelRequire9513;null==i&&((i=function(e){if(e in n)return n[e].exports;if(e in r){var t=r[e];delete r[e];var i={id:e,exports:{}};return n[e]=i,t.call(i.exports,i,i.exports),i.exports}var a=Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}).register=function(e,t){r[e]=t},t.parcelRequire9513=i);var a=i.register;a("ilwiq",function(t,n){let r,i,a;e(t.exports,"MOUSE",()=>s),e(t.exports,"TOUCH",()=>o),e(t.exports,"FrontSide",()=>l),e(t.exports,"BackSide",()=>h),e(t.exports,"DoubleSide",()=>u),e(t.exports,"LinearFilter",()=>c),e(t.exports,"RGBADepthPacking",()=>d),e(t.exports,"EventDispatcher",()=>S),e(t.exports,"MathUtils",()=>D),e(t.exports,"Vector2",()=>I),e(t.exports,"Matrix3",()=>O),e(t.exports,"Texture",()=>ee),e(t.exports,"Vector4",()=>et),e(t.exports,"Quaternion",()=>ea),e(t.exports,"Vector3",()=>es),e(t.exports,"Box3",()=>eh),e(t.exports,"Sphere",()=>eA),e(t.exports,"Ray",()=>eI),e(t.exports,"Matrix4",()=>eO),e(t.exports,"Color",()=>tf),e(t.exports,"MeshBasicMaterial",()=>t_),e(t.exports,"Float32BufferAttribute",()=>tT),e(t.exports,"BufferGeometry",()=>tL),e(t.exports,"Mesh",()=>tK),e(t.exports,"UniformsUtils",()=>t2),e(t.exports,"PerspectiveCamera",()=>t5),e(t.exports,"Plane",()=>nn),e(t.exports,"PlaneGeometry",()=>nl),e(t.exports,"ShaderChunk",()=>nh),e(t.exports,"ShaderLib",()=>nc),e(t.exports,"MeshDepthMaterial",()=>ir),e(t.exports,"MeshDistanceMaterial",()=>ii),e(t.exports,"WebGLRenderer",()=>i_),e(t.exports,"Scene",()=>ix),e(t.exports,"InstancedBufferAttribute",()=>iy),e(t.exports,"LineBasicMaterial",()=>iS),e(t.exports,"Line",()=>iA),e(t.exports,"EllipseCurve",()=>iL),e(t.exports,"CylinderGeometry",()=>i$),e(t.exports,"ExtrudeGeometry",()=>ad),e(t.exports,"SphereGeometry",()=>a_),e(t.exports,"MeshStandardMaterial",()=>ab),e(t.exports,"LineDashedMaterial",()=>aT),e(t.exports,"Loader",()=>aN),e(t.exports,"FileLoader",()=>aB),e(t.exports,"InstancedBufferGeometry",()=>az),e(t.exports,"Spherical",()=>aK),e(t.exports,"GridHelper",()=>aJ),e(t.exports,"ArrowHelper",()=>aQ),e(t.exports,"ShapePath",()=>a1);let s={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},l=0,h=1,u=2,c=1006,d=3201,p="srgb",f="srgb-linear",m="display-p3",g="display-p3-linear",v="linear",_="srgb",x="rec709",y="300 es";class S{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let n=this._listeners[e];if(void 0!==n){let e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let n=t.slice(0);for(let t=0,r=n.length;t>8&255]+M[e>>16&255]+M[e>>24&255]+"-"+M[255&t]+M[t>>8&255]+"-"+M[t>>16&15|64]+M[t>>24&255]+"-"+M[63&n|128]+M[n>>8&255]+"-"+M[n>>16&255]+M[n>>24&255]+M[255&r]+M[r>>8&255]+M[r>>16&255]+M[r>>24&255]).toLowerCase()}function A(e,t,n){return Math.max(t,Math.min(n,e))}function R(e,t){return(e%t+t)%t}function C(e,t,n){return(1-n)*e+n*t}function P(e){return(e&e-1)==0&&0!==e}function U(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function L(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error("Invalid component type.")}}function q(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw Error("Invalid component type.")}}let D={DEG2RAD:T,RAD2DEG:E,generateUUID:w,clamp:A,euclideanModulo:R,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:C,damp:function(e,t,n,r){return C(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(R(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(b=e);let t=b+=1831565813;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*T},radToDeg:function(e){return e*E},isPowerOfTwo:P,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:U,setQuaternionFromProperEuler:function(e,t,n,r,i){let a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),h=a((t+r)/2),u=s((t+r)/2),c=a((t-r)/2),d=s((t-r)/2),p=a((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(o*u,l*c,l*d,o*h);break;case"YZY":e.set(l*d,o*u,l*c,o*h);break;case"ZXZ":e.set(l*c,l*d,o*u,o*h);break;case"XZX":e.set(o*u,l*f,l*p,o*h);break;case"YXY":e.set(l*p,o*u,l*f,o*h);break;case"ZYZ":e.set(l*f,l*p,o*u,o*h);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:q,denormalize:L};class I{constructor(e=0,t=0){I.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 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 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){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=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){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(A(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class O{constructor(e,t,n,r,i,a,s,o,l){O.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l)}set(e,t,n,r,i,a,s,o,l){let h=this.elements;return h[0]=e,h[1]=r,h[2]=s,h[3]=t,h[4]=i,h[5]=o,h[6]=n,h[7]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let 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){let n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],h=n[4],u=n[7],c=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],v=r[1],_=r[4],x=r[7],y=r[2],S=r[5],M=r[8];return i[0]=a*f+s*v+o*y,i[3]=a*m+s*_+o*S,i[6]=a*g+s*x+o*M,i[1]=l*f+h*v+u*y,i[4]=l*m+h*_+u*S,i[7]=l*g+h*x+u*M,i[2]=c*f+d*v+p*y,i[5]=c*m+d*_+p*S,i[8]=c*g+d*x+p*M,this}multiplyScalar(e){let 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(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],h=e[8];return t*a*h-t*s*l-n*i*h+n*s*o+r*i*l-r*a*o}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],h=e[8],u=h*a-s*l,c=s*o-h*i,d=l*i-a*o,p=t*u+n*c+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);let f=1/p;return e[0]=u*f,e[1]=(r*l-h*n)*f,e[2]=(s*n-r*a)*f,e[3]=c*f,e[4]=(h*t-r*o)*f,e[5]=(r*i-s*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*i)*f,this}transpose(){let e;let 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){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,s){let o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-r*l,r*o,-r*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(N.makeScale(e,t)),this}rotate(e){return this.premultiply(N.makeRotation(-e)),this}translate(e,t){return this.premultiply(N.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){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}let N=new O;function F(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function k(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;let B={};function z(e){e in B||(B[e]=!0,console.warn(e))}let G=new O().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),V=new O().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),H={[f]:{transfer:v,primaries:x,toReference:e=>e,fromReference:e=>e},[p]:{transfer:_,primaries:x,toReference:e=>e.convertSRGBToLinear(),fromReference:e=>e.convertLinearToSRGB()},[g]:{transfer:v,primaries:"p3",toReference:e=>e.applyMatrix3(V),fromReference:e=>e.applyMatrix3(G)},[m]:{transfer:_,primaries:"p3",toReference:e=>e.convertSRGBToLinear().applyMatrix3(V),fromReference:e=>e.applyMatrix3(G).convertLinearToSRGB()}},W=new Set([f,g]),X={enabled:!0,_workingColorSpace:f,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(legacyMode){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!legacyMode},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(colorSpace){if(!W.has(colorSpace))throw Error(`Unsupported working color space, "${colorSpace}".`);this._workingColorSpace=colorSpace},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;let r=H[t].toReference;return(0,H[n].fromReference)(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this._workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this._workingColorSpace)},getPrimaries:function(e){return H[e].primaries},getTransfer:function(e){return""===e?v:H[e].transfer}};function j(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Y(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Z{static getDataURL(e){let t;if(/^data:/i.test(e.src)||"undefined"==typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)t=e;else{void 0===r&&(r=k("canvas")),r.width=e.width,r.height=e.height;let n=r.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=r}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("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){let t=k("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return z("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===p?3001:3e3}set encoding(e){z("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=3001===e?p:""}}ee.DEFAULT_IMAGE=null,ee.DEFAULT_MAPPING=300,ee.DEFAULT_ANISOTROPY=1;class et{constructor(e=0,t=0,n=0,r=1){et.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw 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 Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){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){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r;let i=e.elements,a=i[0],s=i[4],o=i[8],l=i[1],h=i[5],u=i[9],c=i[2],d=i[6],p=i[10];if(.01>Math.abs(s-l)&&.01>Math.abs(o-c)&&.01>Math.abs(u-d)){if(.1>Math.abs(s+l)&&.1>Math.abs(o+c)&&.1>Math.abs(u+d)&&.1>Math.abs(a+h+p-3))return this.set(1,0,0,0),this;let e=(a+1)/2,i=(h+1)/2,f=(p+1)/2,m=(s+l)/4,g=(o+c)/4,v=(u+d)/4;return e>i&&e>f?e<.01?(t=0,n=.707106781,r=.707106781):(n=m/(t=Math.sqrt(e)),r=g/t):i>f?i<.01?(t=.707106781,n=0,r=.707106781):(t=m/(n=Math.sqrt(i)),r=v/n):f<.01?(t=.707106781,n=.707106781,r=0):(t=g/(r=Math.sqrt(f)),n=v/r),this.set(t,n,r,Math.PI),this}let f=Math.sqrt((d-u)*(d-u)+(o-c)*(o-c)+(l-s)*(l-s));return .001>Math.abs(f)&&(f=1),this.x=(d-u)/f,this.y=(o-c)/f,this.z=(l-s)/f,this.w=Math.acos((a+h+p-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){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 en extends S{constructor(e=1,t=1,n={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new et(0,0,e,t),this.scissorTest=!1,this.viewport=new et(0,0,e,t),void 0!==n.encoding&&(z("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=3001===n.encoding?p:""),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:c,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},n),this.texture=new ee({width:e,height:t,depth:1},n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps,this.texture.internalFormat=n.internalFormat,this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}setSize(e,t,n=1){(this.width!==e||this.height!==t||this.depth!==n)&&(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;let t=Object.assign({},e.texture.image);return this.texture.source=new J(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class er extends en{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class ei extends ee{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ea{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,s){let o=n[r+0],l=n[r+1],h=n[r+2],u=n[r+3],c=i[a+0],d=i[a+1],p=i[a+2],f=i[a+3];if(0===s){e[t+0]=o,e[t+1]=l,e[t+2]=h,e[t+3]=u;return}if(1===s){e[t+0]=c,e[t+1]=d,e[t+2]=p,e[t+3]=f;return}if(u!==f||o!==c||l!==d||h!==p){let e=1-s,t=o*c+l*d+h*p+u*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){let i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,s=Math.sin(s*a)/i}let i=s*n;if(o=o*e+c*i,l=l*e+d*i,h=h*e+p*i,u=u*e+f*i,e===1-s){let e=1/Math.sqrt(o*o+l*l+h*h+u*u);o*=e,l*=e,h*=e,u*=e}}e[t]=o,e[t+1]=l,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let s=n[r],o=n[r+1],l=n[r+2],h=n[r+3],u=i[a],c=i[a+1],d=i[a+2],p=i[a+3];return e[t]=s*p+h*u+o*d-l*c,e[t+1]=o*p+h*c+l*u-s*d,e[t+2]=l*p+h*d+s*c-o*u,e[t+3]=h*p-s*u-o*c-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){let n=e._x,r=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),h=s(r/2),u=s(i/2),c=o(n/2),d=o(r/2),p=o(i/2);switch(a){case"XYZ":this._x=c*h*u+l*d*p,this._y=l*d*u-c*h*p,this._z=l*h*p+c*d*u,this._w=l*h*u-c*d*p;break;case"YXZ":this._x=c*h*u+l*d*p,this._y=l*d*u-c*h*p,this._z=l*h*p-c*d*u,this._w=l*h*u+c*d*p;break;case"ZXY":this._x=c*h*u-l*d*p,this._y=l*d*u+c*h*p,this._z=l*h*p+c*d*u,this._w=l*h*u-c*d*p;break;case"ZYX":this._x=c*h*u-l*d*p,this._y=l*d*u+c*h*p,this._z=l*h*p-c*d*u,this._w=l*h*u+c*d*p;break;case"YZX":this._x=c*h*u+l*d*p,this._y=l*d*u+c*h*p,this._z=l*h*p-c*d*u,this._w=l*h*u-c*d*p;break;case"XZY":this._x=c*h*u-l*d*p,this._y=l*d*u-c*h*p,this._z=l*h*p+c*d*u,this._w=l*h*u+c*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],h=t[6],u=t[10],c=n+s+u;if(c>0){let e=.5/Math.sqrt(c+1);this._w=.25/e,this._x=(h-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>u){let e=2*Math.sqrt(1+n-s-u);this._w=(h-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>u){let e=2*Math.sqrt(1+s-n-u);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+h)/e}else{let e=2*Math.sqrt(1+u-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+h)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x),this._w=n,this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(A(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);return 0===n||this.slerp(e,Math.min(1,t/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 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,h=t._w;return this._x=n*h+a*s+r*l-i*o,this._y=r*h+a*o+i*s-n*l,this._z=i*h+a*l+n*o-r*s,this._w=a*h-n*s-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);let n=this._x,r=this._y,i=this._z,a=this._w,s=a*e._w+n*e._x+r*e._y+i*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;let o=1-s*s;if(o<=Number.EPSILON){let e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(o),h=Math.atan2(l,s),u=Math.sin((1-t)*h)/l,c=Math.sin(t*h)/l;return this._w=a*u+this._w*c,this._x=n*u+this._x*c,this._y=r*u+this._y*c,this._z=i*u+this._z*c,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}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}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 es{constructor(e=0,t=0,n=0){es.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw 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 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(el.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(el.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*r-s*n),h=2*(s*t-i*r),u=2*(i*n-a*t);return this.x=t+o*l+a*u-s*h,this.y=n+o*h+s*l-i*u,this.z=r+o*u+i*h-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=r*o-i*s,this.y=i*a-n*o,this.z=n*s-r*a,this}projectOnVector(e){let t=e.lengthSq();if(0===t)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return eo.copy(this).projectOnVector(e),this.sub(eo)}reflect(e){return this.sub(eo.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(A(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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(){let e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}let eo=new es,el=new ea;class eh{constructor(e=new es(1/0,1/0,1/0),t=new es(-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,n=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,ec),ec.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ex),ey.subVectors(this.max,ex),ep.subVectors(e.a,ex),ef.subVectors(e.b,ex),em.subVectors(e.c,ex),eg.subVectors(ef,ep),ev.subVectors(em,ef),e_.subVectors(ep,em);let t=[0,-eg.z,eg.y,0,-ev.z,ev.y,0,-e_.z,e_.y,eg.z,0,-eg.x,ev.z,0,-ev.x,e_.z,0,-e_.x,-eg.y,eg.x,0,-ev.y,ev.x,0,-e_.y,e_.x,0];return!!(eb(t,ep,ef,em,ey)&&eb(t=[1,0,0,0,1,0,0,0,1],ep,ef,em,ey))&&(eS.crossVectors(eg,ev),eb(t=[eS.x,eS.y,eS.z],ep,ef,em,ey))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ec).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(ec).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(eu[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),eu[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),eu[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),eu[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),eu[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),eu[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),eu[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),eu[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(eu)),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)}}let eu=[new es,new es,new es,new es,new es,new es,new es,new es],ec=new es,ed=new eh,ep=new es,ef=new es,em=new es,eg=new es,ev=new es,e_=new es,ex=new es,ey=new es,eS=new es,eM=new es;function eb(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){eM.fromArray(e,a);let s=i.x*Math.abs(eM.x)+i.y*Math.abs(eM.y)+i.z*Math.abs(eM.z),o=t.dot(eM),l=n.dot(eM),h=r.dot(eM);if(Math.max(-Math.max(o,l,h),Math.min(o,l,h))>s)return!1}return!0}let eT=new eh,eE=new es,ew=new es;class eA{constructor(e=new es,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;void 0!==t?n.copy(t):eT.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?e.makeEmpty():(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;eE.subVectors(e,this.center);let t=eE.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(eE,n/e),this.radius+=n}return this}union(e){return e.isEmpty()||(this.isEmpty()?this.copy(e):!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(ew.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(eE.copy(e.center).add(ew)),this.expandByPoint(eE.copy(e.center).sub(ew)))),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}let eR=new es,eC=new es,eP=new es,eU=new es,eL=new es,eq=new es,eD=new es;class eI{constructor(e=new es,t=new es(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,eR)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=eR.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(eR.copy(this.origin).addScaledVector(this.direction,t),eR.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){let i,a,s,o;eC.copy(e).add(t).multiplyScalar(.5),eP.copy(t).sub(e).normalize(),eU.copy(this.origin).sub(eC);let l=.5*e.distanceTo(t),h=-this.direction.dot(eP),u=eU.dot(this.direction),c=-eU.dot(eP),d=eU.lengthSq(),p=Math.abs(1-h*h);if(p>0){if(i=h*c-u,a=h*u-c,o=l*p,i>=0){if(a>=-o){if(a<=o){let e=1/p;i*=e,a*=e,s=i*(i+h*a+2*u)+a*(h*i+a+2*c)+d}else s=-(i=Math.max(0,-(h*(a=l)+u)))*i+a*(a+2*c)+d}else s=-(i=Math.max(0,-(h*(a=-l)+u)))*i+a*(a+2*c)+d}else a<=-o?(a=(i=Math.max(0,-(-h*l+u)))>0?-l:Math.min(Math.max(-l,-c),l),s=-i*i+a*(a+2*c)+d):a<=o?(i=0,s=(a=Math.min(Math.max(-l,-c),l))*(a+2*c)+d):(a=(i=Math.max(0,-(h*l+u)))>0?l:Math.min(Math.max(-l,-c),l),s=-i*i+a*(a+2*c)+d)}else a=h>0?-l:l,s=-(i=Math.max(0,-(h*a+u)))*i+a*(a+2*c)+d;return n&&n.copy(this.origin).addScaledVector(this.direction,i),r&&r.copy(eC).addScaledVector(eP,a),s}intersectSphere(e,t){eR.subVectors(e.center,this.origin);let n=eR.dot(this.direction),r=eR.dot(eR)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return!!(0===t||e.normal.dot(this.direction)*t<0)}intersectBox(e,t){let n,r,i,a,s,o;let l=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,c=this.origin;return(l>=0?(n=(e.min.x-c.x)*l,r=(e.max.x-c.x)*l):(n=(e.max.x-c.x)*l,r=(e.min.x-c.x)*l),h>=0?(i=(e.min.y-c.y)*h,a=(e.max.y-c.y)*h):(i=(e.max.y-c.y)*h,a=(e.min.y-c.y)*h),n>a||i>r)?null:((i>n||isNaN(n))&&(n=i),(a=0?(s=(e.min.z-c.z)*u,o=(e.max.z-c.z)*u):(s=(e.max.z-c.z)*u,o=(e.min.z-c.z)*u),n>o||s>r)?null:((s>n||n!=n)&&(n=s),(o=0?n:r,t)}intersectsBox(e){return null!==this.intersectBox(e,eR)}intersectTriangle(e,t,n,r,i){let a;eL.subVectors(t,e),eq.subVectors(n,e),eD.crossVectors(eL,eq);let s=this.direction.dot(eD);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}eU.subVectors(this.origin,e);let o=a*this.direction.dot(eq.crossVectors(eU,eq));if(o<0)return null;let l=a*this.direction.dot(eL.cross(eU));if(l<0||o+l>s)return null;let h=-a*eU.dot(eD);return h<0?null:this.at(h/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class eO{constructor(e,t,n,r,i,a,s,o,l,h,u,c,d,p,f,m){eO.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l,h,u,c,d,p,f,m)}set(e,t,n,r,i,a,s,o,l,h,u,c,d,p,f,m){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=h,g[10]=u,g[14]=c,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new eO().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/eN.setFromMatrixColumn(e,0).length(),i=1/eN.setFromMatrixColumn(e,1).length(),a=1/eN.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(r),l=Math.sin(r),h=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){let e=a*h,n=a*u,r=s*h,i=s*u;t[0]=o*h,t[4]=-o*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*o}else if("YXZ"===e.order){let e=o*h,n=o*u,r=l*h,i=l*u;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*u,t[5]=a*h,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){let e=o*h,n=o*u,r=l*h,i=l*u;t[0]=e-i*s,t[4]=-a*u,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*h,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){let e=a*h,n=a*u,r=s*h,i=s*u;t[0]=o*h,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){let e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*h,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*h,t[9]=-s*h,t[2]=-l*h,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){let e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*h,t[4]=-u,t[8]=l*h,t[1]=e*u+i,t[5]=a*h,t[9]=n*u-r,t[2]=r*u-n,t[6]=s*h,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ek,e,eB)}lookAt(e,t,n){let r=this.elements;return eV.subVectors(e,t),0===eV.lengthSq()&&(eV.z=1),eV.normalize(),ez.crossVectors(n,eV),0===ez.lengthSq()&&(1===Math.abs(n.z)?eV.x+=1e-4:eV.z+=1e-4,eV.normalize(),ez.crossVectors(n,eV)),ez.normalize(),eG.crossVectors(eV,ez),r[0]=ez.x,r[4]=eG.x,r[8]=eV.x,r[1]=ez.y,r[5]=eG.y,r[9]=eV.y,r[2]=ez.z,r[6]=eG.z,r[10]=eV.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],h=n[1],u=n[5],c=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],_=n[7],x=n[11],y=n[15],S=r[0],M=r[4],b=r[8],T=r[12],E=r[1],w=r[5],A=r[9],R=r[13],C=r[2],P=r[6],U=r[10],L=r[14],q=r[3],D=r[7],I=r[11],O=r[15];return i[0]=a*S+s*E+o*C+l*q,i[4]=a*M+s*w+o*P+l*D,i[8]=a*b+s*A+o*U+l*I,i[12]=a*T+s*R+o*L+l*O,i[1]=h*S+u*E+c*C+d*q,i[5]=h*M+u*w+c*P+d*D,i[9]=h*b+u*A+c*U+d*I,i[13]=h*T+u*R+c*L+d*O,i[2]=p*S+f*E+m*C+g*q,i[6]=p*M+f*w+m*P+g*D,i[10]=p*b+f*A+m*U+g*I,i[14]=p*T+f*R+m*L+g*O,i[3]=v*S+_*E+x*C+y*q,i[7]=v*M+_*w+x*P+y*D,i[11]=v*b+_*A+x*U+y*I,i[15]=v*T+_*R+x*L+y*O,this}multiplyScalar(e){let 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(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],h=e[2],u=e[6],c=e[10],d=e[14],p=e[3];return p*(+i*o*u-r*l*u-i*s*c+n*l*c+r*s*d-n*o*d)+e[7]*(+t*o*d-t*l*c+i*a*c-r*a*d+r*l*h-i*o*h)+e[11]*(+t*l*u-t*s*d-i*a*u+n*a*d+i*s*h-n*l*h)+e[15]*(-r*s*h-t*o*u+t*s*c+r*a*u-n*a*c+n*o*h)}transpose(){let e;let t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],h=e[8],u=e[9],c=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],v=u*m*l-f*c*l+f*o*d-s*m*d-u*o*g+s*c*g,_=p*c*l-h*m*l-p*o*d+a*m*d+h*o*g-a*c*g,x=h*f*l-p*u*l+p*s*d-a*f*d-h*s*g+a*u*g,y=p*u*o-h*f*o-p*s*c+a*f*c+h*s*m-a*u*m,S=t*v+n*_+r*x+i*y;if(0===S)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let M=1/S;return e[0]=v*M,e[1]=(f*c*i-u*m*i-f*r*d+n*m*d+u*r*g-n*c*g)*M,e[2]=(s*m*i-f*o*i+f*r*l-n*m*l-s*r*g+n*o*g)*M,e[3]=(u*o*i-s*c*i-u*r*l+n*c*l+s*r*d-n*o*d)*M,e[4]=_*M,e[5]=(h*m*i-p*c*i+p*r*d-t*m*d-h*r*g+t*c*g)*M,e[6]=(p*o*i-a*m*i-p*r*l+t*m*l+a*r*g-t*o*g)*M,e[7]=(a*c*i-h*o*i+h*r*l-t*c*l-a*r*d+t*o*d)*M,e[8]=x*M,e[9]=(p*u*i-h*f*i-p*n*d+t*f*d+h*n*g-t*u*g)*M,e[10]=(a*f*i-p*s*i+p*n*l-t*f*l-a*n*g+t*s*g)*M,e[11]=(h*s*i-a*u*i-h*n*l+t*u*l+a*n*d-t*s*d)*M,e[12]=y*M,e[13]=(h*f*r-p*u*r+p*n*c-t*f*c-h*n*m+t*u*m)*M,e[14]=(p*s*r-a*f*r-p*n*o+t*f*o+a*n*m-t*s*m)*M,e[15]=(a*u*r-h*s*r+h*n*o-t*u*o-a*n*c+t*s*c)*M,this}scale(e){let t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,n){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,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,s=e.y,o=e.z,l=i*a,h=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,h*s+n,h*o-r*a,0,l*o-r*s,h*o+r*a,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,h=a+a,u=s+s,c=i*l,d=i*h,p=i*u,f=a*h,m=a*u,g=s*u,v=o*l,_=o*h,x=o*u,y=n.x,S=n.y,M=n.z;return r[0]=(1-(f+g))*y,r[1]=(d+x)*y,r[2]=(p-_)*y,r[3]=0,r[4]=(d-x)*S,r[5]=(1-(c+g))*S,r[6]=(m+v)*S,r[7]=0,r[8]=(p+_)*M,r[9]=(m-v)*M,r[10]=(1-(c+f))*M,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,i=eN.set(r[0],r[1],r[2]).length(),a=eN.set(r[4],r[5],r[6]).length(),s=eN.set(r[8],r[9],r[10]).length();0>this.determinant()&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],eF.copy(this);let o=1/i,l=1/a,h=1/s;return eF.elements[0]*=o,eF.elements[1]*=o,eF.elements[2]*=o,eF.elements[4]*=l,eF.elements[5]*=l,eF.elements[6]*=l,eF.elements[8]*=h,eF.elements[9]*=h,eF.elements[10]*=h,t.setFromRotationMatrix(eF),n.x=i,n.y=a,n.z=s,this}makePerspective(e,t,n,r,i,a,s=2e3){let o,l;let h=this.elements;if(2e3===s)o=-(a+i)/(a-i),l=-2*a*i/(a-i);else if(2001===s)o=-a/(a-i),l=-a*i/(a-i);else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return h[0]=2*i/(t-e),h[4]=0,h[8]=(t+e)/(t-e),h[12]=0,h[1]=0,h[5]=2*i/(n-r),h[9]=(n+r)/(n-r),h[13]=0,h[2]=0,h[6]=0,h[10]=o,h[14]=l,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(e,t,n,r,i,a,s=2e3){let o,l;let h=this.elements,u=1/(t-e),c=1/(n-r),d=1/(a-i);if(2e3===s)o=(a+i)*d,l=-2*d;else if(2001===s)o=i*d,l=-1*d;else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return h[0]=2*u,h[4]=0,h[8]=0,h[12]=-((t+e)*u),h[1]=0,h[5]=2*c,h[9]=0,h[13]=-((n+r)*c),h[2]=0,h[6]=0,h[10]=l,h[14]=-o,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}let eN=new es,eF=new eO,ek=new es(0,0,0),eB=new es(1,1,1),ez=new es,eG=new es,eV=new es,eH=new eO,eW=new ea;class eX{constructor(e=0,t=0,n=0,r=eX.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,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,n=!0){let r=e.elements,i=r[0],a=r[4],s=r[8],o=r[1],l=r[5],h=r[9],u=r[2],c=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(A(s,-1,1)),.9999999>Math.abs(s)?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(c,l),this._z=0);break;case"YXZ":this._x=Math.asin(-A(h,-1,1)),.9999999>Math.abs(h)?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(A(c,-1,1)),.9999999>Math.abs(c)?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-A(u,-1,1)),.9999999>Math.abs(u)?(this._x=Math.atan2(c,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(A(o,-1,1)),.9999999>Math.abs(o)?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-A(a,-1,1)),.9999999>Math.abs(a)?(this._x=Math.atan2(c,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-h,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return eH.makeRotationFromQuaternion(e),this.setFromRotationMatrix(eH,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return eW.setFromEuler(this),this.setFromQuaternion(eW,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}eX.DEFAULT_ORDER="XYZ";class ej{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(eQ,e,e1),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(eQ,e0,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let n=0,r=t.length;n0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),h.length>0&&(n.animations=h),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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)),!0===t)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){e8.subVectors(r,t),e9.subVectors(n,t),te.subVectors(e,t);let a=e8.dot(e8),s=e8.dot(e9),o=e8.dot(te),l=e9.dot(e9),h=e9.dot(te),u=a*l-s*s;if(0===u)return i.set(-2,-1,-1);let c=1/u,d=(l*o-s*h)*c,p=(a*h-s*o)*c;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,tt),tt.x>=0&&tt.y>=0&&tt.x+tt.y<=1}static getUV(e,t,n,r,i,a,s,o){return!1===tl&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),tl=!0),this.getInterpolation(e,t,n,r,i,a,s,o)}static getInterpolation(e,t,n,r,i,a,s,o){return this.getBarycoord(e,t,n,r,tt),o.setScalar(0),o.addScaledVector(i,tt.x),o.addScaledVector(a,tt.y),o.addScaledVector(s,tt.z),o}static isFrontFacing(e,t,n,r){return e8.subVectors(n,t),e9.subVectors(e,t),0>e8.cross(e9).dot(r)}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return e8.subVectors(this.c,this.b),e9.subVectors(this.a,this.b),.5*e8.cross(e9).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return th.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return th.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===tl&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),tl=!0),th.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return th.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return th.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return th.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n,r;let i=this.a,a=this.b,s=this.c;tn.subVectors(a,i),tr.subVectors(s,i),ta.subVectors(e,i);let o=tn.dot(ta),l=tr.dot(ta);if(o<=0&&l<=0)return t.copy(i);ts.subVectors(e,a);let h=tn.dot(ts),u=tr.dot(ts);if(h>=0&&u<=h)return t.copy(a);let c=o*u-h*l;if(c<=0&&o>=0&&h<=0)return n=o/(o-h),t.copy(i).addScaledVector(tn,n);to.subVectors(e,s);let d=tn.dot(to),p=tr.dot(to);if(p>=0&&d<=p)return t.copy(s);let f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return r=l/(l-p),t.copy(i).addScaledVector(tr,r);let m=h*p-d*u;if(m<=0&&u-h>=0&&d-p>=0)return ti.subVectors(s,a),r=(u-h)/(u-h+(d-p)),t.copy(a).addScaledVector(ti,r);let g=1/(m+f+c);return n=f*g,r=c*g,t.copy(i).addScaledVector(tn,n).addScaledVector(tr,r)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let tu={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},tc={h:0,s:0,l:0},td={h:0,s:0,l:0};function tp(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*6*(2/3-n):e}class tf{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){return void 0===t&&void 0===n?e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e):this.setRGB(e,t,n),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=p){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,X.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=X.workingColorSpace){return this.r=e,this.g=t,this.b=n,X.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=X.workingColorSpace){if(e=R(e,1),t=A(t,0,1),n=A(n,0,1),0===t)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=tp(i,r,e+1/3),this.g=tp(i,r,e),this.b=tp(i,r,e-1/3)}return X.toWorkingColorSpace(this,r),this}setStyle(e,t=p){let n;function r(t){void 0!==t&&1>parseFloat(t)&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;let a=n[1],s=n[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){let r=n[1],i=r.length;if(3===i)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(r,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=p){let n=tu[e.toLowerCase()];return void 0!==n?this.setHex(n,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=j(e.r),this.g=j(e.g),this.b=j(e.b),this}copyLinearToSRGB(e){return this.r=Y(e.r),this.g=Y(e.g),this.b=Y(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=p){return X.fromWorkingColorSpace(tm.copy(this),e),65536*Math.round(A(255*tm.r,0,255))+256*Math.round(A(255*tm.g,0,255))+Math.round(A(255*tm.b,0,255))}getHexString(e=p){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=X.workingColorSpace){let n,r;X.fromWorkingColorSpace(tm.copy(this),t);let i=tm.r,a=tm.g,s=tm.b,o=Math.max(i,a,s),l=Math.min(i,a,s),h=(l+o)/2;if(l===o)n=0,r=0;else{let e=o-l;switch(r=h<=.5?e/(o+l):e/(2-o-l),o){case i:n=(a-s)/e+(a0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(let t in e){let n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(void 0===r){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});let n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),this.side!==l&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),204!==this.blendSrc&&(n.blendSrc=this.blendSrc),205!==this.blendDst&&(n.blendDst=this.blendDst),100!==this.blendEquation&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),7680!==this.stencilFail&&(n.stencilFail=this.stencilFail),7680!==this.stencilZFail&&(n.stencilZFail=this.stencilZFail),7680!==this.stencilZPass&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}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;let t=e.clippingPlanes,n=null;if(null!==t){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.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){!0===e&&this.version++}}class t_ extends tv{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new tf(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}let tx=new es,ty=new I;class tS{constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=35044,this.updateRange={offset:0,count:-1},this.gpuType=1015,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){let t=this.parameters;for(let n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.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;let t={};this.name=e.name;let n=e.index;null!==n&&this.setIndex(n.clone(t));let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2)||(tq.copy(i).invert(),tD.copy(e.ray).applyMatrix4(tq),null!==n.boundingBox&&!1===tD.intersectsBox(n.boundingBox)))return;this._computeIntersections(e,t,tD)}}_computeIntersections(e,t,n){let r;let i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,h=i.attributes.uv1,u=i.attributes.normal,c=i.groups,d=i.drawRange;if(null!==s){if(Array.isArray(a))for(let i=0,o=c.length;in.far?null:{distance:u,point:tZ.clone(),object:e}}(e,t,n,r,tN,tF,tk,tY);if(d){i&&(tG.fromBufferAttribute(i,o),tV.fromBufferAttribute(i,u),tH.fromBufferAttribute(i,c),d.uv=th.getInterpolation(tY,tN,tF,tk,tG,tV,tH,new I)),a&&(tG.fromBufferAttribute(a,o),tV.fromBufferAttribute(a,u),tH.fromBufferAttribute(a,c),d.uv1=th.getInterpolation(tY,tN,tF,tk,tG,tV,tH,new I),d.uv2=d.uv1),s&&(tW.fromBufferAttribute(s,o),tX.fromBufferAttribute(s,u),tj.fromBufferAttribute(s,c),d.normal=th.getInterpolation(tY,tN,tF,tk,tW,tX,tj,new es),d.normal.dot(r.direction)>0&&d.normal.multiplyScalar(-1));let e={a:o,b:u,c:c,normal:new es,materialIndex:0};th.getNormal(tN,tF,tk,e.normal),d.face=e}return d}class t$ extends tL{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let s=this;r=Math.floor(r),i=Math.floor(i);let o=[],l=[],h=[],u=[],c=0,d=0;function p(e,t,n,r,i,a,p,f,m,g,v){let _=a/m,x=p/g,y=a/2,S=p/2,M=f/2,b=m+1,T=g+1,E=0,w=0,A=new es;for(let a=0;a0?1:-1,h.push(A.x,A.y,A.z),u.push(o/m),u.push(1-a/g),E+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class t4 extends e7{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new eO,this.projectionMatrix=new eO,this.projectionMatrixInverse=new eO,this.coordinateSystem=2e3}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)}}class t5 extends t4{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=2*E*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(.5*T*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*E*Math.atan(Math.tan(.5*T*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(.5*T*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){let e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/s,r*=a.width/e,n*=a.height/s}let s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class t6 extends e7{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new t5(-90,1,e,t);r.layers=this.layers,this.add(r);let i=new t5(-90,1,e,t);i.layers=this.layers,this.add(i);let a=new t5(-90,1,e,t);a.layers=this.layers,this.add(a);let s=new t5(-90,1,e,t);s.layers=this.layers,this.add(s);let o=new t5(-90,1,e,t);o.layers=this.layers,this.add(o);let l=new t5(-90,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,s,o]=t;for(let e of t)this.remove(e);if(2e3===e)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else if(2001===e)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1);else throw Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,s,o,l,h]=this.children,u=e.getRenderTarget(),c=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,s),e.setRenderTarget(n,3,r),e.render(t,o),e.setRenderTarget(n,4,r),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,r),e.render(t,h),e.setRenderTarget(u,c,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class t7 extends ee{constructor(e,t,n,r,i,a,s,o,l,h){super(e=void 0!==e?e:[],t=void 0!==t?t:301,n,r,i,a,s,o,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class t8 extends er{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1};void 0!==t.encoding&&(z("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=3001===t.encoding?p:""),this.texture=new t7([n,n,n,n,n,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=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:c}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;let n={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 ); + + } + `},r=new t$(5,5,5),i=new t3({name:"CubemapFromEquirect",uniforms:tQ(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:h,blending:0});i.uniforms.tEquirect.value=t;let a=new tK(r,i),s=t.minFilter;return 1008===t.minFilter&&(t.minFilter=c),new t6(1,10,this).update(e,a),t.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,r){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}let t9=new es,ne=new es,nt=new O;class nn{constructor(e=new es(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,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let r=t9.subVectors(n,t).cross(ne.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let 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){let n=e.delta(t9),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;let i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||nt.getNormalMatrix(e),r=this.coplanarPoint(t9).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}let nr=new eA,ni=new es;class na{constructor(e=new nn,t=new nn,n=new nn,r=new nn,i=new nn,a=new nn){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3){let n=this.planes,r=e.elements,i=r[0],a=r[1],s=r[2],o=r[3],l=r[4],h=r[5],u=r[6],c=r[7],d=r[8],p=r[9],f=r[10],m=r[11],g=r[12],v=r[13],_=r[14],x=r[15];if(n[0].setComponents(o-i,c-l,m-d,x-g).normalize(),n[1].setComponents(o+i,c+l,m+d,x+g).normalize(),n[2].setComponents(o+a,c+h,m+p,x+v).normalize(),n[3].setComponents(o-a,c-h,m-p,x-v).normalize(),n[4].setComponents(o-s,c-u,m-f,x-_).normalize(),2e3===t)n[5].setComponents(o+s,c+u,m+f,x+_).normalize();else if(2001===t)n[5].setComponents(s,u,f,_).normalize();else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),nr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),nr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(nr)}intersectsSprite(e){return nr.center.set(0,0,0),nr.radius=.7071067811865476,nr.applyMatrix4(e.matrixWorld),this.intersectsSphere(nr)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,ni.y=r.normal.y>0?e.max.y:e.min.y,ni.z=r.normal.z>0?e.max.z:e.min.z,0>r.distanceToPoint(ni))return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(0>t[n].distanceToPoint(e))return!1;return!0}clone(){return new this.constructor().copy(this)}}function ns(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function no(e,t){let n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);let n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){let e=r.get(t);(!e||e.version 0\n vec4 plane;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n varying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n return dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_v0 0.339\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_v1 0.276\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_v4 0.046\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_v5 0.016\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_v6 0.0038\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n mat3 m = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n transformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n vec3( 0.8224621, 0.177538, 0.0 ),\n vec3( 0.0331941, 0.9668058, 0.0 ),\n vec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n vec3( 1.2249401, - 0.2249404, 0.0 ),\n vec3( - 0.0420569, 1.0420571, 0.0 ),\n vec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n 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 );\n}\nvec4 LinearToLinear( in vec4 value ) {\n return value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n return sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",fog_vertex:"#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n reflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid 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 ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n #if defined ( LEGACY_LIGHTS )\n if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n }\n return 1.0;\n #else\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n #endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid 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 ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid 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 ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid 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 ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n vec3 diffuseColor;\n float roughness;\n vec3 specularColor;\n float specularF90;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n 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 ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n float v = 0.5 / ( gv + gl );\n return saturate(v);\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColor;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n return saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid 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 ) {\n#else\nvoid 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 ) {\n#endif\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n 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 ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid 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 ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n #endif\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n #endif\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n #ifdef USE_LOGDEPTHBUF_EXT\n varying float vFragDepth;\n varying float vIsPerspective;\n #else\n uniform float logDepthBufFC;\n #endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n #ifdef USE_LOGDEPTHBUF_EXT\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n #else\n if ( isPerspectiveMatrix( projectionMatrix ) ) {\n gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n gl_Position.z *= gl_Position.w;\n }\n #endif\n#endif",map_fragment:"#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n 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 );\n \n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n uniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n #ifdef MORPHTARGETS_TEXTURE\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n #else\n objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n #endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n uniform float morphTargetBaseInfluence;\n #ifdef MORPHTARGETS_TEXTURE\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n #else\n #ifndef USE_MORPHNORMALS\n uniform float morphTargetInfluences[ 8 ];\n #else\n uniform float morphTargetInfluences[ 4 ];\n #endif\n #endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n #ifdef MORPHTARGETS_TEXTURE\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n #else\n transformed += morphTarget0 * morphTargetInfluences[ 0 ];\n transformed += morphTarget1 * morphTargetInfluences[ 1 ];\n transformed += morphTarget2 * morphTargetInfluences[ 2 ];\n transformed += morphTarget3 * morphTargetInfluences[ 3 ];\n #ifndef USE_MORPHNORMALS\n transformed += morphTarget4 * morphTargetInfluences[ 4 ];\n transformed += morphTarget5 * morphTargetInfluences[ 5 ];\n transformed += morphTarget6 * morphTargetInfluences[ 6 ];\n transformed += morphTarget7 * morphTargetInfluences[ 7 ];\n #endif\n #endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * PackFactors ), v );\n r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n return packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n float hard_shadow = step( compare , distribution.x );\n if (hard_shadow != 1.0 ) {\n float distance = compare - distribution.x ;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return shadow;\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n vec3 lightToPosition = shadowCoord.xyz;\n float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n return (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n uniform int boneTextureSize;\n mat4 getBoneMatrix( const in float i ) {\n float j = i * 4.0;\n float x = mod( j, float( boneTextureSize ) );\n float y = floor( j / float( boneTextureSize ) );\n float dx = 1.0 / float( boneTextureSize );\n float dy = 1.0 / float( boneTextureSize );\n y = dy * ( y + 0.5 );\n vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n mat4 bone = mat4( v1, v2, v3, v4 );\n return bone;\n }\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = inverseTransformDirection( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n 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 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include \n #include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include \n vec4 diffuseColor = vec4( 1.0 );\n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include \n #include \n #include \n #include \n #include \n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n #include \n vec4 diffuseColor = vec4( 1.0 );\n #include \n #include \n #include \n #include \n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include \n #include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vLineDistance = scale * lineDistance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include \n #include \n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include \n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n gl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include \n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include \n #include \n #include \n #include \n #include \n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include \n #include \n #include \n #include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include \n #include \n #include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n vec2 scale;\n scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include \n #include \n #include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n}"},nu={common:{diffuse:{value:new tf(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new O},alphaMap:{value:null},alphaMapTransform:{value:new O},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new O}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new O}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new O}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new O},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new O},normalScale:{value:new I(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new O},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new O}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new O}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new O}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new tf(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new tf(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new O},alphaTest:{value:0},uvTransform:{value:new O}},sprite:{diffuse:{value:new tf(16777215)},opacity:{value:1},center:{value:new I(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new O},alphaMap:{value:null},alphaMapTransform:{value:new O},alphaTest:{value:0}}},nc={basic:{uniforms:t1([nu.common,nu.specularmap,nu.envmap,nu.aomap,nu.lightmap,nu.fog]),vertexShader:nh.meshbasic_vert,fragmentShader:nh.meshbasic_frag},lambert:{uniforms:t1([nu.common,nu.specularmap,nu.envmap,nu.aomap,nu.lightmap,nu.emissivemap,nu.bumpmap,nu.normalmap,nu.displacementmap,nu.fog,nu.lights,{emissive:{value:new tf(0)}}]),vertexShader:nh.meshlambert_vert,fragmentShader:nh.meshlambert_frag},phong:{uniforms:t1([nu.common,nu.specularmap,nu.envmap,nu.aomap,nu.lightmap,nu.emissivemap,nu.bumpmap,nu.normalmap,nu.displacementmap,nu.fog,nu.lights,{emissive:{value:new tf(0)},specular:{value:new tf(1118481)},shininess:{value:30}}]),vertexShader:nh.meshphong_vert,fragmentShader:nh.meshphong_frag},standard:{uniforms:t1([nu.common,nu.envmap,nu.aomap,nu.lightmap,nu.emissivemap,nu.bumpmap,nu.normalmap,nu.displacementmap,nu.roughnessmap,nu.metalnessmap,nu.fog,nu.lights,{emissive:{value:new tf(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:nh.meshphysical_vert,fragmentShader:nh.meshphysical_frag},toon:{uniforms:t1([nu.common,nu.aomap,nu.lightmap,nu.emissivemap,nu.bumpmap,nu.normalmap,nu.displacementmap,nu.gradientmap,nu.fog,nu.lights,{emissive:{value:new tf(0)}}]),vertexShader:nh.meshtoon_vert,fragmentShader:nh.meshtoon_frag},matcap:{uniforms:t1([nu.common,nu.bumpmap,nu.normalmap,nu.displacementmap,nu.fog,{matcap:{value:null}}]),vertexShader:nh.meshmatcap_vert,fragmentShader:nh.meshmatcap_frag},points:{uniforms:t1([nu.points,nu.fog]),vertexShader:nh.points_vert,fragmentShader:nh.points_frag},dashed:{uniforms:t1([nu.common,nu.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:nh.linedashed_vert,fragmentShader:nh.linedashed_frag},depth:{uniforms:t1([nu.common,nu.displacementmap]),vertexShader:nh.depth_vert,fragmentShader:nh.depth_frag},normal:{uniforms:t1([nu.common,nu.bumpmap,nu.normalmap,nu.displacementmap,{opacity:{value:1}}]),vertexShader:nh.meshnormal_vert,fragmentShader:nh.meshnormal_frag},sprite:{uniforms:t1([nu.sprite,nu.fog]),vertexShader:nh.sprite_vert,fragmentShader:nh.sprite_frag},background:{uniforms:{uvTransform:{value:new O},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:nh.background_vert,fragmentShader:nh.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:nh.backgroundCube_vert,fragmentShader:nh.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:nh.cube_vert,fragmentShader:nh.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:nh.equirect_vert,fragmentShader:nh.equirect_frag},distanceRGBA:{uniforms:t1([nu.common,nu.displacementmap,{referencePosition:{value:new es},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:nh.distanceRGBA_vert,fragmentShader:nh.distanceRGBA_frag},shadow:{uniforms:t1([nu.lights,nu.fog,{color:{value:new tf(0)},opacity:{value:1}}]),vertexShader:nh.shadow_vert,fragmentShader:nh.shadow_frag}};nc.physical={uniforms:t1([nc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new O},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new O},clearcoatNormalScale:{value:new I(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new O},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new O},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new O},sheen:{value:0},sheenColor:{value:new tf(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new O},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new O},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new O},transmissionSamplerSize:{value:new I},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new O},attenuationDistance:{value:0},attenuationColor:{value:new tf(0)},specularColor:{value:new tf(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new O},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new O},anisotropyVector:{value:new I},anisotropyMap:{value:null},anisotropyMapTransform:{value:new O}}]),vertexShader:nh.meshphysical_vert,fragmentShader:nh.meshphysical_frag};let nd={r:0,b:0,g:0};function np(e,t,n,r,i,a,s){let o,u;let c=new tf(0),d=!0===a?0:1,p=null,f=0,m=null;function g(t,n){t.getRGB(nd,t0(e)),r.buffers.color.setClear(nd.r,nd.g,nd.b,n,s)}return{getClearColor:function(){return c},setClearColor:function(e,t=1){c.set(e),g(c,d=t)},getClearAlpha:function(){return d},setClearAlpha:function(e){g(c,d=e)},render:function(a,v){let x=!1,y=!0===v.isScene?v.background:null;y&&y.isTexture&&(y=(v.backgroundBlurriness>0?n:t).get(y)),null===y?g(c,d):y&&y.isColor&&(g(y,1),x=!0);let S=e.xr.getEnvironmentBlendMode();"additive"===S?r.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===S&&r.buffers.color.setClear(0,0,0,0,s),(e.autoClear||x)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),y&&(y.isCubeTexture||306===y.mapping)?(void 0===u&&((u=new tK(new t$(1,1,1),new t3({name:"BackgroundCubeMaterial",uniforms:tQ(nc.backgroundCube.uniforms),vertexShader:nc.backgroundCube.vertexShader,fragmentShader:nc.backgroundCube.fragmentShader,side:h,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=X.getTransfer(y.colorSpace)!==_,(p!==y||f!==y.version||m!==e.toneMapping)&&(u.material.needsUpdate=!0,p=y,f=y.version,m=e.toneMapping),u.layers.enableAll(),a.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(void 0===o&&((o=new tK(new nl(2,2),new t3({name:"BackgroundMaterial",uniforms:tQ(nc.background.uniforms),vertexShader:nc.background.vertexShader,fragmentShader:nc.background.fragmentShader,side:l,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(o)),o.material.uniforms.t2D.value=y,o.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,o.material.toneMapped=X.getTransfer(y.colorSpace)!==_,!0===y.matrixAutoUpdate&&y.updateMatrix(),o.material.uniforms.uvTransform.value.copy(y.matrix),(p!==y||f!==y.version||m!==e.toneMapping)&&(o.material.needsUpdate=!0,p=y,f=y.version,m=e.toneMapping),o.layers.enableAll(),a.unshift(o,o.geometry,o.material,0,0,null))}}}function nf(e,t,n,r){let i=e.getParameter(e.MAX_VERTEX_ATTRIBS),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),s=r.isWebGL2||null!==a,o={},l=p(null),h=l,u=!1;function c(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function d(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function p(e){let t=[],n=[],r=[];for(let e=0;e=0){let n=i[t],r=a[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n||n.attribute!==r||r&&n.data!==r.data)return!0;s++}return h.attributesNum!==s||h.index!==r}(i,x,d,y))&&function(e,t,n,r){let i={},a=t.attributes,s=0,o=n.getAttributes();for(let t in o)if(o[t].location>=0){let n=a[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}h.attributes=i,h.attributesNum=s,h.index=r}(i,x,d,y)}else{let e=!0===l.wireframe;(h.geometry!==x.id||h.program!==d.id||h.wireframe!==e)&&(h.geometry=x.id,h.program=d.id,h.wireframe=e,S=!0)}null!==y&&n.update(y,e.ELEMENT_ARRAY_BUFFER),(S||u)&&(u=!1,function(i,a,s,o){if(!1===r.isWebGL2&&(i.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();let l=o.attributes,h=s.getAttributes(),u=a.defaultAttributeValues;for(let t in h){let a=h[t];if(a.location>=0){let s=l[t];if(void 0===s&&("instanceMatrix"===t&&i.instanceMatrix&&(s=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(s=i.instanceColor)),void 0!==s){let t=s.normalized,l=s.itemSize,h=n.get(s);if(void 0===h)continue;let u=h.buffer,c=h.type,d=h.bytesPerElement,p=!0===r.isWebGL2&&(c===e.INT||c===e.UNSIGNED_INT||1013===s.gpuType);if(s.isInterleavedBufferAttribute){let n=s.data,r=n.stride,h=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let a="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name,s=void 0!==n.precision?n.precision:"highp",o=i(s);o!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",o,"instead."),s=o);let l=a||t.has("WEBGL_draw_buffers"),h=!0===n.logarithmicDepthBuffer,u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),c=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),_=c>0,x=a||t.has("OES_texture_float"),y=a?e.getParameter(e.MAX_SAMPLES):0;return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){let n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:s,logarithmicDepthBuffer:h,maxTextures:u,maxVertexTextures:c,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:_,floatFragmentTextures:x,floatVertexTextures:_&&x,maxSamples:y}}function nv(e){let t=this,n=null,r=0,i=!1,a=!1,s=new nn,o=new O,l={value:null,needsUpdate:!1};function h(e,n,r,i){let a=null!==e?e.length:0,h=null;if(0!==a){if(h=l.value,!0!==i||null===h){let t=r+4*a,i=n.matrixWorldInverse;o.getNormalMatrix(i),(null===h||h.length0),t.numPlanes=r,t.numIntersection=0)}}function n_(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){let n=e.target;n.removeEventListener("dispose",r);let i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){let a=i.mapping;if(303===a||304===a){if(t.has(i))return n(t.get(i).texture,i.mapping);{let a=i.image;if(!a||!(a.height>0))return null;{let s=new t8(a.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}}}}return i},dispose:function(){t=new WeakMap}}}let nx=[.125,.215,.35,.446,.526,.582],ny=new class extends t4{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=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=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,s=r+t,o=r-t;if(null!==this.view&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}},nS=new tf,nM=null,nb=0,nT=0,nE=(1+Math.sqrt(5))/2,nw=1/nE,nA=[new es(1,1,1),new es(-1,1,1),new es(1,1,-1),new es(-1,1,-1),new es(0,nE,nw),new es(0,nE,-nw),new es(nw,0,nE),new es(-nw,0,nE),new es(nE,nw,0),new es(-nE,nw,0)];class nR{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,n=.1,r=100){nM=this._renderer.getRenderTarget(),nb=this._renderer.getActiveCubeFace(),nT=this._renderer.getActiveMipmapLevel(),this._setSize(256);let i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=nL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=nU(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?o=nx[s-e+4-1]:0===s&&(o=0),r.push(o);let l=1/(a-2),h=-l,u=1+l,c=[h,h,u,h,u,u,h,h,u,u,h,u],d=new Float32Array(108),p=new Float32Array(72),f=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];d.set(r,18*e),p.set(c,12*e);let i=[e,e,e,e,e,e];f.set(i,6*e)}let m=new tL;m.setAttribute("position",new tS(d,3)),m.setAttribute("uv",new tS(p,2)),m.setAttribute("faceIndex",new tS(f,1)),t.push(m),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=new t3({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:new Float32Array(20)},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:new es(0,1,0)}},vertexShader:nq(),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:0,depthTest:!1,depthWrite:!1})}return r}_compileMaterial(e){let t=new tK(this._lodPlanes[0],e);this._renderer.compile(t,ny)}_sceneToCubeUV(e,t,n,r){let i=new t5(90,1,t,n),a=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,u=o.toneMapping;o.getClearColor(nS),o.toneMapping=0,o.autoClear=!1;let c=new t_({name:"PMREM.Background",side:h,depthWrite:!1,depthTest:!1}),d=new tK(new t$,c),p=!1,f=e.background;f?f.isColor&&(c.color.copy(f),e.background=null,p=!0):(c.color.copy(nS),p=!0);for(let t=0;t<6;t++){let n=t%3;0===n?(i.up.set(0,a[t],0),i.lookAt(s[t],0,0)):1===n?(i.up.set(0,0,a[t]),i.lookAt(0,s[t],0)):(i.up.set(0,a[t],0),i.lookAt(0,0,s[t]));let l=this._cubeSize;nP(r,n*l,t>2?l:0,l,l),o.setRenderTarget(r),p&&o.render(d,i),o.render(e,i)}d.geometry.dispose(),d.material.dispose(),o.toneMapping=u,o.autoClear=l,e.background=f}_textureToCubeUV(e,t){let n=this._renderer,r=301===e.mapping||302===e.mapping;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=nL()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=nU());let i=r?this._cubemapMaterial:this._equirectMaterial,a=new tK(this._lodPlanes[0],i);i.uniforms.envMap.value=e;let s=this._cubeSize;nP(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,ny)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);let m=[],g=0;for(let e=0;e<20;++e){let t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:ev-4?r-v+4:0),x,3*_,2*_),o.setRenderTarget(t),o.render(h,ny)}}function nC(e,t,n){let r=new er(e,t,n);return r.texture.mapping=306,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function nP(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function nU(){return new t3({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:nq(),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:0,depthTest:!1,depthWrite:!1})}function nL(){return new t3({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:nq(),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:0,depthTest:!1,depthWrite:!1})}function nq(){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 nD(e){let t=new WeakMap,n=null;function r(e){let n=e.target;n.removeEventListener("dispose",r);let i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){let a=i.mapping,s=303===a||304===a,o=301===a||302===a;if(s||o){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new nR(e)),r=s?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{let a=i.image;if(!(s&&a&&a.height>0||o&&a&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(a)))return null;{null===n&&(n=new nR(e));let a=s?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,a),i.addEventListener("dispose",r),a.texture}}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function nI(e){let t={};function n(n){let r;if(void 0!==t[n])return t[n];switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){let t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function nO(e,t,n,r){let i={},a=new WeakMap;function s(e){let o=e.target;for(let e in null!==o.index&&t.remove(o.index),o.attributes)t.remove(o.attributes[e]);for(let e in o.morphAttributes){let n=o.morphAttributes[e];for(let e=0,r=n.length;et.maxTextureSize&&(f=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let m=new Float32Array(p*f*4*i),g=new ei(m,p,f,i);g.type=1015,g.needsUpdate=!0;let v=4*d;for(let t=0;t0)return e;let i=t*n,a=nj[i];if(void 0===a&&(a=new Float32Array(i),nj[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function nQ(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n":" "} ${i}: ${n[e]}`)}return r.join("\n")}(e.getShaderSource(t),r)}}function rk(e){return""!==e}function rB(e,t){let n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function rz(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}let rG=/^[ \t]*#include +<([\w\d./]+)>/gm;function rV(e){return e.replace(rG,rW)}let rH=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function rW(e,t){let n=nh[t];if(void 0===n){let e=rH.get(t);if(void 0!==e)n=nh[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e);else throw Error("Can not resolve #include <"+t+">")}return rV(n)}let rX=/#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 rj(e){return e.replace(rX,rY)}function rY(e,t,n,r){let i="";for(let e=parseInt(t);e0&&(i+="\n"),(a=[E,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,w].filter(rk).join("\n")).length>0&&(a+="\n")):(i=[rZ(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,w,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+M:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+_:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif","\n"].filter(rk).join("\n"),a=[E,rZ(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,w,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+S:"",n.envMap?"#define "+M:"",n.envMap?"#define "+b:"",T?"#define CUBEUV_TEXEL_WIDTH "+T.texelWidth:"",T?"#define CUBEUV_TEXEL_HEIGHT "+T.texelHeight:"",T?"#define CUBEUV_MAX_MIP "+T.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+_:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?nh.tonemapping_pars_fragment:"",0!==n.toneMapping?function(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",nh.colorspace_pars_fragment,function(e,t){let n=function(e){let t;let n=X.getPrimaries(X.workingColorSpace),r=X.getPrimaries(e);switch(n===r?t="":"p3"===n&&r===x?t="LinearDisplayP3ToLinearSRGB":n===x&&"p3"===r&&(t="LinearSRGBToLinearDisplayP3"),e){case f:case g:return[t,"LinearTransferOETF"];case p:case m:return[t,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),[t,"LinearTransferOETF"]}}(t);return`vec4 ${e}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(rk).join("\n")),d=rz(d=rB(d=rV(d),n),n),v=rz(v=rB(v=rV(v),n),n),d=rj(d),v=rj(v),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(R="#version 300 es\n",i="precision mediump sampler2DArray;\n#define attribute in\n#define varying out\n#define texture2D texture\n"+i,a=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===y?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===y?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+a);let C=R+i+d,P=R+a+v,U=rO(u,u.VERTEX_SHADER,C),L=rO(u,u.FRAGMENT_SHADER,P);function q(t){if(e.debug.checkShaderErrors){let n=u.getProgramInfoLog(A).trim(),r=u.getShaderInfoLog(U).trim(),s=u.getShaderInfoLog(L).trim(),o=!0,l=!0;if(!1===u.getProgramParameter(A,u.LINK_STATUS)){if(o=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(u,A,U,L);else{let e=rF(u,U,"vertex"),t=rF(u,L,"fragment");console.error("THREE.WebGLProgram: Shader Error "+u.getError()+" - VALIDATE_STATUS "+u.getProgramParameter(A,u.VALIDATE_STATUS)+"\n\nProgram Info Log: "+n+"\n"+e+"\n"+t)}}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):(""===r||""===s)&&(l=!1);l&&(t.diagnostics={runnable:o,programLog:n,vertexShader:{log:r,prefix:i},fragmentShader:{log:s,prefix:a}})}u.deleteShader(U),u.deleteShader(L),s=new rI(u,A),o=function(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,K=a.clearcoat>0,J=a.iridescence>0,$=a.sheen>0,Q=a.transmission>0,ee=Z&&!!a.anisotropyMap,et=K&&!!a.clearcoatMap,en=K&&!!a.clearcoatNormalMap,er=K&&!!a.clearcoatRoughnessMap,ei=J&&!!a.iridescenceMap,ea=J&&!!a.iridescenceThicknessMap,es=$&&!!a.sheenColorMap,eo=$&&!!a.sheenRoughnessMap,el=!!a.specularMap,eh=!!a.specularColorMap,eu=!!a.specularIntensityMap,ec=Q&&!!a.transmissionMap,ed=Q&&!!a.thicknessMap,ep=!!a.gradientMap,ef=!!a.alphaMap,em=a.alphaTest>0,eg=!!a.alphaHash,ev=!!a.extensions,e_=!!A.attributes.uv1,ex=!!A.attributes.uv2,ey=!!A.attributes.uv3,eS=0;return a.toneMapped&&(null===I||!0===I.isXRRenderTarget)&&(eS=e.toneMapping),{isWebGL2:d,shaderID:U,shaderType:a.type,shaderName:a.name,vertexShader:M,fragmentShader:b,defines:a.defines,customVertexShaderID:T,customFragmentShaderID:E,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:g,instancing:O,instancingColor:O&&null!==S.instanceColor,supportsVertexTextures:m,outputColorSpace:null===I?e.outputColorSpace:!0===I.isXRRenderTarget?I.texture.colorSpace:f,map:N,matcap:F,envMap:k,envMapMode:k&&C.mapping,envMapCubeUVHeight:P,aoMap:B,lightMap:z,bumpMap:G,normalMap:V,displacementMap:m&&H,emissiveMap:W,normalMapObjectSpace:V&&1===a.normalMapType,normalMapTangentSpace:V&&0===a.normalMapType,metalnessMap:j,roughnessMap:Y,anisotropy:Z,anisotropyMap:ee,clearcoat:K,clearcoatMap:et,clearcoatNormalMap:en,clearcoatRoughnessMap:er,iridescence:J,iridescenceMap:ei,iridescenceThicknessMap:ea,sheen:$,sheenColorMap:es,sheenRoughnessMap:eo,specularMap:el,specularColorMap:eh,specularIntensityMap:eu,transmission:Q,transmissionMap:ec,thicknessMap:ed,gradientMap:ep,opaque:!1===a.transparent&&1===a.blending,alphaMap:ef,alphaTest:em,alphaHash:eg,combine:a.combine,mapUv:N&&x(a.map.channel),aoMapUv:B&&x(a.aoMap.channel),lightMapUv:z&&x(a.lightMap.channel),bumpMapUv:G&&x(a.bumpMap.channel),normalMapUv:V&&x(a.normalMap.channel),displacementMapUv:H&&x(a.displacementMap.channel),emissiveMapUv:W&&x(a.emissiveMap.channel),metalnessMapUv:j&&x(a.metalnessMap.channel),roughnessMapUv:Y&&x(a.roughnessMap.channel),anisotropyMapUv:ee&&x(a.anisotropyMap.channel),clearcoatMapUv:et&&x(a.clearcoatMap.channel),clearcoatNormalMapUv:en&&x(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:er&&x(a.clearcoatRoughnessMap.channel),iridescenceMapUv:ei&&x(a.iridescenceMap.channel),iridescenceThicknessMapUv:ea&&x(a.iridescenceThicknessMap.channel),sheenColorMapUv:es&&x(a.sheenColorMap.channel),sheenRoughnessMapUv:eo&&x(a.sheenRoughnessMap.channel),specularMapUv:el&&x(a.specularMap.channel),specularColorMapUv:eh&&x(a.specularColorMap.channel),specularIntensityMapUv:eu&&x(a.specularIntensityMap.channel),transmissionMapUv:ec&&x(a.transmissionMap.channel),thicknessMapUv:ed&&x(a.thicknessMap.channel),alphaMapUv:ef&&x(a.alphaMap.channel),vertexTangents:!!A.attributes.tangent&&(V||Z),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!A.attributes.color&&4===A.attributes.color.itemSize,vertexUv1s:e_,vertexUv2s:ex,vertexUv3s:ey,pointsUvs:!0===S.isPoints&&!!A.attributes.uv&&(N||ef),fog:!!w,useFog:!0===a.fog,fogExp2:w&&w.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:p,skinning:!0===S.isSkinnedMesh,morphTargets:void 0!==A.morphAttributes.position,morphNormals:void 0!==A.morphAttributes.normal,morphColors:void 0!==A.morphAttributes.color,morphTargetsCount:q,morphTextureStride:D,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:eS,useLegacyLights:e._useLegacyLights,decodeVideoTexture:N&&!0===a.map.isVideoTexture&&X.getTransfer(a.map.colorSpace)===_,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===u,flipSided:a.side===h,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:ev&&!0===a.extensions.derivatives,extensionFragDepth:ev&&!0===a.extensions.fragDepth,extensionDrawBuffers:ev&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:ev&&!0===a.extensions.shaderTextureLOD,rendererExtensionFragDepth:d||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(t){let n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(let e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(n.push(t.precision),n.push(t.outputColorSpace),n.push(t.envMapMode),n.push(t.envMapCubeUVHeight),n.push(t.mapUv),n.push(t.alphaMapUv),n.push(t.lightMapUv),n.push(t.aoMapUv),n.push(t.bumpMapUv),n.push(t.normalMapUv),n.push(t.displacementMapUv),n.push(t.emissiveMapUv),n.push(t.metalnessMapUv),n.push(t.roughnessMapUv),n.push(t.anisotropyMapUv),n.push(t.clearcoatMapUv),n.push(t.clearcoatNormalMapUv),n.push(t.clearcoatRoughnessMapUv),n.push(t.iridescenceMapUv),n.push(t.iridescenceThicknessMapUv),n.push(t.sheenColorMapUv),n.push(t.sheenRoughnessMapUv),n.push(t.specularMapUv),n.push(t.specularColorMapUv),n.push(t.specularIntensityMapUv),n.push(t.transmissionMapUv),n.push(t.thicknessMapUv),n.push(t.combine),n.push(t.fogExp2),n.push(t.sizeAttenuation),n.push(t.morphTargetsCount),n.push(t.morphAttributeCount),n.push(t.numDirLights),n.push(t.numPointLights),n.push(t.numSpotLights),n.push(t.numSpotLightMaps),n.push(t.numHemiLights),n.push(t.numRectAreaLights),n.push(t.numDirLightShadows),n.push(t.numPointLightShadows),n.push(t.numSpotLightShadows),n.push(t.numSpotLightShadowsWithMaps),n.push(t.numLightProbes),n.push(t.shadowMapType),n.push(t.toneMapping),n.push(t.numClippingPlanes),n.push(t.numClipIntersection),n.push(t.depthPacking),o.disableAll(),t.isWebGL2&&o.enable(0),t.supportsVertexTextures&&o.enable(1),t.instancing&&o.enable(2),t.instancingColor&&o.enable(3),t.matcap&&o.enable(4),t.envMap&&o.enable(5),t.normalMapObjectSpace&&o.enable(6),t.normalMapTangentSpace&&o.enable(7),t.clearcoat&&o.enable(8),t.iridescence&&o.enable(9),t.alphaTest&&o.enable(10),t.vertexColors&&o.enable(11),t.vertexAlphas&&o.enable(12),t.vertexUv1s&&o.enable(13),t.vertexUv2s&&o.enable(14),t.vertexUv3s&&o.enable(15),t.vertexTangents&&o.enable(16),t.anisotropy&&o.enable(17),t.alphaHash&&o.enable(18),n.push(o.mask),o.disableAll(),t.fog&&o.enable(0),t.useFog&&o.enable(1),t.flatShading&&o.enable(2),t.logarithmicDepthBuffer&&o.enable(3),t.skinning&&o.enable(4),t.morphTargets&&o.enable(5),t.morphNormals&&o.enable(6),t.morphColors&&o.enable(7),t.premultipliedAlpha&&o.enable(8),t.shadowMapEnabled&&o.enable(9),t.useLegacyLights&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.transmission&&o.enable(15),t.sheen&&o.enable(16),t.opaque&&o.enable(17),t.pointsUvs&&o.enable(18),t.decodeVideoTexture&&o.enable(19),n.push(o.mask),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){let t;let n=v[e.type];if(n){let e=nc[n];t=t2.clone(e.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e0?r.push(u):!0===s.transparent?i.push(u):n.push(u)},unshift:function(e,t,s,o,l,h){let u=a(e,t,s,o,l,h);s.transmission>0?r.unshift(u):!0===s.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||r2),r.length>1&&r.sort(t||r3),i.length>1&&i.sort(t||r3)}}}function r5(){let e=new WeakMap;return{get:function(t,n){let r;let i=e.get(t);return void 0===i?(r=new r4,e.set(t,[r])):n>=i.length?(r=new r4,i.push(r)):r=i[n],r},dispose:function(){e=new WeakMap}}}function r6(){let e={};return{get:function(t){let n;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":n={direction:new es,color:new tf};break;case"SpotLight":n={position:new es,direction:new es,color:new tf,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new es,color:new tf,distance:0,decay:0};break;case"HemisphereLight":n={direction:new es,skyColor:new tf,groundColor:new tf};break;case"RectAreaLight":n={color:new tf,position:new es,halfWidth:new es,halfHeight:new es}}return e[t.id]=n,n}}}let r7=0;function r8(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function r9(e,t){let n=new r6,r=function(){let e={};return{get:function(t){let n;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new I};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new I,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,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 e=0;e<9;e++)i.probe.push(new es);let a=new es,s=new eO,o=new eO;return{setup:function(a,s){let o=0,l=0,h=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,c=0,d=0,p=0,f=0,m=0,g=0,v=0,_=0,x=0,y=0;a.sort(r8);let S=!0===s?Math.PI:1;for(let e=0,t=a.length;e0&&(t.isWebGL2?(i.rectAreaLTC1=nu.LTC_FLOAT_1,i.rectAreaLTC2=nu.LTC_FLOAT_2):!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=nu.LTC_FLOAT_1,i.rectAreaLTC2=nu.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=nu.LTC_HALF_1,i.rectAreaLTC2=nu.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=o,i.ambient[1]=l,i.ambient[2]=h;let M=i.hash;(M.directionalLength!==u||M.pointLength!==c||M.spotLength!==d||M.rectAreaLength!==p||M.hemiLength!==f||M.numDirectionalShadows!==m||M.numPointShadows!==g||M.numSpotShadows!==v||M.numSpotMaps!==_||M.numLightProbes!==y)&&(i.directional.length=u,i.spot.length=d,i.rectArea.length=p,i.point.length=c,i.hemi.length=f,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=v+_-x,i.spotLightMap.length=_,i.numSpotLightShadowsWithMaps=x,i.numLightProbes=y,M.directionalLength=u,M.pointLength=c,M.spotLength=d,M.rectAreaLength=p,M.hemiLength=f,M.numDirectionalShadows=m,M.numPointShadows=g,M.numSpotShadows=v,M.numSpotMaps=_,M.numLightProbes=y,i.version=r7++)},setupView:function(e,t){let n=0,r=0,l=0,h=0,u=0,c=t.matrixWorldInverse;for(let t=0,d=e.length;t=s.length?(a=new ie(e,t),s.push(a)):a=s[i],a},dispose:function(){n=new WeakMap}}}class ir extends tv{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,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 ii extends tv{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}}function ia(e,t,n){let r=new na,i=new I,a=new I,s=new et,o=new ir({depthPacking:d}),c=new ii,p={},f=n.maxTextureSize,m={[l]:h,[h]:l,[u]:u},g=new t3({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new I},radius:{value:4}},vertexShader:"void main() {\n gl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n const float samples = float( VSM_SAMPLES );\n float mean = 0.0;\n float squared_mean = 0.0;\n float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n float uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n for ( float i = 0.0; i < samples; i ++ ) {\n float uvOffset = uvStart + i * uvStride;\n #ifdef HORIZONTAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean / samples;\n squared_mean = squared_mean / samples;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),v=g.clone();v.defines.HORIZONTAL_PASS=1;let _=new tL;_.setAttribute("position",new tS(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let x=new tK(_,g),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let S=this.type;function M(t,n,r,i){let a=null,s=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===r.isPointLight?c:o,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){let e=a.uuid,t=n.uuid,r=p[e];void 0===r&&(r={},p[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i),a=i}return a.visible=n.visible,a.wireframe=n.wireframe,3===i?a.side=null!==n.shadowSide?n.shadowSide:n.side:a.side=null!==n.shadowSide?n.shadowSide:m[n.side],a.alphaMap=n.alphaMap,a.alphaTest=n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=r),a}this.render=function(n,o,l){if(!1===y.enabled||!1===y.autoUpdate&&!1===y.needsUpdate||0===n.length)return;let h=e.getRenderTarget(),u=e.getActiveCubeFace(),c=e.getActiveMipmapLevel(),d=e.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);let p=3!==S&&3===this.type,m=3===S&&3!==this.type;for(let h=0,u=n.length;hf||i.y>f)&&(i.x>f&&(a.x=Math.floor(f/_.x),i.x=a.x*_.x,c.mapSize.x=a.x),i.y>f&&(a.y=Math.floor(f/_.y),i.y=a.y*_.y,c.mapSize.y=a.y)),null===c.map||!0===p||!0===m){let e=3!==this.type?{minFilter:1003,magFilter:1003}:{};null!==c.map&&c.map.dispose(),c.map=new er(i.x,i.y,e),c.map.texture.name=u.name+".shadowMap",c.camera.updateProjectionMatrix()}e.setRenderTarget(c.map),e.clear();let y=c.getViewportCount();for(let n=0;n=1:-1!==D.indexOf("OpenGL ES")&&(q=parseFloat(/^OpenGL ES (\d)/.exec(D)[1])>=2);let I=null,O={},N=e.getParameter(e.SCISSOR_BOX),F=e.getParameter(e.VIEWPORT),k=new et().fromArray(N),B=new et().fromArray(F);function z(t,n,i,a){let s=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;or||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){let r=t?U:Math.floor,a=r(i*e.width),s=r(i*e.height);void 0===o&&(o=M(a,s));let l=n?M(a,s):o;return l.width=a,l.height=s,l.getContext("2d").drawImage(e,0,0,a,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+s+")."),l}"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+").")}return e}function T(e){return P(e.width)&&P(e.height)}function E(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&e.minFilter!==c}function w(t){e.generateMipmap(t)}function A(n,r,i,a,s=!1){if(!1===l)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;if(r===e.RED&&(i===e.FLOAT&&(o=e.R32F),i===e.HALF_FLOAT&&(o=e.R16F),i===e.UNSIGNED_BYTE&&(o=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.R8UI),i===e.UNSIGNED_SHORT&&(o=e.R16UI),i===e.UNSIGNED_INT&&(o=e.R32UI),i===e.BYTE&&(o=e.R8I),i===e.SHORT&&(o=e.R16I),i===e.INT&&(o=e.R32I)),r===e.RG&&(i===e.FLOAT&&(o=e.RG32F),i===e.HALF_FLOAT&&(o=e.RG16F),i===e.UNSIGNED_BYTE&&(o=e.RG8)),r===e.RGBA){let t=s?v:X.getTransfer(a);i===e.FLOAT&&(o=e.RGBA32F),i===e.HALF_FLOAT&&(o=e.RGBA16F),i===e.UNSIGNED_BYTE&&(o=t===_?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(o=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(o=e.RGB5_A1)}return(o===e.R16F||o===e.R32F||o===e.RG16F||o===e.RG32F||o===e.RGBA16F||o===e.RGBA32F)&&t.get("EXT_color_buffer_float"),o}function R(e,t,n){return!0===E(e,n)||e.isFramebufferTexture&&1003!==e.minFilter&&e.minFilter!==c?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function C(t){return 1003===t||1004===t||1005===t?e.NEAREST:e.LINEAR}function L(e){let t=e.target;t.removeEventListener("dispose",L),function(e){let t=r.get(e);if(void 0===t.__webglInit)return;let n=e.source,i=y.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&D(e),0===Object.keys(i).length&&y.delete(n)}r.remove(e)}(t),t.isVideoTexture&&x.delete(t)}function q(t){let n=t.target;n.removeEventListener("dispose",q),function(t){let n=t.texture,i=r.get(t),a=r.get(n);if(void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),s.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(i.__webglFramebuffer[t]))for(let n=0;n0&&a.__version!==t.version){let e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(!1===e.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{V(a,t,i);return}}n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}let N={1e3:e.REPEAT,1001:e.CLAMP_TO_EDGE,1002:e.MIRRORED_REPEAT},F={1003:e.NEAREST,1004:e.NEAREST_MIPMAP_NEAREST,1005:e.NEAREST_MIPMAP_LINEAR,[c]:e.LINEAR,1007:e.LINEAR_MIPMAP_NEAREST,1008:e.LINEAR_MIPMAP_LINEAR},B={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function z(n,a,s){if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,N[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,N[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,N[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,F[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,F[a.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),(1001!==a.wrapS||1001!==a.wrapT)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,C(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,C(a.minFilter)),1003!==a.minFilter&&a.minFilter!==c&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,B[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){let s=t.get("EXT_texture_filter_anisotropic");1003!==a.magFilter&&(1005===a.minFilter||1008===a.minFilter)&&(1015!==a.type||!1!==t.has("OES_texture_float_linear"))&&(!1!==l||1016!==a.type||!1!==t.has("OES_texture_half_float_linear"))&&(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function G(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",L));let i=n.source,a=y.get(i);void 0===a&&(a={},y.set(i,a));let o=function(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(o!==t.__cacheKey){void 0===a[o]&&(a[o]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),a[o].usedTimes++;let i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&D(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function V(t,i,s){let o=e.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(o=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(o=e.TEXTURE_3D);let h=G(t,i),u=i.source;n.bindTexture(o,t.__webglTexture,e.TEXTURE0+s);let p=r.get(u);if(u.version!==p.__version||!0===h){let t;n.activeTexture(e.TEXTURE0+s);let r=X.getPrimaries(X.workingColorSpace),f=""===i.colorSpace?null:X.getPrimaries(i.colorSpace),m=""===i.colorSpace||r===f?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,m);let g=!l&&(1001!==i.wrapS||1001!==i.wrapT||1003!==i.minFilter&&i.minFilter!==c)&&!1===T(i.image),v=b(i.image,g,!1,d),_=T(v=J(i,v))||l,x=a.convert(i.format,i.colorSpace),y=a.convert(i.type),S=A(i.internalFormat,x,y,i.colorSpace,i.isVideoTexture);z(o,i,_);let M=i.mipmaps,C=l&&!0!==i.isVideoTexture,P=void 0===p.__version||!0===h,U=R(i,v,_);if(i.isDepthTexture)S=e.DEPTH_COMPONENT,l?S=1015===i.type?e.DEPTH_COMPONENT32F:1014===i.type?e.DEPTH_COMPONENT24:1020===i.type?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:1015===i.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===i.format&&S===e.DEPTH_COMPONENT&&1012!==i.type&&1014!==i.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=1014,y=a.convert(i.type)),1027===i.format&&S===e.DEPTH_COMPONENT&&(S=e.DEPTH_STENCIL,1020!==i.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=1020,y=a.convert(i.type))),P&&(C?n.texStorage2D(e.TEXTURE_2D,1,S,v.width,v.height):n.texImage2D(e.TEXTURE_2D,0,S,v.width,v.height,0,x,y,null));else if(i.isDataTexture){if(M.length>0&&_){C&&P&&n.texStorage2D(e.TEXTURE_2D,U,S,M[0].width,M[0].height);for(let r=0,i=M.length;r>=1,r>>=1}}}else if(M.length>0&&_){C&&P&&n.texStorage2D(e.TEXTURE_2D,U,S,M[0].width,M[0].height);for(let r=0,i=M.length;r>h),r=Math.max(1,i.height>>h);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,h,d,t,r,i.depth,0,u,c,null):n.texImage2D(l,h,d,t,r,0,u,c,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),K(i)?m.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,l,r.get(s).__webglTexture,0,Y(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,l,r.get(s).__webglTexture,h),n.bindFramebuffer(e.FRAMEBUFFER,null)}function W(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let i=!0===l?e.DEPTH_COMPONENT24:e.DEPTH_COMPONENT16;if(r||K(n)){let t=n.depthTexture;t&&t.isDepthTexture&&(1015===t.type?i=e.DEPTH_COMPONENT32F:1014===t.type&&(i=e.DEPTH_COMPONENT24));let r=Y(n);K(n)?m.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,i,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,r,i,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,i,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){let i=Y(n);r&&!1===K(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):K(n)?m.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{let t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function J(e,n){let r=e.colorSpace,i=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||1035===e.format||r!==f&&""!==r&&(X.getTransfer(r)===_?!1===l?!0===t.has("EXT_sRGB")&&1023===i?(e.format=1035,e.minFilter=c,e.generateMipmaps=!1):n=Z.sRGBToLinear(n):(1023!==i||1009!==a)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",r)),n}this.allocateTextureUnit=function(){let e=I;return e>=h&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+h),I+=1,e},this.resetTextureUnits=function(){I=0},this.setTexture2D=O,this.setTexture2DArray=function(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){V(a,t,i);return}n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){V(a,t,i);return}n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,i){let s=r.get(t);if(t.version>0&&s.__version!==t.version){(function(t,i,s){if(6!==i.image.length)return;let o=G(t,i),h=i.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+s);let c=r.get(h);if(h.version!==c.__version||!0===o){let t;n.activeTexture(e.TEXTURE0+s);let r=X.getPrimaries(X.workingColorSpace),d=""===i.colorSpace?null:X.getPrimaries(i.colorSpace),p=""===i.colorSpace||r===d?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);let f=i.isCompressedTexture||i.image[0].isCompressedTexture,m=i.image[0]&&i.image[0].isDataTexture,g=[];for(let e=0;e<6;e++)f||m?g[e]=m?i.image[e].image:i.image[e]:g[e]=b(i.image[e],!1,!0,u),g[e]=J(i,g[e]);let v=g[0],_=T(v)||l,x=a.convert(i.format,i.colorSpace),y=a.convert(i.type),S=A(i.internalFormat,x,y,i.colorSpace),M=l&&!0!==i.isVideoTexture,C=void 0===c.__version||!0===o,P=R(i,v,_);if(z(e.TEXTURE_CUBE_MAP,i,_),f){M&&C&&n.texStorage2D(e.TEXTURE_CUBE_MAP,P,S,v.width,v.height);for(let r=0;r<6;r++){t=g[r].mipmaps;for(let a=0;a0&&P++,n.texStorage2D(e.TEXTURE_CUBE_MAP,P,S,g[0].width,g[0].height));for(let r=0;r<6;r++)if(m){M?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,0,0,g[r].width,g[r].height,x,y,g[r].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,S,g[r].width,g[r].height,0,x,y,g[r].data);for(let i=0;i0){h.__webglFramebuffer[t]=[];for(let n=0;n0){h.__webglFramebuffer=[];for(let t=0;t0&&!1===K(t)){let r=d?o:[o];h.__webglMultisampledFramebuffer=e.createFramebuffer(),h.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,h.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0&&!1===K(t)){let i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,s=t.height,o=e.COLOR_BUFFER_BIT,l=[],h=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),c=!0===t.isWebGLMultipleRenderTargets;if(c)for(let t=0;t.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1);null!==s&&(null===(r=t.getPose(e.targetRaySpace,n))&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(ic)))}return null!==s&&(s.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){let n=new iu;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class ip extends ee{constructor(e,t,n,r,i,a,s,o,l,h){if(1026!==(h=void 0!==h?h:1026)&&1027!==h)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===h&&(n=1014),void 0===n&&1027===h&&(n=1020),super(null,r,i,a,s,o,h,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==s?s:1003,this.minFilter=void 0!==o?o:1003,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class im extends S{constructor(e,t){super();let n=this,r=null,i=1,a=null,s="local-floor",o=1,l=null,h=null,u=null,c=null,d=null,p=null,f=t.getContextAttributes(),m=null,g=null,v=[],_=[],x=new t5;x.layers.enable(1),x.viewport=new et;let y=new t5;y.layers.enable(2),y.viewport=new et;let S=[x,y],M=new ih;M.layers.enable(1),M.layers.enable(2);let b=null,T=null;function w(e){let t=_.indexOf(e.inputSource);if(-1===t)return;let n=v[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function A(){r.removeEventListener("select",w),r.removeEventListener("selectstart",w),r.removeEventListener("selectend",w),r.removeEventListener("squeeze",w),r.removeEventListener("squeezestart",w),r.removeEventListener("squeezeend",w),r.removeEventListener("end",A),r.removeEventListener("inputsourceschange",R);for(let e=0;e=0&&(_[r]=null,v[r].disconnect(n))}for(let t=0;t=_.length){_.push(n),r=e;break}if(null===_[e]){_[e]=n,r=e;break}}if(-1===r)break}let i=v[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return void 0===t&&(t=new id,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return void 0===t&&(t=new id,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return void 0===t&&(t=new id,v[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==c?c:d},this.getBinding=function(){return u},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(h){if(null!==(r=h)){if(m=e.getRenderTarget(),r.addEventListener("select",w),r.addEventListener("selectstart",w),r.addEventListener("selectend",w),r.addEventListener("squeeze",w),r.addEventListener("squeezestart",w),r.addEventListener("squeezeend",w),r.addEventListener("end",A),r.addEventListener("inputsourceschange",R),!0!==f.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){let n={antialias:void 0!==r.renderState.layers||f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),g=new er(d.framebufferWidth,d.framebufferHeight,{format:1023,type:1009,colorSpace:e.outputColorSpace,stencilBuffer:f.stencil})}else{let n=null,a=null,s=null;f.depth&&(s=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=f.stencil?1027:1026,a=f.stencil?1020:1014);let o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:i};c=(u=new XRWebGLBinding(r,t)).createProjectionLayer(o),r.updateRenderState({layers:[c]}),g=new er(c.textureWidth,c.textureHeight,{format:1023,type:1009,depthTexture:new ip(c.textureWidth,c.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0}),e.properties.get(g).__ignoreDepthValues=c.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await r.requestReferenceSpace(s),q.setContext(r),q.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};let C=new es,P=new es;function U(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;M.near=y.near=x.near=e.near,M.far=y.far=x.far=e.far,(b!==M.near||T!==M.far)&&(r.updateRenderState({depthNear:M.near,depthFar:M.far}),b=M.near,T=M.far);let t=e.parent,n=M.cameras;U(M,t);for(let e=0;e0&&(r.alphaTest.value=i.alphaTest);let a=t.get(i).envMap;if(a&&(r.envMap.value=a,r.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,r.reflectivity.value=i.reflectivity,r.ior.value=i.ior,r.refractionRatio.value=i.refractionRatio),i.lightMap){r.lightMap.value=i.lightMap;let t=!0===e._useLegacyLights?Math.PI:1;r.lightMapIntensity.value=i.lightMapIntensity*t,n(i.lightMap,r.lightMapTransform)}i.aoMap&&(r.aoMap.value=i.aoMap,r.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,r.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,t0(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,a,s,o){i.isMeshBasicMaterial?r(e,i):i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),i.gradientMap&&(e.gradientMap.value=i.gradientMap)):i.isMeshPhongMaterial?(r(e,i),e.specular.value.copy(i.specular),e.shininess.value=Math.max(i.shininess,1e-4)):i.isMeshStandardMaterial?(r(e,i),e.metalness.value=i.metalness,i.metalnessMap&&(e.metalnessMap.value=i.metalnessMap,n(i.metalnessMap,e.metalnessMapTransform)),e.roughness.value=i.roughness,i.roughnessMap&&(e.roughnessMap.value=i.roughnessMap,n(i.roughnessMap,e.roughnessMapTransform)),t.get(i).envMap&&(e.envMapIntensity.value=i.envMapIntensity),i.isMeshPhysicalMaterial&&(e.ior.value=i.ior,i.sheen>0&&(e.sheenColor.value.copy(i.sheenColor).multiplyScalar(i.sheen),e.sheenRoughness.value=i.sheenRoughness,i.sheenColorMap&&(e.sheenColorMap.value=i.sheenColorMap,n(i.sheenColorMap,e.sheenColorMapTransform)),i.sheenRoughnessMap&&(e.sheenRoughnessMap.value=i.sheenRoughnessMap,n(i.sheenRoughnessMap,e.sheenRoughnessMapTransform))),i.clearcoat>0&&(e.clearcoat.value=i.clearcoat,e.clearcoatRoughness.value=i.clearcoatRoughness,i.clearcoatMap&&(e.clearcoatMap.value=i.clearcoatMap,n(i.clearcoatMap,e.clearcoatMapTransform)),i.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=i.clearcoatRoughnessMap,n(i.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),i.clearcoatNormalMap&&(e.clearcoatNormalMap.value=i.clearcoatNormalMap,n(i.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(i.clearcoatNormalScale),i.side===h&&e.clearcoatNormalScale.value.negate())),i.iridescence>0&&(e.iridescence.value=i.iridescence,e.iridescenceIOR.value=i.iridescenceIOR,e.iridescenceThicknessMinimum.value=i.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=i.iridescenceThicknessRange[1],i.iridescenceMap&&(e.iridescenceMap.value=i.iridescenceMap,n(i.iridescenceMap,e.iridescenceMapTransform)),i.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=i.iridescenceThicknessMap,n(i.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),i.transmission>0&&(e.transmission.value=i.transmission,e.transmissionSamplerMap.value=o.texture,e.transmissionSamplerSize.value.set(o.width,o.height),i.transmissionMap&&(e.transmissionMap.value=i.transmissionMap,n(i.transmissionMap,e.transmissionMapTransform)),e.thickness.value=i.thickness,i.thicknessMap&&(e.thicknessMap.value=i.thicknessMap,n(i.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=i.attenuationDistance,e.attenuationColor.value.copy(i.attenuationColor)),i.anisotropy>0&&(e.anisotropyVector.value.set(i.anisotropy*Math.cos(i.anisotropyRotation),i.anisotropy*Math.sin(i.anisotropyRotation)),i.anisotropyMap&&(e.anisotropyMap.value=i.anisotropyMap,n(i.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=i.specularIntensity,e.specularColor.value.copy(i.specularColor),i.specularColorMap&&(e.specularColorMap.value=i.specularColorMap,n(i.specularColorMap,e.specularColorMapTransform)),i.specularIntensityMap&&(e.specularIntensityMap.value=i.specularIntensityMap,n(i.specularIntensityMap,e.specularIntensityMapTransform)))):i.isMeshMatcapMaterial?(r(e,i),i.matcap&&(e.matcap.value=i.matcap)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(e.diffuse.value.copy(i.color),e.opacity.value=i.opacity,i.map&&(e.map.value=i.map,n(i.map,e.mapTransform)),i.isLineDashedMaterial&&(e.dashSize.value=i.dashSize,e.totalSize.value=i.dashSize+i.gapSize,e.scale.value=i.scale)):i.isPointsMaterial?(e.diffuse.value.copy(i.color),e.opacity.value=i.opacity,e.size.value=i.size*a,e.scale.value=.5*s,i.map&&(e.map.value=i.map,n(i.map,e.uvTransform)),i.alphaMap&&(e.alphaMap.value=i.alphaMap,n(i.alphaMap,e.alphaMapTransform)),i.alphaTest>0&&(e.alphaTest.value=i.alphaTest)):i.isSpriteMaterial?(e.diffuse.value.copy(i.color),e.opacity.value=i.opacity,e.rotation.value=i.rotation,i.map&&(e.map.value=i.map,n(i.map,e.mapTransform)),i.alphaMap&&(e.alphaMap.value=i.alphaMap,n(i.alphaMap,e.alphaMapTransform)),i.alphaTest>0&&(e.alphaTest.value=i.alphaTest)):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function iv(e,t,n,r){let i={},a={},s=[],o=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(e){let t={boundary:0,storage:0};return"number"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function h(t){let n=t.target;n.removeEventListener("dispose",h);let r=s.indexOf(n.__bindingPointIndex);s.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}return{bind:function(e,t){let n=t.program;r.uniformBlockBinding(e,n)},update:function(n,u){let c=i[n.id];void 0===c&&(function(e){let t=e.uniforms,n=0,r=0;for(let e=0,i=t.length;e0){let e=16-(r=n%16);0!==r&&e-a.boundary<0&&(n+=16-r,i.__offset=n)}n+=a.storage}(r=n%16)>0&&(n+=16-r),e.__size=n,e.__cache={}}(n),c=function(t){let n=function(){for(let e=0;el.matrixWorld.determinant(),v=function(e,t,n,a,l){var h;!0!==t.isScene&&(t=ew),o.resetTextureUnits();let u=t.fog,p=a.isMeshStandardMaterial?t.environment:null,m=null===ee?K.outputColorSpace:!0===ee.isXRRenderTarget?ee.texture.colorSpace:f,g=(a.isMeshStandardMaterial?d:c).get(a.envMap||p),v=!0===a.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,_=!!n.attributes.tangent&&(!!a.normalMap||a.anisotropy>0),y=!!n.morphAttributes.position,S=!!n.morphAttributes.normal,b=!!n.morphAttributes.color,T=0;a.toneMapped&&(null===ee||!0===ee.isXRRenderTarget)&&(T=K.toneMapping);let w=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,A=void 0!==w?w.length:0,R=s.get(a),C=j.state.lights;if(!0===ey&&(!0===eS||e!==ei)){let t=e===ei&&a.id===en;M.setState(a,e,t)}let U=!1;a.version===R.__version?R.needsLights&&R.lightsStateVersion!==C.state.version?U=!0:R.outputColorSpace!==m?U=!0:l.isInstancedMesh&&!1===R.instancing?U=!0:l.isInstancedMesh||!0!==R.instancing?l.isSkinnedMesh&&!1===R.skinning?U=!0:l.isSkinnedMesh||!0!==R.skinning?l.isInstancedMesh&&!0===R.instancingColor&&null===l.instanceColor?U=!0:l.isInstancedMesh&&!1===R.instancingColor&&null!==l.instanceColor?U=!0:R.envMap!==g?U=!0:!0===a.fog&&R.fog!==u?U=!0:void 0!==R.numClippingPlanes&&(R.numClippingPlanes!==M.numPlanes||R.numIntersection!==M.numIntersection)?U=!0:R.vertexAlphas!==v?U=!0:R.vertexTangents!==_?U=!0:R.morphTargets!==y?U=!0:R.morphNormals!==S?U=!0:R.morphColors!==b?U=!0:R.toneMapping!==T?U=!0:!0===r.isWebGL2&&R.morphTargetsCount!==A&&(U=!0):U=!0:U=!0:(U=!0,R.__version=a.version);let L=R.currentProgram;!0===U&&(L=eW(a,t,l));let q=!1,D=!1,I=!1,O=L.getUniforms(),N=R.uniforms;if(i.useProgram(L.program)&&(q=!0,D=!0,I=!0),a.id!==en&&(en=a.id,D=!0),q||ei!==e){O.setValue(eR,"projectionMatrix",e.projectionMatrix),O.setValue(eR,"viewMatrix",e.matrixWorldInverse);let t=O.map.cameraPosition;void 0!==t&&t.setValue(eR,eE.setFromMatrixPosition(e.matrixWorld)),r.logarithmicDepthBuffer&&O.setValue(eR,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(a.isMeshPhongMaterial||a.isMeshToonMaterial||a.isMeshLambertMaterial||a.isMeshBasicMaterial||a.isMeshStandardMaterial||a.isShaderMaterial)&&O.setValue(eR,"isOrthographic",!0===e.isOrthographicCamera),ei!==e&&(ei=e,D=!0,I=!0)}if(l.isSkinnedMesh){O.setOptional(eR,l,"bindMatrix"),O.setOptional(eR,l,"bindMatrixInverse");let e=l.skeleton;e&&(r.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),O.setValue(eR,"boneTexture",e.boneTexture,o),O.setValue(eR,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}let F=n.morphAttributes;if((void 0!==F.position||void 0!==F.normal||void 0!==F.color&&!0===r.isWebGL2)&&E.update(l,n,L),(D||R.receiveShadow!==l.receiveShadow)&&(R.receiveShadow=l.receiveShadow,O.setValue(eR,"receiveShadow",l.receiveShadow)),a.isMeshGouraudMaterial&&null!==a.envMap&&(N.envMap.value=g,N.flipEnvMap.value=g.isCubeTexture&&!1===g.isRenderTargetTexture?-1:1),D&&(O.setValue(eR,"toneMappingExposure",K.toneMappingExposure),R.needsLights&&(h=I,N.ambientLightColor.needsUpdate=h,N.lightProbe.needsUpdate=h,N.directionalLights.needsUpdate=h,N.directionalLightShadows.needsUpdate=h,N.pointLights.needsUpdate=h,N.pointLightShadows.needsUpdate=h,N.spotLights.needsUpdate=h,N.spotLightShadows.needsUpdate=h,N.rectAreaLights.needsUpdate=h,N.hemisphereLights.needsUpdate=h),u&&!0===a.fog&&x.refreshFogUniforms(N,u),x.refreshMaterialUniforms(N,a,ep,ed,eM),rI.upload(eR,eX(R),N,o)),a.isShaderMaterial&&!0===a.uniformsNeedUpdate&&(rI.upload(eR,eX(R),N,o),a.uniformsNeedUpdate=!1),a.isSpriteMaterial&&O.setValue(eR,"center",l.center),O.setValue(eR,"modelViewMatrix",l.modelViewMatrix),O.setValue(eR,"normalMatrix",l.normalMatrix),O.setValue(eR,"modelMatrix",l.matrixWorld),a.isShaderMaterial||a.isRawShaderMaterial){let e=a.uniformsGroups;for(let t=0,n=e.length;t{function r(){if(i.forEach(function(e){s.get(e).currentProgram.isReady()&&i.delete(e)}),0===i.size){t(e);return}setTimeout(r,10)}null!==n.get("KHR_parallel_shader_compile")?r():setTimeout(r,10)})};let eF=null;function ek(){ez.stop()}function eB(){ez.start()}let ez=new ns;function eG(e,t,a,s){let l=e.opaque,c=e.transmissive,d=e.transparent;j.setupLightsView(a),!0===ey&&M.setGlobalState(K.clippingPlanes,a),c.length>0&&function(e,t,i,a){if(null!==(!0===i.isScene?i.overrideMaterial:null))return;let s=r.isWebGL2;null===eM&&(eM=new er(1,1,{generateMipmaps:!0,type:n.has("EXT_color_buffer_half_float")?1016:1009,minFilter:1008,samples:s?4:0})),K.getDrawingBufferSize(eT),s?eM.setSize(eT.x,eT.y):eM.setSize(U(eT.x),U(eT.y));let l=K.getRenderTarget();K.setRenderTarget(eM),K.getClearColor(eh),(eu=K.getClearAlpha())<1&&K.setClearColor(16777215,.5),K.clear();let c=K.toneMapping;K.toneMapping=0,eV(e,i,a),o.updateMultisampleRenderTarget(eM),o.updateRenderTargetMipmap(eM);let d=!1;for(let e=0,n=t.length;e0&&eV(l,t,a),c.length>0&&eV(c,t,a),d.length>0&&eV(d,t,a),i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),i.setPolygonOffset(!1)}function eV(e,t,n){let r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i0?Z[Z.length-1]:null,Y.pop(),X=Y.length>0?Y[Y.length-1]:null},this.getActiveCubeFace=function(){return $},this.getActiveMipmapLevel=function(){return Q},this.getRenderTarget=function(){return ee},this.setRenderTargetTextures=function(e,t,r){s.get(e.texture).__webglTexture=t,s.get(e.depthTexture).__webglTexture=r;let i=s.get(e);i.__hasExternalTextures=!0,i.__hasExternalTextures&&(i.__autoAllocateDepthBuffer=void 0===r,i.__autoAllocateDepthBuffer||!0!==n.has("WEBGL_multisampled_render_to_texture")||(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),i.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){let n=s.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){ee=e,$=t,Q=n;let a=!0,l=null,h=!1,u=!1;if(e){let c=s.get(e);void 0!==c.__useDefaultFramebuffer?(i.bindFramebuffer(eR.FRAMEBUFFER,null),a=!1):void 0===c.__webglFramebuffer?o.setupRenderTarget(e):c.__hasExternalTextures&&o.rebindTextures(e,s.get(e.texture).__webglTexture,s.get(e.depthTexture).__webglTexture);let d=e.texture;(d.isData3DTexture||d.isDataArrayTexture||d.isCompressedArrayTexture)&&(u=!0);let p=s.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(l=Array.isArray(p[t])?p[t][n]:p[t],h=!0):l=r.isWebGL2&&e.samples>0&&!1===o.useMultisampledRTT(e)?s.get(e).__webglMultisampledFramebuffer:Array.isArray(p)?p[n]:p,ea.copy(e.viewport),eo.copy(e.scissor),el=e.scissorTest}else ea.copy(eg).multiplyScalar(ep).floor(),eo.copy(ev).multiplyScalar(ep).floor(),el=e_;if(i.bindFramebuffer(eR.FRAMEBUFFER,l)&&r.drawBuffers&&a&&i.drawBuffers(e,l),i.viewport(ea),i.scissor(eo),i.setScissorTest(el),h){let r=s.get(e.texture);eR.framebufferTexture2D(eR.FRAMEBUFFER,eR.COLOR_ATTACHMENT0,eR.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(u){let r=s.get(e.texture);eR.framebufferTextureLayer(eR.FRAMEBUFFER,eR.COLOR_ATTACHMENT0,r.__webglTexture,n||0,t||0)}en=-1},this.readRenderTargetPixels=function(e,t,a,o,l,h,u){if(!(e&&e.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let c=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(c=c[u]),c){i.bindFramebuffer(eR.FRAMEBUFFER,c);try{let i=e.texture,s=i.format,u=i.type;if(1023!==s&&R.convert(s)!==eR.getParameter(eR.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let c=1016===u&&(n.has("EXT_color_buffer_half_float")||r.isWebGL2&&n.has("EXT_color_buffer_float"));if(1009!==u&&R.convert(u)!==eR.getParameter(eR.IMPLEMENTATION_COLOR_READ_TYPE)&&!(1015===u&&(r.isWebGL2||n.has("OES_texture_float")||n.has("WEBGL_color_buffer_float")))&&!c){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}t>=0&&t<=e.width-o&&a>=0&&a<=e.height-l&&eR.readPixels(t,a,o,l,R.convert(s),R.convert(u),h)}finally{let e=null!==ee?s.get(ee).__webglFramebuffer:null;i.bindFramebuffer(eR.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){let r=Math.pow(2,-n),a=Math.floor(t.image.width*r),s=Math.floor(t.image.height*r);o.setTexture2D(t,0),eR.copyTexSubImage2D(eR.TEXTURE_2D,n,0,0,e.x,e.y,a,s),i.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){let a=t.image.width,s=t.image.height,l=R.convert(n.format),h=R.convert(n.type);o.setTexture2D(n,0),eR.pixelStorei(eR.UNPACK_FLIP_Y_WEBGL,n.flipY),eR.pixelStorei(eR.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),eR.pixelStorei(eR.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?eR.texSubImage2D(eR.TEXTURE_2D,r,e.x,e.y,a,s,l,h,t.image.data):t.isCompressedTexture?eR.compressedTexSubImage2D(eR.TEXTURE_2D,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,l,t.mipmaps[0].data):eR.texSubImage2D(eR.TEXTURE_2D,r,e.x,e.y,l,h,t.image),0===r&&n.generateMipmaps&&eR.generateMipmap(eR.TEXTURE_2D),i.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,a=0){let s;if(K.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let l=e.max.x-e.min.x+1,h=e.max.y-e.min.y+1,u=e.max.z-e.min.z+1,c=R.convert(r.format),d=R.convert(r.type);if(r.isData3DTexture)o.setTexture3D(r,0),s=eR.TEXTURE_3D;else if(r.isDataArrayTexture)o.setTexture2DArray(r,0),s=eR.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}eR.pixelStorei(eR.UNPACK_FLIP_Y_WEBGL,r.flipY),eR.pixelStorei(eR.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),eR.pixelStorei(eR.UNPACK_ALIGNMENT,r.unpackAlignment);let p=eR.getParameter(eR.UNPACK_ROW_LENGTH),f=eR.getParameter(eR.UNPACK_IMAGE_HEIGHT),m=eR.getParameter(eR.UNPACK_SKIP_PIXELS),g=eR.getParameter(eR.UNPACK_SKIP_ROWS),v=eR.getParameter(eR.UNPACK_SKIP_IMAGES),_=n.isCompressedTexture?n.mipmaps[0]:n.image;eR.pixelStorei(eR.UNPACK_ROW_LENGTH,_.width),eR.pixelStorei(eR.UNPACK_IMAGE_HEIGHT,_.height),eR.pixelStorei(eR.UNPACK_SKIP_PIXELS,e.min.x),eR.pixelStorei(eR.UNPACK_SKIP_ROWS,e.min.y),eR.pixelStorei(eR.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?eR.texSubImage3D(s,a,t.x,t.y,t.z,l,h,u,c,d,_.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),eR.compressedTexSubImage3D(s,a,t.x,t.y,t.z,l,h,u,c,_.data)):eR.texSubImage3D(s,a,t.x,t.y,t.z,l,h,u,c,d,_),eR.pixelStorei(eR.UNPACK_ROW_LENGTH,p),eR.pixelStorei(eR.UNPACK_IMAGE_HEIGHT,f),eR.pixelStorei(eR.UNPACK_SKIP_PIXELS,m),eR.pixelStorei(eR.UNPACK_SKIP_ROWS,g),eR.pixelStorei(eR.UNPACK_SKIP_IMAGES,v),0===a&&r.generateMipmaps&&eR.generateMipmap(s),i.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?o.setTextureCube(e,0):e.isData3DTexture?o.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?o.setTexture2DArray(e,0):o.setTexture2D(e,0),i.unbindTexture()},this.resetState=function(){$=0,Q=0,ee=null,i.reset(),C.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return 2e3}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=e===m?"display-p3":"srgb",t.unpackColorSpace=X.workingColorSpace===g?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===p?3001:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=3001===e?p:f}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}(class extends i_{}).prototype.isWebGL1Renderer=!0;class ix extends e7{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class iy extends tS{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}class iS extends tv{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new tf(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}let iM=new es,ib=new es,iT=new eO,iE=new eI,iw=new eA;class iA extends e7{constructor(e=new tL,t=new iS){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){let e=this.geometry;if(null===e.index){let t=e.attributes.position,n=[0];for(let e=1,r=t.count;eo)continue;c.applyMatrix4(this.matrixWorld);let a=e.ray.origin.distanceTo(c);ae.far||t.push({distance:a,point:u.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else{let n=Math.max(0,a.start),r=Math.min(f.count,a.start+a.count);for(let i=n,a=r-1;io)continue;c.applyMatrix4(this.matrixWorld);let n=e.ray.origin.distanceTo(c);ne.far||t.push({distance:n,point:u.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e0)o=i-1;else{o=i;break}if(r[i=o]===n)return i/(a-1);let h=r[i],u=r[i+1];return(i+(n-h)/(u-h))/(a-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);let i=this.getPoint(n),a=this.getPoint(r),s=t||(i.isVector2?new I:new es);return s.copy(a).sub(i).normalize(),s}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){let n=new es,r=[],i=[],a=[],s=new es,o=new eO;for(let t=0;t<=e;t++){let n=t/e;r[t]=this.getTangentAt(n,new es)}i[0]=new es,a[0]=new es;let l=Number.MAX_VALUE,h=Math.abs(r[0].x),u=Math.abs(r[0].y),c=Math.abs(r[0].z);h<=l&&(l=h,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),c<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),s.crossVectors(r[t-1],r[t]),s.length()>Number.EPSILON){s.normalize();let e=Math.acos(A(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(o.makeRotationAxis(s,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(A(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let 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 iL extends iU{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,s=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t){let n=t||new I,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)r;)i-=r;in.length-2?n.length-1:i+1],h=n[i>n.length-3?n.length-1:i+2];return t.set(iF(a,s.x,o.x,l.x,h.x),iF(a,s.y,o.y,l.y,h.y)),t}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t0?0:(Math.floor(Math.abs(o)/a)+1)*a:0===l&&o===a-1&&(o=a-2,l=1),this.closed||o>0?n=i[(o-1)%a]:(iD.subVectors(i[0],i[1]).add(i[0]),n=iD);let h=i[o%a],u=i[(o+1)%a];if(this.closed||o+2=n){let e=r[i]-n,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}return null}getLength(){let 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;let e=[],t=0;for(let n=0,r=this.curves.length;n1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);let h=l.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class iZ extends tL{constructor(e=[new I(0,-.5),new I(.5,0),new I(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=A(r,0,2*Math.PI);let i=[],a=[],s=[],o=[],l=[],h=1/t,u=new es,c=new I,d=new es,p=new es,f=new es,m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,d.x=1*g,d.y=-m,d.z=0*g,f.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(f.x,f.y,f.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,d.x=1*g,d.y=-m,d.z=0*g,p.copy(d),d.x+=f.x,d.y+=f.y,d.z+=f.z,d.normalize(),o.push(d.x,d.y,d.z),f.copy(p)}for(let i=0;i<=t;i++){let d=n+i*h*r,p=Math.sin(d),f=Math.cos(d);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*p,u.y=e[n].y,u.z=e[n].x*f,a.push(u.x,u.y,u.z),c.x=i/t,c.y=n/(e.length-1),s.push(c.x,c.y);let r=o[3*n+0]*p,h=o[3*n+1],d=o[3*n+0]*f;l.push(r,h,d)}}for(let n=0;n0&&v(!0),t>0&&v(!1)),this.setIndex(h),this.setAttribute("position",new tT(u,3)),this.setAttribute("normal",new tT(c,3)),this.setAttribute("uv",new tT(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i$(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class iQ extends i${constructor(e=1,t=1,n=32,r=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,n,r,i,a,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:s}}static fromJSON(e){return new iQ(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class i1 extends tL{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};let i=[],a=[];function s(e){i.push(e.x,e.y,e.z)}function o(t,n){let r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function l(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function h(e){return Math.atan2(e.z,-e.x)}(function(e){let n=new es,r=new es,i=new es;for(let a=0;a.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new tT(i,3)),this.setAttribute("normal",new tT(i.slice(),3)),this.setAttribute("uv",new tT(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i1(e.vertices,e.indices,e.radius,e.details)}}class i0 extends i1{constructor(e=1,t=0){let n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new i0(e.radius,e.detail)}}class i2 extends iY{constructor(e){super(e),this.uuid=w(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n=n.next.y&&n.next.y!==n.y){let e=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=a&&e>r&&(r=e,i=n.x=n.x&&n.x>=l&&a!==n.x&&i8(si.x||n.x===i.x&&(d=i,p=n,0>i9(d.prev,d,p.prev)&&0>i9(p.next,d,d.next))))&&(i=n,u=c)),n=n.next}while(n!==o)return i}(e,t);if(!n)return t;let r=aa(n,e);return i5(r,r.next),i5(n,n.next)}(h[i],n);return n}(e,t,d,n)),e.length>80*n){r=a=e[0],i=s=e[1];for(let t=n;ta&&(a=o),l>s&&(s=l);h=0!==(h=Math.max(a-r,s-i))?32767/h:0}return function e(t,n,r,i,a,s,o){if(!t)return;!o&&s&&function(e,t,n,r){let i=e;do 0===i.z&&(i.z=i7(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e)i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,a,s,o,l,h=1;do{for(n=e,e=null,a=null,s=0;n;){for(s++,r=n,o=0,t=0;t0||l>0&&r;)0!==o&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,o--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,h*=2}while(s>1)}(i)}(t,i,a,s);let l=t,h,u;for(;t.prev!==t.next;){if(h=t.prev,u=t.next,s?function(e,t,n,r){let i=e.prev,a=e.next;if(i9(i,e,a)>=0)return!1;let s=i.x,o=e.x,l=a.x,h=i.y,u=e.y,c=a.y,d=so?s>l?s:l:o>l?o:l,m=h>u?h>c?h:c:u>c?u:c,g=i7(d,p,t,n,r),v=i7(f,m,t,n,r),_=e.prevZ,x=e.nextZ;for(;_&&_.z>=g&&x&&x.z<=v;){if(_.x>=d&&_.x<=f&&_.y>=p&&_.y<=m&&_!==i&&_!==a&&i8(s,h,o,u,l,c,_.x,_.y)&&i9(_.prev,_,_.next)>=0||(_=_.prevZ,x.x>=d&&x.x<=f&&x.y>=p&&x.y<=m&&x!==i&&x!==a&&i8(s,h,o,u,l,c,x.x,x.y)&&i9(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;_&&_.z>=g;){if(_.x>=d&&_.x<=f&&_.y>=p&&_.y<=m&&_!==i&&_!==a&&i8(s,h,o,u,l,c,_.x,_.y)&&i9(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;x&&x.z<=v;){if(x.x>=d&&x.x<=f&&x.y>=p&&x.y<=m&&x!==i&&x!==a&&i8(s,h,o,u,l,c,x.x,x.y)&&i9(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}(t,i,a,s):function(e){let t=e.prev,n=e.next;if(i9(t,e,n)>=0)return!1;let r=t.x,i=e.x,a=n.x,s=t.y,o=e.y,l=n.y,h=ri?r>a?r:a:i>a?i:a,d=s>o?s>l?s:l:o>l?o:l,p=n.next;for(;p!==t;){if(p.x>=h&&p.x<=c&&p.y>=u&&p.y<=d&&i8(r,s,i,o,a,l,p.x,p.y)&&i9(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}(t)){n.push(h.i/r|0),n.push(t.i/r|0),n.push(u.i/r|0),ao(t),t=u.next,l=u.next;continue}if((t=u)===l){o?1===o?e(t=function(e,t,n){let r=e;do{let i=r.prev,a=r.next.next;!ae(i,a)&&at(i,r,r.next,a)&&ai(i,a)&&ai(a,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(a.i/n|0),ao(r),ao(r.next),r=e=a),r=r.next}while(r!==e)return i5(r)}(i5(t),n,r),n,r,i,a,s,2):2===o&&function(t,n,r,i,a,s){let o=t;do{let t=o.next.next;for(;t!==o.prev;){var l,h;if(o.i!==t.i&&(l=o,h=t,l.next.i!==h.i&&l.prev.i!==h.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&at(n,n.next,e,t))return!0;n=n.next}while(n!==e)return!1}(l,h)&&(ai(l,h)&&ai(h,l)&&function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e)return r}(l,h)&&(i9(l.prev,l,h.prev)||i9(l,h.prev,h))||ae(l,h)&&i9(l.prev,l,l.next)>0&&i9(h.prev,h,h.next)>0))){let l=aa(o,t);o=i5(o,o.next),l=i5(l,l.next),e(o,n,r,i,a,s,0),e(l,n,r,i,a,s,0);return}t=t.next}o=o.next}while(o!==t)}(t,n,r,i,a,s):e(i5(t),n,r,i,a,s,1);break}}}(d,p,n,r,i,h,0),p}};function i4(e,t,n,r,i){let a,s;if(i===function(e,t,n,r){let i=0;for(let a=t,s=n-r;a0)for(a=t;a=t;a-=r)s=as(a,e[a],e[a+1],s);return s&&ae(s,s.next)&&(ao(s),s=s.next),s}function i5(e,t){if(!e)return e;t||(t=e);let n=e,r;do if(r=!1,!n.steiner&&(ae(n,n.next)||0===i9(n.prev,n,n.next))){if(ao(n),(n=t=n.prev)===n.next)break;r=!0}else n=n.next;while(r||n!==t)return t}function i6(e,t){return e.x-t.x}function i7(e,t,n,r,i){return(e=((e=((e=((e=((e=(e-n)*i|0)|e<<8)&16711935)|e<<4)&252645135)|e<<2)&858993459)|e<<1)&1431655765)|(t=((t=((t=((t=((t=(t-r)*i|0)|t<<8)&16711935)|t<<4)&252645135)|t<<2)&858993459)|t<<1)&1431655765)<<1}function i8(e,t,n,r,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(r-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(i-s)*(r-o)}function i9(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function ae(e,t){return e.x===t.x&&e.y===t.y}function at(e,t,n,r){let i=ar(i9(e,t,n)),a=ar(i9(e,t,r)),s=ar(i9(n,r,e)),o=ar(i9(n,r,t));return!!(i!==a&&s!==o||0===i&&an(e,n,t)||0===a&&an(e,r,t)||0===s&&an(n,e,r)||0===o&&an(n,t,r))}function an(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ar(e){return e>0?1:e<0?-1:0}function ai(e,t){return 0>i9(e.prev,e,e.next)?i9(e,t,e.next)>=0&&i9(e,e.prev,t)>=0:0>i9(e,t,e.prev)||0>i9(e,e.next,t)}function aa(e,t){let n=new al(e.i,e.x,e.y),r=new al(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function as(e,t,n,r){let i=new al(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function ao(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function al(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class ah{static area(e){let t=e.length,n=0;for(let r=t-1,i=0;iah.area(e)}static triangulateShape(e,t){let n=[],r=[],i=[];au(e),ac(n,e);let a=e.length;t.forEach(au);for(let e=0;e2&&e[t-1].equals(e[0])&&e.pop()}function ac(e,t){for(let n=0;nNumber.EPSILON){let c=Math.sqrt(u),d=Math.sqrt(l*l+h*h),p=t.x-o/c,f=t.y+s/c,m=((n.x-h/d-p)*h-(n.y+l/d-f)*l)/(s*h-o*l),g=(r=p+s*m-e.x)*r+(i=f+o*m-e.y)*i;if(g<=2)return new I(r,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(h)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(u)):(r=s,i=o,a=Math.sqrt(u/2))}return new I(r/a,i/a)}let U=[];for(let e=0,t=w.length,n=t-1,r=e+1;e=0;e--){let t=e/v,n=f*Math.cos(t*Math.PI/2),r=m*Math.sin(t*Math.PI/2)+g;for(let e=0,t=w.length;e=0;){let a=i,s=i-1;s<0&&(s=e.length-1);for(let e=0,i=c+2*v;e0)&&d.push(t,i,l),(e!==n-1||o=i)){let s=t[1];e=(i=t[--n-1]))break t}a=n,n=0;break n}break e}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&ArrayBuffer.isView(r)&&!(r instanceof DataView))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1,a=1;for(let s=1;s0){e[a]=e[i];for(let e=i*n,r=a*n,s=0;s!==n;++s)t[r+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=new this.constructor(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}aP.prototype.TimeBufferType=Float32Array,aP.prototype.ValueBufferType=Float32Array,aP.prototype.DefaultInterpolation=2301;class aU extends aP{}aU.prototype.ValueTypeName="bool",aU.prototype.ValueBufferType=Array,aU.prototype.DefaultInterpolation=2300,aU.prototype.InterpolantFactoryMethodLinear=void 0,aU.prototype.InterpolantFactoryMethodSmooth=void 0,(class extends aP{}).prototype.ValueTypeName="color",(class extends aP{}).prototype.ValueTypeName="number";class aL extends aw{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(r-t),l=e*s;for(let e=l+s;l!==e;l+=4)ea.slerpFlat(i,0,a,l-s,a,l,o);return i}}class aq extends aP{InterpolantFactoryMethodLinear(e){return new aL(this.times,this.values,this.getValueSize(),e)}}aq.prototype.ValueTypeName="quaternion",aq.prototype.DefaultInterpolation=2301,aq.prototype.InterpolantFactoryMethodSmooth=void 0;class aD extends aP{}aD.prototype.ValueTypeName="string",aD.prototype.ValueBufferType=Array,aD.prototype.DefaultInterpolation=2300,aD.prototype.InterpolantFactoryMethodLinear=void 0,aD.prototype.InterpolantFactoryMethodSmooth=void 0,(class extends aP{}).prototype.ValueTypeName="vector";let aI={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},aO=new class{constructor(e,t,n){let r;let i=this,a=!1,s=0,o=0,l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){o++,!1===a&&void 0!==i.onStart&&i.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==i.onProgress&&i.onProgress(e,s,o),s===o&&(a=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return r?r(e):e},this.setURLModifier=function(e){return r=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){let t=l.indexOf(e);return -1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t{t&&t(i),this.manager.itemEnd(e)},0),i;if(void 0!==aF[e]){aF[e].push({onLoad:t,onProgress:n,onError:r});return}aF[e]=[],aF[e].push({onLoad:t,onProgress:n,onError:r});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;let n=aF[e],r=t.body.getReader(),i=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),a=i?parseInt(i):0,s=0!==a,o=0,l=new ReadableStream({start(e){(function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{o+=i.byteLength;let r=new ProgressEvent("progress",{lengthComputable:s,loaded:o,total:a});for(let e=0,t=n.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>new DOMParser().parseFromString(e,s));case"json":return e.json();default:if(void 0===s)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{aI.add(e,t);let n=aF[e];delete aF[e];for(let e=0,r=n.length;e{let n=aF[e];if(void 0===n)throw this.manager.itemError(e),t;delete aF[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class az extends tL{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}let aG="\\[\\]\\.:\\/",aV=RegExp("["+aG+"]","g"),aH="[^"+aG+"]",aW="[^"+aG.replace("\\.","")+"]",aX=/((?:WC+[\/:])*)/.source.replace("WC",aH),aj=RegExp("^"+aX+/(WCOD+)?/.source.replace("WCOD",aW)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",aH)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",aH)+"$"),aY=["material","materials","bones","map"];class aZ{constructor(e,t,n){this.path=t,this.parsedPath=n||aZ.parseTrackName(t),this.node=aZ.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new aZ.Composite(e,t,n):new aZ(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(aV,"")}static parseTrackName(e){let t=aj.exec(e);if(null===t)throw Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){let e=n.nodeName.substring(r+1);-1!==aY.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){let n=function(e){for(let r=0;r.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{a$.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(a$,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class a1{constructor(){this.type="ShapePath",this.color=new tf,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new iY,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){let t,n,r,i,a;let s=ah.isClockWise,o=this.subPaths;if(0===o.length)return[];let l=[];if(1===o.length)return n=o[0],(r=new i2).curves=n.curves,l.push(r),l;let h=!s(o[0].getPoints());h=e?!h:h;let u=[],c=[],d=[],p=0;c[0]=void 0,d[p]=[];for(let r=0,a=o.length;r1){let e=!1,t=0;for(let e=0,t=c.length;eNumber.EPSILON){if(l<0&&(n=t[a],o=-o,s=t[i],l=-l),e.ys.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{let t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r})(a.p,c[r].p)&&(n!==r&&t++,s?(s=!1,u[r].push(a)):e=!0);s&&u[n].push(a)}}t>0&&!1===e&&(d=u)}for(let e=0,t=c.length;ec);var r=i("ilwiq");let a={type:"change"},s={type:"start"},o={type:"end"},l=new r.Ray,h=new r.Plane,u=Math.cos(70*r.MathUtils.DEG2RAD);class c extends r.EventDispatcher{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new r.Vector3,this.cursor=new r.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:r.MOUSE.ROTATE,MIDDLE:r.MOUSE.DOLLY,RIGHT:r.MOUSE.PAN},this.touches={ONE:r.TOUCH.ROTATE,TWO:r.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return p.phi},this.getAzimuthalAngle=function(){return p.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",Q),this._domElementKeyEvents=e},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Q),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(a),n.update(),c=i.NONE},this.update=function(){let t=new r.Vector3,s=new(0,r.Quaternion)().setFromUnitVectors(e.up,new r.Vector3(0,1,0)),o=s.clone().invert(),v=new r.Vector3,_=new r.Quaternion,x=new r.Vector3,y=2*Math.PI;return function(S=null){let M=n.object.position;t.copy(M).sub(n.target),t.applyQuaternion(s),p.setFromVector3(t),n.autoRotate&&c===i.NONE&&L(null!==S?2*Math.PI/60*n.autoRotateSpeed*S:2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(p.theta+=f.theta*n.dampingFactor,p.phi+=f.phi*n.dampingFactor):(p.theta+=f.theta,p.phi+=f.phi);let b=n.minAzimuthAngle,T=n.maxAzimuthAngle;isFinite(b)&&isFinite(T)&&(b<-Math.PI?b+=y:b>Math.PI&&(b-=y),T<-Math.PI?T+=y:T>Math.PI&&(T-=y),b<=T?p.theta=Math.max(b,Math.min(T,p.theta)):p.theta=p.theta>(b+T)/2?Math.max(b,p.theta):Math.min(T,p.theta)),p.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,p.phi)),p.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(g,n.dampingFactor):n.target.add(g),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor),n.zoomToCursor&&R||n.object.isOrthographicCamera?p.radius=B(p.radius):p.radius=B(p.radius*m),t.setFromSpherical(p),t.applyQuaternion(o),M.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(f.theta*=1-n.dampingFactor,f.phi*=1-n.dampingFactor,g.multiplyScalar(1-n.dampingFactor)):(f.set(0,0,0),g.set(0,0,0));let E=!1;if(n.zoomToCursor&&R){let i=null;if(n.object.isPerspectiveCamera){let e=t.length();i=B(e*m);let r=e-i;n.object.position.addScaledVector(w,r),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){let e=new r.Vector3(A.x,A.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/m)),n.object.updateProjectionMatrix(),E=!0;let a=new r.Vector3(A.x,A.y,0);a.unproject(n.object),n.object.position.sub(a).add(e),n.object.updateMatrixWorld(),i=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==i&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(i).add(n.object.position):(l.origin.copy(n.object.position),l.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(l.direction))d||8*(1-_.dot(n.object.quaternion))>d||x.distanceToSquared(n.target)>0)&&(n.dispatchEvent(a),v.copy(n.object.position),_.copy(n.object.quaternion),x.copy(n.target),E=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",ee),n.domElement.removeEventListener("pointerdown",Z),n.domElement.removeEventListener("pointercancel",J),n.domElement.removeEventListener("wheel",$),n.domElement.removeEventListener("pointermove",K),n.domElement.removeEventListener("pointerup",J),null!==n._domElementKeyEvents&&(n._domElementKeyEvents.removeEventListener("keydown",Q),n._domElementKeyEvents=null)};let n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},c=i.NONE,d=1e-6,p=new r.Spherical,f=new r.Spherical,m=1,g=new r.Vector3,v=new r.Vector2,_=new r.Vector2,x=new r.Vector2,y=new r.Vector2,S=new r.Vector2,M=new r.Vector2,b=new r.Vector2,T=new r.Vector2,E=new r.Vector2,w=new r.Vector3,A=new r.Vector2,R=!1,C=[],P={};function U(){return Math.pow(.95,n.zoomSpeed)}function L(e){f.theta-=e}function q(e){f.phi-=e}let D=function(){let e=new r.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),g.add(e)}}(),I=function(){let e=new r.Vector3;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),g.add(e)}}(),O=function(){let e=new r.Vector3;return function(t,r){let i=n.domElement;if(n.object.isPerspectiveCamera){let a=n.object.position;e.copy(a).sub(n.target);let s=e.length();D(2*t*(s*=Math.tan(n.object.fov/2*Math.PI/180))/i.clientHeight,n.object.matrix),I(2*r*s/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(D(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),I(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function N(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?m/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function F(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?m*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function k(e){if(!n.zoomToCursor)return;R=!0;let t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,s=t.height;A.x=r/a*2-1,A.y=-(i/s*2)+1,w.set(A.x,A.y,1).unproject(n.object).sub(n.object.position).normalize()}function B(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function z(e){v.set(e.clientX,e.clientY)}function G(e){y.set(e.clientX,e.clientY)}function V(){if(1===C.length)v.set(C[0].pageX,C[0].pageY);else{let e=.5*(C[0].pageX+C[1].pageX),t=.5*(C[0].pageY+C[1].pageY);v.set(e,t)}}function H(){if(1===C.length)y.set(C[0].pageX,C[0].pageY);else{let e=.5*(C[0].pageX+C[1].pageX),t=.5*(C[0].pageY+C[1].pageY);y.set(e,t)}}function W(){let e=C[0].pageX-C[1].pageX,t=C[0].pageY-C[1].pageY;b.set(0,Math.sqrt(e*e+t*t))}function X(e){if(1==C.length)_.set(e.pageX,e.pageY);else{let t=en(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);_.set(n,r)}x.subVectors(_,v).multiplyScalar(n.rotateSpeed);let t=n.domElement;L(2*Math.PI*x.x/t.clientHeight),q(2*Math.PI*x.y/t.clientHeight),v.copy(_)}function j(e){if(1===C.length)S.set(e.pageX,e.pageY);else{let t=en(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);S.set(n,r)}M.subVectors(S,y).multiplyScalar(n.panSpeed),O(M.x,M.y),y.copy(S)}function Y(e){let t=en(e),r=e.pageX-t.x,i=e.pageY-t.y;T.set(0,Math.sqrt(r*r+i*i)),E.set(0,Math.pow(T.y/b.y,n.zoomSpeed)),N(E.y),b.copy(T)}function Z(e){!1!==n.enabled&&(0===C.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",K),n.domElement.addEventListener("pointerup",J)),C.push(e),"touch"===e.pointerType?function(e){switch(et(e),C.length){case 1:switch(n.touches.ONE){case r.TOUCH.ROTATE:if(!1===n.enableRotate)return;V(),c=i.TOUCH_ROTATE;break;case r.TOUCH.PAN:if(!1===n.enablePan)return;H(),c=i.TOUCH_PAN;break;default:c=i.NONE}break;case 2:switch(n.touches.TWO){case r.TOUCH.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&W(),n.enablePan&&H(),c=i.TOUCH_DOLLY_PAN;break;case r.TOUCH.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&W(),n.enableRotate&&V(),c=i.TOUCH_DOLLY_ROTATE;break;default:c=i.NONE}break;default:c=i.NONE}c!==i.NONE&&n.dispatchEvent(s)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case r.MOUSE.DOLLY:if(!1===n.enableZoom)return;k(e),b.set(e.clientX,e.clientY),c=i.DOLLY;break;case r.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;G(e),c=i.PAN}else{if(!1===n.enableRotate)return;z(e),c=i.ROTATE}break;case r.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;z(e),c=i.ROTATE}else{if(!1===n.enablePan)return;G(e),c=i.PAN}break;default:c=i.NONE}c!==i.NONE&&n.dispatchEvent(s)}(e))}function K(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(et(e),c){case i.TOUCH_ROTATE:if(!1===n.enableRotate)return;X(e),n.update();break;case i.TOUCH_PAN:if(!1===n.enablePan)return;j(e),n.update();break;case i.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&Y(e),n.enablePan&&j(e),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&Y(e),n.enableRotate&&X(e),n.update();break;default:c=i.NONE}}(e):function(e){switch(c){case i.ROTATE:if(!1===n.enableRotate)return;!function(e){_.set(e.clientX,e.clientY),x.subVectors(_,v).multiplyScalar(n.rotateSpeed);let t=n.domElement;L(2*Math.PI*x.x/t.clientHeight),q(2*Math.PI*x.y/t.clientHeight),v.copy(_),n.update()}(e);break;case i.DOLLY:if(!1===n.enableZoom)return;T.set(e.clientX,e.clientY),E.subVectors(T,b),E.y>0?N(U()):E.y<0&&F(U()),b.copy(T),n.update();break;case i.PAN:if(!1===n.enablePan)return;S.set(e.clientX,e.clientY),M.subVectors(S,y).multiplyScalar(n.panSpeed),O(M.x,M.y),y.copy(S),n.update()}}(e))}function J(e){(function(e){delete P[e.pointerId];for(let t=0;t0&&N(U()),n.update(),n.dispatchEvent(o))}function Q(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?q(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):O(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?q(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):O(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?L(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):O(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?L(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):O(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function ee(e){!1!==n.enabled&&e.preventDefault()}function et(e){let t=P[e.pointerId];void 0===t&&(t=new r.Vector2,P[e.pointerId]=t),t.set(e.pageX,e.pageY)}function en(e){return P[(e.pointerId===C[0].pointerId?C[1]:C[0]).pointerId]}n.domElement.addEventListener("contextmenu",ee),n.domElement.addEventListener("pointerdown",Z),n.domElement.addEventListener("pointercancel",J),n.domElement.addEventListener("wheel",$,{passive:!1}),this.update()}}}),a("gbdyO",function(t,n){let r,a;e(t.exports,"Text",()=>ee);var s=i("ilwiq"),o=i("8ue7g"),l=i("ix9ca"),h=i("2y8EL"),u=i("4kOkh");let c=(0,o.defineWorkerModule)({name:"Typr Font Parser",dependencies:[/*! +Custom build of Typr.ts (https://github.com/fredli74/Typr.ts) for use in Troika text rendering. +Original MIT license applies: https://github.com/fredli74/Typr.ts/blob/master/LICENSE +*/function(){var e,t,n;return"undefined"==typeof window&&(self.window=self),(e={},(t={parse:function(e){var n=t._bin,r=new Uint8Array(e);if("ttcf"==n.readASCII(r,0,4)){var i=4;n.readUshort(r,i),i+=2,n.readUshort(r,i),i+=2;var a=n.readUint(r,i);i+=4;for(var s=[],o=0;o>>n&1)&&t++;return t},t._lctf.readClassDef=function(e,n){var r=t._bin,i=[],a=r.readUshort(e,n);if(n+=2,1==a){var s=r.readUshort(e,n);n+=2;var o=r.readUshort(e,n);n+=2;for(var l=0;l0&&(a.featureParams=i+s);var o=r.readUshort(e,n);n+=2,a.tab=[];for(var l=0;l0&&(a.default=t._lctf.readLangSysTable(e,i+s));var o=r.readUshort(e,n);n+=2;for(var l=0;l255?-1:t.CFF.glyphByUnicode(e,t.CFF.tableSE[n])},t.CFF.readEncoding=function(e,n,r){t._bin;var i=[".notdef"],a=e[n];if(n++,0!=a)throw"error: unknown encoding format: "+a;var s=e[n];n++;for(var o=0;o>4,m=15&p;if(15!=f&&d.push(f),15!=m&&d.push(m),15==m)break}for(var g="",v=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],_=0;_=o.xMax||o.yMin>=o.yMax)return null;if(o.noc>0){o.endPts=[];for(var l=0;l=1&&o.fmt<=2){h=a.readUshort(e,r),r+=2;var u=a.readUshort(e,r);r+=2;var c=t._lctf.numOfOnes(h),d=t._lctf.numOfOnes(u);if(1==o.fmt){o.pairsets=[];var p=a.readUshort(e,r);r+=2;for(var f=0;f=1&&o.fmt<=2){if(1==o.fmt)o.delta=a.readShort(e,r),r+=2;else if(2==o.fmt){var h=a.readUshort(e,r);r+=2,o.newg=a.readUshorts(e,r,h),r+=2*o.newg.length}}else if(2==n&&1==o.fmt){h=a.readUshort(e,r),r+=2,o.seqs=[];for(var u=0;u>>8;if(0!=(c&=15))throw"unknown kern table format: "+c;n=t.kern.readFormat0(e,n,l)}return l},t.kern.parseV1=function(e,n,r,i){var a=t._bin;a.readFixed(e,n),n+=4;var s=a.readUint(e,n);n+=4;for(var o={glyph1:[],rval:[]},l=0;l>>8;if(0!=(u&=15))throw"unknown kern table format: "+u;n=t.kern.readFormat0(e,n,o)}return o},t.kern.readFormat0=function(e,n,r){var i=t._bin,a=-1,s=i.readUshort(e,n);n+=2,i.readUshort(e,n),n+=2,i.readUshort(e,n),n+=2,i.readUshort(e,n),n+=2;for(var o=0;o=i.map.length?0:i.map[t];if(4==i.format){for(var a=-1,s=0;st?0:65535&(0!=i.idRangeOffset[a]?i.glyphIdArray[t-i.startCount[a]+(i.idRangeOffset[a]>>1)-(i.idRangeOffset.length-a)]:t+i.idDelta[a])}if(12==i.format){if(t>i.groups[i.groups.length-1][1])return 0;for(s=0;s-1?t.U._simpleGlyph(i,r):t.U._compoGlyph(i,n,r))},t.U._simpleGlyph=function(e,n){for(var r=0;ra)){for(var p=!0,f=0,m=0;ma)){for(p=!0,m=0;m>1,s.length=0,l=!0;else if("o3"==E||"o23"==E)s.length%2==0||l||(h=s.shift()+i.nominalWidthX),o+=s.length>>1,s.length=0,l=!0;else if("o4"==E)s.length>1&&!l&&(h=s.shift()+i.nominalWidthX,l=!0),u&&t.U.P.closePath(a),p+=s.pop(),t.U.P.moveTo(a,d,p),u=!0;else if("o5"==E)for(;s.length>0;)d+=s.shift(),p+=s.shift(),t.U.P.lineTo(a,d,p);else if("o6"==E||"o7"==E)for(var w=s.length,A="o6"==E,R=0;RMath.abs((S=x+s.shift())-p)?d=y+s.shift():p=S+s.shift(),t.U.P.curveTo(a,f,m,g,v,M,b),t.U.P.curveTo(a,_,x,y,S,d,p));else if("o14"==E){if(s.length>0&&!l&&(h=s.shift()+r.nominalWidthX,l=!0),4==s.length){var U=s.shift(),L=s.shift(),q=s.shift(),D=s.shift(),I=t.CFF.glyphBySE(r,q),O=t.CFF.glyphBySE(r,D);t.U._drawCFF(r.CharStrings[I],n,r,i,a),n.x=U,n.y=L,t.U._drawCFF(r.CharStrings[O],n,r,i,a)}u&&(t.U.P.closePath(a),u=!1)}else if("o19"==E||"o20"==E)s.length%2==0||l||(h=s.shift()+i.nominalWidthX),o+=s.length>>1,s.length=0,l=!0,c+=o+7>>3;else if("o21"==E)s.length>2&&!l&&(h=s.shift()+i.nominalWidthX,l=!0),p+=s.pop(),d+=s.pop(),u&&t.U.P.closePath(a),t.U.P.moveTo(a,d,p),u=!0;else if("o22"==E)s.length>1&&!l&&(h=s.shift()+i.nominalWidthX,l=!0),d+=s.pop(),u&&t.U.P.closePath(a),t.U.P.moveTo(a,d,p),u=!0;else if("o25"==E){for(;s.length>6;)d+=s.shift(),p+=s.shift(),t.U.P.lineTo(a,d,p);f=d+s.shift(),m=p+s.shift(),g=f+s.shift(),v=m+s.shift(),d=g+s.shift(),p=v+s.shift(),t.U.P.curveTo(a,f,m,g,v,d,p)}else if("o26"==E)for(s.length%2&&(d+=s.shift());s.length>0;)f=d,m=p+s.shift(),d=g=f+s.shift(),p=(v=m+s.shift())+s.shift(),t.U.P.curveTo(a,f,m,g,v,d,p);else if("o27"==E)for(s.length%2&&(p+=s.shift());s.length>0;)m=p,g=(f=d+s.shift())+s.shift(),v=m+s.shift(),d=g+s.shift(),p=v,t.U.P.curveTo(a,f,m,g,v,d,p);else if("o10"==E||"o29"==E){var N="o10"==E?i:r;if(0==s.length)console.debug("error: empty stack");else{var F=s.pop(),k=N.Subrs[F+N.Bias];n.x=d,n.y=p,n.nStems=o,n.haveWidth=l,n.width=h,n.open=u,t.U._drawCFF(k,n,r,i,a),d=n.x,p=n.y,o=n.nStems,l=n.haveWidth,h=n.width,u=n.open}}else if("o30"==E||"o31"==E){var B=s.length,z=(P=0,"o31"==E);for(P+=B-(w=-3&B);P>>1|(21845&p)<<1;f=(61680&(f=(52428&f)>>>2|(13107&f)<<2))>>>4|(3855&f)<<4,d[p]=((65280&f)>>>8|(255&f)<<8)>>>1}var m=function(e,t,r){for(var i=e.length,a=0,s=new n(t);a>>h]=u}else for(o=new n(i),a=0;a>>15-e[a]);return o},g=new t(288);for(p=0;p<144;++p)g[p]=8;for(p=144;p<256;++p)g[p]=9;for(p=256;p<280;++p)g[p]=7;for(p=280;p<288;++p)g[p]=8;var v=new t(32);for(p=0;p<32;++p)v[p]=5;var _=m(g,9,1),x=m(v,5,1),y=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},S=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},M=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},b=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],T=function(e,t,n){var r=Error(t||b[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,T),!n)throw r;return r},E=function(e,o,l){var u,d,p,f,g=e.length;if(!g||l&&!l.l&&g<5)return o||new t(0);var v=!o||l,b=!l||l.i;l||(l={}),o||(o=new t(3*g));var E,w=function(e){var n=o.length;if(e>n){var r=new t(Math.max(2*n,e));r.set(o),o=r}},A=l.f||0,R=l.p||0,C=l.b||0,P=l.l,U=l.d,L=l.m,q=l.n,D=8*g;do{if(!P){l.f=A=S(e,R,1);var I=S(e,R+1,3);if(R+=3,!I){var O=e[(j=((E=R)/8|0)+(7&E&&1)+4)-4]|e[j-3]<<8,N=j+O;if(N>g){b&&T(0);break}v&&w(C+O),o.set(e.subarray(j,N),C),l.b=C+=O,l.p=R=8*N;continue}if(1==I)P=_,U=x,L=9,q=5;else if(2==I){var F=S(e,R,31)+257,k=S(e,R+10,15)+4,B=F+S(e,R+5,31)+1;R+=14;for(var z=new t(B),G=new t(19),V=0;V>>4)<16)z[V++]=j;else{var Z=0,K=0;for(16==j?(K=3+S(e,R,3),R+=2,Z=z[V-1]):17==j?(K=3+S(e,R,7),R+=3):18==j&&(K=11+S(e,R,127),R+=7);K--;)z[V++]=Z}}var J=z.subarray(0,F),$=z.subarray(F);L=y(J),q=y($),P=m(J,L,1),U=m($,q,1)}else T(1);if(R>D){b&&T(0);break}}v&&w(C+131072);for(var Q=(1<>>4;if((R+=15&Z)>D){b&&T(0);break}if(Z||T(2),en<256)o[C++]=en;else{if(256==en){et=R,P=null;break}var er=en-254;if(en>264){var ei=i[V=en-257];er=S(e,R,(1<>>4;if(ea||T(3),R+=15&ea,$=c[es],es>3&&(ei=a[es],$+=M(e,R)&(1<D){b&&T(0);break}v&&w(C+131072);for(var eo=C+er;Cu.length)&&(p=u.length),(f=new(u instanceof n?n:u instanceof r?r:t)(p-d)).set(u.subarray(d,p)),f)},w=new t(0),A="undefined"!=typeof TextDecoder&&new TextDecoder;try{A.decode(w,{stream:!0})}catch(e){}return e.convert_streams=function(e){var t=new DataView(e),n=0;function r(){var e=t.getUint16(n);return n+=2,e}function i(){var e=t.getUint32(n);return n+=4,e}function a(e){v.setUint16(_,e),_+=2}function s(e){v.setUint32(_,e),_+=4}for(var o={signature:i(),flavor:i(),length:i(),numTables:r(),reserved:r(),totalSfntSize:i(),majorVersion:r(),minorVersion:r(),metaOffset:i(),metaLength:i(),metaOrigLength:i(),privOffset:i(),privLength:i()},l=0;Math.pow(2,l)<=o.numTables;)l++;l--;for(var h=16*Math.pow(2,l),u=16*o.numTables-h,c=12,d=[],p=0;pe.U.codeToGlyph(t,n)>0,forEachGlyph(o,h,u,c){let d=0,f=1/p.unitsPerEm*h,m=function(t,r){let s=[];for(let n=0;n65535&&n++,s.push(e.U.codeToGlyph(t,i))}let o=t.GSUB;if(o){let t;let{lookupList:l,featureList:h}=o,u=/^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws|ccmp)$/,c=[];h.forEach(o=>{if(u.test(o.tag))for(let h=0;h{let[a,s]=i.split("+");a=parseInt(a,36),s=s?parseInt(s,36):0,n.set(r+=a,e[t]);for(let i=s;i--;)n.set(++r,e[t])})}}return n.get(e)||32}(l),u=1;!(8&h)&&(21&r?22&h?(u=3,(1===a||3===a)&&t[s]++):33&h&&(2===a||4===a)&&t[s]--:34&r&&(2===a||4===a)&&t[s]--,a=t[o]=u,r=h,s=o,l>65535&&o++)}return t}(r));for(let n=0;n=0;t--)if(-1!==n[t]&&(!e||e(n[t])))return t;return -1}function o(e){return 1===s(t,e)}function l(e,t){for(let n=0;n<3;n++)r[3*t+n]+=e[n]||0}}(t,m);return m.forEach((n,i)=>{if(-1!==n){let a=l[n];if(!a){let i,s,o,h;let{cmds:u,crds:c}=e.U.glyphToPath(t,n),d="",p=0;for(let e=0,t=u.length;e1?",":"")+c[p++]}if(c.length){i=s=1/0,o=h=-1/0;for(let e=0,t=c.length;eo&&(o=t),n>h&&(h=n)}}else i=o=s=h=0;a=l[n]={index:n,advanceWidth:t.hmtx.aWidth[n],xMin:i,yMin:s,xMax:o,yMax:h,path:d}}c.call(null,a,d+v[3*i]*f,v[3*i+1]*f,g),d+=v[3*i+2]*f,u&&(d+=u*h)}g+=o.codePointAt(g)>65535?2:1}),d}};return p}(e.parse(l)[0])}}],init:(e,t,n)=>n(e(),t())}),d=(0,o.defineWorkerModule)({name:"FontResolver",dependencies:[function(e,t){let n=Object.create(null),r=Object.create(null);function i(t,i){let a=n[t];a?i(a):r[t]?r[t].push(i):(r[t]=[i],function(t,n){let r=e=>{console.error(`Failure loading font ${t}`,e)};try{let i=new XMLHttpRequest;i.open("get",t,!0),i.responseType="arraybuffer",i.onload=function(){if(i.status>=400)r(Error(i.statusText));else if(i.status>0)try{let r=e(i.response);r.src=t,n(r)}catch(e){r(e)}},i.onerror=r,i.send()}catch(e){r(e)}}(t,e=>{e.src=t,n[t]=e,r[t].forEach(t=>t(e)),delete r[t]}))}return function(e,r,{lang:a,fonts:s=[],style:o="normal",weight:l="normal",unicodeFontsURL:h}={}){let u=new Uint8Array(e.length),c=[];e.length||m();let d=new Map,p=[];if("italic"!==o&&(o="normal"),"number"!=typeof l&&(l="bold"===l?700:400),s&&!Array.isArray(s)&&(s=[s]),(s=s.slice().filter(e=>!e.lang||e.lang.test(a)).reverse()).length){let t=0;!function r(a=0){for(let o=a,l=e.length;o{r(o)});return}if(e.supportsCodePoint(a)){let n=d.get(e);"number"!=typeof n&&(n=c.length,c.push(e),d.set(e,n)),u[o]=n,t=1;break}}}a>65535&&o+1e.substring(t[0],t[1]+1)).join("\n");t.getFontsForString(n,{lang:a||void 0,style:o,weight:l,dataUrl:h}).then(({fontUrls:e,chars:t})=>{let n=c.length,r=0;p.forEach(e=>{for(let i=0,a=e[1]-e[0];i<=a;i++)u[e[0]+i]=t[r++]+n;r++});let a=0;e.forEach((t,r)=>{i(t,t=>{c[r+n]=t,++a===e.length&&m()})})})}else m()}function m(){r({chars:u,fonts:c})}}},c,/*! +Custom bundle of @unicode-font-resolver/client v1.0.2 (https://github.com/lojjic/unicode-font-resolver) +for use in Troika text rendering. +Original MIT license applies +*/function(){return function(e){var t=function(){this.buckets=new Map};function n(e,t){var n=255&e,r=t.codePointAt(n/6|0);return 0!=((r=(r||48)-48)&1<>5;this.buckets.set(t,(this.buckets.get(t)||0)|1<<(31&e))},t.prototype.has=function(e){var t=this.buckets.get(e>>5);return void 0!==t&&0!=(t&1<<(31&e))},t.prototype.serialize=function(){var e=[];return this.buckets.forEach(function(t,n){e.push((+n).toString(36)+":"+t.toString(36))}),e.join(",")},t.prototype.deserialize=function(e){var t=this;this.buckets.clear(),e.split(",").forEach(function(e){var n=e.split(":");t.buckets.set(parseInt(n[0],36),parseInt(n[1],36))})};var i,a={},s={},o=new WeakMap,l="https://cdn.jsdelivr.net/gh/lojjic/unicode-font-resolver@v1.0.1/packages/data",h=new Map;function u(e,t,n){return e[t]?t:e[n]?n:function(e){for(var t in e)return t}(e)}return e.CodePointSet=t,e.clearCache=function(){a={},s={}},e.getFontsForString=function(e,c){void 0===c&&(c={});var d=c.lang;void 0===d&&(d=/\p{Script=Hangul}/u.test(e)?"ko":/\p{Script=Hiragana}|\p{Script=Katakana}/u.test(e)?"ja":"en");var p=c.category;void 0===p&&(p="sans-serif");var f=c.style;void 0===f&&(f="normal");var m=c.weight;void 0===m&&(m=400);var g=(c.dataUrl||l).replace(/\/$/g,""),v=new Map,_=new Uint8Array(e.length),x={},y={},S=Array(e.length),M=new Map,b=!1;function T(e){var t=h.get(e);return t||(t=fetch(g+"/"+e).then(function(e){if(!e.ok)throw Error(e.statusText);return e.json().then(function(e){if(!Array.isArray(e)||1!==e[0])throw Error("Incorrect schema version; need 1, got "+e[0]);return e[1]})}).catch(function(t){if(g!==l)return b||(console.error('unicode-font-resolver: Failed loading from dataUrl "'+g+'", trying default CDN. '+t.message),b=!0),g=l,h.delete(e),T(e);throw t}),h.set(e,t)),t}for(var E=0;E>16)+"/"+t+"-"+n+".json"}(n);S[t]=r,a[r]||M.has(r)||M.set(r,T(r).then(function(e){a[r]=e})),n>65535&&(E=++t)})(E);return Promise.all(M.values()).then(function(){M.clear();for(var t=0;t65535&&(t=++r)})(t);return Promise.all(M.values())}).then(function(){for(var n,a=null,l=0;l65535&&(_[++l]=_[l-1])}return{fontUrls:Array.from(v.keys()),chars:_}})},Object.defineProperty(e,"__esModule",{value:!0}),e}({})}],init:(e,t,n)=>e(t,n())}),p=()=>(self.performance||Date).now(),f=(0,l.default)(),m=[],g=0;function v(){let e=p();for(;m.length&&p()-e<5;)m.shift()();g=m.length?setTimeout(v,0):0}let _=(...e)=>new Promise((t,n)=>{m.push(()=>{let r=p();try{f.webgl.generateIntoCanvas(...e),t({timing:p()-r})}catch(e){n(e)}}),g||(g=setTimeout(v,0))}),x={},y=0;function S(e,t,n,r,i,a,s,h,u,c){let d="TroikaTextSDFGenerator_JS_"+y++%4,m=x[d];return m||(m=x[d]={workerModule:(0,o.defineWorkerModule)({name:d,workerId:d,dependencies:[l.default,p],init(e,t){let n=e().javascript.generate;return function(...e){let r=t();return{textureData:n(...e),timing:t()-r}}},getTransferables:e=>[e.textureData.buffer]}),requests:0,idleTimer:null}),m.requests++,clearTimeout(m.idleTimer),m.workerModule(e,t,n,r,i,a).then(({textureData:n,timing:r})=>{let i=p(),a=new Uint8Array(4*n.length);for(let e=0;e{(0,o.terminateWorker)(d)},2e3)),{timing:r}})}let M=f.webglUtils.resizeWebGLCanvasWithoutClearing,b={defaultFontURL:null,unicodeFontsURL:null,sdfGlyphSize:64,sdfMargin:1/16,sdfExponent:9,textureWidth:2048},T=new s.Color;function E(){return(self.performance||Date).now()}let w=Object.create(null);function A({path:e,atlasIndex:t,sdfViewBox:n},{sdfGlyphSize:i,sdfCanvas:a,contextLost:s},o){if(s)return Promise.resolve({timing:-1});let{textureWidth:l,sdfExponent:h}=b,u=Math.max(n[2]-n[0],n[3]-n[1]),c=Math.floor(t/4),d=c%(l/i)*i,p=Math.floor(c/(l/i))*i;return function(e,t,n,i,a,s,o,l,h,u,c=!0){return c?_(e,t,n,i,a,s,o,l,h,u).then(null,c=>(r||(console.warn("WebGL SDF generation failed, falling back to JS",c),r=!0),S(e,t,n,i,a,s,o,l,h,u))):S(e,t,n,i,a,s,o,l,h,u)}(i,i,e,n,u,h,a,d,p,t%4,o)}function R(e){return a||(a="undefined"==typeof document?{}:document.createElement("a")),a.href=e,a.href}function C(e){if("function"!=typeof createImageBitmap){console.info("Safari<15: applying SDF canvas workaround");let{sdfCanvas:t,sdfTexture:n}=e,{width:r,height:i}=t,a=e.sdfCanvas.getContext("webgl"),s=n.image.data;s&&s.length===r*i*4||(s=new Uint8Array(r*i*4),n.image={width:r,height:i,data:s},n.flipY=!1,n.isDataTexture=!0),a.readPixels(0,0,r,i,a.RGBA,a.UNSIGNED_BYTE,s)}}let P=(0,o.defineWorkerModule)({name:"Typesetter",dependencies:[function(e,t){let n=1/0,r=/[\u00AD\u034F\u061C\u115F-\u1160\u17B4-\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8]/,i="[^\\S\\u00A0]",a=RegExp(`${i}|[\\-\\u007C\\u00AD\\u2010\\u2012-\\u2014\\u2027\\u2056\\u2E17\\u2E40]`);function s({text:s="",font:c,lang:d,sdfGlyphSize:p=64,fontSize:f=400,fontWeight:m=1,fontStyle:g="normal",letterSpacing:v=0,lineHeight:_="normal",maxWidth:x=n,direction:y,textAlign:S="left",textIndent:M=0,whiteSpace:b="normal",overflowWrap:T="normal",anchorX:E=0,anchorY:w=0,metricsOnly:A=!1,unicodeFontsURL:R,preResolvedFonts:C=null,includeCaretPositions:P=!1,chunkedBoundsSize:U=8192,colorRanges:L=null},q){let D=h(),I={fontLoad:0,typesetting:0};s.indexOf("\r")>-1&&(console.info("Typesetter: got text with \\r chars; normalizing to \\n"),s=s.replace(/\r\n/g,"\n").replace(/\r/g,"\n")),f=+f,v=+v,x=+x,_=_||"normal",M=+M,function({text:t,lang:n,fonts:r,style:i,weight:a,preResolvedFonts:s,unicodeFontsURL:o},l){let h=({chars:e,fonts:t})=>{let n,r;let i=[];for(let a=0;a{I.fontLoad=h()-D;let c=isFinite(x),d=null,p=null,m=null,g=null,R=null,C=null,O=null,N=null,F=0,k=0,B="nowrap"!==b,z=new Map,G=h(),V=M,H=0,W=new u,X=[W];e.forEach(e=>{let t,n;let{fontObj:o}=e,{ascender:l,descender:h,unitsPerEm:d,lineGap:p,capHeight:m,xHeight:g}=o,y=z.get(o);if(!y){let e=f/d,t="normal"===_?(l-h+p)*e:_*f,n=(t-(l-h)*e)/2,r=Math.min(t,(l-h)*e),i=(l+h)/2*e+r/2;y={index:z.size,src:o.src,fontObj:o,fontSizeMult:e,unitsPerEm:d,ascender:l*e,descender:h*e,capHeight:m*e,xHeight:g*e,lineHeight:t,baseline:-n-l*e,caretTop:(l+h)/2*e+r/2,caretBottom:i-r},z.set(o,y)}let{fontSizeMult:S}=y,b=s.slice(e.start,e.end+1);o.forEachGlyph(b,f,v,(o,l,h,d)=>{let p;l+=H,d+=e.start,t=l,n=o;let m=s.charAt(d),g=o.advanceWidth*S,_=W.count;if("isEmpty"in o||(o.isWhitespace=!!m&&new RegExp(i).test(m),o.canBreakAfter=!!m&&a.test(m),o.isEmpty=o.xMin===o.xMax||o.yMin===o.yMax||r.test(m)),!o.isWhitespace&&!o.isEmpty&&k++,B&&c&&!o.isWhitespace&&l+g+V>x&&_){if(W.glyphAt(_-1).glyphObj.canBreakAfter)p=new u,V=-l;else for(let e=_;e--;){if(0===e&&"break-word"===T){p=new u,V=-l;break}if(W.glyphAt(e).glyphObj.canBreakAfter){let t=(p=W.splitAt(e+1)).glyphAt(0).x;V-=t;for(let e=p.count;e--;)p.glyphAt(e).x-=t;break}}p&&(W.isSoftWrapped=!0,W=p,X.push(W),F=x)}let b=W.glyphAt(W.count);b.glyphObj=o,b.x=l+V,b.y=h,b.width=g,b.charIndex=d,b.fontData=y,"\n"===m&&(W=new u,X.push(W),V=-(l+g+v*f)+M)}),H=t+n.advanceWidth*S+v*f});let j=0;X.forEach(e=>{let t=!0;for(let n=e.count;n--;){let r=e.glyphAt(n);t&&!r.glyphObj.isWhitespace&&(e.width=r.x+r.width,e.width>F&&(F=e.width),t=!1);let{lineHeight:i,capHeight:a,xHeight:s,baseline:o}=r.fontData;i>e.lineHeight&&(e.lineHeight=i);let l=o-e.baseline;l<0&&(e.baseline+=l,e.cap+=l,e.ex+=l),e.cap=Math.max(e.cap,e.baseline+a),e.ex=Math.max(e.ex,e.baseline+s)}e.baseline-=j,e.cap-=j,e.ex-=j,j+=e.lineHeight});let Y=0,Z=0;if(E&&("number"==typeof E?Y=-E:"string"==typeof E&&(Y=-F*("left"===E?0:"center"===E?.5:"right"===E?1:o(E)))),w&&("number"==typeof w?Z=-w:"string"==typeof w&&(Z="top"===w?0:"top-baseline"===w?-X[0].baseline:"top-cap"===w?-X[0].cap:"top-ex"===w?-X[0].ex:"middle"===w?j/2:"bottom"===w?j:"bottom-baseline"===w?X[X.length-1].baseline:o(w)*j)),!A){let e,r;let i=t.getEmbeddingLevels(s,y);d=new Uint16Array(k),p=new Uint8Array(k),m=new Float32Array(2*k),g={},O=[n,n,-n,-n],N=[],P&&(C=new Float32Array(4*s.length)),L&&(R=new Uint8Array(3*k));let a=0,o=-1,h=-1;if(X.forEach((u,c)=>{let{count:f,width:v}=u;if(f>0){let c,_=0;for(let e=f;e--&&u.glyphAt(e).glyphObj.isWhitespace;)_++;let x=0,y=0;if("center"===S)x=(F-v)/2;else if("right"===S)x=F-v;else if("justify"===S&&u.isSoftWrapped){let e=0;for(let t=f-_;t--;)u.glyphAt(t).glyphObj.isWhitespace&&e++;y=(F-v)/e}if(y||x){let e=0;for(let t=0;t=t){let t=e,a=e;for(;an)break;ac=e;for(let v=0;v1&&l(C,o,i),o=e}if(L){let{charIndex:e}=f;for(;e>h;)h++,L.hasOwnProperty(h)&&(r=L[h])}if(!c.isWhitespace&&!c.isEmpty){let t=a++,{fontSizeMult:i,src:s,index:o}=f.fontData,l=g[s]||(g[s]={});l[_]||(l[_]={path:c.path,pathBounds:[c.xMin,c.yMin,c.xMax,c.yMax]});let h=f.x+Y,v=f.y+u.baseline+Z;m[2*t]=h,m[2*t+1]=v;let x=h+c.xMin*i,y=v+c.yMin*i,S=h+c.xMax*i,M=v+c.yMax*i;xO[2]&&(O[2]=S),M>O[3]&&(O[3]=M),t%U==0&&(e={start:t,end:t,rect:[n,n,-n,-n]},N.push(e)),e.end++;let b=e.rect;if(xb[2]&&(b[2]=S),M>b[3]&&(b[3]=M),d[t]=_,p[t]=o,L){let e=3*t;R[e]=r>>16&255,R[e+1]=r>>8&255,R[e+2]=255&r}}}}}),C){let e=s.length-o;e>1&&l(C,o,e)}}let K=[];z.forEach(({index:e,src:t,unitsPerEm:n,ascender:r,descender:i,lineHeight:a,capHeight:s,xHeight:o})=>{K[e]={src:t,unitsPerEm:n,ascender:r,descender:i,lineHeight:a,capHeight:s,xHeight:o}}),I.typesetting=h()-G,q({glyphIds:d,glyphFontIndices:p,glyphPositions:m,glyphData:g,fontData:K,caretPositions:C,glyphColors:R,chunkedBounds:N,fontSize:f,topBaseline:Z+X[0].baseline,blockBounds:[Y,Z-j,Y+F,Z],visibleBounds:O,timings:I})})}function o(e){let t=e.match(/^([\d.]+)%$/),n=t?parseFloat(t[1]):NaN;return isNaN(n)?0:n/100}function l(e,t,n){let r=e[4*t],i=e[4*t+1],a=e[4*t+2],s=e[4*t+3],o=(i-r)/n;for(let i=0;i(Object.defineProperty(e,t,{get(){return this.data[this.index*c.length+n]},set(e){this.data[this.index*c.length+n]=e}}),e),{data:null,index:0}),{typeset:s,measure:function(e,t){s({...e,metricsOnly:!0},e=>{let[n,r,i,a]=e.blockBounds;t({width:i-n,height:a-r})})}}},d,h.default],init:(e,t,n)=>e(t,n())}),U=(0,o.defineWorkerModule)({name:"Typesetter",dependencies:[P],init:e=>function(t){return new Promise(n=>{e.typeset(t,n)})},getTransferables(e){let t=[];for(let n in e)e[n]&&e[n].buffer&&t.push(e[n].buffer);return t}}),L={},q="aTroikaGlyphIndex";class D extends s.InstancedBufferGeometry{constructor(){super(),this.detail=1,this.curveRadius=0,this.groups=[{start:0,count:1/0,materialIndex:0},{start:0,count:1/0,materialIndex:1}],this.boundingSphere=new s.Sphere,this.boundingBox=new s.Box3}computeBoundingSphere(){}computeBoundingBox(){}setSide(e){let t=this.getIndex().count;this.setDrawRange(e===s.BackSide?t/2:0,e===s.DoubleSide?t:t/2)}set detail(e){if(e!==this._detail){this._detail=e,("number"!=typeof e||e<1)&&(e=1);let t=function(e){let t=L[e];if(!t){let n=new s.PlaneGeometry(1,1,e,e),r=n.clone(),i=n.attributes,a=r.attributes,o=new s.BufferGeometry,l=i.uv.count;for(let e=0;e{o.setAttribute(e,new s.Float32BufferAttribute([...i[e].array,...a[e].array],i[e].itemSize))}),o.setIndex([...n.index.array,...r.index.array.map(e=>e+l)]),o.translate(.5,.5,0),t=L[e]=o}return t}(e);["position","normal","uv"].forEach(e=>{this.attributes[e]=t.attributes[e].clone()}),this.setIndex(t.getIndex().clone())}}get detail(){return this._detail}set curveRadius(e){e!==this._curveRadius&&(this._curveRadius=e,this._updateBounds())}get curveRadius(){return this._curveRadius}updateGlyphs(e,t,n,r,i){I(this,"aTroikaGlyphBounds",e,4),I(this,q,t,1),I(this,"aTroikaGlyphColor",i,3),this._blockBounds=n,this._chunkedBounds=r,this.instanceCount=t.length,this._updateBounds()}_updateBounds(){let e=this._blockBounds;if(e){let{curveRadius:t,boundingBox:n}=this;if(t){let{PI:r,floor:i,min:a,max:s,sin:o,cos:l}=Math,h=r/2,u=2*r,c=Math.abs(t),d=e[0]/c,p=e[2]/c,f=i((d+h)/u)!==i((p+h)/u)?-c:a(o(d)*c,o(p)*c),m=i((d-h)/u)!==i((p-h)/u)?c:s(o(d)*c,o(p)*c),g=i((d+r)/u)!==i((p+r)/u)?2*c:s(c-l(d)*c,c-l(p)*c);n.min.set(f,e[1],t<0?-g:0),n.max.set(m,e[3],t<0?0:g)}else n.min.set(e[0],e[1],0),n.max.set(e[2],e[3],0);n.getBoundingSphere(this.boundingSphere)}}applyClipRect(e){let t=this.getAttribute(q).count,n=this._chunkedBounds;if(n)for(let r=n.length;r--;){t=n[r].end;let i=n[r].rect;if(i[1]e.y&&i[0]e.x)break}this.instanceCount=t}}function I(e,t,n,r){let i=e.getAttribute(t);n?i&&i.array.length===n.length?(i.array.set(n),i.needsUpdate=!0):(e.setAttribute(t,new s.InstancedBufferAttribute(n,r)),delete e._maxInstanceCount,e.dispose()):i&&e.deleteAttribute(t)}let O=` +uniform vec2 uTroikaSDFTextureSize; +uniform float uTroikaSDFGlyphSize; +uniform vec4 uTroikaTotalBounds; +uniform vec4 uTroikaClipRect; +uniform mat3 uTroikaOrient; +uniform bool uTroikaUseGlyphColors; +uniform float uTroikaDistanceOffset; +uniform float uTroikaBlurRadius; +uniform vec2 uTroikaPositionOffset; +uniform float uTroikaCurveRadius; +attribute vec4 aTroikaGlyphBounds; +attribute float aTroikaGlyphIndex; +attribute vec3 aTroikaGlyphColor; +varying vec2 vTroikaGlyphUV; +varying vec4 vTroikaTextureUVBounds; +varying float vTroikaTextureChannel; +varying vec3 vTroikaGlyphColor; +varying vec2 vTroikaGlyphDimensions; +`,N=` +vec4 bounds = aTroikaGlyphBounds; +bounds.xz += uTroikaPositionOffset.x; +bounds.yw -= uTroikaPositionOffset.y; + +vec4 outlineBounds = vec4( + bounds.xy - uTroikaDistanceOffset - uTroikaBlurRadius, + bounds.zw + uTroikaDistanceOffset + uTroikaBlurRadius +); +vec4 clippedBounds = vec4( + clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw), + clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw) +); + +vec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy); + +position.xy = mix(bounds.xy, bounds.zw, clippedXY); + +uv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy); + +float rad = uTroikaCurveRadius; +if (rad != 0.0) { + float angle = position.x / rad; + position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad); + normal.xz = vec2(sin(angle), cos(angle)); +} + +position = uTroikaOrient * position; +normal = uTroikaOrient * normal; + +vTroikaGlyphUV = clippedXY.xy; +vTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]); + + +float txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize; +vec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize; +vec2 txStartUV = txUvPerSquare * vec2( + mod(floor(aTroikaGlyphIndex / 4.0), txCols), + floor(floor(aTroikaGlyphIndex / 4.0) / txCols) +); +vTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare); +vTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0); +`,F=` +uniform sampler2D uTroikaSDFTexture; +uniform vec2 uTroikaSDFTextureSize; +uniform float uTroikaSDFGlyphSize; +uniform float uTroikaSDFExponent; +uniform float uTroikaDistanceOffset; +uniform float uTroikaFillOpacity; +uniform float uTroikaOutlineOpacity; +uniform float uTroikaBlurRadius; +uniform vec3 uTroikaStrokeColor; +uniform float uTroikaStrokeWidth; +uniform float uTroikaStrokeOpacity; +uniform bool uTroikaSDFDebug; +varying vec2 vTroikaGlyphUV; +varying vec4 vTroikaTextureUVBounds; +varying float vTroikaTextureChannel; +varying vec2 vTroikaGlyphDimensions; + +float troikaSdfValueToSignedDistance(float alpha) { + // Inverse of exponential encoding in webgl-sdf-generator + + float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y); + float absDist = (1.0 - pow(2.0 * (alpha > 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension; + float signedDist = absDist * (alpha > 0.5 ? -1.0 : 1.0); + return signedDist; +} + +float troikaGlyphUvToSdfValue(vec2 glyphUV) { + vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV); + vec4 rgba = texture2D(uTroikaSDFTexture, textureUV); + float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1 + return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a; +} + +float troikaGlyphUvToDistance(vec2 uv) { + return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv)); +} + +float troikaGetAADist() { + + #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300 + return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5; + #else + return vTroikaGlyphDimensions.x / 64.0; + #endif +} + +float troikaGetFragDistValue() { + vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize); + float distance = troikaGlyphUvToDistance(clampedGlyphUV); + + // Extrapolate distance when outside bounds: + distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : + length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions); + + + + return distance; +} + +float troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) { + #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL) + float alpha = step(-distanceOffset, -distance); + #else + + float alpha = smoothstep( + distanceOffset + aaDist, + distanceOffset - aaDist, + distance + ); + #endif + + return alpha; +} +`,k=` +float aaDist = troikaGetAADist(); +float fragDistance = troikaGetFragDistValue(); +float edgeAlpha = uTroikaSDFDebug ? + troikaGlyphUvToSdfValue(vTroikaGlyphUV) : + troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius)); + +#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL) +vec4 fillRGBA = gl_FragColor; +fillRGBA.a *= uTroikaFillOpacity; +vec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity); +if (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb; +gl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep( + -uTroikaStrokeWidth - aaDist, + -uTroikaStrokeWidth + aaDist, + fragDistance +)); +gl_FragColor.a *= edgeAlpha; +#endif + +if (edgeAlpha == 0.0) { + discard; +} +`,B=new s.MeshBasicMaterial({color:16777215,side:s.DoubleSide,transparent:!0}),z=new s.Matrix4,G=new s.Vector3,V=new s.Vector3,H=[],W=new s.Vector3,X="+x+y";function j(e){return Array.isArray(e)?e[0]:e}let Y=()=>{let e=new s.Mesh(new s.PlaneGeometry(1,1),B);return Y=()=>e,e},Z=()=>{let e=new s.Mesh(new s.PlaneGeometry(1,1,32,1),B);return Z=()=>e,e},K={type:"syncstart"},J={type:"synccomplete"},$=["font","fontSize","fontStyle","fontWeight","lang","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],Q=$.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");class ee extends s.Mesh{constructor(){super(new D,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.unicodeFontsURL=null,this.fontSize=.1,this.fontWeight="normal",this.fontStyle="normal",this.lang=null,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=8421504,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=X,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(e){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(e):(this._isSyncing=!0,this.dispatchEvent(K),function(e,t){e=function(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}({},e);let n=E(),{defaultFontURL:r}=b,i=[];if(r&&i.push({label:"default",src:R(r)}),e.font&&i.push({label:"user",src:R(e.font)}),e.font=i,e.text=""+e.text,e.sdfGlyphSize=e.sdfGlyphSize||b.sdfGlyphSize,e.unicodeFontsURL=e.unicodeFontsURL||b.unicodeFontsURL,null!=e.colorRanges){let t={};for(let n in e.colorRanges)if(e.colorRanges.hasOwnProperty(n)){let r=e.colorRanges[n];"number"!=typeof r&&(r=T.set(r).getHex()),t[n]=r}e.colorRanges=t}Object.freeze(e);let{textureWidth:a,sdfExponent:o}=b,{sdfGlyphSize:l}=e,h=a/l*4,u=w[l];if(!u){let e=document.createElement("canvas");e.width=a,e.height=256*l/h,(u=w[l]={glyphCount:0,sdfGlyphSize:l,sdfCanvas:e,sdfTexture:new s.Texture(e,void 0,void 0,void 0,s.LinearFilter,s.LinearFilter),contextLost:!1,glyphsByFont:new Map}).sdfTexture.generateMipmaps=!1,function(e){let t=e.sdfCanvas;t.addEventListener("webglcontextlost",t=>{console.log("Context Lost",t),t.preventDefault(),e.contextLost=!0}),t.addEventListener("webglcontextrestored",t=>{console.log("Context Restored",t),e.contextLost=!1;let n=[];e.glyphsByFont.forEach(t=>{t.forEach(t=>{n.push(A(t,e,!0))})}),Promise.all(n).then(()=>{C(e),e.sdfTexture.needsUpdate=!0})})}(u)}let{sdfTexture:c,sdfCanvas:d}=u;U(e).then(r=>{let{glyphIds:i,glyphFontIndices:s,fontData:p,glyphPositions:f,fontSize:m,timings:g}=r,v=[],_=new Float32Array(4*i.length),x=0,y=0,S=E(),T=p.map(e=>{let t=u.glyphsByFont.get(e.src);return t||u.glyphsByFont.set(e.src,t=new Map),t});i.forEach((e,t)=>{let n=s[t],{src:a,unitsPerEm:o}=p[n],h=T[n].get(e);if(!h){let{path:t,pathBounds:i}=r.glyphData[a][e],s=Math.max(i[2]-i[0],i[3]-i[1])/l*(b.sdfMargin*l+.5),o=u.glyphCount++,c=[i[0]-s,i[1]-s,i[2]+s,i[3]+s];T[n].set(e,h={path:t,atlasIndex:o,sdfViewBox:c}),v.push(h)}let{sdfViewBox:c}=h,d=f[y++],g=f[y++],S=m/o;_[x++]=d+c[0]*S,_[x++]=g+c[1]*S,_[x++]=d+c[2]*S,_[x++]=g+c[3]*S,i[t]=h.atlasIndex}),g.quads=(g.quads||0)+(E()-S);let w=E();g.sdf={};let R=d.height,P=Math.pow(2,Math.ceil(Math.log2(Math.ceil(u.glyphCount/h)*l)));P>R&&(console.info(`Increasing SDF texture size ${R}->${P}`),M(d,a,P),c.dispose()),Promise.all(v.map(t=>A(t,u,e.gpuAccelerateSDF).then(({timing:e})=>{g.sdf[t.atlasIndex]=e}))).then(()=>{v.length&&!u.contextLost&&(C(u),c.needsUpdate=!0),g.sdfTotal=E()-w,g.total=E()-n,t(Object.freeze({parameters:e,sdfTexture:c,sdfGlyphSize:l,sdfExponent:o,glyphBounds:_,glyphAtlasIndices:i,glyphColors:r.glyphColors,caretPositions:r.caretPositions,chunkedBounds:r.chunkedBounds,ascender:r.ascender,descender:r.descender,lineHeight:r.lineHeight,capHeight:r.capHeight,xHeight:r.xHeight,topBaseline:r.topBaseline,blockBounds:r.blockBounds,visibleBounds:r.visibleBounds,timings:r.timings}))})}),Promise.resolve().then(()=>{!u.contextLost&&(d._warm||(f.webgl.isSupported(d),d._warm=!0))})}({text:this.text,font:this.font,lang:this.lang,fontSize:this.fontSize||.1,fontWeight:this.fontWeight||"normal",fontStyle:this.fontStyle||"normal",letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF,unicodeFontsURL:this.unicodeFontsURL},t=>{this._isSyncing=!1,this._textRenderInfo=t,this.geometry.updateGlyphs(t.glyphBounds,t.glyphAtlasIndices,t.blockBounds,t.chunkedBounds,t.glyphColors);let n=this._queuedSyncs;n&&(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=>{n.forEach(e=>e&&e())})),this.dispatchEvent(J),e&&e()})))}onBeforeRender(e,t,n,r,i,a){this.sync(),i.isTroikaTextMaterial&&this._prepareForRender(i),i._hadOwnSide=i.hasOwnProperty("side"),this.geometry.setSide(i._actualSide=i.side),i.side=s.FrontSide}onAfterRender(e,t,n,r,i,a){i._hadOwnSide?i.side=i._actualSide:delete i.side}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}get material(){let e=this._derivedMaterial,t=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=B.clone());if(e&&e.baseMaterial===t||(e=this._derivedMaterial=function(e){let t=(0,u.createDerivedMaterial)(e,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new s.Vector2},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new s.Vector4(0,0,0,0)},uTroikaClipRect:{value:new s.Vector4(0,0,0,0)},uTroikaDistanceOffset:{value:0},uTroikaOutlineOpacity:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new s.Vector2},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new s.Color},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new s.Matrix3},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:O,vertexTransform:N,fragmentDefs:F,fragmentColorTransform:k,customRewriter({vertexShader:e,fragmentShader:t}){let n=/\buniform\s+vec3\s+diffuse\b/;return n.test(t)&&(t=t.replace(n,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),n.test(e)||(e=e.replace(u.voidMainRegExp,"uniform vec3 diffuse;\n$&\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\n"))),{vertexShader:e,fragmentShader:t}}});return t.transparent=!0,Object.defineProperties(t,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),t}(t),t.addEventListener("dispose",function n(){t.removeEventListener("dispose",n),e.dispose()})),!this.outlineWidth&&!this.outlineBlur&&!this.outlineOffsetX&&!this.outlineOffsetY)return e;{let t=e._outlineMtl;return t||((t=e._outlineMtl=Object.create(e,{id:{value:e.id+.1}})).isTextOutlineMaterial=!0,t.depthWrite=!1,t.map=null,e.addEventListener("dispose",function n(){e.removeEventListener("dispose",n),t.dispose()})),[t,e]}}set material(e){e&&e.isTroikaTextMaterial?(this._derivedMaterial=e,this._baseMaterial=e.baseMaterial):this._baseMaterial=e}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(e){this.geometry.detail=e}get curveRadius(){return this.geometry.curveRadius}set curveRadius(e){this.geometry.curveRadius=e}get customDepthMaterial(){return j(this.material).getDepthMaterial()}get customDistanceMaterial(){return j(this.material).getDistanceMaterial()}_prepareForRender(e){let t=e.isTextOutlineMaterial,n=e.uniforms,r=this.textRenderInfo;if(r){let e,i,a;let{sdfTexture:s,blockBounds:o}=r;n.uTroikaSDFTexture.value=s,n.uTroikaSDFTextureSize.value.set(s.image.width,s.image.height),n.uTroikaSDFGlyphSize.value=r.sdfGlyphSize,n.uTroikaSDFExponent.value=r.sdfExponent,n.uTroikaTotalBounds.value.fromArray(o),n.uTroikaUseGlyphColors.value=!t&&!!r.glyphColors;let l=0,h=0,u=0,c=0,d=0;if(t){let{outlineWidth:t,outlineOffsetX:n,outlineOffsetY:r,outlineBlur:i,outlineOpacity:a}=this;l=this._parsePercent(t)||0,h=Math.max(0,this._parsePercent(i)||0),e=a,c=this._parsePercent(n)||0,d=this._parsePercent(r)||0}else(u=Math.max(0,this._parsePercent(this.strokeWidth)||0))&&(a=this.strokeColor,n.uTroikaStrokeColor.value.set(null==a?8421504:a),null==(i=this.strokeOpacity)&&(i=1)),e=this.fillOpacity;n.uTroikaDistanceOffset.value=l,n.uTroikaPositionOffset.value.set(c,d),n.uTroikaBlurRadius.value=h,n.uTroikaStrokeWidth.value=u,n.uTroikaStrokeOpacity.value=i,n.uTroikaFillOpacity.value=null==e?1:e,n.uTroikaCurveRadius.value=this.curveRadius||0;let p=this.clipRect;if(p&&Array.isArray(p)&&4===p.length)n.uTroikaClipRect.value.fromArray(p);else{let e=100*(this.fontSize||.1);n.uTroikaClipRect.value.set(o[0]-e,o[1]-e,o[2]+e,o[3]+e)}this.geometry.applyClipRect(n.uTroikaClipRect.value)}n.uTroikaSDFDebug.value=!!this.debugSDF,e.polygonOffset=!!this.depthOffset,e.polygonOffsetFactor=e.polygonOffsetUnits=this.depthOffset||0;let i=t?this.outlineColor||0:this.color;if(null==i)delete e.color;else{let t=e.hasOwnProperty("color")?e.color:e.color=new s.Color;(i!==t._input||"object"==typeof i)&&t.set(t._input=i)}let a=this.orientation||X;if(a!==e._orientation){let t=n.uTroikaOrient.value,r=(a=a.replace(/[^-+xyz]/g,""))!==X&&a.match(/^([-+])([xyz])([-+])([xyz])$/);if(r){let[,e,n,i,a]=r;G.set(0,0,0)[n]="-"===e?1:-1,V.set(0,0,0)[a]="-"===i?-1:1,z.lookAt(W,G.cross(V),V),t.setFromMatrix4(z)}else t.identity();e._orientation=a}}_parsePercent(e){if("string"==typeof e){let t=e.match(/^(-?[\d.]+)%$/),n=t?parseFloat(t[1]):NaN;e=(isNaN(n)?0:n/100)*this.fontSize}return e}localPositionToTextCoords(e,t=new s.Vector2){t.copy(e);let n=this.curveRadius;return n&&(t.x=Math.atan2(e.x,Math.abs(n)-Math.abs(e.z))*Math.abs(n)),t}worldPositionToTextCoords(e,t=new s.Vector2){return G.copy(e),this.localPositionToTextCoords(this.worldToLocal(G),t)}raycast(e,t){let{textRenderInfo:n,curveRadius:r}=this;if(n){let i=n.blockBounds,a=r?Z():Y(),s=a.geometry,{position:o,uv:l}=s.attributes;for(let e=0;e{this[t]=e[t]}),this}clone(){return new this.constructor().copy(this)}}$.forEach(e=>{let t="_private_"+e;Object.defineProperty(ee.prototype,e,{get(){return this[t]},set(e){e!==this[t]&&(this[t]=e,this._needsSync=!0)}})}),new WeakMap,new WeakMap}),a("8ue7g",function(t,n){function r(){var e=Object.create(null);function t(e,t){var n=void 0;self.troikaDefine=function(e){return n=e};var r=URL.createObjectURL(new Blob(["/** "+e.replace(/\*/g,"")+" **/\n\ntroikaDefine(\n"+t+"\n)"],{type:"application/javascript"}));try{importScripts(r)}catch(e){console.error(e)}return URL.revokeObjectURL(r),delete self.troikaDefine,n}self.addEventListener("message",function(n){var r=n.data,i=r.messageId,a=r.action,s=r.data;try{"registerModule"===a&&function n(r,i){var a=r.id,s=r.name,o=r.dependencies;void 0===o&&(o=[]);var l=r.init;void 0===l&&(l=function(){});var h=r.getTransferables;if(void 0===h&&(h=null),!e[a])try{o=o.map(function(t){return t&&t.isWorkerModule&&(n(t,function(e){if(e instanceof Error)throw e}),t=e[t.id].value),t}),l=t("<"+s+">.init",l),h&&(h=t("<"+s+">.getTransferables",h));var u=null;"function"==typeof l?u=l.apply(void 0,o):console.error("worker module init function failed to rehydrate"),e[a]={id:a,value:u,getTransferables:h},i(u)}catch(e){e&&e.noLog||console.error(e),i(e)}}(s,function(e){e instanceof Error?postMessage({messageId:i,success:!1,error:e.message}):postMessage({messageId:i,success:!0,result:{isCallable:"function"==typeof e}})}),"callModule"===a&&function(t,n){var r,i=t.id,a=t.args;e[i]&&"function"==typeof e[i].value||n(Error("Worker module "+i+": not found or its 'init' did not return a function"));try{var s=(r=e[i]).value.apply(r,a);s&&"function"==typeof s.then?s.then(o,function(e){return n(e instanceof Error?e:Error(""+e))}):o(s)}catch(e){n(e)}function o(t){try{var r=e[i].getTransferables&&e[i].getTransferables(t);r&&Array.isArray(r)&&r.length||(r=void 0),n(t,r)}catch(e){console.error(e),n(e)}}}(s,function(e,t){e instanceof Error?postMessage({messageId:i,success:!1,error:e.message}):postMessage({messageId:i,success:!0,result:e},t||void 0)})}catch(e){postMessage({messageId:i,success:!1,error:e.stack})}})}e(t.exports,"defineWorkerModule",()=>function e(t){if((!t||"function"!=typeof t.init)&&!l)throw Error("requires `options.init` function");var n,r=t.dependencies,i=t.init,o=t.getTransferables,h=t.workerId;if(!a())return(n=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return n._getInitResult().then(function(t){if("function"==typeof t)return t.apply(void 0,e);throw Error("Worker module function was called but `init` did not return a callable function")})})._getInitResult=function(){var e=t.dependencies,r=t.init,i=Promise.all(e=Array.isArray(e)?e.map(function(e){return e&&e._getInitResult?e._getInitResult():e}):[]).then(function(e){return r.apply(null,e)});return n._getInitResult=function(){return i},i},n;null==h&&(h="#default");var c="workerModule"+ ++s,d=t.name||c,m=null;function g(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(!m){m=f(h,"registerModule",g.workerModuleData);var n=function(){m=null,u[h].delete(n)};(u[h]||(u[h]=new Set)).add(n)}return m.then(function(t){if(t.isCallable)return f(h,"callModule",{id:c,args:e});throw Error("Worker module function was called but `init` did not return a callable function")})}return r=r&&r.map(function(t){return"function"!=typeof t||t.workerModuleData||(l=!0,t=e({workerId:h,name:"<"+d+"> function dependency: "+t.name,init:"function(){return (\n"+p(t)+"\n)}"}),l=!1),t&&t.workerModuleData&&(t=t.workerModuleData),t}),g.workerModuleData={isWorkerModule:!0,id:c,name:d,dependencies:r,init:p(i),getTransferables:o&&p(o)},g}),e(t.exports,"terminateWorker",()=>d),i("hPtJY");var a=function(){var e=!1;if("undefined"!=typeof window&&void 0!==window.document)try{new Worker(URL.createObjectURL(new Blob([""],{type:"application/javascript"}))).terminate(),e=!0}catch(e){console.log("Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: ["+e.message+"]")}return a=function(){return e},e},s=0,o=0,l=!1,h=Object.create(null),u=Object.create(null),c=Object.create(null);function d(e){u[e]&&u[e].forEach(function(e){e()}),h[e]&&(h[e].terminate(),delete h[e])}function p(e){var t=e.toString();return!/^function/.test(t)&&/^\w+\s*\(/.test(t)&&(t="function "+t),t}function f(e,t,n){return new Promise(function(i,a){var s=++o;c[s]=function(e){e.success?i(e.result):a(Error("Error in worker "+t+" call: "+e.error))},(function(e){var t=h[e];if(!t){var n=p(r);(t=h[e]=new Worker(URL.createObjectURL(new Blob(["/** Worker Module Bootstrap: "+e.replace(/\*/g,"")+" **/\n\n;("+n+")()"],{type:"application/javascript"})))).onmessage=function(e){var t=e.data,n=t.messageId,r=c[n];if(!r)throw Error("WorkerModule response with empty or unknown messageId");delete c[n],r(t)}}return t})(e).postMessage({messageId:s,action:t,data:n})})}}),a("hPtJY",function(e,t){var n,r,i,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var h=[],u=!1,c=-1;function d(){u&&i&&(u=!1,i.length?h=i.concat(h):c=-1,h.length&&p())}function p(){if(!u){var e=l(d);u=!0;for(var t=h.length;t;){for(i=h,h=[];++c1)for(var n=1;nr);function r(){return function(e){function t(e,t){for(var n,r,i,a,s,o=/([MLQCZ])([^MLQCZ]*)/g;n=o.exec(e);){var l=n[2].replace(/^\s*|\s*$/g,"").split(/[,\s]+/).map(function(e){return parseFloat(e)});switch(n[1]){case"M":a=r=l[0],s=i=l[1];break;case"L":(l[0]!==a||l[1]!==s)&&t("L",a,s,a=l[0],s=l[1]);break;case"Q":t("Q",a,s,a=l[2],s=l[3],l[0],l[1]);break;case"C":t("C",a,s,a=l[4],s=l[5],l[0],l[1],l[2],l[3]);break;case"Z":(a!==r||s!==i)&&t("L",a,s,r,i)}}}function n(e,n,r){void 0===r&&(r=16);var i={x:0,y:0};t(e,function(e,t,a,s,o,l,h,u,c){switch(e){case"L":n(t,a,s,o);break;case"Q":for(var d=t,p=a,f=1;f0;)r[i]=arguments[i+2];var a=o[t]||(o[t]=n.getUniformLocation(h,t));n["uniform"+e].apply(n,[a].concat(r))},setAttribute:function(e,t,r,i,o){var l=a[e];l||(l=a[e]={buf:n.createBuffer(),loc:n.getAttribLocation(h,e),data:null}),n.bindBuffer(n.ARRAY_BUFFER,l.buf),n.vertexAttribPointer(l.loc,t,n.FLOAT,!1,0,0),n.enableVertexAttribArray(l.loc),s?n.vertexAttribDivisor(l.loc,i):d("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(l.loc,i),o!==l.data&&(n.bufferData(n.ARRAY_BUFFER,o,r),l.data=o)}})}}}l[e].transaction(i)},withTexture:function(e,t){u++;try{n.activeTexture(n.TEXTURE0+u);var r=h[e];r||(r=h[e]=n.createTexture(),n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST)),n.bindTexture(n.TEXTURE_2D,r),t(r,u)}finally{u--}},withTextureFramebuffer:function(e,t,r){var i=n.createFramebuffer();c.push(i),n.bindFramebuffer(n.FRAMEBUFFER,i),n.activeTexture(n.TEXTURE0+t),n.bindTexture(n.TEXTURE_2D,e),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);try{r(i)}finally{n.deleteFramebuffer(i),n.bindFramebuffer(n.FRAMEBUFFER,c[--c.length-1]||null)}},handleContextLoss:f})}t(r)}function o(e,t,n,i,a,o,l,h){void 0===l&&(l=15),void 0===h&&(h=null),s(e,function(e){var s=e.gl,u=e.withProgram;(0,e.withTexture)("copy",function(e,c){s.texImage2D(s.TEXTURE_2D,0,s.RGBA,a,o,0,s.RGBA,s.UNSIGNED_BYTE,t),u("copy",r,"precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){gl_FragColor=texture2D(tex,vUV);}",function(e){var t=e.setUniform;(0,e.setAttribute)("aUV",2,s.STATIC_DRAW,0,new Float32Array([0,0,2,0,0,2])),t("1i","image",c),s.bindFramebuffer(s.FRAMEBUFFER,h||null),s.disable(s.BLEND),s.colorMask(8&l,4&l,2&l,1&l),s.viewport(n,i,a,o),s.scissor(n,i,a,o),s.drawArrays(s.TRIANGLES,0,3)})})})}var l=Object.freeze({__proto__:null,withWebGLContext:s,renderImageData:o,resizeWebGLCanvasWithoutClearing:function(e,t,n){var r=e.width,i=e.height;s(e,function(a){var s=a.gl,l=new Uint8Array(r*i*4);s.readPixels(0,0,r,i,s.RGBA,s.UNSIGNED_BYTE,l),e.width=t,e.height=n,o(s,l,0,0,r,i)})}});function h(e,t,r,i,a,s){void 0===s&&(s=1);var o=new Uint8Array(e*t),l=i[2]-i[0],h=i[3]-i[1],u=[];n(r,function(e,t,n,r){u.push({x1:e,y1:t,x2:n,y2:r,minX:Math.min(e,n),minY:Math.min(t,r),maxX:Math.max(e,n),maxY:Math.max(t,r)})}),u.sort(function(e,t){return e.maxX-t.maxX});for(var c=0;ca.minX&&t-ra.minY){var s=function(e,t,n,r,i,a){var s=i-n,o=a-r,l=s*s+o*o,h=l?Math.max(0,Math.min(1,((e-n)*s+(t-r)*o)/l)):0,u=e-(n+h*s),c=t-(r+h*o);return u*u+c*c}(e,t,a.x1,a.y1,a.x2,a.y2);st!=i.y2>t&&e<(i.x2-i.x1)*(t-i.y1)/(i.y2-i.y1)+i.x1&&(n+=i.y1p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.yr);var r=function(){return function(e){var t,n,r,i,a={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},s={},o={};s.L=1,o[1]="L",Object.keys(a).forEach(function(e,t){s[e]=1<1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function g(e,t){var n,r=0,i=new Map,a=t&&new Map;return e.split(",").forEach(function e(s){if(-1!==s.indexOf("+"))for(var o=+s;o--;)e(n);else{n=s;var l=s.split(">"),h=l[0],u=l[1];h=String.fromCodePoint(r+=parseInt(h,36)),u=String.fromCodePoint(r+=parseInt(u,36)),i.set(h,u),t&&a.set(u,h)}}),{map:i,reverseMap:a}}function v(){if(!t){var e=g(m.pairs,!0),i=e.map,a=e.reverseMap;t=i,n=a,r=g(m.canonical,!1).map}}function _(e){return v(),t.get(e)||null}function x(e){return v(),n.get(e)||null}function y(e){return v(),r.get(e)||null}var S=s.L,M=s.R,b=s.EN,T=s.ES,E=s.ET,w=s.AN,A=s.CS,R=s.B,C=s.S,P=s.ON,U=s.BN,L=s.NSM,q=s.AL,D=s.LRO,I=s.RLO,O=s.LRE,N=s.RLE,F=s.PDF,k=s.LRI,B=s.RLI,z=s.FSI,G=s.PDI;function V(e){return function(){if(!i){var e=g("14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1",!0),t=e.map;e.reverseMap.forEach(function(e,n){t.set(n,e)}),i=t}}(),i.get(e)||null}function H(e,t,n,r){var i=e.length;n=Math.max(0,null==n?0:+n),r=Math.min(i-1,null==r?i-1:+r);var a=[];return t.paragraphs.forEach(function(i){var s=Math.max(n,i.start),o=Math.min(r,i.end);if(s=s&&f(e[h])&d;h--)l[h]=i.level;for(var u=i.level,c=1/0,p=0;pu&&(u=m),m=c;g--)for(var v=0;v=g){for(var _=v;v+1=g;)v++;v>_&&a.push([_+s,v+s])}}}),a}function W(e,t,n,r){for(var i=H(e,t,n,r),a=[],s=0;s0)Y--;else if(K>0){for(Z=0;!X[X.length-1]._isolate;)X.pop();var en=X[X.length-1]._isolInitIndex;null!=en&&(o.set(en,J),o.set(J,en)),X.pop(),K--}j=X[X.length-1],s[J]=j._level,j._override&&a(J,j._override)}else $&F?(0===Y&&(Z>0?Z--:!j._isolate&&X.length>1&&(X.pop(),j=X[X.length-1])),s[J]=j._level):$&R&&(s[J]=m.level)}else s[J]=j._level,j._override&&$!==U&&a(J,j._override)}for(var er=[],ei=null,ea=m.start;ea<=m.end;ea++){var es=n[ea];if(!(es&c)){var eo=s[ea],el=es&l,eh=es===G;ei&&eo===ei._level?(ei._end=ea,ei._endsWithIsolInit=el):er.push(ei={_start:ea,_end:ea,_level:eo,_startsWithPDI:eh,_endsWithIsolInit:el})}}for(var eu=[],ec=0;ec=0;eM--)if(!(n[eM]&c)){eS=s[eM];break}var eb=eg[eg.length-1],eT=s[eb],eE=m.level;if(!(n[eb]&l)){for(var ew=eb+1;ew<=m.end;ew++)if(!(n[ew]&c)){eE=s[ew];break}}eu.push({_seqIndices:eg,_sosType:Math.max(eS,ey)%2?M:S,_eosType:Math.max(eE,eT)%2?M:S})}}for(var eA=0;eA=0;eO--)if(!(n[eC[eO]]&c)){eI=n[eC[eO]];break}a(eD,eI&(l|G)?P:eI)}}if(i.get(b))for(var eN=0;eN=-1;ek--){var eB=-1===ek?eP:n[eC[ek]];if(eB&h){eB===q&&a(eF,w);break}}}if(i.get(q))for(var ez=0;ez=0&&(eW=n[eC[ej]])&c;ej--);for(var eY=eV+1;eY=0&&n[eC[eK]]&(E|c);eK--)a(eC[eK],b);for(eZ++;eZ=0&&n[eC[eQ]]&c;eQ--)a(eC[eQ],P);for(var e1=eJ+1;e1=0;tn--){var tr=e8[tn].char;if(tr===tt||tr===x(y(te))||_(y(tr))===te){e7.push([e8[tn].seqIndex,e9]),e8.length=tn;break}}}e7.sort(function(e,t){return e[0]-t[0]});for(var ti=0;ti=0;tp--){var tf=eC[tp];if(n[tf]&e6){var tm=n[tf]&e5?M:S;th=tm!==eL?tm:eL;break}}}if(th){if(n[eC[ts]]=n[eC[to]]=th,th!==eL){for(var tg=ts+1;tg=0;tM--)if(n[eC[tM]]&c)tx=tM;else{tS=n[eC[tM]]&e5?M:S;break}for(var tb=eU,tT=t_+1;tT=0&&f(e[tC])&d;tC--)s[tC]=m.level}}return{levels:s,paragraphs:p};function tP(t,r){for(var i=t;ia),e(t.exports,"createDerivedMaterial",()=>function e(t,n){let i=function(e){let t=JSON.stringify(e,f),n=g.get(t);return null==n&&g.set(t,n=++m),n}(n),a=u.get(t);if(a||u.set(t,a=Object.create(null)),a[i])return new a[i];let v=`_onBeforeCompile${i}`,_=function(e,r){t.onBeforeCompile.call(this,e,r);let a=this.customProgramCacheKey()+"|"+e.vertexShader+"|"+e.fragmentShader,o=c[a];if(!o){let t=function(e,{vertexShader:t,fragmentShader:n},r,i){let{vertexDefs:a,vertexMainIntro:o,vertexMainOutro:l,vertexTransform:h,fragmentDefs:u,fragmentMainIntro:c,fragmentMainOutro:d,fragmentColorTransform:f,customRewriter:m,timeUniform:g}=r;if(a=a||"",o=o||"",l=l||"",u=u||"",c=c||"",d=d||"",(h||m)&&(t=s(t)),(f||m)&&(n=s(n=n.replace(/^[ \t]*#include <((?:tonemapping|encodings|fog|premultiplied_alpha|dithering)_fragment)>/gm,"\n//!BEGIN_POST_CHUNK $1\n$&\n//!END_POST_CHUNK\n"))),m){let e=m({vertexShader:t,fragmentShader:n});t=e.vertexShader,n=e.fragmentShader}if(f){let e=[];n=n.replace(/^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm,t=>(e.push(t),"")),d=`${f} +${e.join("\n")} +${d}`}if(g){let e=` +uniform float ${g}; +`;a=e+a,u=e+u}return h&&(t=`vec3 troika_position_${i}; +vec3 troika_normal_${i}; +vec2 troika_uv_${i}; +${t} +`,a=`${a} +void troikaVertexTransform${i}(inout vec3 position, inout vec3 normal, inout vec2 uv) { + ${h} +} +`,o=` +troika_position_${i} = vec3(position); +troika_normal_${i} = vec3(normal); +troika_uv_${i} = vec2(uv); +troikaVertexTransform${i}(troika_position_${i}, troika_normal_${i}, troika_uv_${i}); +${o} +`,t=t.replace(/\b(position|normal|uv)\b/g,(e,t,n,r)=>/\battribute\s+vec[23]\s+$/.test(r.substr(0,n))?t:`troika_${t}_${i}`),e.map&&e.map.channel>0||(t=t.replace(/\bMAP_UV\b/g,`troika_uv_${i}`))),{vertexShader:t=p(t,i,a,o,l),fragmentShader:n=p(n,i,u,c,d)}}(this,e,n,i);o=c[a]=t}e.vertexShader=o.vertexShader,e.fragmentShader=o.fragmentShader,l(e.uniforms,this.uniforms),n.timeUniform&&(e.uniforms[n.timeUniform]={get value(){return Date.now()-h}}),this[v]&&this[v](e)},x=function(){return y(n.chained?t:t.clone())},y=function(e){let r=Object.create(e,S);return Object.defineProperty(r,"baseMaterial",{value:t}),Object.defineProperty(r,"id",{value:d++}),r.uuid=function(){let e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(o[255&e]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255]+"-"+o[255&t]+o[t>>8&255]+"-"+o[t>>16&15|64]+o[t>>24&255]+"-"+o[63&n|128]+o[n>>8&255]+"-"+o[n>>16&255]+o[n>>24&255]+o[255&r]+o[r>>8&255]+o[r>>16&255]+o[r>>24&255]).toUpperCase()}(),r.uniforms=l({},e.uniforms,n.uniforms),r.defines=l({},e.defines,n.defines),r.defines[`TROIKA_DERIVED_MATERIAL_${i}`]="",r.extensions=l({},e.extensions,n.extensions),r._listeners=void 0,r},S={constructor:{value:x},isDerivedMaterial:{value:!0},customProgramCacheKey:{writable:!0,configurable:!0,value:function(){return t.customProgramCacheKey()+"|"+i}},onBeforeCompile:{get:()=>_,set(e){this[v]=e}},copy:{writable:!0,configurable:!0,value:function(e){return t.copy.call(this,e),t.isShaderMaterial||t.isDerivedMaterial||(l(this.extensions,e.extensions),l(this.defines,e.defines),l(this.uniforms,(0,r.UniformsUtils).clone(e.uniforms))),this}},clone:{writable:!0,configurable:!0,value:function(){return y(new t.constructor).copy(this)}},getDepthMaterial:{writable:!0,configurable:!0,value:function(){let i=this._depthMaterial;return i||((i=this._depthMaterial=e(t.isDerivedMaterial?t.getDepthMaterial():new r.MeshDepthMaterial({depthPacking:r.RGBADepthPacking}),n)).defines.IS_DEPTH_MATERIAL="",i.uniforms=this.uniforms),i}},getDistanceMaterial:{writable:!0,configurable:!0,value:function(){let i=this._distanceMaterial;return i||((i=this._distanceMaterial=e(t.isDerivedMaterial?t.getDistanceMaterial():new r.MeshDistanceMaterial,n)).defines.IS_DISTANCE_MATERIAL="",i.uniforms=this.uniforms),i}},dispose:{writable:!0,configurable:!0,value(){let{_depthMaterial:e,_distanceMaterial:n}=this;e&&e.dispose(),n&&n.dispose(),t.dispose.call(this)}}};return a[i]=x,new x});var r=i("ilwiq");let a=/\bvoid\s+main\s*\(\s*\)\s*{/g;function s(e){return e.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(e,t){let n=r.ShaderChunk[t];return n?s(n):e})}let o=[];for(let e=0;e<256;e++)o[e]=(e<16?"0":"")+e.toString(16);let l=Object.assign||function(){let e=arguments[0];for(let t=1,n=arguments.length;ta);var r=i("ilwiq");class a{constructor(e){this.isFont=!0,this.type="Font",this.data=e}generateShapes(e,t=100){let n=[],i=function(e,t,n){let i=Array.from(e),a=t/n.resolution,s=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*a,o=[],l=0,h=0;for(let e=0;ea);var r=i("ilwiq");class a extends r.ExtrudeGeometry{constructor(e,t={}){let n=t.font;if(void 0===n)super();else{let r=n.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(r,t)}this.type="TextGeometry"}}}),a("bYSYW",function(e,t){e.exports=JSON.parse('{"glyphs":{"0":{"x_min":73,"x_max":715,"ha":792,"o":"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"1":{"x_min":215.671875,"x_max":574,"ha":792,"o":"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"2":{"x_min":59,"x_max":731,"ha":792,"o":"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"3":{"x_min":54,"x_max":737,"ha":792,"o":"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"4":{"x_min":48,"x_max":742.453125,"ha":792,"o":"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},"5":{"x_min":54.171875,"x_max":738,"ha":792,"o":"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"6":{"x_min":53,"x_max":739,"ha":792,"o":"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"7":{"x_min":58.71875,"x_max":730.953125,"ha":792,"o":"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},"8":{"x_min":55,"x_max":736,"ha":792,"o":"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},"9":{"x_min":53,"x_max":739,"ha":792,"o":"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},"ο":{"x_min":0,"x_max":712,"ha":815,"o":"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},"S":{"x_min":0,"x_max":788,"ha":890,"o":"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"¦":{"x_min":343,"x_max":449,"ha":792,"o":"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{"x_min":183.25,"x_max":608.328125,"ha":792,"o":"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},"Τ":{"x_min":-0.4375,"x_max":777.453125,"ha":839,"o":"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},"y":{"x_min":0,"x_max":684.78125,"ha":771,"o":"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},"Π":{"x_min":0,"x_max":803,"ha":917,"o":"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},"ΐ":{"x_min":-111,"x_max":339,"ha":361,"o":"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},"g":{"x_min":0,"x_max":686,"ha":838,"o":"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"²":{"x_min":0,"x_max":442,"ha":539,"o":"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"–":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},"Κ":{"x_min":0,"x_max":819.5625,"ha":893,"o":"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},"ƒ":{"x_min":-46.265625,"x_max":392,"ha":513,"o":"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},"e":{"x_min":0,"x_max":714,"ha":813,"o":"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},"ό":{"x_min":0,"x_max":712,"ha":815,"o":"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},"J":{"x_min":0,"x_max":588,"ha":699,"o":"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"»":{"x_min":-1,"x_max":503,"ha":601,"o":"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"©":{"x_min":-3,"x_max":1008,"ha":1106,"o":"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},"ώ":{"x_min":0,"x_max":922,"ha":1030,"o":"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{"x_min":193.0625,"x_max":598.609375,"ha":792,"o":"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"«":{"x_min":0,"x_max":507.203125,"ha":604,"o":"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},"D":{"x_min":0,"x_max":828,"ha":935,"o":"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"∙":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"ÿ":{"x_min":0,"x_max":47,"ha":125,"o":"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},"w":{"x_min":0,"x_max":1009.71875,"ha":1100,"o":"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},"$":{"x_min":0,"x_max":700,"ha":793,"o":"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\\\":{"x_min":-0.015625,"x_max":425.0625,"ha":522,"o":"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},"µ":{"x_min":0,"x_max":697.21875,"ha":747,"o":"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},"Ι":{"x_min":42,"x_max":181,"ha":297,"o":"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},"Ύ":{"x_min":0,"x_max":1144.5,"ha":1214,"o":"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"’":{"x_min":0,"x_max":139,"ha":236,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"Ν":{"x_min":0,"x_max":801,"ha":915,"o":"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{"x_min":8.71875,"x_max":350.390625,"ha":478,"o":"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},"Q":{"x_min":0,"x_max":968,"ha":1072,"o":"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},"ς":{"x_min":1,"x_max":676.28125,"ha":740,"o":"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},"M":{"x_min":0,"x_max":954,"ha":1067,"o":"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},"Ψ":{"x_min":0,"x_max":1006,"ha":1094,"o":"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},"C":{"x_min":0,"x_max":886,"ha":944,"o":"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{"x_min":0,"x_max":138,"ha":236,"o":"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{"x_min":0,"x_max":480.5625,"ha":578,"o":"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},"X":{"x_min":-0.015625,"x_max":854.15625,"ha":940,"o":"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{"x_min":0,"x_max":963.890625,"ha":1061,"o":"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},"ι":{"x_min":42,"x_max":284,"ha":361,"o":"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},"Ά":{"x_min":0,"x_max":906.953125,"ha":982,"o":"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{"x_min":0,"x_max":318,"ha":415,"o":"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},"ε":{"x_min":0,"x_max":634.71875,"ha":714,"o":"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},"Δ":{"x_min":0,"x_max":952.78125,"ha":1028,"o":"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{"x_min":0,"x_max":481,"ha":578,"o":"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"‰":{"x_min":-3,"x_max":1672,"ha":1821,"o":"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},"a":{"x_min":0,"x_max":698.609375,"ha":794,"o":"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"—":{"x_min":0,"x_max":941.671875,"ha":1039,"o":"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{"x_min":8.71875,"x_max":780.953125,"ha":792,"o":"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},"N":{"x_min":0,"x_max":801,"ha":914,"o":"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},"ρ":{"x_min":0,"x_max":712,"ha":797,"o":"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"¯":{"x_min":0,"x_max":941.671875,"ha":938,"o":"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},"Z":{"x_min":0,"x_max":779,"ha":849,"o":"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},"u":{"x_min":0,"x_max":617,"ha":729,"o":"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},"k":{"x_min":0,"x_max":612.484375,"ha":697,"o":"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},"Η":{"x_min":0,"x_max":803,"ha":917,"o":"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"Α":{"x_min":0,"x_max":906.953125,"ha":985,"o":"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},"s":{"x_min":0,"x_max":604,"ha":697,"o":"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},"B":{"x_min":0,"x_max":778,"ha":876,"o":"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"…":{"x_min":0,"x_max":614,"ha":708,"o":"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{"x_min":0,"x_max":607,"ha":704,"o":"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},"H":{"x_min":0,"x_max":803,"ha":915,"o":"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"ν":{"x_min":0,"x_max":675,"ha":761,"o":"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},"c":{"x_min":1,"x_max":701.390625,"ha":775,"o":"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"¶":{"x_min":0,"x_max":566.671875,"ha":678,"o":"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},"β":{"x_min":0,"x_max":660,"ha":745,"o":"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},"Μ":{"x_min":0,"x_max":954,"ha":1068,"o":"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},"Ό":{"x_min":0.109375,"x_max":1120,"ha":1217,"o":"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ή":{"x_min":0,"x_max":1158,"ha":1275,"o":"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"•":{"x_min":0,"x_max":663.890625,"ha":775,"o":"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"¥":{"x_min":0.1875,"x_max":819.546875,"ha":886,"o":"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{"x_min":0,"x_max":318.0625,"ha":415,"o":"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},"U":{"x_min":0,"x_max":796,"ha":904,"o":"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},"γ":{"x_min":0.5,"x_max":744.953125,"ha":822,"o":"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},"α":{"x_min":0,"x_max":765.5625,"ha":809,"o":"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},"F":{"x_min":0,"x_max":683.328125,"ha":717,"o":"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"­":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"Χ":{"x_min":0,"x_max":854.171875,"ha":935,"o":"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{"x_min":116,"x_max":674,"ha":792,"o":"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"†":{"x_min":0,"x_max":777,"ha":835,"o":"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"°":{"x_min":0,"x_max":347,"ha":444,"o":"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},"V":{"x_min":0,"x_max":862.71875,"ha":940,"o":"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},"Ξ":{"x_min":0,"x_max":734.71875,"ha":763,"o":"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "}," ":{"x_min":0,"x_max":0,"ha":853},"Ϋ":{"x_min":0.328125,"x_max":819.515625,"ha":889,"o":"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"”":{"x_min":0,"x_max":347,"ha":454,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{"x_min":0,"x_max":1260,"ha":1357,"o":"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},"Ί":{"x_min":0,"x_max":499,"ha":613,"o":"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},"i":{"x_min":14,"x_max":136,"ha":275,"o":"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},"Β":{"x_min":0,"x_max":778,"ha":877,"o":"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},"υ":{"x_min":0,"x_max":617,"ha":725,"o":"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{"x_min":0,"x_max":275,"ha":372,"o":"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},"m":{"x_min":0,"x_max":1019,"ha":1128,"o":"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},"χ":{"x_min":8.328125,"x_max":780.5625,"ha":815,"o":"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"ί":{"x_min":42,"x_max":326.71875,"ha":361,"o":"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},"Ζ":{"x_min":0,"x_max":779.171875,"ha":850,"o":"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},"R":{"x_min":0,"x_max":781.953125,"ha":907,"o":"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},"o":{"x_min":0,"x_max":713,"ha":821,"o":"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"K":{"x_min":0,"x_max":819.46875,"ha":906,"o":"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},"d":{"x_min":0,"x_max":683,"ha":796,"o":"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"¨":{"x_min":-109,"x_max":247,"ha":232,"o":"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},"E":{"x_min":0,"x_max":736.109375,"ha":789,"o":"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"Y":{"x_min":0,"x_max":820,"ha":886,"o":"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},"\\"":{"x_min":0,"x_max":299,"ha":396,"o":"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"‹":{"x_min":17.984375,"x_max":773.609375,"ha":792,"o":"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"„":{"x_min":0,"x_max":364,"ha":467,"o":"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},"δ":{"x_min":1,"x_max":710,"ha":810,"o":"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},"έ":{"x_min":0,"x_max":634.71875,"ha":714,"o":"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},"ω":{"x_min":0,"x_max":922,"ha":1031,"o":"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"´":{"x_min":0,"x_max":96,"ha":251,"o":"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"±":{"x_min":11,"x_max":781,"ha":792,"o":"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{"x_min":343,"x_max":449,"ha":792,"o":"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"ϋ":{"x_min":0,"x_max":617,"ha":725,"o":"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"§":{"x_min":0,"x_max":593,"ha":690,"o":"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},"b":{"x_min":0,"x_max":685,"ha":783,"o":"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},"q":{"x_min":0,"x_max":683,"ha":876,"o":"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},"Ω":{"x_min":-0.171875,"x_max":969.5625,"ha":1068,"o":"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},"ύ":{"x_min":0,"x_max":617,"ha":725,"o":"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},"z":{"x_min":-0.015625,"x_max":613.890625,"ha":697,"o":"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"™":{"x_min":0,"x_max":894,"ha":1000,"o":"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},"ή":{"x_min":0.78125,"x_max":697,"ha":810,"o":"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},"Θ":{"x_min":0,"x_max":960,"ha":1056,"o":"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"®":{"x_min":-3,"x_max":1008,"ha":1106,"o":"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{"x_min":0,"x_max":833,"ha":931,"o":"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},"Ε":{"x_min":0,"x_max":736.21875,"ha":778,"o":"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"³":{"x_min":0,"x_max":450,"ha":547,"o":"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{"x_min":0,"x_max":273.609375,"ha":371,"o":"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},"L":{"x_min":0,"x_max":645.828125,"ha":696,"o":"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},"σ":{"x_min":0,"x_max":803.390625,"ha":894,"o":"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},"ζ":{"x_min":0,"x_max":573,"ha":642,"o":"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},"θ":{"x_min":0,"x_max":674,"ha":778,"o":"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},"Ο":{"x_min":0,"x_max":958,"ha":1054,"o":"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},"Γ":{"x_min":0,"x_max":705.28125,"ha":749,"o":"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{"x_min":0,"x_max":0,"ha":375},"%":{"x_min":-3,"x_max":1089,"ha":1186,"o":"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},"P":{"x_min":0,"x_max":726,"ha":806,"o":"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},"Έ":{"x_min":0,"x_max":1078.21875,"ha":1118,"o":"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ώ":{"x_min":0.125,"x_max":1136.546875,"ha":1235,"o":"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},"_":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},"Ϊ":{"x_min":-110,"x_max":246,"ha":275,"o":"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{"x_min":23,"x_max":768,"ha":792,"o":"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"½":{"x_min":0,"x_max":1050,"ha":1149,"o":"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},"Ρ":{"x_min":0,"x_max":720,"ha":783,"o":"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"\'":{"x_min":0,"x_max":139,"ha":236,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"ª":{"x_min":0,"x_max":350,"ha":397,"o":"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"΅":{"x_min":0,"x_max":450,"ha":553,"o":"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},"T":{"x_min":0,"x_max":777,"ha":835,"o":"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},"Φ":{"x_min":0,"x_max":915,"ha":997,"o":"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"⁋":{"x_min":0,"x_max":0,"ha":694},"j":{"x_min":-77.78125,"x_max":167,"ha":349,"o":"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},"Σ":{"x_min":0,"x_max":756.953125,"ha":819,"o":"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"›":{"x_min":18.0625,"x_max":774,"ha":792,"o":"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{"x_min":17.984375,"x_max":773.609375,"ha":792,"o":"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"£":{"x_min":0,"x_max":704.484375,"ha":801,"o":"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},"t":{"x_min":0,"x_max":367,"ha":458,"o":"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"¬":{"x_min":0,"x_max":706,"ha":803,"o":"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},"λ":{"x_min":0,"x_max":750,"ha":803,"o":"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},"W":{"x_min":0,"x_max":1263.890625,"ha":1351,"o":"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{"x_min":18.0625,"x_max":774,"ha":792,"o":"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"v":{"x_min":0,"x_max":675.15625,"ha":761,"o":"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},"τ":{"x_min":0.28125,"x_max":644.5,"ha":703,"o":"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},"ξ":{"x_min":0,"x_max":624.9375,"ha":699,"o":"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{"x_min":-3,"x_max":894.25,"ha":992,"o":"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},"Λ":{"x_min":0,"x_max":862.5,"ha":942,"o":"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},"I":{"x_min":41,"x_max":180,"ha":293,"o":"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},"G":{"x_min":0,"x_max":921,"ha":1011,"o":"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},"ΰ":{"x_min":0,"x_max":617,"ha":725,"o":"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{"x_min":0,"x_max":138.890625,"ha":236,"o":"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"·":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"Υ":{"x_min":0.328125,"x_max":819.515625,"ha":889,"o":"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},"r":{"x_min":0,"x_max":355.5625,"ha":432,"o":"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},"x":{"x_min":0,"x_max":675,"ha":764,"o":"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},"μ":{"x_min":0,"x_max":696.609375,"ha":747,"o":"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},"h":{"x_min":0,"x_max":615,"ha":724,"o":"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"φ":{"x_min":-2,"x_max":878,"ha":974,"o":"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},"f":{"x_min":0,"x_max":378,"ha":472,"o":"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"“":{"x_min":1,"x_max":348.21875,"ha":454,"o":"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},"A":{"x_min":0.03125,"x_max":906.953125,"ha":1008,"o":"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"‘":{"x_min":1,"x_max":139.890625,"ha":236,"o":"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},"ϊ":{"x_min":-70,"x_max":283,"ha":361,"o":"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},"π":{"x_min":-0.21875,"x_max":773.21875,"ha":857,"o":"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},"ά":{"x_min":0,"x_max":765.5625,"ha":809,"o":"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},"O":{"x_min":0,"x_max":958,"ha":1057,"o":"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},"n":{"x_min":0,"x_max":615,"ha":724,"o":"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"l":{"x_min":41,"x_max":166,"ha":279,"o":"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"¤":{"x_min":40.09375,"x_max":728.796875,"ha":825,"o":"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},"κ":{"x_min":0,"x_max":632.328125,"ha":679,"o":"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"p":{"x_min":0,"x_max":685,"ha":786,"o":"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"‡":{"x_min":0,"x_max":777,"ha":835,"o":"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},"ψ":{"x_min":0,"x_max":808,"ha":907,"o":"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},"η":{"x_min":0.78125,"x_max":697,"ha":810,"o":"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},"cssFontWeight":"normal","ascender":1189,"underlinePosition":-100,"cssFontStyle":"normal","boundingBox":{"yMin":-334,"xMin":-111,"yMax":1189,"xMax":1672},"resolution":1000,"original_font_information":{"postscript_name":"Helvetiker-Regular","version_string":"Version 1.00 2004 initial release","vendor_url":"http://www.magenta.gr/","full_font_name":"Helvetiker","font_family_name":"Helvetiker","copyright":"Copyright (c) Μagenta ltd, 2004","description":"","trademark":"","designer":"","designer_url":"","unique_font_identifier":"Μagenta ltd:Helvetiker:22-10-104","license_url":"http://www.ellak.gr/fonts/MgOpen/license.html","license_description":"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\\r\\n\\r\\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\\"Fonts\\") and associated documentation files (the \\"Font Software\\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \\r\\n\\r\\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\\r\\n\\r\\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \\"MgOpen\\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\\r\\n\\r\\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \\"MgOpen\\" name.\\r\\n\\r\\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \\r\\n\\r\\nTHE FONT SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.","manufacturer_name":"Μagenta ltd","font_sub_family_name":"Regular"},"descender":-334,"familyName":"Helvetiker","lineHeight":1522,"underlineThickness":50}')});var s=i("ilwiq"),o={};Object.defineProperty(o,"__esModule",{value:!0}),o.getRandomPoints=o.Greek=o.Label=o.VectorPlot=o.ScatterPlot=o.Frame=void 0;var l={};Object.defineProperty(l,"__esModule",{value:!0}),l.Frame=void 0;var s=i("ilwiq"),h=i("5Rd1x"),u={};Object.defineProperty(u,"__esModule",{value:!0}),u.Axes=u.PlaneAxes=u.UnitVector=void 0;var s=i("ilwiq");u.UnitVector={i:new s.Vector3(1,0,0),j:new s.Vector3(0,1,0),k:new s.Vector3(0,0,1)},u.PlaneAxes={xy:{normal:u.UnitVector.k,unit:{x:u.UnitVector.i,y:u.UnitVector.j}},xz:{normal:u.UnitVector.j,unit:{x:u.UnitVector.i,z:u.UnitVector.k}},yz:{normal:u.UnitVector.i,unit:{y:u.UnitVector.j,z:u.UnitVector.k}}};class c extends s.ArrowHelper{constructor(e,t){super(e,new s.Vector3(0,0,0),t)}}u.Axes=class{constructor(e,t,n){this.lengthX=e,this.lengthY=t,this.lengthZ=n,this.x=new c(new s.Vector3(1,0,0),1.1*this.lengthX),this.y=new c(new s.Vector3(0,1,0),1.1*this.lengthY),this.z=new c(new s.Vector3(0,0,1),1.1*this.lengthZ),this.setGrids()}setGrids(){this.gridXZ=new s.GridHelper(Math.max(this.lengthX,this.lengthZ)),this.gridXZ.position.setX(this.lengthX/2),this.gridXZ.position.setZ(this.lengthZ/2),this.gridXY=new s.GridHelper(Math.max(this.lengthX,this.lengthY)),this.gridXY.position.setX(this.lengthX/2),this.gridXY.position.setY(this.lengthY/2),this.gridXY.rotateOnAxis(new s.Vector3(1,0,0),Math.PI/2),this.gridYZ=new s.GridHelper(Math.max(this.lengthY,this.lengthZ)),this.gridYZ.position.setY(this.lengthY/2),this.gridYZ.position.setZ(this.lengthZ/2),this.gridYZ.rotateOnAxis(new s.Vector3(0,0,1),Math.PI/2)}};class d extends s.Scene{constructor(e,t=10){super(),this.canvas=e,this.size=t,this.observer=new ResizeObserver(()=>this.update()),this.scene=new s.Scene,this.scene.background=new s.Color(16777215);let{clientWidth:n,clientHeight:r}=e;this.renderer=new s.WebGLRenderer({canvas:e}),this.renderer.setSize(n,r),this.setCamera(n,r),this.setControls(),this.setAxes(),this.updateOnChanges(),this.update()}setCamera(e,t){this.camera=new s.PerspectiveCamera(45,e/t,.1,1e3),this.camera.position.set(2*this.size,2*this.size,2*this.size),this.scene.add(this.camera)}setControls(){this.controls=new h.OrbitControls(this.camera,this.canvas),this.controls.target.set(0,0,0)}setAxes(){this.axes=new u.Axes(this.size,this.size,this.size),this.scene.add(this.axes.x),this.scene.add(this.axes.y),this.scene.add(this.axes.z),this.scene.add(this.axes.gridXY),this.scene.add(this.axes.gridXZ),this.scene.add(this.axes.gridYZ)}updateOnChanges(){this.controls.addEventListener("change",()=>this.update()),this.observer.observe(this.canvas)}update(){this.renderer.render(this.scene,this.camera)}capture(){this.canvas.toDataURL("img/png")}addPlot(e){this.scene.add(...e.getFrameable()),this.update()}async addFallbackLabel(e){this.scene.add(...e.getFrameable()),this.update()}async addLabel(e){this.scene.add(...e.getFrameable()),e.text.addEventListener("synccomplete",()=>{this.update()})}}l.Frame=d,Object.defineProperty(o,"Frame",{enumerable:!0,get:function(){return l.Frame}});var p={};Object.defineProperty(p,"__esModule",{value:!0}),p.ScatterPlot=void 0;var s=i("ilwiq"),f={};Object.defineProperty(f,"__esModule",{value:!0}),f.Plot=void 0,f.Plot=class{};class m extends f.Plot{constructor(e,t=.2){super(),this.points=e.map(e=>{let n=new s.SphereGeometry(t),r=new s.MeshBasicMaterial({color:65280}),i=new s.Mesh(n,r);return i.position.set(e.x,e.y,e.z),i})}getFrameable(){return this.points}}p.ScatterPlot=m,Object.defineProperty(o,"ScatterPlot",{enumerable:!0,get:function(){return p.ScatterPlot}});var g={};Object.defineProperty(g,"__esModule",{value:!0}),g.VectorPlot=void 0;var s=i("ilwiq"),v={};Object.defineProperty(v,"__esModule",{value:!0}),v.VectorPlotPlaneConfigParams=v.VectorPlotConfigurationParams=void 0,v.VectorPlotConfigurationParams=class{constructor(e){let{angle:t,color:n,xy:r,xz:i,yz:a}=e;this.setColorOrDefault(n),t&&this.setAngle(t),r&&(this.xy=new _(r)),i&&(this.xz=new _(i)),a&&(this.xz=new _(a))}setColorOrDefault(e){e=e||0,this.color=e}setAngle(e){this.angle=!0===e?{color:0}:e}};class _{constructor(e){let{component:t,projection:n,projectionAngle:r}=e=!0===e?{projection:!0,component:!0,projectionAngle:!0}:e;n&&this.setProjection(n),t&&this.setComponent(t),r&&this.setProjectionAngle(r)}setProjection(e){this.projection=!0===e?x:e}setComponent(e){this.component=!0===e?x:e}setProjectionAngle(e){this.projectionAngle=!0===e?x:e}}v.VectorPlotPlaneConfigParams=_;const x={linetype:"dashed",linestyle:{color:0,linewidth:1,scale:1,dashSize:.25,gapSize:.1}};class y extends f.Plot{constructor(e,t,n){for(let r in super(),this.origin=e,this.target=t,this.config=new v.VectorPlotConfigurationParams(n),this.drawables=[],this.drawables.push(this.createVector(e,t)),u.PlaneAxes){let e=this.config[r];(null==e?void 0:e.projection)&&this.drawables.push(this.createProjection(r)),(null==e?void 0:e.component)&&this.drawables.push(this.createComponent(r)),(null==e?void 0:e.projectionAngle)&&this.drawables.push(this.createAngleToProjection(r))}this.config.angle&&this.drawables.push(this.createAngleToTarget("y"))}createVector(e,t){let n=Math.abs(e.distanceTo(t));return new s.ArrowHelper(t.clone().normalize(),e,n,this.config.color,.2*n,.1*n)}createAngleToProjection(e){let t=u.PlaneAxes[e],n=t.normal,r=this.target.clone().projectOnPlane(n),i=.5*r.distanceTo(this.origin),a=0,o=r.angleTo(u.UnitVector.i);"xz"===e&&(a=-Math.PI/2,o=r.angleTo(u.UnitVector.k)),"yz"===e&&(a=Math.PI/2,o=r.angleTo(u.UnitVector.j));let l=new s.EllipseCurve(this.origin.x,this.origin.y,i,i,0,o,!1,a),h=new s.LineBasicMaterial({color:0}),c=new s.BufferGeometry().setFromPoints(l.getPoints(50)),d=new s.Quaternion().setFromUnitVectors(u.UnitVector.k,t.normal);return c.applyQuaternion(d),new s.Line(c,h)}createAngleToTarget(e){let t=this.target.clone().distanceTo(this.origin),n=this.target.clone().projectOnPlane(u.UnitVector.j),r=new s.EllipseCurve(this.origin.x,this.origin.y,t,t,0,this.target.angleTo(n),!1,0),i=new s.LineBasicMaterial(this.config.angle),a=new s.BufferGeometry().setFromPoints(r.getPoints(50));return a.applyQuaternion(new s.Quaternion().setFromAxisAngle(u.UnitVector.j,-u.UnitVector.i.angleTo(n))),new s.Line(a,i)}createProjection(e){let{linetype:t,linestyle:n}=this.config[e].projection,r=new("dashed"===t?s.LineDashedMaterial:s.LineBasicMaterial)(n),i=u.PlaneAxes[e].normal,a=this.target.clone().projectOnPlane(i),o=new s.BufferGeometry().setFromPoints([a,this.origin]);return new s.Line(o,r).computeLineDistances()}createComponent(e){let{linetype:t,linestyle:n}=this.config[e].component,r=new("dashed"===t?s.LineDashedMaterial:s.LineBasicMaterial)(n),i=u.PlaneAxes[e].normal,a=this.target.clone().projectOnPlane(i),o=new s.BufferGeometry().setFromPoints([a,this.target]);return new s.Line(o,r).computeLineDistances()}getFrameable(){return this.drawables}}g.VectorPlot=y,Object.defineProperty(o,"VectorPlot",{enumerable:!0,get:function(){return g.VectorPlot}});var S={},M=S&&S.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(S,"__esModule",{value:!0}),S.FallbackLabel=S.Label=void 0;var s=i("ilwiq"),b=i("gbdyO"),T=i("eT66s"),E=i("8NFZ6");const w=M(i("bYSYW"));S.Label=class{constructor(e,t,n=.2,r=0){this.text=new b.Text,this.text.text=t,this.text.position.x=e.x,this.text.position.y=e.y,this.text.position.z=e.z,this.text.anchorX="center",this.text.anchorY="middle",this.text.fontSize=n,this.text.color=r}getFrameable(){return this.text.sync(),[this.text]}},S.FallbackLabel=class{constructor(e,t,n=1,r=0){this.position=e,this.text=t,this.size=n,this.color=r;let i=new E.TextGeometry(this.text,{font:new T.Font(w.default),size:this.size,height:.01,curveSegments:25,bevelEnabled:!1}),a=new s.MeshBasicMaterial({color:this.color});this.drawable=new s.Mesh(i,a),this.drawable.position.set(...this.position.toArray())}getFrameable(){return[this.drawable]}},Object.defineProperty(o,"Label",{enumerable:!0,get:function(){return S.Label}});var A={};Object.defineProperty(A,"__esModule",{value:!0}),A.Greek=void 0;class R{}A.Greek=R,R.uppercaseHeta="Ͱ",R.lowercaseHeta="ͱ",R.uppercaseArchaicSampi="Ͳ",R.lowercaseArchaicSampi="ͳ",R.numeralSign="ʹ",R.lowerNumeralSign="͵",R.uppercasePamphylianDigamma="Ͷ",R.lowercasePamphylianDigamma="ͷ",R.ypogegrammeni="ͺ",R.smallReversedLunateSigmaSymbol="ͻ",R.smallDottedLunateSigmaSymbol="ͼ",R.smallReversedDottedLunateSigmaSymbol="ͽ",R.questionMark=";",R.uppercaseYot="Ϳ",R.acuteaccent="΄",R.diaeresiswithacuteaccent="΅",R.uppercaseAwithacuteaccent="Ά",R.anoTeleia="·",R.uppercaseEpsilonwithacuteaccent="Έ",R.uppercaseEtawithacuteaccent="Ή",R.uppercaseIotawithacuteaccent="Ί",R.uppercaseOmicronwithacuteaccent="Ό",R.uppercaseUpsilonwithacuteaccent="Ύ",R.uppercaseOmegawithacuteaccent="Ώ",R.lowercaseIotawithdiaeresisandacuteaccent="ΐ",R.uppercaseAlpha="Α",R.uppercaseBeta="Β",R.uppercaseGamma="Γ",R.uppercaseDelta="Δ",R.uppercaseEpsilon="Ε",R.uppercaseZeta="Ζ",R.uppercaseEta="Η",R.uppercaseTheta="Θ",R.uppercaseIota="Ι",R.uppercaseKappa="Κ",R.uppercaseLambda="Λ",R.uppercaseMu="Μ",R.uppercaseNu="Ν",R.uppercaseXi="Ξ",R.uppercaseOmicron="Ο",R.uppercasePi="Π",R.uppercaseRho="Ρ",R.uppercaseSigma="Σ",R.uppercaseTau="Τ",R.uppercaseUpsilon="Υ",R.uppercasePhi="Φ",R.uppercaseChi="Χ",R.uppercasePsi="Ψ",R.uppercaseOmega="Ω",R.uppercaseIotawithdiaeresis="Ϊ",R.uppercaseUpsilonwithdiaeresis="Ϋ",R.lowercaseAlphawithacuteaccent="ά",R.lowercaseEpsilonwithacuteaccent="έ",R.lowercaseEtawithacuteaccent="ή",R.lowercaseIotawithacuteaccent="ί",R.lowercaseUpsilonwithdiaeresisandacuteaccent="ΰ",R.lowercaseAlpha="α",R.lowercaseBeta="β",R.lowercaseGamma="γ",R.lowercaseDelta="δ",R.lowercaseEpsilon="ε",R.lowercaseZeta="ζ",R.lowercaseEta="η",R.lowercaseTheta="θ",R.lowercaseIota="ι",R.lowercaseKappa="κ",R.lowercaseLambda="λ",R.lowercaseMu="μ",R.lowercaseNu="ν",R.lowercaseXi="ξ",R.lowercaseOmicron="ο",R.lowercasePi="π",R.lowercaseRho="ρ",R.lowercaseFinalSigma="ς",R.lowercaseSigma="σ",R.lowercaseTau="τ",R.lowercaseUpsilon="υ",R.lowercasePhi="φ",R.lowercaseChi="χ",R.lowercasePsi="ψ",R.lowercaseOmega="ω",R.lowercaseIotawithdiaeresis="ϊ",R.lowercaseUpsilonwithdiaeresis="ϋ",R.lowercaseOmicronwithacuteaccent="ό",R.lowercaseUpsilonwithacuteaccent="ύ",R.lowercaseOmegawithacuteaccent="ώ",R.uppercaseKaiSymbol="Ϗ",R.betaSymbol="ϐ",R.thetaSymbol="ϑ",R.upsilonwithhookSymbol="ϒ",R.upsilonwithacuteandhookSymbol="ϓ",R.upsilonwithdiaeresisandhookSymbol="ϔ",R.phiSymbol="ϕ",R.piSymbol="ϖ",R.kaiSymbol="ϗ",R.letterQoppa="Ϙ",R.lowercaseQoppa="ϙ",R.letterStigma="Ϛ",R.lowercaseStigma="ϛ",R.letterDigamma="Ϝ",R.lowercaseDigamma="ϝ",R.letterKoppa="Ϟ",R.lowercaseKoppa="ϟ",R.letterSampi="Ϡ",R.lowercaseSampi="ϡ",R.copticuppercaseShei="Ϣ",R.copticlowercaseShei="ϣ",R.copticuppercaseFei="Ϥ",R.copticlowercaseFei="ϥ",R.copticuppercaseKhei="Ϧ",R.copticlowercaseKhei="ϧ",R.copticuppercaseHori="Ϩ",R.copticlowercaseHori="ϩ",R.copticuppercaseGangia="Ϫ",R.copticlowercaseGangia="ϫ",R.copticuppercaseShima="Ϭ",R.copticlowercaseShima="ϭ",R.copticuppercaseDei="Ϯ",R.copticlowercaseDei="ϯ",R.kappaSymbol="ϰ",R.rhoSymbol="ϱ",R.lunateSigmaSymbol="ϲ",R.letterYot="ϳ",R.uppercaseThetaSymbol="ϴ",R.lunateEpsilonSymbol="ϵ",R.reversedLunateEpsilonSymbol="϶",R.uppercaseSho="Ϸ",R.lowercaseSho="ϸ",R.uppercaseLunateSigmaSymbol="Ϲ",R.uppercaseSan="Ϻ",R.lowercaseSan="ϻ",R.rhowithstrokeSymbol="ϼ",R.uppercaseReversedLunateSigmaSymbol="Ͻ",R.uppercaseDottedLunateSigmaSymbol="Ͼ",R.uppercaseReversedDottedLunateSigmaSymbol="Ͽ",Object.defineProperty(o,"Greek",{enumerable:!0,get:function(){return A.Greek}});var C={};Object.defineProperty(C,"__esModule",{value:!0}),C.getRandomPoints=void 0;var s=i("ilwiq");C.getRandomPoints=(e=100,t=10)=>{let n=[];for(let r=0;r","node_modules/three/build/three.module.js","node_modules/three/examples/jsm/controls/OrbitControls.js","node_modules/troika-three-text/dist/troika-three-text.esm.js","node_modules/troika-worker-utils/dist/troika-worker-utils.esm.js","node_modules/process/browser.js","node_modules/webgl-sdf-generator/dist/webgl-sdf-generator.mjs","node_modules/bidi-js/dist/bidi.mjs","node_modules/troika-three-utils/dist/troika-three-utils.esm.js","node_modules/three/examples/jsm/loaders/FontLoader.js","node_modules/three/examples/jsm/geometries/TextGeometry.js","dist/fonts/helvetiker_regular.typeface.json","test/e2e/index.ts","dist/index.js","dist/frame.js","dist/axes.js","dist/plots/scatterplot.js","dist/plot.js","dist/plots/vectorplot.js","dist/plots/vectorplot.config.js","dist/label.js","dist/greek.js","dist/data.js"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire9513\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire9513\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"ilwiq\", function(module, exports) {\n\n$parcel$export(module.exports, \"MOUSE\", () => $d5b33d7c30034067$export$7177b3e430c2d7ca);\n$parcel$export(module.exports, \"TOUCH\", () => $d5b33d7c30034067$export$d46bd3ead7cc759b);\n$parcel$export(module.exports, \"FrontSide\", () => $d5b33d7c30034067$export$2ede184fc2998901);\n$parcel$export(module.exports, \"BackSide\", () => $d5b33d7c30034067$export$d9f0486e75b5ace);\n$parcel$export(module.exports, \"DoubleSide\", () => $d5b33d7c30034067$export$3b296b6f144d5b03);\n$parcel$export(module.exports, \"LinearFilter\", () => $d5b33d7c30034067$export$8a72f490b25c56c8);\n$parcel$export(module.exports, \"RGBADepthPacking\", () => $d5b33d7c30034067$export$8f910f4c4f73df11);\n$parcel$export(module.exports, \"EventDispatcher\", () => $d5b33d7c30034067$export$ec8b666c5fe2c75a);\n$parcel$export(module.exports, \"MathUtils\", () => $d5b33d7c30034067$export$6a7ef315a0d1ef07);\n$parcel$export(module.exports, \"Vector2\", () => $d5b33d7c30034067$export$c977b3e384af9ae1);\n$parcel$export(module.exports, \"Matrix3\", () => $d5b33d7c30034067$export$8ff26dafa08918);\n$parcel$export(module.exports, \"Texture\", () => $d5b33d7c30034067$export$5431306cf43de24a);\n$parcel$export(module.exports, \"Vector4\", () => $d5b33d7c30034067$export$fa7daccca11cdbe3);\n$parcel$export(module.exports, \"Quaternion\", () => $d5b33d7c30034067$export$23d6a54f0bbc85a3);\n$parcel$export(module.exports, \"Vector3\", () => $d5b33d7c30034067$export$64b5c384219d3699);\n$parcel$export(module.exports, \"Box3\", () => $d5b33d7c30034067$export$6f7d5a9418ab2aa3);\n$parcel$export(module.exports, \"Sphere\", () => $d5b33d7c30034067$export$805e8b72413ccaba);\n$parcel$export(module.exports, \"Ray\", () => $d5b33d7c30034067$export$a186db52eed6d40e);\n$parcel$export(module.exports, \"Matrix4\", () => $d5b33d7c30034067$export$2ae72fc923e5eb5);\n$parcel$export(module.exports, \"Color\", () => $d5b33d7c30034067$export$892596cec99bc70e);\n$parcel$export(module.exports, \"MeshBasicMaterial\", () => $d5b33d7c30034067$export$55cbcc9b622fe1f5);\n$parcel$export(module.exports, \"Float32BufferAttribute\", () => $d5b33d7c30034067$export$cbe7a62641830ebd);\n$parcel$export(module.exports, \"BufferGeometry\", () => $d5b33d7c30034067$export$b7be63a67df8959);\n$parcel$export(module.exports, \"Mesh\", () => $d5b33d7c30034067$export$e176487c05830cc5);\n$parcel$export(module.exports, \"UniformsUtils\", () => $d5b33d7c30034067$export$d8ecdf8615bfea69);\n$parcel$export(module.exports, \"PerspectiveCamera\", () => $d5b33d7c30034067$export$74e4ae24825f68d7);\n$parcel$export(module.exports, \"Plane\", () => $d5b33d7c30034067$export$7ff5ac152ef991b0);\n$parcel$export(module.exports, \"PlaneGeometry\", () => $d5b33d7c30034067$export$967d831af31f69ce);\n$parcel$export(module.exports, \"ShaderChunk\", () => $d5b33d7c30034067$export$955f9f2e84c43c8b);\n$parcel$export(module.exports, \"ShaderLib\", () => $d5b33d7c30034067$export$bee4a7d47f8f5014);\n$parcel$export(module.exports, \"MeshDepthMaterial\", () => $d5b33d7c30034067$export$2698c22ec13825db);\n$parcel$export(module.exports, \"MeshDistanceMaterial\", () => $d5b33d7c30034067$export$33e187ed002f2a19);\n$parcel$export(module.exports, \"WebGLRenderer\", () => $d5b33d7c30034067$export$f6cc00ef28d7cf97);\n$parcel$export(module.exports, \"Scene\", () => $d5b33d7c30034067$export$38af1803e3442a7f);\n$parcel$export(module.exports, \"InstancedBufferAttribute\", () => $d5b33d7c30034067$export$32ea87a8b54d744a);\n$parcel$export(module.exports, \"LineBasicMaterial\", () => $d5b33d7c30034067$export$fbaaa33907730a0c);\n$parcel$export(module.exports, \"Line\", () => $d5b33d7c30034067$export$17d680238e50603e);\n$parcel$export(module.exports, \"EllipseCurve\", () => $d5b33d7c30034067$export$3f87a931616cde04);\n$parcel$export(module.exports, \"CylinderGeometry\", () => $d5b33d7c30034067$export$68f745719dbe5198);\n$parcel$export(module.exports, \"ExtrudeGeometry\", () => $d5b33d7c30034067$export$598697a1efa63ca7);\n$parcel$export(module.exports, \"SphereGeometry\", () => $d5b33d7c30034067$export$1b417fc3b307a251);\n$parcel$export(module.exports, \"MeshStandardMaterial\", () => $d5b33d7c30034067$export$f2980790215acccd);\n$parcel$export(module.exports, \"LineDashedMaterial\", () => $d5b33d7c30034067$export$327886a3efaeaebe);\n$parcel$export(module.exports, \"Loader\", () => $d5b33d7c30034067$export$3b0d6d7590275603);\n$parcel$export(module.exports, \"FileLoader\", () => $d5b33d7c30034067$export$98435a25b5cf7b2b);\n$parcel$export(module.exports, \"InstancedBufferGeometry\", () => $d5b33d7c30034067$export$231f009cbe414146);\n$parcel$export(module.exports, \"Spherical\", () => $d5b33d7c30034067$export$d712cd887b4a00f7);\n$parcel$export(module.exports, \"GridHelper\", () => $d5b33d7c30034067$export$3875d39926561055);\n$parcel$export(module.exports, \"ArrowHelper\", () => $d5b33d7c30034067$export$a3008e7bd8d2cbe7);\n$parcel$export(module.exports, \"ShapePath\", () => $d5b33d7c30034067$export$148534a3c727230b);\n/**\n * @license\n * Copyright 2010-2023 Three.js Authors\n * SPDX-License-Identifier: MIT\n */ const $d5b33d7c30034067$export$3545e07a80636437 = \"158\";\nconst $d5b33d7c30034067$export$7177b3e430c2d7ca = {\n LEFT: 0,\n MIDDLE: 1,\n RIGHT: 2,\n ROTATE: 0,\n DOLLY: 1,\n PAN: 2\n};\nconst $d5b33d7c30034067$export$d46bd3ead7cc759b = {\n ROTATE: 0,\n PAN: 1,\n DOLLY_PAN: 2,\n DOLLY_ROTATE: 3\n};\nconst $d5b33d7c30034067$export$3237e1f2c1ea1f44 = 0;\nconst $d5b33d7c30034067$export$b9a7b4fc5cb15f9b = 1;\nconst $d5b33d7c30034067$export$b8058bcc7037d3f3 = 2;\nconst $d5b33d7c30034067$export$f24be24dcddeac0d = 3;\nconst $d5b33d7c30034067$export$346307dbae2b7447 = 0;\nconst $d5b33d7c30034067$export$5813f879eee7cd88 = 1;\nconst $d5b33d7c30034067$export$a47c4b43a1be34f0 = 2;\nconst $d5b33d7c30034067$export$896ae1ade6c829c4 = 3;\nconst $d5b33d7c30034067$export$2ede184fc2998901 = 0;\nconst $d5b33d7c30034067$export$d9f0486e75b5ace = 1;\nconst $d5b33d7c30034067$export$3b296b6f144d5b03 = 2;\nconst $d5b33d7c30034067$export$211211c00f97204d = 2; // r149\nconst $d5b33d7c30034067$export$63b8d6b580fc65ba = 0;\nconst $d5b33d7c30034067$export$5b29a26d96ee6af0 = 1;\nconst $d5b33d7c30034067$export$777d8f9551c2216b = 2;\nconst $d5b33d7c30034067$export$cdfa06f868e2e467 = 3;\nconst $d5b33d7c30034067$export$4138e1c684b46a20 = 4;\nconst $d5b33d7c30034067$export$eda4864c68df1fa2 = 5;\nconst $d5b33d7c30034067$export$20183a0484ce21a0 = 100;\nconst $d5b33d7c30034067$export$73e0df5177988548 = 101;\nconst $d5b33d7c30034067$export$28e582859cbec660 = 102;\nconst $d5b33d7c30034067$export$c8c1508da8d0600c = 103;\nconst $d5b33d7c30034067$export$99948c02fb51055f = 104;\nconst $d5b33d7c30034067$export$2110f05edf778d3d = 200;\nconst $d5b33d7c30034067$export$8805bad65e24940e = 201;\nconst $d5b33d7c30034067$export$7fbe15b28d28cf52 = 202;\nconst $d5b33d7c30034067$export$947829af9f2c17f6 = 203;\nconst $d5b33d7c30034067$export$d5773124e86cf28c = 204;\nconst $d5b33d7c30034067$export$11d468cc7f19e971 = 205;\nconst $d5b33d7c30034067$export$a78aed1ca2a87192 = 206;\nconst $d5b33d7c30034067$export$5d0fe17fd8773bac = 207;\nconst $d5b33d7c30034067$export$ef5f2dd8ffac5574 = 208;\nconst $d5b33d7c30034067$export$56b85b2686ab16 = 209;\nconst $d5b33d7c30034067$export$c05e2a1fc8609506 = 210;\nconst $d5b33d7c30034067$export$7dd8f434fd59075 = 211;\nconst $d5b33d7c30034067$export$99c8d898a9afbcee = 212;\nconst $d5b33d7c30034067$export$310cd2be38d13b56 = 213;\nconst $d5b33d7c30034067$export$db77b8fbcf45dbf4 = 214;\nconst $d5b33d7c30034067$export$69025ce147cee220 = 0;\nconst $d5b33d7c30034067$export$7182eb52ea3b3f04 = 1;\nconst $d5b33d7c30034067$export$eedccec66ab7ebe = 2;\nconst $d5b33d7c30034067$export$296f78a0b892f81a = 3;\nconst $d5b33d7c30034067$export$a60d398fc7b7590e = 4;\nconst $d5b33d7c30034067$export$7d7234c1240a1fc4 = 5;\nconst $d5b33d7c30034067$export$c5e2c52991f30937 = 6;\nconst $d5b33d7c30034067$export$2f843afa843d8916 = 7;\nconst $d5b33d7c30034067$export$e50ac29801f1774d = 0;\nconst $d5b33d7c30034067$export$9f9d94f963c85479 = 1;\nconst $d5b33d7c30034067$export$e641dc52bc3494aa = 2;\nconst $d5b33d7c30034067$export$9fcb6b4294603b2 = 0;\nconst $d5b33d7c30034067$export$98f52c2a46c598ca = 1;\nconst $d5b33d7c30034067$export$74b25e54b3bcd548 = 2;\nconst $d5b33d7c30034067$export$932b3dd283d4a366 = 3;\nconst $d5b33d7c30034067$export$a0d98fe6d7e4af64 = 4;\nconst $d5b33d7c30034067$export$2c7b09c1e9abfb5e = 5;\nconst $d5b33d7c30034067$export$2595a3798997538 = \"attached\";\nconst $d5b33d7c30034067$export$d7e7dc2e114517a0 = \"detached\";\nconst $d5b33d7c30034067$export$1beec6768cbb3d2d = 300;\nconst $d5b33d7c30034067$export$8759762a6477f2c4 = 301;\nconst $d5b33d7c30034067$export$dc59f8aed047f61d = 302;\nconst $d5b33d7c30034067$export$d64030b316d3b087 = 303;\nconst $d5b33d7c30034067$export$ee99d97d46898098 = 304;\nconst $d5b33d7c30034067$export$dbf3e70ff37af79 = 306;\nconst $d5b33d7c30034067$export$533346c8e8dac0f5 = 1000;\nconst $d5b33d7c30034067$export$9d9334239a5a5e06 = 1001;\nconst $d5b33d7c30034067$export$c7e7c00b14f51a4f = 1002;\nconst $d5b33d7c30034067$export$727aa5ec3fe39bf0 = 1003;\nconst $d5b33d7c30034067$export$d129e38cf6feaa8c = 1004;\nconst $d5b33d7c30034067$export$14a4936464a36496 = 1004;\nconst $d5b33d7c30034067$export$d2327c1afe5bfdf2 = 1005;\nconst $d5b33d7c30034067$export$cbc5b7f5647595d8 = 1005;\nconst $d5b33d7c30034067$export$8a72f490b25c56c8 = 1006;\nconst $d5b33d7c30034067$export$19a719f377145a13 = 1007;\nconst $d5b33d7c30034067$export$dbe96bee3fe9dbf0 = 1007;\nconst $d5b33d7c30034067$export$5d8599b6a933fb1b = 1008;\nconst $d5b33d7c30034067$export$90d80f1e3506775f = 1008;\nconst $d5b33d7c30034067$export$2e8ce08d3f6f5e10 = 1009;\nconst $d5b33d7c30034067$export$545fce0311a9796a = 1010;\nconst $d5b33d7c30034067$export$88572337f312435f = 1011;\nconst $d5b33d7c30034067$export$c63dc51868b06a9d = 1012;\nconst $d5b33d7c30034067$export$5c612977753abe2 = 1013;\nconst $d5b33d7c30034067$export$c3c7fc4518ebba96 = 1014;\nconst $d5b33d7c30034067$export$f6d331659b644596 = 1015;\nconst $d5b33d7c30034067$export$2697304443f382bc = 1016;\nconst $d5b33d7c30034067$export$b3969b01faf587f2 = 1017;\nconst $d5b33d7c30034067$export$18886f8ae33e90de = 1018;\nconst $d5b33d7c30034067$export$6c8ea339bfab1301 = 1020;\nconst $d5b33d7c30034067$export$988473390501ed4b = 1021;\nconst $d5b33d7c30034067$export$3f8bb04b555a363c = 1023;\nconst $d5b33d7c30034067$export$cc09ccbf6d1ed449 = 1024;\nconst $d5b33d7c30034067$export$9053a81c4a69c289 = 1025;\nconst $d5b33d7c30034067$export$c1b6b5136be58045 = 1026;\nconst $d5b33d7c30034067$export$1e113ac2d0905829 = 1027;\nconst $d5b33d7c30034067$export$4e041a7967d15c4b = 1028;\nconst $d5b33d7c30034067$export$aa92e870a709d190 = 1029;\nconst $d5b33d7c30034067$export$6cdf0b461c7ce8a0 = 1030;\nconst $d5b33d7c30034067$export$1ba1c45f9f77d4d7 = 1031;\nconst $d5b33d7c30034067$export$c200e7d26f592f21 = 1033;\nconst $d5b33d7c30034067$export$21d1799c6d552fc0 = 33776;\nconst $d5b33d7c30034067$export$afa304c3e981b668 = 33777;\nconst $d5b33d7c30034067$export$d2a1a68024a3e56c = 33778;\nconst $d5b33d7c30034067$export$9a79c424327dacf9 = 33779;\nconst $d5b33d7c30034067$export$19ada9bbb1af3573 = 35840;\nconst $d5b33d7c30034067$export$d0f0355bb3d948e4 = 35841;\nconst $d5b33d7c30034067$export$b82296714358084c = 35842;\nconst $d5b33d7c30034067$export$b71692456c47b6c3 = 35843;\nconst $d5b33d7c30034067$export$6ab91af2d757aee7 = 36196;\nconst $d5b33d7c30034067$export$7800993ef8106a6a = 37492;\nconst $d5b33d7c30034067$export$23ed8300a860e7d8 = 37496;\nconst $d5b33d7c30034067$export$dc5570b4a2b92d48 = 37808;\nconst $d5b33d7c30034067$export$68880cd325f8b2fb = 37809;\nconst $d5b33d7c30034067$export$7d2c0be323373d95 = 37810;\nconst $d5b33d7c30034067$export$22b52da301fc3a3e = 37811;\nconst $d5b33d7c30034067$export$c009e2cb4a66485e = 37812;\nconst $d5b33d7c30034067$export$118fff5afa255b63 = 37813;\nconst $d5b33d7c30034067$export$120713c829ae0667 = 37814;\nconst $d5b33d7c30034067$export$c79eeabbf53313e9 = 37815;\nconst $d5b33d7c30034067$export$443cf6567cdd6424 = 37816;\nconst $d5b33d7c30034067$export$6573984fc9840780 = 37817;\nconst $d5b33d7c30034067$export$e7aee563f30091de = 37818;\nconst $d5b33d7c30034067$export$2eb8634622ddeab7 = 37819;\nconst $d5b33d7c30034067$export$202b1ce7b5d25742 = 37820;\nconst $d5b33d7c30034067$export$18ab77abd087e467 = 37821;\nconst $d5b33d7c30034067$export$ce40b115e188bc81 = 36492;\nconst $d5b33d7c30034067$export$d279c5c4bac5121e = 36494;\nconst $d5b33d7c30034067$export$cde52d17225fdbd3 = 36495;\nconst $d5b33d7c30034067$export$b1688df4c4c21670 = 36283;\nconst $d5b33d7c30034067$export$fc15e5d8261eed58 = 36284;\nconst $d5b33d7c30034067$export$d220f6ade8463a0f = 36285;\nconst $d5b33d7c30034067$export$768646d09dc1b6ef = 36286;\nconst $d5b33d7c30034067$export$d62fdc9d1b1cccad = 2200;\nconst $d5b33d7c30034067$export$dfaf4422ce096e29 = 2201;\nconst $d5b33d7c30034067$export$f8f6f2041b78e210 = 2202;\nconst $d5b33d7c30034067$export$995b32462a65e855 = 2300;\nconst $d5b33d7c30034067$export$30fac1aace31cf4d = 2301;\nconst $d5b33d7c30034067$export$198b11ff4c72bb30 = 2302;\nconst $d5b33d7c30034067$export$7f795934b84ab523 = 2400;\nconst $d5b33d7c30034067$export$24a4ccb5099273b5 = 2401;\nconst $d5b33d7c30034067$export$8e8c3ecdcd8e1fee = 2402;\nconst $d5b33d7c30034067$export$bcfbbdcf8de7f8cd = 2500;\nconst $d5b33d7c30034067$export$d875e029ef558d3 = 2501;\nconst $d5b33d7c30034067$export$4c28c87c2dc84758 = 0;\nconst $d5b33d7c30034067$export$b23a071aa286eb29 = 1;\nconst $d5b33d7c30034067$export$f0d8293634f88842 = 2;\n/** @deprecated Use LinearSRGBColorSpace or NoColorSpace in three.js r152+. */ const $d5b33d7c30034067$export$7207336e4151a112 = 3000;\n/** @deprecated Use SRGBColorSpace in three.js r152+. */ const $d5b33d7c30034067$export$f32388edbb32674 = 3001;\nconst $d5b33d7c30034067$export$deeb383078690b50 = 3200;\nconst $d5b33d7c30034067$export$8f910f4c4f73df11 = 3201;\nconst $d5b33d7c30034067$export$2852a58ebdac27b8 = 0;\nconst $d5b33d7c30034067$export$9990ad26f9db5b2c = 1;\n// Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available.\nconst $d5b33d7c30034067$export$bfcb490c2dd3db51 = \"\";\nconst $d5b33d7c30034067$export$561f394b24edfcaa = \"srgb\";\nconst $d5b33d7c30034067$export$42429b3acfb233a4 = \"srgb-linear\";\nconst $d5b33d7c30034067$export$626af19ae879bdf6 = \"display-p3\";\nconst $d5b33d7c30034067$export$c0dc1bc7e964761 = \"display-p3-linear\";\nconst $d5b33d7c30034067$export$f197347d588c1b4a = \"linear\";\nconst $d5b33d7c30034067$export$8d0a61916cc26abb = \"srgb\";\nconst $d5b33d7c30034067$export$ce9118f9eaae3bb2 = \"rec709\";\nconst $d5b33d7c30034067$export$ef371755dbe7f98a = \"p3\";\nconst $d5b33d7c30034067$export$69433f11f42d5527 = 0;\nconst $d5b33d7c30034067$export$9f542ae4b5baca34 = 7680;\nconst $d5b33d7c30034067$export$8a4f28336ef203d3 = 7681;\nconst $d5b33d7c30034067$export$2928c0231297c036 = 7682;\nconst $d5b33d7c30034067$export$c0e9611c8a15f9a8 = 7683;\nconst $d5b33d7c30034067$export$9c2c08927385dcc4 = 34055;\nconst $d5b33d7c30034067$export$7c74ea00fa1315e6 = 34056;\nconst $d5b33d7c30034067$export$22e2e5726612443 = 5386;\nconst $d5b33d7c30034067$export$1343870698229224 = 512;\nconst $d5b33d7c30034067$export$8e1d8ed281997fa6 = 513;\nconst $d5b33d7c30034067$export$55648a1cde8329a7 = 514;\nconst $d5b33d7c30034067$export$2dff107857e6aca2 = 515;\nconst $d5b33d7c30034067$export$6f93765ab2f451a2 = 516;\nconst $d5b33d7c30034067$export$6f3fb2d2440f2b76 = 517;\nconst $d5b33d7c30034067$export$4119cf7b4c98fd5a = 518;\nconst $d5b33d7c30034067$export$14cf96713ddd97a8 = 519;\nconst $d5b33d7c30034067$export$d9e2d19a747baaab = 512;\nconst $d5b33d7c30034067$export$36bcf49c713b3eb7 = 513;\nconst $d5b33d7c30034067$export$66f28d946fc6a0d5 = 514;\nconst $d5b33d7c30034067$export$64eea11eb407ddf1 = 515;\nconst $d5b33d7c30034067$export$155af022118f3a38 = 516;\nconst $d5b33d7c30034067$export$67ab95dde6bed156 = 517;\nconst $d5b33d7c30034067$export$1cdcb70d53d65f61 = 518;\nconst $d5b33d7c30034067$export$187b73a3e352c145 = 519;\nconst $d5b33d7c30034067$export$763e8360f4d7f77d = 35044;\nconst $d5b33d7c30034067$export$8505d14ac8546ca = 35048;\nconst $d5b33d7c30034067$export$721e63549e51d81e = 35040;\nconst $d5b33d7c30034067$export$415731dc4f48e299 = 35045;\nconst $d5b33d7c30034067$export$9e809946455f13bc = 35049;\nconst $d5b33d7c30034067$export$2ed9499a35b5f832 = 35041;\nconst $d5b33d7c30034067$export$32ab2503ea19469a = 35046;\nconst $d5b33d7c30034067$export$ab4022c2c3f86315 = 35050;\nconst $d5b33d7c30034067$export$ba7f1db36a76a970 = 35042;\nconst $d5b33d7c30034067$export$43600cc67fabd9f = \"100\";\nconst $d5b33d7c30034067$export$f63012db5506e7dd = \"300 es\";\nconst $d5b33d7c30034067$export$ca1dce8b5e1de74d = 1035; // fallback for WebGL 1\nconst $d5b33d7c30034067$export$5a0e9190d10875d3 = 2000;\nconst $d5b33d7c30034067$export$cc83beedcb9be9ac = 2001;\n/**\n * https://github.com/mrdoob/eventdispatcher.js/\n */ class $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n addEventListener(type, listener) {\n if (this._listeners === undefined) this._listeners = {};\n const listeners = this._listeners;\n if (listeners[type] === undefined) listeners[type] = [];\n if (listeners[type].indexOf(listener) === -1) listeners[type].push(listener);\n }\n hasEventListener(type, listener) {\n if (this._listeners === undefined) return false;\n const listeners = this._listeners;\n return listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;\n }\n removeEventListener(type, listener) {\n if (this._listeners === undefined) return;\n const listeners = this._listeners;\n const listenerArray = listeners[type];\n if (listenerArray !== undefined) {\n const index = listenerArray.indexOf(listener);\n if (index !== -1) listenerArray.splice(index, 1);\n }\n }\n dispatchEvent(event) {\n if (this._listeners === undefined) return;\n const listeners = this._listeners;\n const listenerArray = listeners[event.type];\n if (listenerArray !== undefined) {\n event.target = this;\n // Make a copy, in case listeners are removed while iterating.\n const array = listenerArray.slice(0);\n for(let i = 0, l = array.length; i < l; i++)array[i].call(this, event);\n event.target = null;\n }\n }\n}\nconst $d5b33d7c30034067$var$_lut = [\n \"00\",\n \"01\",\n \"02\",\n \"03\",\n \"04\",\n \"05\",\n \"06\",\n \"07\",\n \"08\",\n \"09\",\n \"0a\",\n \"0b\",\n \"0c\",\n \"0d\",\n \"0e\",\n \"0f\",\n \"10\",\n \"11\",\n \"12\",\n \"13\",\n \"14\",\n \"15\",\n \"16\",\n \"17\",\n \"18\",\n \"19\",\n \"1a\",\n \"1b\",\n \"1c\",\n \"1d\",\n \"1e\",\n \"1f\",\n \"20\",\n \"21\",\n \"22\",\n \"23\",\n \"24\",\n \"25\",\n \"26\",\n \"27\",\n \"28\",\n \"29\",\n \"2a\",\n \"2b\",\n \"2c\",\n \"2d\",\n \"2e\",\n \"2f\",\n \"30\",\n \"31\",\n \"32\",\n \"33\",\n \"34\",\n \"35\",\n \"36\",\n \"37\",\n \"38\",\n \"39\",\n \"3a\",\n \"3b\",\n \"3c\",\n \"3d\",\n \"3e\",\n \"3f\",\n \"40\",\n \"41\",\n \"42\",\n \"43\",\n \"44\",\n \"45\",\n \"46\",\n \"47\",\n \"48\",\n \"49\",\n \"4a\",\n \"4b\",\n \"4c\",\n \"4d\",\n \"4e\",\n \"4f\",\n \"50\",\n \"51\",\n \"52\",\n \"53\",\n \"54\",\n \"55\",\n \"56\",\n \"57\",\n \"58\",\n \"59\",\n \"5a\",\n \"5b\",\n \"5c\",\n \"5d\",\n \"5e\",\n \"5f\",\n \"60\",\n \"61\",\n \"62\",\n \"63\",\n \"64\",\n \"65\",\n \"66\",\n \"67\",\n \"68\",\n \"69\",\n \"6a\",\n \"6b\",\n \"6c\",\n \"6d\",\n \"6e\",\n \"6f\",\n \"70\",\n \"71\",\n \"72\",\n \"73\",\n \"74\",\n \"75\",\n \"76\",\n \"77\",\n \"78\",\n \"79\",\n \"7a\",\n \"7b\",\n \"7c\",\n \"7d\",\n \"7e\",\n \"7f\",\n \"80\",\n \"81\",\n \"82\",\n \"83\",\n \"84\",\n \"85\",\n \"86\",\n \"87\",\n \"88\",\n \"89\",\n \"8a\",\n \"8b\",\n \"8c\",\n \"8d\",\n \"8e\",\n \"8f\",\n \"90\",\n \"91\",\n \"92\",\n \"93\",\n \"94\",\n \"95\",\n \"96\",\n \"97\",\n \"98\",\n \"99\",\n \"9a\",\n \"9b\",\n \"9c\",\n \"9d\",\n \"9e\",\n \"9f\",\n \"a0\",\n \"a1\",\n \"a2\",\n \"a3\",\n \"a4\",\n \"a5\",\n \"a6\",\n \"a7\",\n \"a8\",\n \"a9\",\n \"aa\",\n \"ab\",\n \"ac\",\n \"ad\",\n \"ae\",\n \"af\",\n \"b0\",\n \"b1\",\n \"b2\",\n \"b3\",\n \"b4\",\n \"b5\",\n \"b6\",\n \"b7\",\n \"b8\",\n \"b9\",\n \"ba\",\n \"bb\",\n \"bc\",\n \"bd\",\n \"be\",\n \"bf\",\n \"c0\",\n \"c1\",\n \"c2\",\n \"c3\",\n \"c4\",\n \"c5\",\n \"c6\",\n \"c7\",\n \"c8\",\n \"c9\",\n \"ca\",\n \"cb\",\n \"cc\",\n \"cd\",\n \"ce\",\n \"cf\",\n \"d0\",\n \"d1\",\n \"d2\",\n \"d3\",\n \"d4\",\n \"d5\",\n \"d6\",\n \"d7\",\n \"d8\",\n \"d9\",\n \"da\",\n \"db\",\n \"dc\",\n \"dd\",\n \"de\",\n \"df\",\n \"e0\",\n \"e1\",\n \"e2\",\n \"e3\",\n \"e4\",\n \"e5\",\n \"e6\",\n \"e7\",\n \"e8\",\n \"e9\",\n \"ea\",\n \"eb\",\n \"ec\",\n \"ed\",\n \"ee\",\n \"ef\",\n \"f0\",\n \"f1\",\n \"f2\",\n \"f3\",\n \"f4\",\n \"f5\",\n \"f6\",\n \"f7\",\n \"f8\",\n \"f9\",\n \"fa\",\n \"fb\",\n \"fc\",\n \"fd\",\n \"fe\",\n \"ff\"\n];\nlet $d5b33d7c30034067$var$_seed = 1234567;\nconst $d5b33d7c30034067$var$DEG2RAD = Math.PI / 180;\nconst $d5b33d7c30034067$var$RAD2DEG = 180 / Math.PI;\n// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\nfunction $d5b33d7c30034067$var$generateUUID() {\n const d0 = Math.random() * 0xffffffff | 0;\n const d1 = Math.random() * 0xffffffff | 0;\n const d2 = Math.random() * 0xffffffff | 0;\n const d3 = Math.random() * 0xffffffff | 0;\n const uuid = $d5b33d7c30034067$var$_lut[d0 & 0xff] + $d5b33d7c30034067$var$_lut[d0 >> 8 & 0xff] + $d5b33d7c30034067$var$_lut[d0 >> 16 & 0xff] + $d5b33d7c30034067$var$_lut[d0 >> 24 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d1 & 0xff] + $d5b33d7c30034067$var$_lut[d1 >> 8 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d1 >> 16 & 0x0f | 0x40] + $d5b33d7c30034067$var$_lut[d1 >> 24 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d2 & 0x3f | 0x80] + $d5b33d7c30034067$var$_lut[d2 >> 8 & 0xff] + \"-\" + $d5b33d7c30034067$var$_lut[d2 >> 16 & 0xff] + $d5b33d7c30034067$var$_lut[d2 >> 24 & 0xff] + $d5b33d7c30034067$var$_lut[d3 & 0xff] + $d5b33d7c30034067$var$_lut[d3 >> 8 & 0xff] + $d5b33d7c30034067$var$_lut[d3 >> 16 & 0xff] + $d5b33d7c30034067$var$_lut[d3 >> 24 & 0xff];\n // .toLowerCase() here flattens concatenated strings to save heap memory space.\n return uuid.toLowerCase();\n}\nfunction $d5b33d7c30034067$var$clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n// compute euclidean modulo of m % n\n// https://en.wikipedia.org/wiki/Modulo_operation\nfunction $d5b33d7c30034067$var$euclideanModulo(n, m) {\n return (n % m + m) % m;\n}\n// Linear mapping from range to range \nfunction $d5b33d7c30034067$var$mapLinear(x, a1, a2, b1, b2) {\n return b1 + (x - a1) * (b2 - b1) / (a2 - a1);\n}\n// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/\nfunction $d5b33d7c30034067$var$inverseLerp(x, y, value) {\n if (x !== y) return (value - x) / (y - x);\n else return 0;\n}\n// https://en.wikipedia.org/wiki/Linear_interpolation\nfunction $d5b33d7c30034067$var$lerp(x, y, t) {\n return (1 - t) * x + t * y;\n}\n// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\nfunction $d5b33d7c30034067$var$damp(x, y, lambda, dt) {\n return $d5b33d7c30034067$var$lerp(x, y, 1 - Math.exp(-lambda * dt));\n}\n// https://www.desmos.com/calculator/vcsjnyz7x4\nfunction $d5b33d7c30034067$var$pingpong(x, length = 1) {\n return length - Math.abs($d5b33d7c30034067$var$euclideanModulo(x, length * 2) - length);\n}\n// http://en.wikipedia.org/wiki/Smoothstep\nfunction $d5b33d7c30034067$var$smoothstep(x, min, max) {\n if (x <= min) return 0;\n if (x >= max) return 1;\n x = (x - min) / (max - min);\n return x * x * (3 - 2 * x);\n}\nfunction $d5b33d7c30034067$var$smootherstep(x, min, max) {\n if (x <= min) return 0;\n if (x >= max) return 1;\n x = (x - min) / (max - min);\n return x * x * x * (x * (x * 6 - 15) + 10);\n}\n// Random integer from interval\nfunction $d5b33d7c30034067$var$randInt(low, high) {\n return low + Math.floor(Math.random() * (high - low + 1));\n}\n// Random float from interval\nfunction $d5b33d7c30034067$var$randFloat(low, high) {\n return low + Math.random() * (high - low);\n}\n// Random float from <-range/2, range/2> interval\nfunction $d5b33d7c30034067$var$randFloatSpread(range) {\n return range * (0.5 - Math.random());\n}\n// Deterministic pseudo-random float in the interval [ 0, 1 ]\nfunction $d5b33d7c30034067$var$seededRandom(s) {\n if (s !== undefined) $d5b33d7c30034067$var$_seed = s;\n // Mulberry32 generator\n let t = $d5b33d7c30034067$var$_seed += 0x6D2B79F5;\n t = Math.imul(t ^ t >>> 15, t | 1);\n t ^= t + Math.imul(t ^ t >>> 7, t | 61);\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n}\nfunction $d5b33d7c30034067$var$degToRad(degrees) {\n return degrees * $d5b33d7c30034067$var$DEG2RAD;\n}\nfunction $d5b33d7c30034067$var$radToDeg(radians) {\n return radians * $d5b33d7c30034067$var$RAD2DEG;\n}\nfunction $d5b33d7c30034067$var$isPowerOfTwo(value) {\n return (value & value - 1) === 0 && value !== 0;\n}\nfunction $d5b33d7c30034067$var$ceilPowerOfTwo(value) {\n return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));\n}\nfunction $d5b33d7c30034067$var$floorPowerOfTwo(value) {\n return Math.pow(2, Math.floor(Math.log(value) / Math.LN2));\n}\nfunction $d5b33d7c30034067$var$setQuaternionFromProperEuler(q, a, b, c, order) {\n // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n // rotations are applied to the axes in the order specified by 'order'\n // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n // angles are in radians\n const cos = Math.cos;\n const sin = Math.sin;\n const c2 = cos(b / 2);\n const s2 = sin(b / 2);\n const c13 = cos((a + c) / 2);\n const s13 = sin((a + c) / 2);\n const c1_3 = cos((a - c) / 2);\n const s1_3 = sin((a - c) / 2);\n const c3_1 = cos((c - a) / 2);\n const s3_1 = sin((c - a) / 2);\n switch(order){\n case \"XYX\":\n q.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13);\n break;\n case \"YZY\":\n q.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13);\n break;\n case \"ZXZ\":\n q.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13);\n break;\n case \"XZX\":\n q.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13);\n break;\n case \"YXY\":\n q.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13);\n break;\n case \"ZYZ\":\n q.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13);\n break;\n default:\n console.warn(\"THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: \" + order);\n }\n}\nfunction $d5b33d7c30034067$var$denormalize(value, array) {\n switch(array.constructor){\n case Float32Array:\n return value;\n case Uint32Array:\n return value / 4294967295.0;\n case Uint16Array:\n return value / 65535.0;\n case Uint8Array:\n return value / 255.0;\n case Int32Array:\n return Math.max(value / 2147483647.0, -1);\n case Int16Array:\n return Math.max(value / 32767.0, -1);\n case Int8Array:\n return Math.max(value / 127.0, -1);\n default:\n throw new Error(\"Invalid component type.\");\n }\n}\nfunction $d5b33d7c30034067$var$normalize(value, array) {\n switch(array.constructor){\n case Float32Array:\n return value;\n case Uint32Array:\n return Math.round(value * 4294967295.0);\n case Uint16Array:\n return Math.round(value * 65535.0);\n case Uint8Array:\n return Math.round(value * 255.0);\n case Int32Array:\n return Math.round(value * 2147483647.0);\n case Int16Array:\n return Math.round(value * 32767.0);\n case Int8Array:\n return Math.round(value * 127.0);\n default:\n throw new Error(\"Invalid component type.\");\n }\n}\nconst $d5b33d7c30034067$export$6a7ef315a0d1ef07 = {\n DEG2RAD: $d5b33d7c30034067$var$DEG2RAD,\n RAD2DEG: $d5b33d7c30034067$var$RAD2DEG,\n generateUUID: $d5b33d7c30034067$var$generateUUID,\n clamp: $d5b33d7c30034067$var$clamp,\n euclideanModulo: $d5b33d7c30034067$var$euclideanModulo,\n mapLinear: $d5b33d7c30034067$var$mapLinear,\n inverseLerp: $d5b33d7c30034067$var$inverseLerp,\n lerp: $d5b33d7c30034067$var$lerp,\n damp: $d5b33d7c30034067$var$damp,\n pingpong: $d5b33d7c30034067$var$pingpong,\n smoothstep: $d5b33d7c30034067$var$smoothstep,\n smootherstep: $d5b33d7c30034067$var$smootherstep,\n randInt: $d5b33d7c30034067$var$randInt,\n randFloat: $d5b33d7c30034067$var$randFloat,\n randFloatSpread: $d5b33d7c30034067$var$randFloatSpread,\n seededRandom: $d5b33d7c30034067$var$seededRandom,\n degToRad: $d5b33d7c30034067$var$degToRad,\n radToDeg: $d5b33d7c30034067$var$radToDeg,\n isPowerOfTwo: $d5b33d7c30034067$var$isPowerOfTwo,\n ceilPowerOfTwo: $d5b33d7c30034067$var$ceilPowerOfTwo,\n floorPowerOfTwo: $d5b33d7c30034067$var$floorPowerOfTwo,\n setQuaternionFromProperEuler: $d5b33d7c30034067$var$setQuaternionFromProperEuler,\n normalize: $d5b33d7c30034067$var$normalize,\n denormalize: $d5b33d7c30034067$var$denormalize\n};\nclass $d5b33d7c30034067$export$c977b3e384af9ae1 {\n constructor(x = 0, y = 0){\n $d5b33d7c30034067$export$c977b3e384af9ae1.prototype.isVector2 = true;\n this.x = x;\n this.y = y;\n }\n get width() {\n return this.x;\n }\n set width(value) {\n this.x = value;\n }\n get height() {\n return this.y;\n }\n set height(value) {\n this.y = value;\n }\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n setScalar(scalar) {\n this.x = scalar;\n this.y = scalar;\n return this;\n }\n setX(x) {\n this.x = x;\n return this;\n }\n setY(y) {\n this.y = y;\n return this;\n }\n setComponent(index, value) {\n switch(index){\n case 0:\n this.x = value;\n break;\n case 1:\n this.y = value;\n break;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n return this;\n }\n getComponent(index) {\n switch(index){\n case 0:\n return this.x;\n case 1:\n return this.y;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n }\n clone() {\n return new this.constructor(this.x, this.y);\n }\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n return this;\n }\n addScalar(s) {\n this.x += s;\n this.y += s;\n return this;\n }\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n return this;\n }\n addScaledVector(v, s) {\n this.x += v.x * s;\n this.y += v.y * s;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n return this;\n }\n subScalar(s) {\n this.x -= s;\n this.y -= s;\n return this;\n }\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n return this;\n }\n multiply(v) {\n this.x *= v.x;\n this.y *= v.y;\n return this;\n }\n multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n return this;\n }\n divide(v) {\n this.x /= v.x;\n this.y /= v.y;\n return this;\n }\n divideScalar(scalar) {\n return this.multiplyScalar(1 / scalar);\n }\n applyMatrix3(m) {\n const x = this.x, y = this.y;\n const e = m.elements;\n this.x = e[0] * x + e[3] * y + e[6];\n this.y = e[1] * x + e[4] * y + e[7];\n return this;\n }\n min(v) {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n return this;\n }\n max(v) {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n return this;\n }\n clamp(min, max) {\n // assumes min < max, componentwise\n this.x = Math.max(min.x, Math.min(max.x, this.x));\n this.y = Math.max(min.y, Math.min(max.y, this.y));\n return this;\n }\n clampScalar(minVal, maxVal) {\n this.x = Math.max(minVal, Math.min(maxVal, this.x));\n this.y = Math.max(minVal, Math.min(maxVal, this.y));\n return this;\n }\n clampLength(min, max) {\n const length = this.length();\n return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n }\n floor() {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n return this;\n }\n ceil() {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n return this;\n }\n round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n roundToZero() {\n this.x = Math.trunc(this.x);\n this.y = Math.trunc(this.y);\n return this;\n }\n negate() {\n this.x = -this.x;\n this.y = -this.y;\n return this;\n }\n dot(v) {\n return this.x * v.x + this.y * v.y;\n }\n cross(v) {\n return this.x * v.y - this.y * v.x;\n }\n lengthSq() {\n return this.x * this.x + this.y * this.y;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n manhattanLength() {\n return Math.abs(this.x) + Math.abs(this.y);\n }\n normalize() {\n return this.divideScalar(this.length() || 1);\n }\n angle() {\n // computes the angle in radians with respect to the positive x-axis\n const angle = Math.atan2(-this.y, -this.x) + Math.PI;\n return angle;\n }\n angleTo(v) {\n const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());\n if (denominator === 0) return Math.PI / 2;\n const theta = this.dot(v) / denominator;\n // clamp, to handle numerical problems\n return Math.acos($d5b33d7c30034067$var$clamp(theta, -1, 1));\n }\n distanceTo(v) {\n return Math.sqrt(this.distanceToSquared(v));\n }\n distanceToSquared(v) {\n const dx = this.x - v.x, dy = this.y - v.y;\n return dx * dx + dy * dy;\n }\n manhattanDistanceTo(v) {\n return Math.abs(this.x - v.x) + Math.abs(this.y - v.y);\n }\n setLength(length) {\n return this.normalize().multiplyScalar(length);\n }\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n return this;\n }\n lerpVectors(v1, v2, alpha) {\n this.x = v1.x + (v2.x - v1.x) * alpha;\n this.y = v1.y + (v2.y - v1.y) * alpha;\n return this;\n }\n equals(v) {\n return v.x === this.x && v.y === this.y;\n }\n fromArray(array, offset = 0) {\n this.x = array[offset];\n this.y = array[offset + 1];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.x;\n array[offset + 1] = this.y;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.x = attribute.getX(index);\n this.y = attribute.getY(index);\n return this;\n }\n rotateAround(center, angle) {\n const c = Math.cos(angle), s = Math.sin(angle);\n const x = this.x - center.x;\n const y = this.y - center.y;\n this.x = x * c - y * s + center.x;\n this.y = x * s + y * c + center.y;\n return this;\n }\n random() {\n this.x = Math.random();\n this.y = Math.random();\n return this;\n }\n *[Symbol.iterator]() {\n yield this.x;\n yield this.y;\n }\n}\nclass $d5b33d7c30034067$export$8ff26dafa08918 {\n constructor(n11, n12, n13, n21, n22, n23, n31, n32, n33){\n $d5b33d7c30034067$export$8ff26dafa08918.prototype.isMatrix3 = true;\n this.elements = [\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 1\n ];\n if (n11 !== undefined) this.set(n11, n12, n13, n21, n22, n23, n31, n32, n33);\n }\n set(n11, n12, n13, n21, n22, n23, n31, n32, n33) {\n const te = this.elements;\n te[0] = n11;\n te[1] = n21;\n te[2] = n31;\n te[3] = n12;\n te[4] = n22;\n te[5] = n32;\n te[6] = n13;\n te[7] = n23;\n te[8] = n33;\n return this;\n }\n identity() {\n this.set(1, 0, 0, 0, 1, 0, 0, 0, 1);\n return this;\n }\n copy(m) {\n const te = this.elements;\n const me = m.elements;\n te[0] = me[0];\n te[1] = me[1];\n te[2] = me[2];\n te[3] = me[3];\n te[4] = me[4];\n te[5] = me[5];\n te[6] = me[6];\n te[7] = me[7];\n te[8] = me[8];\n return this;\n }\n extractBasis(xAxis, yAxis, zAxis) {\n xAxis.setFromMatrix3Column(this, 0);\n yAxis.setFromMatrix3Column(this, 1);\n zAxis.setFromMatrix3Column(this, 2);\n return this;\n }\n setFromMatrix4(m) {\n const me = m.elements;\n this.set(me[0], me[4], me[8], me[1], me[5], me[9], me[2], me[6], me[10]);\n return this;\n }\n multiply(m) {\n return this.multiplyMatrices(this, m);\n }\n premultiply(m) {\n return this.multiplyMatrices(m, this);\n }\n multiplyMatrices(a, b) {\n const ae = a.elements;\n const be = b.elements;\n const te = this.elements;\n const a11 = ae[0], a12 = ae[3], a13 = ae[6];\n const a21 = ae[1], a22 = ae[4], a23 = ae[7];\n const a31 = ae[2], a32 = ae[5], a33 = ae[8];\n const b11 = be[0], b12 = be[3], b13 = be[6];\n const b21 = be[1], b22 = be[4], b23 = be[7];\n const b31 = be[2], b32 = be[5], b33 = be[8];\n te[0] = a11 * b11 + a12 * b21 + a13 * b31;\n te[3] = a11 * b12 + a12 * b22 + a13 * b32;\n te[6] = a11 * b13 + a12 * b23 + a13 * b33;\n te[1] = a21 * b11 + a22 * b21 + a23 * b31;\n te[4] = a21 * b12 + a22 * b22 + a23 * b32;\n te[7] = a21 * b13 + a22 * b23 + a23 * b33;\n te[2] = a31 * b11 + a32 * b21 + a33 * b31;\n te[5] = a31 * b12 + a32 * b22 + a33 * b32;\n te[8] = a31 * b13 + a32 * b23 + a33 * b33;\n return this;\n }\n multiplyScalar(s) {\n const te = this.elements;\n te[0] *= s;\n te[3] *= s;\n te[6] *= s;\n te[1] *= s;\n te[4] *= s;\n te[7] *= s;\n te[2] *= s;\n te[5] *= s;\n te[8] *= s;\n return this;\n }\n determinant() {\n const te = this.elements;\n const a = te[0], b = te[1], c = te[2], d = te[3], e = te[4], f = te[5], g = te[6], h = te[7], i = te[8];\n return a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n }\n invert() {\n const te = this.elements, n11 = te[0], n21 = te[1], n31 = te[2], n12 = te[3], n22 = te[4], n32 = te[5], n13 = te[6], n23 = te[7], n33 = te[8], t11 = n33 * n22 - n32 * n23, t12 = n32 * n13 - n33 * n12, t13 = n23 * n12 - n22 * n13, det = n11 * t11 + n21 * t12 + n31 * t13;\n if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);\n const detInv = 1 / det;\n te[0] = t11 * detInv;\n te[1] = (n31 * n23 - n33 * n21) * detInv;\n te[2] = (n32 * n21 - n31 * n22) * detInv;\n te[3] = t12 * detInv;\n te[4] = (n33 * n11 - n31 * n13) * detInv;\n te[5] = (n31 * n12 - n32 * n11) * detInv;\n te[6] = t13 * detInv;\n te[7] = (n21 * n13 - n23 * n11) * detInv;\n te[8] = (n22 * n11 - n21 * n12) * detInv;\n return this;\n }\n transpose() {\n let tmp;\n const m = this.elements;\n tmp = m[1];\n m[1] = m[3];\n m[3] = tmp;\n tmp = m[2];\n m[2] = m[6];\n m[6] = tmp;\n tmp = m[5];\n m[5] = m[7];\n m[7] = tmp;\n return this;\n }\n getNormalMatrix(matrix4) {\n return this.setFromMatrix4(matrix4).invert().transpose();\n }\n transposeIntoArray(r) {\n const m = this.elements;\n r[0] = m[0];\n r[1] = m[3];\n r[2] = m[6];\n r[3] = m[1];\n r[4] = m[4];\n r[5] = m[7];\n r[6] = m[2];\n r[7] = m[5];\n r[8] = m[8];\n return this;\n }\n setUvTransform(tx, ty, sx, sy, rotation, cx, cy) {\n const c = Math.cos(rotation);\n const s = Math.sin(rotation);\n this.set(sx * c, sx * s, -sx * (c * cx + s * cy) + cx + tx, -sy * s, sy * c, -sy * (-s * cx + c * cy) + cy + ty, 0, 0, 1);\n return this;\n }\n //\n scale(sx, sy) {\n this.premultiply($d5b33d7c30034067$var$_m3.makeScale(sx, sy));\n return this;\n }\n rotate(theta) {\n this.premultiply($d5b33d7c30034067$var$_m3.makeRotation(-theta));\n return this;\n }\n translate(tx, ty) {\n this.premultiply($d5b33d7c30034067$var$_m3.makeTranslation(tx, ty));\n return this;\n }\n // for 2D Transforms\n makeTranslation(x, y) {\n if (x.isVector2) this.set(1, 0, x.x, 0, 1, x.y, 0, 0, 1);\n else this.set(1, 0, x, 0, 1, y, 0, 0, 1);\n return this;\n }\n makeRotation(theta) {\n // counterclockwise\n const c = Math.cos(theta);\n const s = Math.sin(theta);\n this.set(c, -s, 0, s, c, 0, 0, 0, 1);\n return this;\n }\n makeScale(x, y) {\n this.set(x, 0, 0, 0, y, 0, 0, 0, 1);\n return this;\n }\n //\n equals(matrix) {\n const te = this.elements;\n const me = matrix.elements;\n for(let i = 0; i < 9; i++){\n if (te[i] !== me[i]) return false;\n }\n return true;\n }\n fromArray(array, offset = 0) {\n for(let i = 0; i < 9; i++)this.elements[i] = array[i + offset];\n return this;\n }\n toArray(array = [], offset = 0) {\n const te = this.elements;\n array[offset] = te[0];\n array[offset + 1] = te[1];\n array[offset + 2] = te[2];\n array[offset + 3] = te[3];\n array[offset + 4] = te[4];\n array[offset + 5] = te[5];\n array[offset + 6] = te[6];\n array[offset + 7] = te[7];\n array[offset + 8] = te[8];\n return array;\n }\n clone() {\n return new this.constructor().fromArray(this.elements);\n }\n}\nconst $d5b33d7c30034067$var$_m3 = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918();\nfunction $d5b33d7c30034067$var$arrayNeedsUint32(array) {\n // assumes larger values usually on last\n for(let i = array.length - 1; i >= 0; --i){\n if (array[i] >= 65535) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565\n }\n return false;\n}\nconst $d5b33d7c30034067$var$TYPED_ARRAYS = {\n Int8Array: Int8Array,\n Uint8Array: Uint8Array,\n Uint8ClampedArray: Uint8ClampedArray,\n Int16Array: Int16Array,\n Uint16Array: Uint16Array,\n Int32Array: Int32Array,\n Uint32Array: Uint32Array,\n Float32Array: Float32Array,\n Float64Array: Float64Array\n};\nfunction $d5b33d7c30034067$var$getTypedArray(type, buffer) {\n return new $d5b33d7c30034067$var$TYPED_ARRAYS[type](buffer);\n}\nfunction $d5b33d7c30034067$var$createElementNS(name) {\n return document.createElementNS(\"http://www.w3.org/1999/xhtml\", name);\n}\nfunction $d5b33d7c30034067$export$1033a2df66368859() {\n const canvas = $d5b33d7c30034067$var$createElementNS(\"canvas\");\n canvas.style.display = \"block\";\n return canvas;\n}\nconst $d5b33d7c30034067$var$_cache = {};\nfunction $d5b33d7c30034067$var$warnOnce(message) {\n if (message in $d5b33d7c30034067$var$_cache) return;\n $d5b33d7c30034067$var$_cache[message] = true;\n console.warn(message);\n}\n/**\n * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping\n * or clipping. Based on W3C specifications for sRGB and Display P3,\n * and ICC specifications for the D50 connection space. Values in/out\n * are _linear_ sRGB and _linear_ Display P3.\n *\n * Note that both sRGB and Display P3 use the sRGB transfer functions.\n *\n * Reference:\n * - http://www.russellcottrell.com/photo/matrixCalculator.htm\n */ const $d5b33d7c30034067$var$LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918().set(0.8224621, 0.177538, 0.0, 0.0331941, 0.9668058, 0.0, 0.0170827, 0.0723974, 0.9105199);\nconst $d5b33d7c30034067$var$LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918().set(1.2249401, -0.2249404, 0.0, -0.0420569, 1.0420571, 0.0, -0.0196376, -0.0786361, 1.0982735);\n/**\n * Defines supported color spaces by transfer function and primaries,\n * and provides conversions to/from the Linear-sRGB reference space.\n */ const $d5b33d7c30034067$var$COLOR_SPACES = {\n [$d5b33d7c30034067$export$42429b3acfb233a4]: {\n transfer: $d5b33d7c30034067$export$f197347d588c1b4a,\n primaries: $d5b33d7c30034067$export$ce9118f9eaae3bb2,\n toReference: (color)=>color,\n fromReference: (color)=>color\n },\n [$d5b33d7c30034067$export$561f394b24edfcaa]: {\n transfer: $d5b33d7c30034067$export$8d0a61916cc26abb,\n primaries: $d5b33d7c30034067$export$ce9118f9eaae3bb2,\n toReference: (color)=>color.convertSRGBToLinear(),\n fromReference: (color)=>color.convertLinearToSRGB()\n },\n [$d5b33d7c30034067$export$c0dc1bc7e964761]: {\n transfer: $d5b33d7c30034067$export$f197347d588c1b4a,\n primaries: $d5b33d7c30034067$export$ef371755dbe7f98a,\n toReference: (color)=>color.applyMatrix3($d5b33d7c30034067$var$LINEAR_DISPLAY_P3_TO_LINEAR_SRGB),\n fromReference: (color)=>color.applyMatrix3($d5b33d7c30034067$var$LINEAR_SRGB_TO_LINEAR_DISPLAY_P3)\n },\n [$d5b33d7c30034067$export$626af19ae879bdf6]: {\n transfer: $d5b33d7c30034067$export$8d0a61916cc26abb,\n primaries: $d5b33d7c30034067$export$ef371755dbe7f98a,\n toReference: (color)=>color.convertSRGBToLinear().applyMatrix3($d5b33d7c30034067$var$LINEAR_DISPLAY_P3_TO_LINEAR_SRGB),\n fromReference: (color)=>color.applyMatrix3($d5b33d7c30034067$var$LINEAR_SRGB_TO_LINEAR_DISPLAY_P3).convertLinearToSRGB()\n }\n};\nconst $d5b33d7c30034067$var$SUPPORTED_WORKING_COLOR_SPACES = new Set([\n $d5b33d7c30034067$export$42429b3acfb233a4,\n $d5b33d7c30034067$export$c0dc1bc7e964761\n]);\nconst $d5b33d7c30034067$export$5e6fd513f44698c = {\n enabled: true,\n _workingColorSpace: $d5b33d7c30034067$export$42429b3acfb233a4,\n get legacyMode () {\n console.warn(\"THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.\");\n return !this.enabled;\n },\n set legacyMode (legacyMode){\n console.warn(\"THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.\");\n this.enabled = !legacyMode;\n },\n get workingColorSpace () {\n return this._workingColorSpace;\n },\n set workingColorSpace (colorSpace){\n if (!$d5b33d7c30034067$var$SUPPORTED_WORKING_COLOR_SPACES.has(colorSpace)) throw new Error(`Unsupported working color space, \"${colorSpace}\".`);\n this._workingColorSpace = colorSpace;\n },\n convert: function(color, sourceColorSpace, targetColorSpace) {\n if (this.enabled === false || sourceColorSpace === targetColorSpace || !sourceColorSpace || !targetColorSpace) return color;\n const sourceToReference = $d5b33d7c30034067$var$COLOR_SPACES[sourceColorSpace].toReference;\n const targetFromReference = $d5b33d7c30034067$var$COLOR_SPACES[targetColorSpace].fromReference;\n return targetFromReference(sourceToReference(color));\n },\n fromWorkingColorSpace: function(color, targetColorSpace) {\n return this.convert(color, this._workingColorSpace, targetColorSpace);\n },\n toWorkingColorSpace: function(color, sourceColorSpace) {\n return this.convert(color, sourceColorSpace, this._workingColorSpace);\n },\n getPrimaries: function(colorSpace1) {\n return $d5b33d7c30034067$var$COLOR_SPACES[colorSpace1].primaries;\n },\n getTransfer: function(colorSpace1) {\n if (colorSpace1 === $d5b33d7c30034067$export$bfcb490c2dd3db51) return $d5b33d7c30034067$export$f197347d588c1b4a;\n return $d5b33d7c30034067$var$COLOR_SPACES[colorSpace1].transfer;\n }\n};\nfunction $d5b33d7c30034067$var$SRGBToLinear(c) {\n return c < 0.04045 ? c * 0.0773993808 : Math.pow(c * 0.9478672986 + 0.0521327014, 2.4);\n}\nfunction $d5b33d7c30034067$var$LinearToSRGB(c) {\n return c < 0.0031308 ? c * 12.92 : 1.055 * Math.pow(c, 0.41666) - 0.055;\n}\nlet $d5b33d7c30034067$var$_canvas;\nclass $d5b33d7c30034067$export$698882cf06df44aa {\n static getDataURL(image) {\n if (/^data:/i.test(image.src)) return image.src;\n if (typeof HTMLCanvasElement === \"undefined\") return image.src;\n let canvas;\n if (image instanceof HTMLCanvasElement) canvas = image;\n else {\n if ($d5b33d7c30034067$var$_canvas === undefined) $d5b33d7c30034067$var$_canvas = $d5b33d7c30034067$var$createElementNS(\"canvas\");\n $d5b33d7c30034067$var$_canvas.width = image.width;\n $d5b33d7c30034067$var$_canvas.height = image.height;\n const context = $d5b33d7c30034067$var$_canvas.getContext(\"2d\");\n if (image instanceof ImageData) context.putImageData(image, 0, 0);\n else context.drawImage(image, 0, 0, image.width, image.height);\n canvas = $d5b33d7c30034067$var$_canvas;\n }\n if (canvas.width > 2048 || canvas.height > 2048) {\n console.warn(\"THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons\", image);\n return canvas.toDataURL(\"image/jpeg\", 0.6);\n } else return canvas.toDataURL(\"image/png\");\n }\n static sRGBToLinear(image) {\n if (typeof HTMLImageElement !== \"undefined\" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== \"undefined\" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== \"undefined\" && image instanceof ImageBitmap) {\n const canvas = $d5b33d7c30034067$var$createElementNS(\"canvas\");\n canvas.width = image.width;\n canvas.height = image.height;\n const context = canvas.getContext(\"2d\");\n context.drawImage(image, 0, 0, image.width, image.height);\n const imageData = context.getImageData(0, 0, image.width, image.height);\n const data = imageData.data;\n for(let i = 0; i < data.length; i++)data[i] = $d5b33d7c30034067$var$SRGBToLinear(data[i] / 255) * 255;\n context.putImageData(imageData, 0, 0);\n return canvas;\n } else if (image.data) {\n const data = image.data.slice(0);\n for(let i = 0; i < data.length; i++)if (data instanceof Uint8Array || data instanceof Uint8ClampedArray) data[i] = Math.floor($d5b33d7c30034067$var$SRGBToLinear(data[i] / 255) * 255);\n else // assuming float\n data[i] = $d5b33d7c30034067$var$SRGBToLinear(data[i]);\n return {\n data: data,\n width: image.width,\n height: image.height\n };\n } else {\n console.warn(\"THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.\");\n return image;\n }\n }\n}\nlet $d5b33d7c30034067$var$_sourceId = 0;\nclass $d5b33d7c30034067$export$1d2df86270c81ecb {\n constructor(data = null){\n this.isSource = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_sourceId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.data = data;\n this.version = 0;\n }\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n toJSON(meta) {\n const isRootObject = meta === undefined || typeof meta === \"string\";\n if (!isRootObject && meta.images[this.uuid] !== undefined) return meta.images[this.uuid];\n const output = {\n uuid: this.uuid,\n url: \"\"\n };\n const data = this.data;\n if (data !== null) {\n let url;\n if (Array.isArray(data)) {\n // cube texture\n url = [];\n for(let i = 0, l = data.length; i < l; i++)if (data[i].isDataTexture) url.push($d5b33d7c30034067$var$serializeImage(data[i].image));\n else url.push($d5b33d7c30034067$var$serializeImage(data[i]));\n } else // texture\n url = $d5b33d7c30034067$var$serializeImage(data);\n output.url = url;\n }\n if (!isRootObject) meta.images[this.uuid] = output;\n return output;\n }\n}\nfunction $d5b33d7c30034067$var$serializeImage(image) {\n if (typeof HTMLImageElement !== \"undefined\" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== \"undefined\" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== \"undefined\" && image instanceof ImageBitmap) // default images\n return $d5b33d7c30034067$export$698882cf06df44aa.getDataURL(image);\n else {\n if (image.data) // images of DataTexture\n return {\n data: Array.from(image.data),\n width: image.width,\n height: image.height,\n type: image.data.constructor.name\n };\n else {\n console.warn(\"THREE.Texture: Unable to serialize Texture.\");\n return {};\n }\n }\n}\nlet $d5b33d7c30034067$var$_textureId = 0;\nclass $d5b33d7c30034067$export$5431306cf43de24a extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(image = $d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_IMAGE, mapping = $d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_MAPPING, wrapS = $d5b33d7c30034067$export$9d9334239a5a5e06, wrapT = $d5b33d7c30034067$export$9d9334239a5a5e06, magFilter = $d5b33d7c30034067$export$8a72f490b25c56c8, minFilter = $d5b33d7c30034067$export$5d8599b6a933fb1b, format = $d5b33d7c30034067$export$3f8bb04b555a363c, type = $d5b33d7c30034067$export$2e8ce08d3f6f5e10, anisotropy = $d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_ANISOTROPY, colorSpace1 = $d5b33d7c30034067$export$bfcb490c2dd3db51){\n super();\n this.isTexture = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_textureId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.source = new $d5b33d7c30034067$export$1d2df86270c81ecb(image);\n this.mipmaps = [];\n this.mapping = mapping;\n this.channel = 0;\n this.wrapS = wrapS;\n this.wrapT = wrapT;\n this.magFilter = magFilter;\n this.minFilter = minFilter;\n this.anisotropy = anisotropy;\n this.format = format;\n this.internalFormat = null;\n this.type = type;\n this.offset = new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0);\n this.repeat = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.center = new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0);\n this.rotation = 0;\n this.matrixAutoUpdate = true;\n this.matrix = new $d5b33d7c30034067$export$8ff26dafa08918();\n this.generateMipmaps = true;\n this.premultiplyAlpha = false;\n this.flipY = true;\n this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n if (typeof colorSpace1 === \"string\") this.colorSpace = colorSpace1;\n else {\n $d5b33d7c30034067$var$warnOnce(\"THREE.Texture: Property .encoding has been replaced by .colorSpace.\");\n this.colorSpace = colorSpace1 === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n this.userData = {};\n this.version = 0;\n this.onUpdate = null;\n this.isRenderTargetTexture = false; // indicates whether a texture belongs to a render target or not\n this.needsPMREMUpdate = false; // indicates whether this texture should be processed by PMREMGenerator or not (only relevant for render target textures)\n }\n get image() {\n return this.source.data;\n }\n set image(value = null) {\n this.source.data = value;\n }\n updateMatrix() {\n this.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.name = source.name;\n this.source = source.source;\n this.mipmaps = source.mipmaps.slice(0);\n this.mapping = source.mapping;\n this.channel = source.channel;\n this.wrapS = source.wrapS;\n this.wrapT = source.wrapT;\n this.magFilter = source.magFilter;\n this.minFilter = source.minFilter;\n this.anisotropy = source.anisotropy;\n this.format = source.format;\n this.internalFormat = source.internalFormat;\n this.type = source.type;\n this.offset.copy(source.offset);\n this.repeat.copy(source.repeat);\n this.center.copy(source.center);\n this.rotation = source.rotation;\n this.matrixAutoUpdate = source.matrixAutoUpdate;\n this.matrix.copy(source.matrix);\n this.generateMipmaps = source.generateMipmaps;\n this.premultiplyAlpha = source.premultiplyAlpha;\n this.flipY = source.flipY;\n this.unpackAlignment = source.unpackAlignment;\n this.colorSpace = source.colorSpace;\n this.userData = JSON.parse(JSON.stringify(source.userData));\n this.needsUpdate = true;\n return this;\n }\n toJSON(meta) {\n const isRootObject = meta === undefined || typeof meta === \"string\";\n if (!isRootObject && meta.textures[this.uuid] !== undefined) return meta.textures[this.uuid];\n const output = {\n metadata: {\n version: 4.6,\n type: \"Texture\",\n generator: \"Texture.toJSON\"\n },\n uuid: this.uuid,\n name: this.name,\n image: this.source.toJSON(meta).uuid,\n mapping: this.mapping,\n channel: this.channel,\n repeat: [\n this.repeat.x,\n this.repeat.y\n ],\n offset: [\n this.offset.x,\n this.offset.y\n ],\n center: [\n this.center.x,\n this.center.y\n ],\n rotation: this.rotation,\n wrap: [\n this.wrapS,\n this.wrapT\n ],\n format: this.format,\n internalFormat: this.internalFormat,\n type: this.type,\n colorSpace: this.colorSpace,\n minFilter: this.minFilter,\n magFilter: this.magFilter,\n anisotropy: this.anisotropy,\n flipY: this.flipY,\n generateMipmaps: this.generateMipmaps,\n premultiplyAlpha: this.premultiplyAlpha,\n unpackAlignment: this.unpackAlignment\n };\n if (Object.keys(this.userData).length > 0) output.userData = this.userData;\n if (!isRootObject) meta.textures[this.uuid] = output;\n return output;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n transformUv(uv) {\n if (this.mapping !== $d5b33d7c30034067$export$1beec6768cbb3d2d) return uv;\n uv.applyMatrix3(this.matrix);\n if (uv.x < 0 || uv.x > 1) switch(this.wrapS){\n case $d5b33d7c30034067$export$533346c8e8dac0f5:\n uv.x = uv.x - Math.floor(uv.x);\n break;\n case $d5b33d7c30034067$export$9d9334239a5a5e06:\n uv.x = uv.x < 0 ? 0 : 1;\n break;\n case $d5b33d7c30034067$export$c7e7c00b14f51a4f:\n if (Math.abs(Math.floor(uv.x) % 2) === 1) uv.x = Math.ceil(uv.x) - uv.x;\n else uv.x = uv.x - Math.floor(uv.x);\n break;\n }\n if (uv.y < 0 || uv.y > 1) switch(this.wrapT){\n case $d5b33d7c30034067$export$533346c8e8dac0f5:\n uv.y = uv.y - Math.floor(uv.y);\n break;\n case $d5b33d7c30034067$export$9d9334239a5a5e06:\n uv.y = uv.y < 0 ? 0 : 1;\n break;\n case $d5b33d7c30034067$export$c7e7c00b14f51a4f:\n if (Math.abs(Math.floor(uv.y) % 2) === 1) uv.y = Math.ceil(uv.y) - uv.y;\n else uv.y = uv.y - Math.floor(uv.y);\n break;\n }\n if (this.flipY) uv.y = 1 - uv.y;\n return uv;\n }\n set needsUpdate(value) {\n if (value === true) {\n this.version++;\n this.source.needsUpdate = true;\n }\n }\n get encoding() {\n $d5b33d7c30034067$var$warnOnce(\"THREE.Texture: Property .encoding has been replaced by .colorSpace.\");\n return this.colorSpace === $d5b33d7c30034067$export$561f394b24edfcaa ? $d5b33d7c30034067$export$f32388edbb32674 : $d5b33d7c30034067$export$7207336e4151a112;\n }\n set encoding(encoding) {\n $d5b33d7c30034067$var$warnOnce(\"THREE.Texture: Property .encoding has been replaced by .colorSpace.\");\n this.colorSpace = encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n}\n$d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_IMAGE = null;\n$d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_MAPPING = $d5b33d7c30034067$export$1beec6768cbb3d2d;\n$d5b33d7c30034067$export$5431306cf43de24a.DEFAULT_ANISOTROPY = 1;\nclass $d5b33d7c30034067$export$fa7daccca11cdbe3 {\n constructor(x = 0, y = 0, z = 0, w = 1){\n $d5b33d7c30034067$export$fa7daccca11cdbe3.prototype.isVector4 = true;\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n get width() {\n return this.z;\n }\n set width(value) {\n this.z = value;\n }\n get height() {\n return this.w;\n }\n set height(value) {\n this.w = value;\n }\n set(x, y, z, w) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n return this;\n }\n setScalar(scalar) {\n this.x = scalar;\n this.y = scalar;\n this.z = scalar;\n this.w = scalar;\n return this;\n }\n setX(x) {\n this.x = x;\n return this;\n }\n setY(y) {\n this.y = y;\n return this;\n }\n setZ(z) {\n this.z = z;\n return this;\n }\n setW(w) {\n this.w = w;\n return this;\n }\n setComponent(index, value) {\n switch(index){\n case 0:\n this.x = value;\n break;\n case 1:\n this.y = value;\n break;\n case 2:\n this.z = value;\n break;\n case 3:\n this.w = value;\n break;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n return this;\n }\n getComponent(index) {\n switch(index){\n case 0:\n return this.x;\n case 1:\n return this.y;\n case 2:\n return this.z;\n case 3:\n return this.w;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n }\n clone() {\n return new this.constructor(this.x, this.y, this.z, this.w);\n }\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n this.w = v.w !== undefined ? v.w : 1;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n this.w += v.w;\n return this;\n }\n addScalar(s) {\n this.x += s;\n this.y += s;\n this.z += s;\n this.w += s;\n return this;\n }\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n this.w = a.w + b.w;\n return this;\n }\n addScaledVector(v, s) {\n this.x += v.x * s;\n this.y += v.y * s;\n this.z += v.z * s;\n this.w += v.w * s;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n this.w -= v.w;\n return this;\n }\n subScalar(s) {\n this.x -= s;\n this.y -= s;\n this.z -= s;\n this.w -= s;\n return this;\n }\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n this.z = a.z - b.z;\n this.w = a.w - b.w;\n return this;\n }\n multiply(v) {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z;\n this.w *= v.w;\n return this;\n }\n multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n this.w *= scalar;\n return this;\n }\n applyMatrix4(m) {\n const x = this.x, y = this.y, z = this.z, w = this.w;\n const e = m.elements;\n this.x = e[0] * x + e[4] * y + e[8] * z + e[12] * w;\n this.y = e[1] * x + e[5] * y + e[9] * z + e[13] * w;\n this.z = e[2] * x + e[6] * y + e[10] * z + e[14] * w;\n this.w = e[3] * x + e[7] * y + e[11] * z + e[15] * w;\n return this;\n }\n divideScalar(scalar) {\n return this.multiplyScalar(1 / scalar);\n }\n setAxisAngleFromQuaternion(q) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n // q is assumed to be normalized\n this.w = 2 * Math.acos(q.w);\n const s = Math.sqrt(1 - q.w * q.w);\n if (s < 0.0001) {\n this.x = 1;\n this.y = 0;\n this.z = 0;\n } else {\n this.x = q.x / s;\n this.y = q.y / s;\n this.z = q.z / s;\n }\n return this;\n }\n setAxisAngleFromRotationMatrix(m) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n let angle, x, y, z; // variables for result\n const epsilon = 0.01, epsilon2 = 0.1, te = m.elements, m11 = te[0], m12 = te[4], m13 = te[8], m21 = te[1], m22 = te[5], m23 = te[9], m31 = te[2], m32 = te[6], m33 = te[10];\n if (Math.abs(m12 - m21) < epsilon && Math.abs(m13 - m31) < epsilon && Math.abs(m23 - m32) < epsilon) {\n // singularity found\n // first check for identity matrix which must have +1 for all terms\n // in leading diagonal and zero in other terms\n if (Math.abs(m12 + m21) < epsilon2 && Math.abs(m13 + m31) < epsilon2 && Math.abs(m23 + m32) < epsilon2 && Math.abs(m11 + m22 + m33 - 3) < epsilon2) {\n // this singularity is identity matrix so angle = 0\n this.set(1, 0, 0, 0);\n return this; // zero angle, arbitrary axis\n }\n // otherwise this singularity is angle = 180\n angle = Math.PI;\n const xx = (m11 + 1) / 2;\n const yy = (m22 + 1) / 2;\n const zz = (m33 + 1) / 2;\n const xy = (m12 + m21) / 4;\n const xz = (m13 + m31) / 4;\n const yz = (m23 + m32) / 4;\n if (xx > yy && xx > zz) {\n // m11 is the largest diagonal term\n if (xx < epsilon) {\n x = 0;\n y = 0.707106781;\n z = 0.707106781;\n } else {\n x = Math.sqrt(xx);\n y = xy / x;\n z = xz / x;\n }\n } else if (yy > zz) {\n // m22 is the largest diagonal term\n if (yy < epsilon) {\n x = 0.707106781;\n y = 0;\n z = 0.707106781;\n } else {\n y = Math.sqrt(yy);\n x = xy / y;\n z = yz / y;\n }\n } else // m33 is the largest diagonal term so base result on this\n if (zz < epsilon) {\n x = 0.707106781;\n y = 0.707106781;\n z = 0;\n } else {\n z = Math.sqrt(zz);\n x = xz / z;\n y = yz / z;\n }\n this.set(x, y, z, angle);\n return this; // return 180 deg rotation\n }\n // as we have reached here there are no singularities so we can handle normally\n let s = Math.sqrt((m32 - m23) * (m32 - m23) + (m13 - m31) * (m13 - m31) + (m21 - m12) * (m21 - m12)); // used to normalize\n if (Math.abs(s) < 0.001) s = 1;\n // prevent divide by zero, should not happen if matrix is orthogonal and should be\n // caught by singularity test above, but I've left it in just in case\n this.x = (m32 - m23) / s;\n this.y = (m13 - m31) / s;\n this.z = (m21 - m12) / s;\n this.w = Math.acos((m11 + m22 + m33 - 1) / 2);\n return this;\n }\n min(v) {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n this.w = Math.min(this.w, v.w);\n return this;\n }\n max(v) {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\n this.w = Math.max(this.w, v.w);\n return this;\n }\n clamp(min, max) {\n // assumes min < max, componentwise\n this.x = Math.max(min.x, Math.min(max.x, this.x));\n this.y = Math.max(min.y, Math.min(max.y, this.y));\n this.z = Math.max(min.z, Math.min(max.z, this.z));\n this.w = Math.max(min.w, Math.min(max.w, this.w));\n return this;\n }\n clampScalar(minVal, maxVal) {\n this.x = Math.max(minVal, Math.min(maxVal, this.x));\n this.y = Math.max(minVal, Math.min(maxVal, this.y));\n this.z = Math.max(minVal, Math.min(maxVal, this.z));\n this.w = Math.max(minVal, Math.min(maxVal, this.w));\n return this;\n }\n clampLength(min, max) {\n const length = this.length();\n return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n }\n floor() {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n this.z = Math.floor(this.z);\n this.w = Math.floor(this.w);\n return this;\n }\n ceil() {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n this.z = Math.ceil(this.z);\n this.w = Math.ceil(this.w);\n return this;\n }\n round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n this.z = Math.round(this.z);\n this.w = Math.round(this.w);\n return this;\n }\n roundToZero() {\n this.x = Math.trunc(this.x);\n this.y = Math.trunc(this.y);\n this.z = Math.trunc(this.z);\n this.w = Math.trunc(this.w);\n return this;\n }\n negate() {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n return this;\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n }\n lengthSq() {\n return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n }\n manhattanLength() {\n return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w);\n }\n normalize() {\n return this.divideScalar(this.length() || 1);\n }\n setLength(length) {\n return this.normalize().multiplyScalar(length);\n }\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n this.z += (v.z - this.z) * alpha;\n this.w += (v.w - this.w) * alpha;\n return this;\n }\n lerpVectors(v1, v2, alpha) {\n this.x = v1.x + (v2.x - v1.x) * alpha;\n this.y = v1.y + (v2.y - v1.y) * alpha;\n this.z = v1.z + (v2.z - v1.z) * alpha;\n this.w = v1.w + (v2.w - v1.w) * alpha;\n return this;\n }\n equals(v) {\n return v.x === this.x && v.y === this.y && v.z === this.z && v.w === this.w;\n }\n fromArray(array, offset = 0) {\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\n this.w = array[offset + 3];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.x;\n array[offset + 1] = this.y;\n array[offset + 2] = this.z;\n array[offset + 3] = this.w;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.x = attribute.getX(index);\n this.y = attribute.getY(index);\n this.z = attribute.getZ(index);\n this.w = attribute.getW(index);\n return this;\n }\n random() {\n this.x = Math.random();\n this.y = Math.random();\n this.z = Math.random();\n this.w = Math.random();\n return this;\n }\n *[Symbol.iterator]() {\n yield this.x;\n yield this.y;\n yield this.z;\n yield this.w;\n }\n}\n/*\n In options, we can specify:\n * Texture parameters for an auto-generated target texture\n * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n*/ class $d5b33d7c30034067$export$efcb1f8bf367cbfb extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(width = 1, height = 1, options = {}){\n super();\n this.isRenderTarget = true;\n this.width = width;\n this.height = height;\n this.depth = 1;\n this.scissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, width, height);\n this.scissorTest = false;\n this.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, width, height);\n const image = {\n width: width,\n height: height,\n depth: 1\n };\n if (options.encoding !== undefined) {\n // @deprecated, r152\n $d5b33d7c30034067$var$warnOnce(\"THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace.\");\n options.colorSpace = options.encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n options = Object.assign({\n generateMipmaps: false,\n internalFormat: null,\n minFilter: $d5b33d7c30034067$export$8a72f490b25c56c8,\n depthBuffer: true,\n stencilBuffer: false,\n depthTexture: null,\n samples: 0\n }, options);\n this.texture = new $d5b33d7c30034067$export$5431306cf43de24a(image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace);\n this.texture.isRenderTargetTexture = true;\n this.texture.flipY = false;\n this.texture.generateMipmaps = options.generateMipmaps;\n this.texture.internalFormat = options.internalFormat;\n this.depthBuffer = options.depthBuffer;\n this.stencilBuffer = options.stencilBuffer;\n this.depthTexture = options.depthTexture;\n this.samples = options.samples;\n }\n setSize(width, height, depth = 1) {\n if (this.width !== width || this.height !== height || this.depth !== depth) {\n this.width = width;\n this.height = height;\n this.depth = depth;\n this.texture.image.width = width;\n this.texture.image.height = height;\n this.texture.image.depth = depth;\n this.dispose();\n }\n this.viewport.set(0, 0, width, height);\n this.scissor.set(0, 0, width, height);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.width = source.width;\n this.height = source.height;\n this.depth = source.depth;\n this.scissor.copy(source.scissor);\n this.scissorTest = source.scissorTest;\n this.viewport.copy(source.viewport);\n this.texture = source.texture.clone();\n this.texture.isRenderTargetTexture = true;\n // ensure image object is not shared, see #20328\n const image = Object.assign({}, source.texture.image);\n this.texture.source = new $d5b33d7c30034067$export$1d2df86270c81ecb(image);\n this.depthBuffer = source.depthBuffer;\n this.stencilBuffer = source.stencilBuffer;\n if (source.depthTexture !== null) this.depthTexture = source.depthTexture.clone();\n this.samples = source.samples;\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n}\nclass $d5b33d7c30034067$export$3c052beb2e51e23f extends $d5b33d7c30034067$export$efcb1f8bf367cbfb {\n constructor(width = 1, height = 1, options = {}){\n super(width, height, options);\n this.isWebGLRenderTarget = true;\n }\n}\nclass $d5b33d7c30034067$export$dfac6c8e811406a3 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(data = null, width = 1, height = 1, depth = 1){\n super(null);\n this.isDataArrayTexture = true;\n this.image = {\n data: data,\n width: width,\n height: height,\n depth: depth\n };\n this.magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.wrapR = $d5b33d7c30034067$export$9d9334239a5a5e06;\n this.generateMipmaps = false;\n this.flipY = false;\n this.unpackAlignment = 1;\n }\n}\nclass $d5b33d7c30034067$export$c77a02c11ed180c7 extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(width = 1, height = 1, depth = 1){\n super(width, height);\n this.isWebGLArrayRenderTarget = true;\n this.depth = depth;\n this.texture = new $d5b33d7c30034067$export$dfac6c8e811406a3(null, width, height, depth);\n this.texture.isRenderTargetTexture = true;\n }\n}\nclass $d5b33d7c30034067$export$d7a3086320f856db extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(data = null, width = 1, height = 1, depth = 1){\n // We're going to add .setXXX() methods for setting properties later.\n // Users can still set in DataTexture3D directly.\n //\n //\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n // \ttexture.anisotropy = 16;\n //\n // See #14839\n super(null);\n this.isData3DTexture = true;\n this.image = {\n data: data,\n width: width,\n height: height,\n depth: depth\n };\n this.magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.wrapR = $d5b33d7c30034067$export$9d9334239a5a5e06;\n this.generateMipmaps = false;\n this.flipY = false;\n this.unpackAlignment = 1;\n }\n}\nclass $d5b33d7c30034067$export$7ee06591009639df extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(width = 1, height = 1, depth = 1){\n super(width, height);\n this.isWebGL3DRenderTarget = true;\n this.depth = depth;\n this.texture = new $d5b33d7c30034067$export$d7a3086320f856db(null, width, height, depth);\n this.texture.isRenderTargetTexture = true;\n }\n}\nclass $d5b33d7c30034067$export$bd934554fb721730 extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(width = 1, height = 1, count = 1, options = {}){\n super(width, height, options);\n this.isWebGLMultipleRenderTargets = true;\n const texture = this.texture;\n this.texture = [];\n for(let i = 0; i < count; i++){\n this.texture[i] = texture.clone();\n this.texture[i].isRenderTargetTexture = true;\n }\n }\n setSize(width, height, depth = 1) {\n if (this.width !== width || this.height !== height || this.depth !== depth) {\n this.width = width;\n this.height = height;\n this.depth = depth;\n for(let i = 0, il = this.texture.length; i < il; i++){\n this.texture[i].image.width = width;\n this.texture[i].image.height = height;\n this.texture[i].image.depth = depth;\n }\n this.dispose();\n }\n this.viewport.set(0, 0, width, height);\n this.scissor.set(0, 0, width, height);\n }\n copy(source) {\n this.dispose();\n this.width = source.width;\n this.height = source.height;\n this.depth = source.depth;\n this.scissor.copy(source.scissor);\n this.scissorTest = source.scissorTest;\n this.viewport.copy(source.viewport);\n this.depthBuffer = source.depthBuffer;\n this.stencilBuffer = source.stencilBuffer;\n if (source.depthTexture !== null) this.depthTexture = source.depthTexture.clone();\n this.texture.length = 0;\n for(let i = 0, il = source.texture.length; i < il; i++){\n this.texture[i] = source.texture[i].clone();\n this.texture[i].isRenderTargetTexture = true;\n }\n return this;\n }\n}\nclass $d5b33d7c30034067$export$23d6a54f0bbc85a3 {\n constructor(x = 0, y = 0, z = 0, w = 1){\n this.isQuaternion = true;\n this._x = x;\n this._y = y;\n this._z = z;\n this._w = w;\n }\n static slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) {\n // fuzz-free, array-based Quaternion SLERP operation\n let x0 = src0[srcOffset0 + 0], y0 = src0[srcOffset0 + 1], z0 = src0[srcOffset0 + 2], w0 = src0[srcOffset0 + 3];\n const x1 = src1[srcOffset1 + 0], y1 = src1[srcOffset1 + 1], z1 = src1[srcOffset1 + 2], w1 = src1[srcOffset1 + 3];\n if (t === 0) {\n dst[dstOffset + 0] = x0;\n dst[dstOffset + 1] = y0;\n dst[dstOffset + 2] = z0;\n dst[dstOffset + 3] = w0;\n return;\n }\n if (t === 1) {\n dst[dstOffset + 0] = x1;\n dst[dstOffset + 1] = y1;\n dst[dstOffset + 2] = z1;\n dst[dstOffset + 3] = w1;\n return;\n }\n if (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) {\n let s = 1 - t;\n const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1, dir = cos >= 0 ? 1 : -1, sqrSin = 1 - cos * cos;\n // Skip the Slerp for tiny steps to avoid numeric problems:\n if (sqrSin > Number.EPSILON) {\n const sin = Math.sqrt(sqrSin), len = Math.atan2(sin, cos * dir);\n s = Math.sin(s * len) / sin;\n t = Math.sin(t * len) / sin;\n }\n const tDir = t * dir;\n x0 = x0 * s + x1 * tDir;\n y0 = y0 * s + y1 * tDir;\n z0 = z0 * s + z1 * tDir;\n w0 = w0 * s + w1 * tDir;\n // Normalize in case we just did a lerp:\n if (s === 1 - t) {\n const f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0);\n x0 *= f;\n y0 *= f;\n z0 *= f;\n w0 *= f;\n }\n }\n dst[dstOffset] = x0;\n dst[dstOffset + 1] = y0;\n dst[dstOffset + 2] = z0;\n dst[dstOffset + 3] = w0;\n }\n static multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) {\n const x0 = src0[srcOffset0];\n const y0 = src0[srcOffset0 + 1];\n const z0 = src0[srcOffset0 + 2];\n const w0 = src0[srcOffset0 + 3];\n const x1 = src1[srcOffset1];\n const y1 = src1[srcOffset1 + 1];\n const z1 = src1[srcOffset1 + 2];\n const w1 = src1[srcOffset1 + 3];\n dst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n dst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n dst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n dst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n return dst;\n }\n get x() {\n return this._x;\n }\n set x(value) {\n this._x = value;\n this._onChangeCallback();\n }\n get y() {\n return this._y;\n }\n set y(value) {\n this._y = value;\n this._onChangeCallback();\n }\n get z() {\n return this._z;\n }\n set z(value) {\n this._z = value;\n this._onChangeCallback();\n }\n get w() {\n return this._w;\n }\n set w(value) {\n this._w = value;\n this._onChangeCallback();\n }\n set(x, y, z, w) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._w = w;\n this._onChangeCallback();\n return this;\n }\n clone() {\n return new this.constructor(this._x, this._y, this._z, this._w);\n }\n copy(quaternion) {\n this._x = quaternion.x;\n this._y = quaternion.y;\n this._z = quaternion.z;\n this._w = quaternion.w;\n this._onChangeCallback();\n return this;\n }\n setFromEuler(euler, update) {\n const x = euler._x, y = euler._y, z = euler._z, order = euler._order;\n // http://www.mathworks.com/matlabcentral/fileexchange/\n // \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n //\tcontent/SpinCalc.m\n const cos = Math.cos;\n const sin = Math.sin;\n const c1 = cos(x / 2);\n const c2 = cos(y / 2);\n const c3 = cos(z / 2);\n const s1 = sin(x / 2);\n const s2 = sin(y / 2);\n const s3 = sin(z / 2);\n switch(order){\n case \"XYZ\":\n this._x = s1 * c2 * c3 + c1 * s2 * s3;\n this._y = c1 * s2 * c3 - s1 * c2 * s3;\n this._z = c1 * c2 * s3 + s1 * s2 * c3;\n this._w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case \"YXZ\":\n this._x = s1 * c2 * c3 + c1 * s2 * s3;\n this._y = c1 * s2 * c3 - s1 * c2 * s3;\n this._z = c1 * c2 * s3 - s1 * s2 * c3;\n this._w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n case \"ZXY\":\n this._x = s1 * c2 * c3 - c1 * s2 * s3;\n this._y = c1 * s2 * c3 + s1 * c2 * s3;\n this._z = c1 * c2 * s3 + s1 * s2 * c3;\n this._w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case \"ZYX\":\n this._x = s1 * c2 * c3 - c1 * s2 * s3;\n this._y = c1 * s2 * c3 + s1 * c2 * s3;\n this._z = c1 * c2 * s3 - s1 * s2 * c3;\n this._w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n case \"YZX\":\n this._x = s1 * c2 * c3 + c1 * s2 * s3;\n this._y = c1 * s2 * c3 + s1 * c2 * s3;\n this._z = c1 * c2 * s3 - s1 * s2 * c3;\n this._w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case \"XZY\":\n this._x = s1 * c2 * c3 - c1 * s2 * s3;\n this._y = c1 * s2 * c3 - s1 * c2 * s3;\n this._z = c1 * c2 * s3 + s1 * s2 * c3;\n this._w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n default:\n console.warn(\"THREE.Quaternion: .setFromEuler() encountered an unknown order: \" + order);\n }\n if (update !== false) this._onChangeCallback();\n return this;\n }\n setFromAxisAngle(axis, angle) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n // assumes axis is normalized\n const halfAngle = angle / 2, s = Math.sin(halfAngle);\n this._x = axis.x * s;\n this._y = axis.y * s;\n this._z = axis.z * s;\n this._w = Math.cos(halfAngle);\n this._onChangeCallback();\n return this;\n }\n setFromRotationMatrix(m) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n const te = m.elements, m11 = te[0], m12 = te[4], m13 = te[8], m21 = te[1], m22 = te[5], m23 = te[9], m31 = te[2], m32 = te[6], m33 = te[10], trace = m11 + m22 + m33;\n if (trace > 0) {\n const s = 0.5 / Math.sqrt(trace + 1.0);\n this._w = 0.25 / s;\n this._x = (m32 - m23) * s;\n this._y = (m13 - m31) * s;\n this._z = (m21 - m12) * s;\n } else if (m11 > m22 && m11 > m33) {\n const s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n this._w = (m32 - m23) / s;\n this._x = 0.25 * s;\n this._y = (m12 + m21) / s;\n this._z = (m13 + m31) / s;\n } else if (m22 > m33) {\n const s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n this._w = (m13 - m31) / s;\n this._x = (m12 + m21) / s;\n this._y = 0.25 * s;\n this._z = (m23 + m32) / s;\n } else {\n const s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n this._w = (m21 - m12) / s;\n this._x = (m13 + m31) / s;\n this._y = (m23 + m32) / s;\n this._z = 0.25 * s;\n }\n this._onChangeCallback();\n return this;\n }\n setFromUnitVectors(vFrom, vTo) {\n // assumes direction vectors vFrom and vTo are normalized\n let r = vFrom.dot(vTo) + 1;\n if (r < Number.EPSILON) {\n // vFrom and vTo point in opposite directions\n r = 0;\n if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {\n this._x = -vFrom.y;\n this._y = vFrom.x;\n this._z = 0;\n this._w = r;\n } else {\n this._x = 0;\n this._y = -vFrom.z;\n this._z = vFrom.y;\n this._w = r;\n }\n } else {\n // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n this._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n this._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n this._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n this._w = r;\n }\n return this.normalize();\n }\n angleTo(q) {\n return 2 * Math.acos(Math.abs($d5b33d7c30034067$var$clamp(this.dot(q), -1, 1)));\n }\n rotateTowards(q, step) {\n const angle = this.angleTo(q);\n if (angle === 0) return this;\n const t = Math.min(1, step / angle);\n this.slerp(q, t);\n return this;\n }\n identity() {\n return this.set(0, 0, 0, 1);\n }\n invert() {\n // quaternion is assumed to have unit length\n return this.conjugate();\n }\n conjugate() {\n this._x *= -1;\n this._y *= -1;\n this._z *= -1;\n this._onChangeCallback();\n return this;\n }\n dot(v) {\n return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n }\n lengthSq() {\n return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n }\n length() {\n return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);\n }\n normalize() {\n let l = this.length();\n if (l === 0) {\n this._x = 0;\n this._y = 0;\n this._z = 0;\n this._w = 1;\n } else {\n l = 1 / l;\n this._x = this._x * l;\n this._y = this._y * l;\n this._z = this._z * l;\n this._w = this._w * l;\n }\n this._onChangeCallback();\n return this;\n }\n multiply(q) {\n return this.multiplyQuaternions(this, q);\n }\n premultiply(q) {\n return this.multiplyQuaternions(q, this);\n }\n multiplyQuaternions(a, b) {\n // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n const qax = a._x, qay = a._y, qaz = a._z, qaw = a._w;\n const qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w;\n this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n this._onChangeCallback();\n return this;\n }\n slerp(qb, t) {\n if (t === 0) return this;\n if (t === 1) return this.copy(qb);\n const x = this._x, y = this._y, z = this._z, w = this._w;\n // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n let cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n if (cosHalfTheta < 0) {\n this._w = -qb._w;\n this._x = -qb._x;\n this._y = -qb._y;\n this._z = -qb._z;\n cosHalfTheta = -cosHalfTheta;\n } else this.copy(qb);\n if (cosHalfTheta >= 1.0) {\n this._w = w;\n this._x = x;\n this._y = y;\n this._z = z;\n return this;\n }\n const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n if (sqrSinHalfTheta <= Number.EPSILON) {\n const s = 1 - t;\n this._w = s * w + t * this._w;\n this._x = s * x + t * this._x;\n this._y = s * y + t * this._y;\n this._z = s * z + t * this._z;\n this.normalize();\n this._onChangeCallback();\n return this;\n }\n const sinHalfTheta = Math.sqrt(sqrSinHalfTheta);\n const halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta);\n const ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta, ratioB = Math.sin(t * halfTheta) / sinHalfTheta;\n this._w = w * ratioA + this._w * ratioB;\n this._x = x * ratioA + this._x * ratioB;\n this._y = y * ratioA + this._y * ratioB;\n this._z = z * ratioA + this._z * ratioB;\n this._onChangeCallback();\n return this;\n }\n slerpQuaternions(qa, qb, t) {\n return this.copy(qa).slerp(qb, t);\n }\n random() {\n // Derived from http://planning.cs.uiuc.edu/node198.html\n // Note, this source uses w, x, y, z ordering,\n // so we swap the order below.\n const u1 = Math.random();\n const sqrt1u1 = Math.sqrt(1 - u1);\n const sqrtu1 = Math.sqrt(u1);\n const u2 = 2 * Math.PI * Math.random();\n const u3 = 2 * Math.PI * Math.random();\n return this.set(sqrt1u1 * Math.cos(u2), sqrtu1 * Math.sin(u3), sqrtu1 * Math.cos(u3), sqrt1u1 * Math.sin(u2));\n }\n equals(quaternion) {\n return quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w;\n }\n fromArray(array, offset = 0) {\n this._x = array[offset];\n this._y = array[offset + 1];\n this._z = array[offset + 2];\n this._w = array[offset + 3];\n this._onChangeCallback();\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this._x;\n array[offset + 1] = this._y;\n array[offset + 2] = this._z;\n array[offset + 3] = this._w;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this._x = attribute.getX(index);\n this._y = attribute.getY(index);\n this._z = attribute.getZ(index);\n this._w = attribute.getW(index);\n return this;\n }\n toJSON() {\n return this.toArray();\n }\n _onChange(callback) {\n this._onChangeCallback = callback;\n return this;\n }\n _onChangeCallback() {}\n *[Symbol.iterator]() {\n yield this._x;\n yield this._y;\n yield this._z;\n yield this._w;\n }\n}\nclass $d5b33d7c30034067$export$64b5c384219d3699 {\n constructor(x = 0, y = 0, z = 0){\n $d5b33d7c30034067$export$64b5c384219d3699.prototype.isVector3 = true;\n this.x = x;\n this.y = y;\n this.z = z;\n }\n set(x, y, z) {\n if (z === undefined) z = this.z; // sprite.scale.set(x,y)\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n setScalar(scalar) {\n this.x = scalar;\n this.y = scalar;\n this.z = scalar;\n return this;\n }\n setX(x) {\n this.x = x;\n return this;\n }\n setY(y) {\n this.y = y;\n return this;\n }\n setZ(z) {\n this.z = z;\n return this;\n }\n setComponent(index, value) {\n switch(index){\n case 0:\n this.x = value;\n break;\n case 1:\n this.y = value;\n break;\n case 2:\n this.z = value;\n break;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n return this;\n }\n getComponent(index) {\n switch(index){\n case 0:\n return this.x;\n case 1:\n return this.y;\n case 2:\n return this.z;\n default:\n throw new Error(\"index is out of range: \" + index);\n }\n }\n clone() {\n return new this.constructor(this.x, this.y, this.z);\n }\n copy(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n }\n add(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n }\n addScalar(s) {\n this.x += s;\n this.y += s;\n this.z += s;\n return this;\n }\n addVectors(a, b) {\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n return this;\n }\n addScaledVector(v, s) {\n this.x += v.x * s;\n this.y += v.y * s;\n this.z += v.z * s;\n return this;\n }\n sub(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n }\n subScalar(s) {\n this.x -= s;\n this.y -= s;\n this.z -= s;\n return this;\n }\n subVectors(a, b) {\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n this.z = a.z - b.z;\n return this;\n }\n multiply(v) {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z;\n return this;\n }\n multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n return this;\n }\n multiplyVectors(a, b) {\n this.x = a.x * b.x;\n this.y = a.y * b.y;\n this.z = a.z * b.z;\n return this;\n }\n applyEuler(euler) {\n return this.applyQuaternion($d5b33d7c30034067$var$_quaternion$4.setFromEuler(euler));\n }\n applyAxisAngle(axis, angle) {\n return this.applyQuaternion($d5b33d7c30034067$var$_quaternion$4.setFromAxisAngle(axis, angle));\n }\n applyMatrix3(m) {\n const x = this.x, y = this.y, z = this.z;\n const e = m.elements;\n this.x = e[0] * x + e[3] * y + e[6] * z;\n this.y = e[1] * x + e[4] * y + e[7] * z;\n this.z = e[2] * x + e[5] * y + e[8] * z;\n return this;\n }\n applyNormalMatrix(m) {\n return this.applyMatrix3(m).normalize();\n }\n applyMatrix4(m) {\n const x = this.x, y = this.y, z = this.z;\n const e = m.elements;\n const w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]);\n this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w;\n this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w;\n this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w;\n return this;\n }\n applyQuaternion(q) {\n // quaternion q is assumed to have unit length\n const vx = this.x, vy = this.y, vz = this.z;\n const qx = q.x, qy = q.y, qz = q.z, qw = q.w;\n // t = 2 * cross( q.xyz, v );\n const tx = 2 * (qy * vz - qz * vy);\n const ty = 2 * (qz * vx - qx * vz);\n const tz = 2 * (qx * vy - qy * vx);\n // v + q.w * t + cross( q.xyz, t );\n this.x = vx + qw * tx + qy * tz - qz * ty;\n this.y = vy + qw * ty + qz * tx - qx * tz;\n this.z = vz + qw * tz + qx * ty - qy * tx;\n return this;\n }\n project(camera) {\n return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix);\n }\n unproject(camera) {\n return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld);\n }\n transformDirection(m) {\n // input: THREE.Matrix4 affine matrix\n // vector interpreted as a direction\n const x = this.x, y = this.y, z = this.z;\n const e = m.elements;\n this.x = e[0] * x + e[4] * y + e[8] * z;\n this.y = e[1] * x + e[5] * y + e[9] * z;\n this.z = e[2] * x + e[6] * y + e[10] * z;\n return this.normalize();\n }\n divide(v) {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z;\n return this;\n }\n divideScalar(scalar) {\n return this.multiplyScalar(1 / scalar);\n }\n min(v) {\n this.x = Math.min(this.x, v.x);\n this.y = Math.min(this.y, v.y);\n this.z = Math.min(this.z, v.z);\n return this;\n }\n max(v) {\n this.x = Math.max(this.x, v.x);\n this.y = Math.max(this.y, v.y);\n this.z = Math.max(this.z, v.z);\n return this;\n }\n clamp(min, max) {\n // assumes min < max, componentwise\n this.x = Math.max(min.x, Math.min(max.x, this.x));\n this.y = Math.max(min.y, Math.min(max.y, this.y));\n this.z = Math.max(min.z, Math.min(max.z, this.z));\n return this;\n }\n clampScalar(minVal, maxVal) {\n this.x = Math.max(minVal, Math.min(maxVal, this.x));\n this.y = Math.max(minVal, Math.min(maxVal, this.y));\n this.z = Math.max(minVal, Math.min(maxVal, this.z));\n return this;\n }\n clampLength(min, max) {\n const length = this.length();\n return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n }\n floor() {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n this.z = Math.floor(this.z);\n return this;\n }\n ceil() {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n this.z = Math.ceil(this.z);\n return this;\n }\n round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n this.z = Math.round(this.z);\n return this;\n }\n roundToZero() {\n this.x = Math.trunc(this.x);\n this.y = Math.trunc(this.y);\n this.z = Math.trunc(this.z);\n return this;\n }\n negate() {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n return this;\n }\n dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n }\n // TODO lengthSquared?\n lengthSq() {\n return this.x * this.x + this.y * this.y + this.z * this.z;\n }\n length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n manhattanLength() {\n return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);\n }\n normalize() {\n return this.divideScalar(this.length() || 1);\n }\n setLength(length) {\n return this.normalize().multiplyScalar(length);\n }\n lerp(v, alpha) {\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n this.z += (v.z - this.z) * alpha;\n return this;\n }\n lerpVectors(v1, v2, alpha) {\n this.x = v1.x + (v2.x - v1.x) * alpha;\n this.y = v1.y + (v2.y - v1.y) * alpha;\n this.z = v1.z + (v2.z - v1.z) * alpha;\n return this;\n }\n cross(v) {\n return this.crossVectors(this, v);\n }\n crossVectors(a, b) {\n const ax = a.x, ay = a.y, az = a.z;\n const bx = b.x, by = b.y, bz = b.z;\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n return this;\n }\n projectOnVector(v) {\n const denominator = v.lengthSq();\n if (denominator === 0) return this.set(0, 0, 0);\n const scalar = v.dot(this) / denominator;\n return this.copy(v).multiplyScalar(scalar);\n }\n projectOnPlane(planeNormal) {\n $d5b33d7c30034067$var$_vector$b.copy(this).projectOnVector(planeNormal);\n return this.sub($d5b33d7c30034067$var$_vector$b);\n }\n reflect(normal) {\n // reflect incident vector off plane orthogonal to normal\n // normal is assumed to have unit length\n return this.sub($d5b33d7c30034067$var$_vector$b.copy(normal).multiplyScalar(2 * this.dot(normal)));\n }\n angleTo(v) {\n const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());\n if (denominator === 0) return Math.PI / 2;\n const theta = this.dot(v) / denominator;\n // clamp, to handle numerical problems\n return Math.acos($d5b33d7c30034067$var$clamp(theta, -1, 1));\n }\n distanceTo(v) {\n return Math.sqrt(this.distanceToSquared(v));\n }\n distanceToSquared(v) {\n const dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;\n return dx * dx + dy * dy + dz * dz;\n }\n manhattanDistanceTo(v) {\n return Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z);\n }\n setFromSpherical(s) {\n return this.setFromSphericalCoords(s.radius, s.phi, s.theta);\n }\n setFromSphericalCoords(radius, phi, theta) {\n const sinPhiRadius = Math.sin(phi) * radius;\n this.x = sinPhiRadius * Math.sin(theta);\n this.y = Math.cos(phi) * radius;\n this.z = sinPhiRadius * Math.cos(theta);\n return this;\n }\n setFromCylindrical(c) {\n return this.setFromCylindricalCoords(c.radius, c.theta, c.y);\n }\n setFromCylindricalCoords(radius, theta, y) {\n this.x = radius * Math.sin(theta);\n this.y = y;\n this.z = radius * Math.cos(theta);\n return this;\n }\n setFromMatrixPosition(m) {\n const e = m.elements;\n this.x = e[12];\n this.y = e[13];\n this.z = e[14];\n return this;\n }\n setFromMatrixScale(m) {\n const sx = this.setFromMatrixColumn(m, 0).length();\n const sy = this.setFromMatrixColumn(m, 1).length();\n const sz = this.setFromMatrixColumn(m, 2).length();\n this.x = sx;\n this.y = sy;\n this.z = sz;\n return this;\n }\n setFromMatrixColumn(m, index) {\n return this.fromArray(m.elements, index * 4);\n }\n setFromMatrix3Column(m, index) {\n return this.fromArray(m.elements, index * 3);\n }\n setFromEuler(e) {\n this.x = e._x;\n this.y = e._y;\n this.z = e._z;\n return this;\n }\n setFromColor(c) {\n this.x = c.r;\n this.y = c.g;\n this.z = c.b;\n return this;\n }\n equals(v) {\n return v.x === this.x && v.y === this.y && v.z === this.z;\n }\n fromArray(array, offset = 0) {\n this.x = array[offset];\n this.y = array[offset + 1];\n this.z = array[offset + 2];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.x;\n array[offset + 1] = this.y;\n array[offset + 2] = this.z;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.x = attribute.getX(index);\n this.y = attribute.getY(index);\n this.z = attribute.getZ(index);\n return this;\n }\n random() {\n this.x = Math.random();\n this.y = Math.random();\n this.z = Math.random();\n return this;\n }\n randomDirection() {\n // Derived from https://mathworld.wolfram.com/SpherePointPicking.html\n const u = (Math.random() - 0.5) * 2;\n const t = Math.random() * Math.PI * 2;\n const f = Math.sqrt(1 - u ** 2);\n this.x = f * Math.cos(t);\n this.y = f * Math.sin(t);\n this.z = u;\n return this;\n }\n *[Symbol.iterator]() {\n yield this.x;\n yield this.y;\n yield this.z;\n }\n}\nconst $d5b33d7c30034067$var$_vector$b = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nclass $d5b33d7c30034067$export$6f7d5a9418ab2aa3 {\n constructor(min = new $d5b33d7c30034067$export$64b5c384219d3699(Infinity, Infinity, Infinity), max = new $d5b33d7c30034067$export$64b5c384219d3699(-Infinity, -Infinity, -Infinity)){\n this.isBox3 = true;\n this.min = min;\n this.max = max;\n }\n set(min, max) {\n this.min.copy(min);\n this.max.copy(max);\n return this;\n }\n setFromArray(array) {\n this.makeEmpty();\n for(let i = 0, il = array.length; i < il; i += 3)this.expandByPoint($d5b33d7c30034067$var$_vector$a.fromArray(array, i));\n return this;\n }\n setFromBufferAttribute(attribute) {\n this.makeEmpty();\n for(let i = 0, il = attribute.count; i < il; i++)this.expandByPoint($d5b33d7c30034067$var$_vector$a.fromBufferAttribute(attribute, i));\n return this;\n }\n setFromPoints(points) {\n this.makeEmpty();\n for(let i = 0, il = points.length; i < il; i++)this.expandByPoint(points[i]);\n return this;\n }\n setFromCenterAndSize(center, size) {\n const halfSize = $d5b33d7c30034067$var$_vector$a.copy(size).multiplyScalar(0.5);\n this.min.copy(center).sub(halfSize);\n this.max.copy(center).add(halfSize);\n return this;\n }\n setFromObject(object, precise = false) {\n this.makeEmpty();\n return this.expandByObject(object, precise);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(box) {\n this.min.copy(box.min);\n this.max.copy(box.max);\n return this;\n }\n makeEmpty() {\n this.min.x = this.min.y = this.min.z = Infinity;\n this.max.x = this.max.y = this.max.z = -Infinity;\n return this;\n }\n isEmpty() {\n // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z;\n }\n getCenter(target) {\n return this.isEmpty() ? target.set(0, 0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n }\n getSize(target) {\n return this.isEmpty() ? target.set(0, 0, 0) : target.subVectors(this.max, this.min);\n }\n expandByPoint(point) {\n this.min.min(point);\n this.max.max(point);\n return this;\n }\n expandByVector(vector) {\n this.min.sub(vector);\n this.max.add(vector);\n return this;\n }\n expandByScalar(scalar) {\n this.min.addScalar(-scalar);\n this.max.addScalar(scalar);\n return this;\n }\n expandByObject(object, precise = false) {\n // Computes the world-axis-aligned bounding box of an object (including its children),\n // accounting for both the object's, and children's, world transforms\n object.updateWorldMatrix(false, false);\n const geometry = object.geometry;\n if (geometry !== undefined) {\n const positionAttribute = geometry.getAttribute(\"position\");\n // precise AABB computation based on vertex data requires at least a position attribute.\n // instancing isn't supported so far and uses the normal (conservative) code path.\n if (precise === true && positionAttribute !== undefined && object.isInstancedMesh !== true) for(let i = 0, l = positionAttribute.count; i < l; i++){\n if (object.isMesh === true) object.getVertexPosition(i, $d5b33d7c30034067$var$_vector$a);\n else $d5b33d7c30034067$var$_vector$a.fromBufferAttribute(positionAttribute, i);\n $d5b33d7c30034067$var$_vector$a.applyMatrix4(object.matrixWorld);\n this.expandByPoint($d5b33d7c30034067$var$_vector$a);\n }\n else {\n if (object.boundingBox !== undefined) {\n // object-level bounding box\n if (object.boundingBox === null) object.computeBoundingBox();\n $d5b33d7c30034067$var$_box$3.copy(object.boundingBox);\n } else {\n // geometry-level bounding box\n if (geometry.boundingBox === null) geometry.computeBoundingBox();\n $d5b33d7c30034067$var$_box$3.copy(geometry.boundingBox);\n }\n $d5b33d7c30034067$var$_box$3.applyMatrix4(object.matrixWorld);\n this.union($d5b33d7c30034067$var$_box$3);\n }\n }\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)this.expandByObject(children[i], precise);\n return this;\n }\n containsPoint(point) {\n return point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y || point.z < this.min.z || point.z > this.max.z ? false : true;\n }\n containsBox(box) {\n return this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y && this.min.z <= box.min.z && box.max.z <= this.max.z;\n }\n getParameter(point, target) {\n // This can potentially have a divide by zero if the box\n // has a size dimension of 0.\n return target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y), (point.z - this.min.z) / (this.max.z - this.min.z));\n }\n intersectsBox(box) {\n // using 6 splitting planes to rule out intersections.\n return box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y || box.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n }\n intersectsSphere(sphere) {\n // Find the point on the AABB closest to the sphere center.\n this.clampPoint(sphere.center, $d5b33d7c30034067$var$_vector$a);\n // If that point is inside the sphere, the AABB and sphere intersect.\n return $d5b33d7c30034067$var$_vector$a.distanceToSquared(sphere.center) <= sphere.radius * sphere.radius;\n }\n intersectsPlane(plane) {\n // We compute the minimum and maximum dot product values. If those values\n // are on the same side (back or front) of the plane, then there is no intersection.\n let min, max;\n if (plane.normal.x > 0) {\n min = plane.normal.x * this.min.x;\n max = plane.normal.x * this.max.x;\n } else {\n min = plane.normal.x * this.max.x;\n max = plane.normal.x * this.min.x;\n }\n if (plane.normal.y > 0) {\n min += plane.normal.y * this.min.y;\n max += plane.normal.y * this.max.y;\n } else {\n min += plane.normal.y * this.max.y;\n max += plane.normal.y * this.min.y;\n }\n if (plane.normal.z > 0) {\n min += plane.normal.z * this.min.z;\n max += plane.normal.z * this.max.z;\n } else {\n min += plane.normal.z * this.max.z;\n max += plane.normal.z * this.min.z;\n }\n return min <= -plane.constant && max >= -plane.constant;\n }\n intersectsTriangle(triangle) {\n if (this.isEmpty()) return false;\n // compute box center and extents\n this.getCenter($d5b33d7c30034067$var$_center);\n $d5b33d7c30034067$var$_extents.subVectors(this.max, $d5b33d7c30034067$var$_center);\n // translate triangle to aabb origin\n $d5b33d7c30034067$var$_v0$2.subVectors(triangle.a, $d5b33d7c30034067$var$_center);\n $d5b33d7c30034067$var$_v1$7.subVectors(triangle.b, $d5b33d7c30034067$var$_center);\n $d5b33d7c30034067$var$_v2$4.subVectors(triangle.c, $d5b33d7c30034067$var$_center);\n // compute edge vectors for triangle\n $d5b33d7c30034067$var$_f0.subVectors($d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v0$2);\n $d5b33d7c30034067$var$_f1.subVectors($d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_v1$7);\n $d5b33d7c30034067$var$_f2.subVectors($d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v2$4);\n // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n // make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n // axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n let axes = [\n 0,\n -$d5b33d7c30034067$var$_f0.z,\n $d5b33d7c30034067$var$_f0.y,\n 0,\n -$d5b33d7c30034067$var$_f1.z,\n $d5b33d7c30034067$var$_f1.y,\n 0,\n -$d5b33d7c30034067$var$_f2.z,\n $d5b33d7c30034067$var$_f2.y,\n $d5b33d7c30034067$var$_f0.z,\n 0,\n -$d5b33d7c30034067$var$_f0.x,\n $d5b33d7c30034067$var$_f1.z,\n 0,\n -$d5b33d7c30034067$var$_f1.x,\n $d5b33d7c30034067$var$_f2.z,\n 0,\n -$d5b33d7c30034067$var$_f2.x,\n -$d5b33d7c30034067$var$_f0.y,\n $d5b33d7c30034067$var$_f0.x,\n 0,\n -$d5b33d7c30034067$var$_f1.y,\n $d5b33d7c30034067$var$_f1.x,\n 0,\n -$d5b33d7c30034067$var$_f2.y,\n $d5b33d7c30034067$var$_f2.x,\n 0\n ];\n if (!$d5b33d7c30034067$var$satForAxes(axes, $d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_extents)) return false;\n // test 3 face normals from the aabb\n axes = [\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 1\n ];\n if (!$d5b33d7c30034067$var$satForAxes(axes, $d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_extents)) return false;\n // finally testing the face normal of the triangle\n // use already existing triangle edge vectors here\n $d5b33d7c30034067$var$_triangleNormal.crossVectors($d5b33d7c30034067$var$_f0, $d5b33d7c30034067$var$_f1);\n axes = [\n $d5b33d7c30034067$var$_triangleNormal.x,\n $d5b33d7c30034067$var$_triangleNormal.y,\n $d5b33d7c30034067$var$_triangleNormal.z\n ];\n return $d5b33d7c30034067$var$satForAxes(axes, $d5b33d7c30034067$var$_v0$2, $d5b33d7c30034067$var$_v1$7, $d5b33d7c30034067$var$_v2$4, $d5b33d7c30034067$var$_extents);\n }\n clampPoint(point, target) {\n return target.copy(point).clamp(this.min, this.max);\n }\n distanceToPoint(point) {\n return this.clampPoint(point, $d5b33d7c30034067$var$_vector$a).distanceTo(point);\n }\n getBoundingSphere(target) {\n if (this.isEmpty()) target.makeEmpty();\n else {\n this.getCenter(target.center);\n target.radius = this.getSize($d5b33d7c30034067$var$_vector$a).length() * 0.5;\n }\n return target;\n }\n intersect(box) {\n this.min.max(box.min);\n this.max.min(box.max);\n // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n if (this.isEmpty()) this.makeEmpty();\n return this;\n }\n union(box) {\n this.min.min(box.min);\n this.max.max(box.max);\n return this;\n }\n applyMatrix4(matrix) {\n // transform of empty box is an empty box.\n if (this.isEmpty()) return this;\n // NOTE: I am using a binary pattern to specify all 2^3 combinations below\n $d5b33d7c30034067$var$_points[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(matrix); // 000\n $d5b33d7c30034067$var$_points[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(matrix); // 001\n $d5b33d7c30034067$var$_points[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(matrix); // 010\n $d5b33d7c30034067$var$_points[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(matrix); // 011\n $d5b33d7c30034067$var$_points[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(matrix); // 100\n $d5b33d7c30034067$var$_points[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(matrix); // 101\n $d5b33d7c30034067$var$_points[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(matrix); // 110\n $d5b33d7c30034067$var$_points[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(matrix); // 111\n this.setFromPoints($d5b33d7c30034067$var$_points);\n return this;\n }\n translate(offset) {\n this.min.add(offset);\n this.max.add(offset);\n return this;\n }\n equals(box) {\n return box.min.equals(this.min) && box.max.equals(this.max);\n }\n}\nconst $d5b33d7c30034067$var$_points = [\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699()\n];\nconst $d5b33d7c30034067$var$_vector$a = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_box$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n// triangle centered vertices\nconst $d5b33d7c30034067$var$_v0$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v1$7 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\n// triangle edge vectors\nconst $d5b33d7c30034067$var$_f0 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_f1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_f2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_center = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_extents = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_triangleNormal = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_testAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nfunction $d5b33d7c30034067$var$satForAxes(axes, v0, v1, v2, extents) {\n for(let i = 0, j = axes.length - 3; i <= j; i += 3){\n $d5b33d7c30034067$var$_testAxis.fromArray(axes, i);\n // project the aabb onto the separating axis\n const r = extents.x * Math.abs($d5b33d7c30034067$var$_testAxis.x) + extents.y * Math.abs($d5b33d7c30034067$var$_testAxis.y) + extents.z * Math.abs($d5b33d7c30034067$var$_testAxis.z);\n // project all 3 vertices of the triangle onto the separating axis\n const p0 = v0.dot($d5b33d7c30034067$var$_testAxis);\n const p1 = v1.dot($d5b33d7c30034067$var$_testAxis);\n const p2 = v2.dot($d5b33d7c30034067$var$_testAxis);\n // actual test, basically see if either of the most extreme of the triangle points intersects r\n if (Math.max(-Math.max(p0, p1, p2), Math.min(p0, p1, p2)) > r) // points of the projected triangle are outside the projected half-length of the aabb\n // the axis is separating and we can exit\n return false;\n }\n return true;\n}\nconst $d5b33d7c30034067$var$_box$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_v1$6 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$805e8b72413ccaba {\n constructor(center = new $d5b33d7c30034067$export$64b5c384219d3699(), radius = -1){\n this.center = center;\n this.radius = radius;\n }\n set(center, radius) {\n this.center.copy(center);\n this.radius = radius;\n return this;\n }\n setFromPoints(points, optionalCenter) {\n const center = this.center;\n if (optionalCenter !== undefined) center.copy(optionalCenter);\n else $d5b33d7c30034067$var$_box$2.setFromPoints(points).getCenter(center);\n let maxRadiusSq = 0;\n for(let i = 0, il = points.length; i < il; i++)maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(points[i]));\n this.radius = Math.sqrt(maxRadiusSq);\n return this;\n }\n copy(sphere) {\n this.center.copy(sphere.center);\n this.radius = sphere.radius;\n return this;\n }\n isEmpty() {\n return this.radius < 0;\n }\n makeEmpty() {\n this.center.set(0, 0, 0);\n this.radius = -1;\n return this;\n }\n containsPoint(point) {\n return point.distanceToSquared(this.center) <= this.radius * this.radius;\n }\n distanceToPoint(point) {\n return point.distanceTo(this.center) - this.radius;\n }\n intersectsSphere(sphere) {\n const radiusSum = this.radius + sphere.radius;\n return sphere.center.distanceToSquared(this.center) <= radiusSum * radiusSum;\n }\n intersectsBox(box) {\n return box.intersectsSphere(this);\n }\n intersectsPlane(plane) {\n return Math.abs(plane.distanceToPoint(this.center)) <= this.radius;\n }\n clampPoint(point, target) {\n const deltaLengthSq = this.center.distanceToSquared(point);\n target.copy(point);\n if (deltaLengthSq > this.radius * this.radius) {\n target.sub(this.center).normalize();\n target.multiplyScalar(this.radius).add(this.center);\n }\n return target;\n }\n getBoundingBox(target) {\n if (this.isEmpty()) {\n // Empty sphere produces empty bounding box\n target.makeEmpty();\n return target;\n }\n target.set(this.center, this.center);\n target.expandByScalar(this.radius);\n return target;\n }\n applyMatrix4(matrix) {\n this.center.applyMatrix4(matrix);\n this.radius = this.radius * matrix.getMaxScaleOnAxis();\n return this;\n }\n translate(offset) {\n this.center.add(offset);\n return this;\n }\n expandByPoint(point) {\n if (this.isEmpty()) {\n this.center.copy(point);\n this.radius = 0;\n return this;\n }\n $d5b33d7c30034067$var$_v1$6.subVectors(point, this.center);\n const lengthSq = $d5b33d7c30034067$var$_v1$6.lengthSq();\n if (lengthSq > this.radius * this.radius) {\n // calculate the minimal sphere\n const length = Math.sqrt(lengthSq);\n const delta = (length - this.radius) * 0.5;\n this.center.addScaledVector($d5b33d7c30034067$var$_v1$6, delta / length);\n this.radius += delta;\n }\n return this;\n }\n union(sphere) {\n if (sphere.isEmpty()) return this;\n if (this.isEmpty()) {\n this.copy(sphere);\n return this;\n }\n if (this.center.equals(sphere.center) === true) this.radius = Math.max(this.radius, sphere.radius);\n else {\n $d5b33d7c30034067$var$_v2$3.subVectors(sphere.center, this.center).setLength(sphere.radius);\n this.expandByPoint($d5b33d7c30034067$var$_v1$6.copy(sphere.center).add($d5b33d7c30034067$var$_v2$3));\n this.expandByPoint($d5b33d7c30034067$var$_v1$6.copy(sphere.center).sub($d5b33d7c30034067$var$_v2$3));\n }\n return this;\n }\n equals(sphere) {\n return sphere.center.equals(this.center) && sphere.radius === this.radius;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_vector$9 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_segCenter = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_segDir = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_diff = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_edge1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_edge2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normal$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$a186db52eed6d40e {\n constructor(origin = new $d5b33d7c30034067$export$64b5c384219d3699(), direction = new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, -1)){\n this.origin = origin;\n this.direction = direction;\n }\n set(origin, direction) {\n this.origin.copy(origin);\n this.direction.copy(direction);\n return this;\n }\n copy(ray) {\n this.origin.copy(ray.origin);\n this.direction.copy(ray.direction);\n return this;\n }\n at(t, target) {\n return target.copy(this.origin).addScaledVector(this.direction, t);\n }\n lookAt(v) {\n this.direction.copy(v).sub(this.origin).normalize();\n return this;\n }\n recast(t) {\n this.origin.copy(this.at(t, $d5b33d7c30034067$var$_vector$9));\n return this;\n }\n closestPointToPoint(point, target) {\n target.subVectors(point, this.origin);\n const directionDistance = target.dot(this.direction);\n if (directionDistance < 0) return target.copy(this.origin);\n return target.copy(this.origin).addScaledVector(this.direction, directionDistance);\n }\n distanceToPoint(point) {\n return Math.sqrt(this.distanceSqToPoint(point));\n }\n distanceSqToPoint(point) {\n const directionDistance = $d5b33d7c30034067$var$_vector$9.subVectors(point, this.origin).dot(this.direction);\n // point behind the ray\n if (directionDistance < 0) return this.origin.distanceToSquared(point);\n $d5b33d7c30034067$var$_vector$9.copy(this.origin).addScaledVector(this.direction, directionDistance);\n return $d5b33d7c30034067$var$_vector$9.distanceToSquared(point);\n }\n distanceSqToSegment(v0, v1, optionalPointOnRay, optionalPointOnSegment) {\n // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteDistRaySegment.h\n // It returns the min distance between the ray and the segment\n // defined by v0 and v1\n // It can also set two optional targets :\n // - The closest point on the ray\n // - The closest point on the segment\n $d5b33d7c30034067$var$_segCenter.copy(v0).add(v1).multiplyScalar(0.5);\n $d5b33d7c30034067$var$_segDir.copy(v1).sub(v0).normalize();\n $d5b33d7c30034067$var$_diff.copy(this.origin).sub($d5b33d7c30034067$var$_segCenter);\n const segExtent = v0.distanceTo(v1) * 0.5;\n const a01 = -this.direction.dot($d5b33d7c30034067$var$_segDir);\n const b0 = $d5b33d7c30034067$var$_diff.dot(this.direction);\n const b1 = -$d5b33d7c30034067$var$_diff.dot($d5b33d7c30034067$var$_segDir);\n const c = $d5b33d7c30034067$var$_diff.lengthSq();\n const det = Math.abs(1 - a01 * a01);\n let s0, s1, sqrDist, extDet;\n if (det > 0) {\n // The ray and segment are not parallel.\n s0 = a01 * b1 - b0;\n s1 = a01 * b0 - b1;\n extDet = segExtent * det;\n if (s0 >= 0) {\n if (s1 >= -extDet) {\n if (s1 <= extDet) {\n // region 0\n // Minimum at interior points of ray and segment.\n const invDet = 1 / det;\n s0 *= invDet;\n s1 *= invDet;\n sqrDist = s0 * (s0 + a01 * s1 + 2 * b0) + s1 * (a01 * s0 + s1 + 2 * b1) + c;\n } else {\n // region 1\n s1 = segExtent;\n s0 = Math.max(0, -(a01 * s1 + b0));\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n } else {\n // region 5\n s1 = -segExtent;\n s0 = Math.max(0, -(a01 * s1 + b0));\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n } else {\n if (s1 <= -extDet) {\n // region 4\n s0 = Math.max(0, -(-a01 * segExtent + b0));\n s1 = s0 > 0 ? -segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n } else if (s1 <= extDet) {\n // region 3\n s0 = 0;\n s1 = Math.min(Math.max(-segExtent, -b1), segExtent);\n sqrDist = s1 * (s1 + 2 * b1) + c;\n } else {\n // region 2\n s0 = Math.max(0, -(a01 * segExtent + b0));\n s1 = s0 > 0 ? segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n }\n } else {\n // Ray and segment are parallel.\n s1 = a01 > 0 ? -segExtent : segExtent;\n s0 = Math.max(0, -(a01 * s1 + b0));\n sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n }\n if (optionalPointOnRay) optionalPointOnRay.copy(this.origin).addScaledVector(this.direction, s0);\n if (optionalPointOnSegment) optionalPointOnSegment.copy($d5b33d7c30034067$var$_segCenter).addScaledVector($d5b33d7c30034067$var$_segDir, s1);\n return sqrDist;\n }\n intersectSphere(sphere, target) {\n $d5b33d7c30034067$var$_vector$9.subVectors(sphere.center, this.origin);\n const tca = $d5b33d7c30034067$var$_vector$9.dot(this.direction);\n const d2 = $d5b33d7c30034067$var$_vector$9.dot($d5b33d7c30034067$var$_vector$9) - tca * tca;\n const radius2 = sphere.radius * sphere.radius;\n if (d2 > radius2) return null;\n const thc = Math.sqrt(radius2 - d2);\n // t0 = first intersect point - entrance on front of sphere\n const t0 = tca - thc;\n // t1 = second intersect point - exit point on back of sphere\n const t1 = tca + thc;\n // test to see if t1 is behind the ray - if so, return null\n if (t1 < 0) return null;\n // test to see if t0 is behind the ray:\n // if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n // in order to always return an intersect point that is in front of the ray.\n if (t0 < 0) return this.at(t1, target);\n // else t0 is in front of the ray, so return the first collision point scaled by t0\n return this.at(t0, target);\n }\n intersectsSphere(sphere) {\n return this.distanceSqToPoint(sphere.center) <= sphere.radius * sphere.radius;\n }\n distanceToPlane(plane) {\n const denominator = plane.normal.dot(this.direction);\n if (denominator === 0) {\n // line is coplanar, return origin\n if (plane.distanceToPoint(this.origin) === 0) return 0;\n // Null is preferable to undefined since undefined means.... it is undefined\n return null;\n }\n const t = -(this.origin.dot(plane.normal) + plane.constant) / denominator;\n // Return if the ray never intersects the plane\n return t >= 0 ? t : null;\n }\n intersectPlane(plane, target) {\n const t = this.distanceToPlane(plane);\n if (t === null) return null;\n return this.at(t, target);\n }\n intersectsPlane(plane) {\n // check if the ray lies on the plane first\n const distToPoint = plane.distanceToPoint(this.origin);\n if (distToPoint === 0) return true;\n const denominator = plane.normal.dot(this.direction);\n if (denominator * distToPoint < 0) return true;\n // ray origin is behind the plane (and is pointing behind it)\n return false;\n }\n intersectBox(box, target) {\n let tmin, tmax, tymin, tymax, tzmin, tzmax;\n const invdirx = 1 / this.direction.x, invdiry = 1 / this.direction.y, invdirz = 1 / this.direction.z;\n const origin = this.origin;\n if (invdirx >= 0) {\n tmin = (box.min.x - origin.x) * invdirx;\n tmax = (box.max.x - origin.x) * invdirx;\n } else {\n tmin = (box.max.x - origin.x) * invdirx;\n tmax = (box.min.x - origin.x) * invdirx;\n }\n if (invdiry >= 0) {\n tymin = (box.min.y - origin.y) * invdiry;\n tymax = (box.max.y - origin.y) * invdiry;\n } else {\n tymin = (box.max.y - origin.y) * invdiry;\n tymax = (box.min.y - origin.y) * invdiry;\n }\n if (tmin > tymax || tymin > tmax) return null;\n if (tymin > tmin || isNaN(tmin)) tmin = tymin;\n if (tymax < tmax || isNaN(tmax)) tmax = tymax;\n if (invdirz >= 0) {\n tzmin = (box.min.z - origin.z) * invdirz;\n tzmax = (box.max.z - origin.z) * invdirz;\n } else {\n tzmin = (box.max.z - origin.z) * invdirz;\n tzmax = (box.min.z - origin.z) * invdirz;\n }\n if (tmin > tzmax || tzmin > tmax) return null;\n if (tzmin > tmin || tmin !== tmin) tmin = tzmin;\n if (tzmax < tmax || tmax !== tmax) tmax = tzmax;\n //return point closest to the ray (positive side)\n if (tmax < 0) return null;\n return this.at(tmin >= 0 ? tmin : tmax, target);\n }\n intersectsBox(box) {\n return this.intersectBox(box, $d5b33d7c30034067$var$_vector$9) !== null;\n }\n intersectTriangle(a, b, c, backfaceCulling, target) {\n // Compute the offset origin, edges, and normal.\n // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n $d5b33d7c30034067$var$_edge1.subVectors(b, a);\n $d5b33d7c30034067$var$_edge2.subVectors(c, a);\n $d5b33d7c30034067$var$_normal$1.crossVectors($d5b33d7c30034067$var$_edge1, $d5b33d7c30034067$var$_edge2);\n // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n // E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n // |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n // |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n // |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n let DdN = this.direction.dot($d5b33d7c30034067$var$_normal$1);\n let sign;\n if (DdN > 0) {\n if (backfaceCulling) return null;\n sign = 1;\n } else if (DdN < 0) {\n sign = -1;\n DdN = -DdN;\n } else return null;\n $d5b33d7c30034067$var$_diff.subVectors(this.origin, a);\n const DdQxE2 = sign * this.direction.dot($d5b33d7c30034067$var$_edge2.crossVectors($d5b33d7c30034067$var$_diff, $d5b33d7c30034067$var$_edge2));\n // b1 < 0, no intersection\n if (DdQxE2 < 0) return null;\n const DdE1xQ = sign * this.direction.dot($d5b33d7c30034067$var$_edge1.cross($d5b33d7c30034067$var$_diff));\n // b2 < 0, no intersection\n if (DdE1xQ < 0) return null;\n // b1+b2 > 1, no intersection\n if (DdQxE2 + DdE1xQ > DdN) return null;\n // Line intersects triangle, check if ray does.\n const QdN = -sign * $d5b33d7c30034067$var$_diff.dot($d5b33d7c30034067$var$_normal$1);\n // t < 0, no intersection\n if (QdN < 0) return null;\n // Ray intersects triangle.\n return this.at(QdN / DdN, target);\n }\n applyMatrix4(matrix4) {\n this.origin.applyMatrix4(matrix4);\n this.direction.transformDirection(matrix4);\n return this;\n }\n equals(ray) {\n return ray.origin.equals(this.origin) && ray.direction.equals(this.direction);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nclass $d5b33d7c30034067$export$2ae72fc923e5eb5 {\n constructor(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44){\n $d5b33d7c30034067$export$2ae72fc923e5eb5.prototype.isMatrix4 = true;\n this.elements = [\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n if (n11 !== undefined) this.set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44);\n }\n set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) {\n const te = this.elements;\n te[0] = n11;\n te[4] = n12;\n te[8] = n13;\n te[12] = n14;\n te[1] = n21;\n te[5] = n22;\n te[9] = n23;\n te[13] = n24;\n te[2] = n31;\n te[6] = n32;\n te[10] = n33;\n te[14] = n34;\n te[3] = n41;\n te[7] = n42;\n te[11] = n43;\n te[15] = n44;\n return this;\n }\n identity() {\n this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n return this;\n }\n clone() {\n return new $d5b33d7c30034067$export$2ae72fc923e5eb5().fromArray(this.elements);\n }\n copy(m) {\n const te = this.elements;\n const me = m.elements;\n te[0] = me[0];\n te[1] = me[1];\n te[2] = me[2];\n te[3] = me[3];\n te[4] = me[4];\n te[5] = me[5];\n te[6] = me[6];\n te[7] = me[7];\n te[8] = me[8];\n te[9] = me[9];\n te[10] = me[10];\n te[11] = me[11];\n te[12] = me[12];\n te[13] = me[13];\n te[14] = me[14];\n te[15] = me[15];\n return this;\n }\n copyPosition(m) {\n const te = this.elements, me = m.elements;\n te[12] = me[12];\n te[13] = me[13];\n te[14] = me[14];\n return this;\n }\n setFromMatrix3(m) {\n const me = m.elements;\n this.set(me[0], me[3], me[6], 0, me[1], me[4], me[7], 0, me[2], me[5], me[8], 0, 0, 0, 0, 1);\n return this;\n }\n extractBasis(xAxis, yAxis, zAxis) {\n xAxis.setFromMatrixColumn(this, 0);\n yAxis.setFromMatrixColumn(this, 1);\n zAxis.setFromMatrixColumn(this, 2);\n return this;\n }\n makeBasis(xAxis, yAxis, zAxis) {\n this.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1);\n return this;\n }\n extractRotation(m) {\n // this method does not support reflection matrices\n const te = this.elements;\n const me = m.elements;\n const scaleX = 1 / $d5b33d7c30034067$var$_v1$5.setFromMatrixColumn(m, 0).length();\n const scaleY = 1 / $d5b33d7c30034067$var$_v1$5.setFromMatrixColumn(m, 1).length();\n const scaleZ = 1 / $d5b33d7c30034067$var$_v1$5.setFromMatrixColumn(m, 2).length();\n te[0] = me[0] * scaleX;\n te[1] = me[1] * scaleX;\n te[2] = me[2] * scaleX;\n te[3] = 0;\n te[4] = me[4] * scaleY;\n te[5] = me[5] * scaleY;\n te[6] = me[6] * scaleY;\n te[7] = 0;\n te[8] = me[8] * scaleZ;\n te[9] = me[9] * scaleZ;\n te[10] = me[10] * scaleZ;\n te[11] = 0;\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n return this;\n }\n makeRotationFromEuler(euler) {\n const te = this.elements;\n const x = euler.x, y = euler.y, z = euler.z;\n const a = Math.cos(x), b = Math.sin(x);\n const c = Math.cos(y), d = Math.sin(y);\n const e = Math.cos(z), f = Math.sin(z);\n if (euler.order === \"XYZ\") {\n const ae = a * e, af = a * f, be = b * e, bf = b * f;\n te[0] = c * e;\n te[4] = -c * f;\n te[8] = d;\n te[1] = af + be * d;\n te[5] = ae - bf * d;\n te[9] = -b * c;\n te[2] = bf - ae * d;\n te[6] = be + af * d;\n te[10] = a * c;\n } else if (euler.order === \"YXZ\") {\n const ce = c * e, cf = c * f, de = d * e, df = d * f;\n te[0] = ce + df * b;\n te[4] = de * b - cf;\n te[8] = a * d;\n te[1] = a * f;\n te[5] = a * e;\n te[9] = -b;\n te[2] = cf * b - de;\n te[6] = df + ce * b;\n te[10] = a * c;\n } else if (euler.order === \"ZXY\") {\n const ce = c * e, cf = c * f, de = d * e, df = d * f;\n te[0] = ce - df * b;\n te[4] = -a * f;\n te[8] = de + cf * b;\n te[1] = cf + de * b;\n te[5] = a * e;\n te[9] = df - ce * b;\n te[2] = -a * d;\n te[6] = b;\n te[10] = a * c;\n } else if (euler.order === \"ZYX\") {\n const ae = a * e, af = a * f, be = b * e, bf = b * f;\n te[0] = c * e;\n te[4] = be * d - af;\n te[8] = ae * d + bf;\n te[1] = c * f;\n te[5] = bf * d + ae;\n te[9] = af * d - be;\n te[2] = -d;\n te[6] = b * c;\n te[10] = a * c;\n } else if (euler.order === \"YZX\") {\n const ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n te[0] = c * e;\n te[4] = bd - ac * f;\n te[8] = bc * f + ad;\n te[1] = f;\n te[5] = a * e;\n te[9] = -b * e;\n te[2] = -d * e;\n te[6] = ad * f + bc;\n te[10] = ac - bd * f;\n } else if (euler.order === \"XZY\") {\n const ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n te[0] = c * e;\n te[4] = -f;\n te[8] = d * e;\n te[1] = ac * f + bd;\n te[5] = a * e;\n te[9] = ad * f - bc;\n te[2] = bc * f - ad;\n te[6] = b * e;\n te[10] = bd * f + ac;\n }\n // bottom row\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n // last column\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n return this;\n }\n makeRotationFromQuaternion(q) {\n return this.compose($d5b33d7c30034067$var$_zero, q, $d5b33d7c30034067$var$_one);\n }\n lookAt(eye, target, up) {\n const te = this.elements;\n $d5b33d7c30034067$var$_z.subVectors(eye, target);\n if ($d5b33d7c30034067$var$_z.lengthSq() === 0) // eye and target are in the same position\n $d5b33d7c30034067$var$_z.z = 1;\n $d5b33d7c30034067$var$_z.normalize();\n $d5b33d7c30034067$var$_x.crossVectors(up, $d5b33d7c30034067$var$_z);\n if ($d5b33d7c30034067$var$_x.lengthSq() === 0) {\n // up and z are parallel\n if (Math.abs(up.z) === 1) $d5b33d7c30034067$var$_z.x += 0.0001;\n else $d5b33d7c30034067$var$_z.z += 0.0001;\n $d5b33d7c30034067$var$_z.normalize();\n $d5b33d7c30034067$var$_x.crossVectors(up, $d5b33d7c30034067$var$_z);\n }\n $d5b33d7c30034067$var$_x.normalize();\n $d5b33d7c30034067$var$_y.crossVectors($d5b33d7c30034067$var$_z, $d5b33d7c30034067$var$_x);\n te[0] = $d5b33d7c30034067$var$_x.x;\n te[4] = $d5b33d7c30034067$var$_y.x;\n te[8] = $d5b33d7c30034067$var$_z.x;\n te[1] = $d5b33d7c30034067$var$_x.y;\n te[5] = $d5b33d7c30034067$var$_y.y;\n te[9] = $d5b33d7c30034067$var$_z.y;\n te[2] = $d5b33d7c30034067$var$_x.z;\n te[6] = $d5b33d7c30034067$var$_y.z;\n te[10] = $d5b33d7c30034067$var$_z.z;\n return this;\n }\n multiply(m) {\n return this.multiplyMatrices(this, m);\n }\n premultiply(m) {\n return this.multiplyMatrices(m, this);\n }\n multiplyMatrices(a, b) {\n const ae = a.elements;\n const be = b.elements;\n const te = this.elements;\n const a11 = ae[0], a12 = ae[4], a13 = ae[8], a14 = ae[12];\n const a21 = ae[1], a22 = ae[5], a23 = ae[9], a24 = ae[13];\n const a31 = ae[2], a32 = ae[6], a33 = ae[10], a34 = ae[14];\n const a41 = ae[3], a42 = ae[7], a43 = ae[11], a44 = ae[15];\n const b11 = be[0], b12 = be[4], b13 = be[8], b14 = be[12];\n const b21 = be[1], b22 = be[5], b23 = be[9], b24 = be[13];\n const b31 = be[2], b32 = be[6], b33 = be[10], b34 = be[14];\n const b41 = be[3], b42 = be[7], b43 = be[11], b44 = be[15];\n te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n return this;\n }\n multiplyScalar(s) {\n const te = this.elements;\n te[0] *= s;\n te[4] *= s;\n te[8] *= s;\n te[12] *= s;\n te[1] *= s;\n te[5] *= s;\n te[9] *= s;\n te[13] *= s;\n te[2] *= s;\n te[6] *= s;\n te[10] *= s;\n te[14] *= s;\n te[3] *= s;\n te[7] *= s;\n te[11] *= s;\n te[15] *= s;\n return this;\n }\n determinant() {\n const te = this.elements;\n const n11 = te[0], n12 = te[4], n13 = te[8], n14 = te[12];\n const n21 = te[1], n22 = te[5], n23 = te[9], n24 = te[13];\n const n31 = te[2], n32 = te[6], n33 = te[10], n34 = te[14];\n const n41 = te[3], n42 = te[7], n43 = te[11], n44 = te[15];\n //TODO: make this more efficient\n //( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n return n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31);\n }\n transpose() {\n const te = this.elements;\n let tmp;\n tmp = te[1];\n te[1] = te[4];\n te[4] = tmp;\n tmp = te[2];\n te[2] = te[8];\n te[8] = tmp;\n tmp = te[6];\n te[6] = te[9];\n te[9] = tmp;\n tmp = te[3];\n te[3] = te[12];\n te[12] = tmp;\n tmp = te[7];\n te[7] = te[13];\n te[13] = tmp;\n tmp = te[11];\n te[11] = te[14];\n te[14] = tmp;\n return this;\n }\n setPosition(x, y, z) {\n const te = this.elements;\n if (x.isVector3) {\n te[12] = x.x;\n te[13] = x.y;\n te[14] = x.z;\n } else {\n te[12] = x;\n te[13] = y;\n te[14] = z;\n }\n return this;\n }\n invert() {\n // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n const te = this.elements, n11 = te[0], n21 = te[1], n31 = te[2], n41 = te[3], n12 = te[4], n22 = te[5], n32 = te[6], n42 = te[7], n13 = te[8], n23 = te[9], n33 = te[10], n43 = te[11], n14 = te[12], n24 = te[13], n34 = te[14], n44 = te[15], t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44, t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44, t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44, t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n const det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n const detInv = 1 / det;\n te[0] = t11 * detInv;\n te[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv;\n te[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv;\n te[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv;\n te[4] = t12 * detInv;\n te[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv;\n te[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv;\n te[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv;\n te[8] = t13 * detInv;\n te[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv;\n te[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv;\n te[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv;\n te[12] = t14 * detInv;\n te[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv;\n te[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv;\n te[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv;\n return this;\n }\n scale(v) {\n const te = this.elements;\n const x = v.x, y = v.y, z = v.z;\n te[0] *= x;\n te[4] *= y;\n te[8] *= z;\n te[1] *= x;\n te[5] *= y;\n te[9] *= z;\n te[2] *= x;\n te[6] *= y;\n te[10] *= z;\n te[3] *= x;\n te[7] *= y;\n te[11] *= z;\n return this;\n }\n getMaxScaleOnAxis() {\n const te = this.elements;\n const scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2];\n const scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6];\n const scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10];\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n }\n makeTranslation(x, y, z) {\n if (x.isVector3) this.set(1, 0, 0, x.x, 0, 1, 0, x.y, 0, 0, 1, x.z, 0, 0, 0, 1);\n else this.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1);\n return this;\n }\n makeRotationX(theta) {\n const c = Math.cos(theta), s = Math.sin(theta);\n this.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1);\n return this;\n }\n makeRotationY(theta) {\n const c = Math.cos(theta), s = Math.sin(theta);\n this.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1);\n return this;\n }\n makeRotationZ(theta) {\n const c = Math.cos(theta), s = Math.sin(theta);\n this.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n return this;\n }\n makeRotationAxis(axis, angle) {\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\n const c = Math.cos(angle);\n const s = Math.sin(angle);\n const t = 1 - c;\n const x = axis.x, y = axis.y, z = axis.z;\n const tx = t * x, ty = t * y;\n this.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1);\n return this;\n }\n makeScale(x, y, z) {\n this.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);\n return this;\n }\n makeShear(xy, xz, yx, yz, zx, zy) {\n this.set(1, yx, zx, 0, xy, 1, zy, 0, xz, yz, 1, 0, 0, 0, 0, 1);\n return this;\n }\n compose(position, quaternion, scale) {\n const te = this.elements;\n const x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;\n const x2 = x + x, y2 = y + y, z2 = z + z;\n const xx = x * x2, xy = x * y2, xz = x * z2;\n const yy = y * y2, yz = y * z2, zz = z * z2;\n const wx = w * x2, wy = w * y2, wz = w * z2;\n const sx = scale.x, sy = scale.y, sz = scale.z;\n te[0] = (1 - (yy + zz)) * sx;\n te[1] = (xy + wz) * sx;\n te[2] = (xz - wy) * sx;\n te[3] = 0;\n te[4] = (xy - wz) * sy;\n te[5] = (1 - (xx + zz)) * sy;\n te[6] = (yz + wx) * sy;\n te[7] = 0;\n te[8] = (xz + wy) * sz;\n te[9] = (yz - wx) * sz;\n te[10] = (1 - (xx + yy)) * sz;\n te[11] = 0;\n te[12] = position.x;\n te[13] = position.y;\n te[14] = position.z;\n te[15] = 1;\n return this;\n }\n decompose(position, quaternion, scale) {\n const te = this.elements;\n let sx = $d5b33d7c30034067$var$_v1$5.set(te[0], te[1], te[2]).length();\n const sy = $d5b33d7c30034067$var$_v1$5.set(te[4], te[5], te[6]).length();\n const sz = $d5b33d7c30034067$var$_v1$5.set(te[8], te[9], te[10]).length();\n // if determine is negative, we need to invert one scale\n const det = this.determinant();\n if (det < 0) sx = -sx;\n position.x = te[12];\n position.y = te[13];\n position.z = te[14];\n // scale the rotation part\n $d5b33d7c30034067$var$_m1$2.copy(this);\n const invSX = 1 / sx;\n const invSY = 1 / sy;\n const invSZ = 1 / sz;\n $d5b33d7c30034067$var$_m1$2.elements[0] *= invSX;\n $d5b33d7c30034067$var$_m1$2.elements[1] *= invSX;\n $d5b33d7c30034067$var$_m1$2.elements[2] *= invSX;\n $d5b33d7c30034067$var$_m1$2.elements[4] *= invSY;\n $d5b33d7c30034067$var$_m1$2.elements[5] *= invSY;\n $d5b33d7c30034067$var$_m1$2.elements[6] *= invSY;\n $d5b33d7c30034067$var$_m1$2.elements[8] *= invSZ;\n $d5b33d7c30034067$var$_m1$2.elements[9] *= invSZ;\n $d5b33d7c30034067$var$_m1$2.elements[10] *= invSZ;\n quaternion.setFromRotationMatrix($d5b33d7c30034067$var$_m1$2);\n scale.x = sx;\n scale.y = sy;\n scale.z = sz;\n return this;\n }\n makePerspective(left, right, top, bottom, near, far, coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3) {\n const te = this.elements;\n const x = 2 * near / (right - left);\n const y = 2 * near / (top - bottom);\n const a = (right + left) / (right - left);\n const b = (top + bottom) / (top - bottom);\n let c, d;\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) {\n c = -(far + near) / (far - near);\n d = -2 * far * near / (far - near);\n } else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) {\n c = -far / (far - near);\n d = -far * near / (far - near);\n } else throw new Error(\"THREE.Matrix4.makePerspective(): Invalid coordinate system: \" + coordinateSystem);\n te[0] = x;\n te[4] = 0;\n te[8] = a;\n te[12] = 0;\n te[1] = 0;\n te[5] = y;\n te[9] = b;\n te[13] = 0;\n te[2] = 0;\n te[6] = 0;\n te[10] = c;\n te[14] = d;\n te[3] = 0;\n te[7] = 0;\n te[11] = -1;\n te[15] = 0;\n return this;\n }\n makeOrthographic(left, right, top, bottom, near, far, coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3) {\n const te = this.elements;\n const w = 1.0 / (right - left);\n const h = 1.0 / (top - bottom);\n const p = 1.0 / (far - near);\n const x = (right + left) * w;\n const y = (top + bottom) * h;\n let z, zInv;\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) {\n z = (far + near) * p;\n zInv = -2 * p;\n } else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) {\n z = near * p;\n zInv = -1 * p;\n } else throw new Error(\"THREE.Matrix4.makeOrthographic(): Invalid coordinate system: \" + coordinateSystem);\n te[0] = 2 * w;\n te[4] = 0;\n te[8] = 0;\n te[12] = -x;\n te[1] = 0;\n te[5] = 2 * h;\n te[9] = 0;\n te[13] = -y;\n te[2] = 0;\n te[6] = 0;\n te[10] = zInv;\n te[14] = -z;\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n te[15] = 1;\n return this;\n }\n equals(matrix) {\n const te = this.elements;\n const me = matrix.elements;\n for(let i = 0; i < 16; i++){\n if (te[i] !== me[i]) return false;\n }\n return true;\n }\n fromArray(array, offset = 0) {\n for(let i = 0; i < 16; i++)this.elements[i] = array[i + offset];\n return this;\n }\n toArray(array = [], offset = 0) {\n const te = this.elements;\n array[offset] = te[0];\n array[offset + 1] = te[1];\n array[offset + 2] = te[2];\n array[offset + 3] = te[3];\n array[offset + 4] = te[4];\n array[offset + 5] = te[5];\n array[offset + 6] = te[6];\n array[offset + 7] = te[7];\n array[offset + 8] = te[8];\n array[offset + 9] = te[9];\n array[offset + 10] = te[10];\n array[offset + 11] = te[11];\n array[offset + 12] = te[12];\n array[offset + 13] = te[13];\n array[offset + 14] = te[14];\n array[offset + 15] = te[15];\n return array;\n }\n}\nconst $d5b33d7c30034067$var$_v1$5 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_m1$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_zero = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 0);\nconst $d5b33d7c30034067$var$_one = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 1);\nconst $d5b33d7c30034067$var$_x = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_y = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_z = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_matrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_quaternion$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nclass $d5b33d7c30034067$export$d93cc409a0768c5f {\n constructor(x = 0, y = 0, z = 0, order = $d5b33d7c30034067$export$d93cc409a0768c5f.DEFAULT_ORDER){\n this.isEuler = true;\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n }\n get x() {\n return this._x;\n }\n set x(value) {\n this._x = value;\n this._onChangeCallback();\n }\n get y() {\n return this._y;\n }\n set y(value) {\n this._y = value;\n this._onChangeCallback();\n }\n get z() {\n return this._z;\n }\n set z(value) {\n this._z = value;\n this._onChangeCallback();\n }\n get order() {\n return this._order;\n }\n set order(value) {\n this._order = value;\n this._onChangeCallback();\n }\n set(x, y, z, order = this._order) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._order = order;\n this._onChangeCallback();\n return this;\n }\n clone() {\n return new this.constructor(this._x, this._y, this._z, this._order);\n }\n copy(euler) {\n this._x = euler._x;\n this._y = euler._y;\n this._z = euler._z;\n this._order = euler._order;\n this._onChangeCallback();\n return this;\n }\n setFromRotationMatrix(m, order = this._order, update = true) {\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n const te = m.elements;\n const m11 = te[0], m12 = te[4], m13 = te[8];\n const m21 = te[1], m22 = te[5], m23 = te[9];\n const m31 = te[2], m32 = te[6], m33 = te[10];\n switch(order){\n case \"XYZ\":\n this._y = Math.asin($d5b33d7c30034067$var$clamp(m13, -1, 1));\n if (Math.abs(m13) < 0.9999999) {\n this._x = Math.atan2(-m23, m33);\n this._z = Math.atan2(-m12, m11);\n } else {\n this._x = Math.atan2(m32, m22);\n this._z = 0;\n }\n break;\n case \"YXZ\":\n this._x = Math.asin(-$d5b33d7c30034067$var$clamp(m23, -1, 1));\n if (Math.abs(m23) < 0.9999999) {\n this._y = Math.atan2(m13, m33);\n this._z = Math.atan2(m21, m22);\n } else {\n this._y = Math.atan2(-m31, m11);\n this._z = 0;\n }\n break;\n case \"ZXY\":\n this._x = Math.asin($d5b33d7c30034067$var$clamp(m32, -1, 1));\n if (Math.abs(m32) < 0.9999999) {\n this._y = Math.atan2(-m31, m33);\n this._z = Math.atan2(-m12, m22);\n } else {\n this._y = 0;\n this._z = Math.atan2(m21, m11);\n }\n break;\n case \"ZYX\":\n this._y = Math.asin(-$d5b33d7c30034067$var$clamp(m31, -1, 1));\n if (Math.abs(m31) < 0.9999999) {\n this._x = Math.atan2(m32, m33);\n this._z = Math.atan2(m21, m11);\n } else {\n this._x = 0;\n this._z = Math.atan2(-m12, m22);\n }\n break;\n case \"YZX\":\n this._z = Math.asin($d5b33d7c30034067$var$clamp(m21, -1, 1));\n if (Math.abs(m21) < 0.9999999) {\n this._x = Math.atan2(-m23, m22);\n this._y = Math.atan2(-m31, m11);\n } else {\n this._x = 0;\n this._y = Math.atan2(m13, m33);\n }\n break;\n case \"XZY\":\n this._z = Math.asin(-$d5b33d7c30034067$var$clamp(m12, -1, 1));\n if (Math.abs(m12) < 0.9999999) {\n this._x = Math.atan2(m32, m22);\n this._y = Math.atan2(m13, m11);\n } else {\n this._x = Math.atan2(-m23, m33);\n this._y = 0;\n }\n break;\n default:\n console.warn(\"THREE.Euler: .setFromRotationMatrix() encountered an unknown order: \" + order);\n }\n this._order = order;\n if (update === true) this._onChangeCallback();\n return this;\n }\n setFromQuaternion(q, order, update) {\n $d5b33d7c30034067$var$_matrix.makeRotationFromQuaternion(q);\n return this.setFromRotationMatrix($d5b33d7c30034067$var$_matrix, order, update);\n }\n setFromVector3(v, order = this._order) {\n return this.set(v.x, v.y, v.z, order);\n }\n reorder(newOrder) {\n // WARNING: this discards revolution information -bhouston\n $d5b33d7c30034067$var$_quaternion$3.setFromEuler(this);\n return this.setFromQuaternion($d5b33d7c30034067$var$_quaternion$3, newOrder);\n }\n equals(euler) {\n return euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order;\n }\n fromArray(array) {\n this._x = array[0];\n this._y = array[1];\n this._z = array[2];\n if (array[3] !== undefined) this._order = array[3];\n this._onChangeCallback();\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this._x;\n array[offset + 1] = this._y;\n array[offset + 2] = this._z;\n array[offset + 3] = this._order;\n return array;\n }\n _onChange(callback) {\n this._onChangeCallback = callback;\n return this;\n }\n _onChangeCallback() {}\n *[Symbol.iterator]() {\n yield this._x;\n yield this._y;\n yield this._z;\n yield this._order;\n }\n}\n$d5b33d7c30034067$export$d93cc409a0768c5f.DEFAULT_ORDER = \"XYZ\";\nclass $d5b33d7c30034067$export$89312ce47c0ca777 {\n constructor(){\n this.mask = 1;\n }\n set(channel) {\n this.mask = (1 << channel | 0) >>> 0;\n }\n enable(channel) {\n this.mask |= 1 << channel | 0;\n }\n enableAll() {\n this.mask = -1;\n }\n toggle(channel) {\n this.mask ^= 1 << channel | 0;\n }\n disable(channel) {\n this.mask &= ~(1 << channel | 0);\n }\n disableAll() {\n this.mask = 0;\n }\n test(layers) {\n return (this.mask & layers.mask) !== 0;\n }\n isEnabled(channel) {\n return (this.mask & (1 << channel | 0)) !== 0;\n }\n}\nlet $d5b33d7c30034067$var$_object3DId = 0;\nconst $d5b33d7c30034067$var$_v1$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_q1 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_m1$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_target = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_position$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_scale$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_xAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 0, 0);\nconst $d5b33d7c30034067$var$_yAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0);\nconst $d5b33d7c30034067$var$_zAxis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1);\nconst $d5b33d7c30034067$var$_addedEvent = {\n type: \"added\"\n};\nconst $d5b33d7c30034067$var$_removedEvent = {\n type: \"removed\"\n};\nclass $d5b33d7c30034067$export$e4dd07dff30cc924 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isObject3D = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_object3DId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.type = \"Object3D\";\n this.parent = null;\n this.children = [];\n this.up = $d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP.clone();\n const position = new $d5b33d7c30034067$export$64b5c384219d3699();\n const rotation = new $d5b33d7c30034067$export$d93cc409a0768c5f();\n const quaternion = new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\n const scale = new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 1);\n function onRotationChange() {\n quaternion.setFromEuler(rotation, false);\n }\n function onQuaternionChange() {\n rotation.setFromQuaternion(quaternion, undefined, false);\n }\n rotation._onChange(onRotationChange);\n quaternion._onChange(onQuaternionChange);\n Object.defineProperties(this, {\n position: {\n configurable: true,\n enumerable: true,\n value: position\n },\n rotation: {\n configurable: true,\n enumerable: true,\n value: rotation\n },\n quaternion: {\n configurable: true,\n enumerable: true,\n value: quaternion\n },\n scale: {\n configurable: true,\n enumerable: true,\n value: scale\n },\n modelViewMatrix: {\n value: new $d5b33d7c30034067$export$2ae72fc923e5eb5()\n },\n normalMatrix: {\n value: new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n });\n this.matrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.matrixWorld = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.matrixAutoUpdate = $d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_AUTO_UPDATE;\n this.matrixWorldNeedsUpdate = false;\n this.matrixWorldAutoUpdate = $d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_WORLD_AUTO_UPDATE; // checked by the renderer\n this.layers = new $d5b33d7c30034067$export$89312ce47c0ca777();\n this.visible = true;\n this.castShadow = false;\n this.receiveShadow = false;\n this.frustumCulled = true;\n this.renderOrder = 0;\n this.animations = [];\n this.userData = {};\n }\n onBeforeRender() {}\n onAfterRender() {}\n applyMatrix4(matrix) {\n if (this.matrixAutoUpdate) this.updateMatrix();\n this.matrix.premultiply(matrix);\n this.matrix.decompose(this.position, this.quaternion, this.scale);\n }\n applyQuaternion(q) {\n this.quaternion.premultiply(q);\n return this;\n }\n setRotationFromAxisAngle(axis, angle) {\n // assumes axis is normalized\n this.quaternion.setFromAxisAngle(axis, angle);\n }\n setRotationFromEuler(euler) {\n this.quaternion.setFromEuler(euler, true);\n }\n setRotationFromMatrix(m) {\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n this.quaternion.setFromRotationMatrix(m);\n }\n setRotationFromQuaternion(q) {\n // assumes q is normalized\n this.quaternion.copy(q);\n }\n rotateOnAxis(axis, angle) {\n // rotate object on axis in object space\n // axis is assumed to be normalized\n $d5b33d7c30034067$var$_q1.setFromAxisAngle(axis, angle);\n this.quaternion.multiply($d5b33d7c30034067$var$_q1);\n return this;\n }\n rotateOnWorldAxis(axis, angle) {\n // rotate object on axis in world space\n // axis is assumed to be normalized\n // method assumes no rotated parent\n $d5b33d7c30034067$var$_q1.setFromAxisAngle(axis, angle);\n this.quaternion.premultiply($d5b33d7c30034067$var$_q1);\n return this;\n }\n rotateX(angle) {\n return this.rotateOnAxis($d5b33d7c30034067$var$_xAxis, angle);\n }\n rotateY(angle) {\n return this.rotateOnAxis($d5b33d7c30034067$var$_yAxis, angle);\n }\n rotateZ(angle) {\n return this.rotateOnAxis($d5b33d7c30034067$var$_zAxis, angle);\n }\n translateOnAxis(axis, distance) {\n // translate object by distance along axis in object space\n // axis is assumed to be normalized\n $d5b33d7c30034067$var$_v1$4.copy(axis).applyQuaternion(this.quaternion);\n this.position.add($d5b33d7c30034067$var$_v1$4.multiplyScalar(distance));\n return this;\n }\n translateX(distance) {\n return this.translateOnAxis($d5b33d7c30034067$var$_xAxis, distance);\n }\n translateY(distance) {\n return this.translateOnAxis($d5b33d7c30034067$var$_yAxis, distance);\n }\n translateZ(distance) {\n return this.translateOnAxis($d5b33d7c30034067$var$_zAxis, distance);\n }\n localToWorld(vector) {\n this.updateWorldMatrix(true, false);\n return vector.applyMatrix4(this.matrixWorld);\n }\n worldToLocal(vector) {\n this.updateWorldMatrix(true, false);\n return vector.applyMatrix4($d5b33d7c30034067$var$_m1$1.copy(this.matrixWorld).invert());\n }\n lookAt(x, y, z) {\n // This method does not support objects having non-uniformly-scaled parent(s)\n if (x.isVector3) $d5b33d7c30034067$var$_target.copy(x);\n else $d5b33d7c30034067$var$_target.set(x, y, z);\n const parent = this.parent;\n this.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_position$3.setFromMatrixPosition(this.matrixWorld);\n if (this.isCamera || this.isLight) $d5b33d7c30034067$var$_m1$1.lookAt($d5b33d7c30034067$var$_position$3, $d5b33d7c30034067$var$_target, this.up);\n else $d5b33d7c30034067$var$_m1$1.lookAt($d5b33d7c30034067$var$_target, $d5b33d7c30034067$var$_position$3, this.up);\n this.quaternion.setFromRotationMatrix($d5b33d7c30034067$var$_m1$1);\n if (parent) {\n $d5b33d7c30034067$var$_m1$1.extractRotation(parent.matrixWorld);\n $d5b33d7c30034067$var$_q1.setFromRotationMatrix($d5b33d7c30034067$var$_m1$1);\n this.quaternion.premultiply($d5b33d7c30034067$var$_q1.invert());\n }\n }\n add(object) {\n if (arguments.length > 1) {\n for(let i = 0; i < arguments.length; i++)this.add(arguments[i]);\n return this;\n }\n if (object === this) {\n console.error(\"THREE.Object3D.add: object can't be added as a child of itself.\", object);\n return this;\n }\n if (object && object.isObject3D) {\n if (object.parent !== null) object.parent.remove(object);\n object.parent = this;\n this.children.push(object);\n object.dispatchEvent($d5b33d7c30034067$var$_addedEvent);\n } else console.error(\"THREE.Object3D.add: object not an instance of THREE.Object3D.\", object);\n return this;\n }\n remove(object) {\n if (arguments.length > 1) {\n for(let i = 0; i < arguments.length; i++)this.remove(arguments[i]);\n return this;\n }\n const index = this.children.indexOf(object);\n if (index !== -1) {\n object.parent = null;\n this.children.splice(index, 1);\n object.dispatchEvent($d5b33d7c30034067$var$_removedEvent);\n }\n return this;\n }\n removeFromParent() {\n const parent = this.parent;\n if (parent !== null) parent.remove(this);\n return this;\n }\n clear() {\n return this.remove(...this.children);\n }\n attach(object) {\n // adds object as a child of this, while maintaining the object's world transform\n // Note: This method does not support scene graphs having non-uniformly-scaled nodes(s)\n this.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_m1$1.copy(this.matrixWorld).invert();\n if (object.parent !== null) {\n object.parent.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_m1$1.multiply(object.parent.matrixWorld);\n }\n object.applyMatrix4($d5b33d7c30034067$var$_m1$1);\n this.add(object);\n object.updateWorldMatrix(false, true);\n return this;\n }\n getObjectById(id) {\n return this.getObjectByProperty(\"id\", id);\n }\n getObjectByName(name) {\n return this.getObjectByProperty(\"name\", name);\n }\n getObjectByProperty(name, value) {\n if (this[name] === value) return this;\n for(let i = 0, l = this.children.length; i < l; i++){\n const child = this.children[i];\n const object = child.getObjectByProperty(name, value);\n if (object !== undefined) return object;\n }\n return undefined;\n }\n getObjectsByProperty(name, value) {\n let result = [];\n if (this[name] === value) result.push(this);\n for(let i = 0, l = this.children.length; i < l; i++){\n const childResult = this.children[i].getObjectsByProperty(name, value);\n if (childResult.length > 0) result = result.concat(childResult);\n }\n return result;\n }\n getWorldPosition(target) {\n this.updateWorldMatrix(true, false);\n return target.setFromMatrixPosition(this.matrixWorld);\n }\n getWorldQuaternion(target) {\n this.updateWorldMatrix(true, false);\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position$3, target, $d5b33d7c30034067$var$_scale$2);\n return target;\n }\n getWorldScale(target) {\n this.updateWorldMatrix(true, false);\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position$3, $d5b33d7c30034067$var$_quaternion$2, target);\n return target;\n }\n getWorldDirection(target) {\n this.updateWorldMatrix(true, false);\n const e = this.matrixWorld.elements;\n return target.set(e[8], e[9], e[10]).normalize();\n }\n raycast() {}\n traverse(callback) {\n callback(this);\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++)children[i].traverse(callback);\n }\n traverseVisible(callback) {\n if (this.visible === false) return;\n callback(this);\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++)children[i].traverseVisible(callback);\n }\n traverseAncestors(callback) {\n const parent = this.parent;\n if (parent !== null) {\n callback(parent);\n parent.traverseAncestors(callback);\n }\n }\n updateMatrix() {\n this.matrix.compose(this.position, this.quaternion, this.scale);\n this.matrixWorldNeedsUpdate = true;\n }\n updateMatrixWorld(force) {\n if (this.matrixAutoUpdate) this.updateMatrix();\n if (this.matrixWorldNeedsUpdate || force) {\n if (this.parent === null) this.matrixWorld.copy(this.matrix);\n else this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n this.matrixWorldNeedsUpdate = false;\n force = true;\n }\n // update children\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++){\n const child = children[i];\n if (child.matrixWorldAutoUpdate === true || force === true) child.updateMatrixWorld(force);\n }\n }\n updateWorldMatrix(updateParents, updateChildren) {\n const parent = this.parent;\n if (updateParents === true && parent !== null && parent.matrixWorldAutoUpdate === true) parent.updateWorldMatrix(true, false);\n if (this.matrixAutoUpdate) this.updateMatrix();\n if (this.parent === null) this.matrixWorld.copy(this.matrix);\n else this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n // update children\n if (updateChildren === true) {\n const children = this.children;\n for(let i = 0, l = children.length; i < l; i++){\n const child = children[i];\n if (child.matrixWorldAutoUpdate === true) child.updateWorldMatrix(false, true);\n }\n }\n }\n toJSON(meta) {\n // meta is a string when called from JSON.stringify\n const isRootObject = meta === undefined || typeof meta === \"string\";\n const output = {};\n // meta is a hash used to collect geometries, materials.\n // not providing it implies that this is the root object\n // being serialized.\n if (isRootObject) {\n // initialize meta obj\n meta = {\n geometries: {},\n materials: {},\n textures: {},\n images: {},\n shapes: {},\n skeletons: {},\n animations: {},\n nodes: {}\n };\n output.metadata = {\n version: 4.6,\n type: \"Object\",\n generator: \"Object3D.toJSON\"\n };\n }\n // standard Object3D serialization\n const object = {};\n object.uuid = this.uuid;\n object.type = this.type;\n if (this.name !== \"\") object.name = this.name;\n if (this.castShadow === true) object.castShadow = true;\n if (this.receiveShadow === true) object.receiveShadow = true;\n if (this.visible === false) object.visible = false;\n if (this.frustumCulled === false) object.frustumCulled = false;\n if (this.renderOrder !== 0) object.renderOrder = this.renderOrder;\n if (Object.keys(this.userData).length > 0) object.userData = this.userData;\n object.layers = this.layers.mask;\n object.matrix = this.matrix.toArray();\n object.up = this.up.toArray();\n if (this.matrixAutoUpdate === false) object.matrixAutoUpdate = false;\n // object specific properties\n if (this.isInstancedMesh) {\n object.type = \"InstancedMesh\";\n object.count = this.count;\n object.instanceMatrix = this.instanceMatrix.toJSON();\n if (this.instanceColor !== null) object.instanceColor = this.instanceColor.toJSON();\n }\n //\n function serialize(library, element) {\n if (library[element.uuid] === undefined) library[element.uuid] = element.toJSON(meta);\n return element.uuid;\n }\n if (this.isScene) {\n if (this.background) {\n if (this.background.isColor) object.background = this.background.toJSON();\n else if (this.background.isTexture) object.background = this.background.toJSON(meta).uuid;\n }\n if (this.environment && this.environment.isTexture && this.environment.isRenderTargetTexture !== true) object.environment = this.environment.toJSON(meta).uuid;\n } else if (this.isMesh || this.isLine || this.isPoints) {\n object.geometry = serialize(meta.geometries, this.geometry);\n const parameters = this.geometry.parameters;\n if (parameters !== undefined && parameters.shapes !== undefined) {\n const shapes = parameters.shapes;\n if (Array.isArray(shapes)) for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n serialize(meta.shapes, shape);\n }\n else serialize(meta.shapes, shapes);\n }\n }\n if (this.isSkinnedMesh) {\n object.bindMode = this.bindMode;\n object.bindMatrix = this.bindMatrix.toArray();\n if (this.skeleton !== undefined) {\n serialize(meta.skeletons, this.skeleton);\n object.skeleton = this.skeleton.uuid;\n }\n }\n if (this.material !== undefined) {\n if (Array.isArray(this.material)) {\n const uuids = [];\n for(let i = 0, l = this.material.length; i < l; i++)uuids.push(serialize(meta.materials, this.material[i]));\n object.material = uuids;\n } else object.material = serialize(meta.materials, this.material);\n }\n //\n if (this.children.length > 0) {\n object.children = [];\n for(let i = 0; i < this.children.length; i++)object.children.push(this.children[i].toJSON(meta).object);\n }\n //\n if (this.animations.length > 0) {\n object.animations = [];\n for(let i = 0; i < this.animations.length; i++){\n const animation = this.animations[i];\n object.animations.push(serialize(meta.animations, animation));\n }\n }\n if (isRootObject) {\n const geometries = extractFromCache(meta.geometries);\n const materials = extractFromCache(meta.materials);\n const textures = extractFromCache(meta.textures);\n const images = extractFromCache(meta.images);\n const shapes = extractFromCache(meta.shapes);\n const skeletons = extractFromCache(meta.skeletons);\n const animations = extractFromCache(meta.animations);\n const nodes = extractFromCache(meta.nodes);\n if (geometries.length > 0) output.geometries = geometries;\n if (materials.length > 0) output.materials = materials;\n if (textures.length > 0) output.textures = textures;\n if (images.length > 0) output.images = images;\n if (shapes.length > 0) output.shapes = shapes;\n if (skeletons.length > 0) output.skeletons = skeletons;\n if (animations.length > 0) output.animations = animations;\n if (nodes.length > 0) output.nodes = nodes;\n }\n output.object = object;\n return output;\n // extract data from the cache hash\n // remove metadata on each item\n // and return as array\n function extractFromCache(cache) {\n const values = [];\n for(const key in cache){\n const data = cache[key];\n delete data.metadata;\n values.push(data);\n }\n return values;\n }\n }\n clone(recursive) {\n return new this.constructor().copy(this, recursive);\n }\n copy(source, recursive = true) {\n this.name = source.name;\n this.up.copy(source.up);\n this.position.copy(source.position);\n this.rotation.order = source.rotation.order;\n this.quaternion.copy(source.quaternion);\n this.scale.copy(source.scale);\n this.matrix.copy(source.matrix);\n this.matrixWorld.copy(source.matrixWorld);\n this.matrixAutoUpdate = source.matrixAutoUpdate;\n this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n this.matrixWorldAutoUpdate = source.matrixWorldAutoUpdate;\n this.layers.mask = source.layers.mask;\n this.visible = source.visible;\n this.castShadow = source.castShadow;\n this.receiveShadow = source.receiveShadow;\n this.frustumCulled = source.frustumCulled;\n this.renderOrder = source.renderOrder;\n this.animations = source.animations.slice();\n this.userData = JSON.parse(JSON.stringify(source.userData));\n if (recursive === true) for(let i = 0; i < source.children.length; i++){\n const child = source.children[i];\n this.add(child.clone());\n }\n return this;\n }\n}\n$d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0);\n$d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_AUTO_UPDATE = true;\n$d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;\nconst $d5b33d7c30034067$var$_v0$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v1$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v3$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vab = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vac = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vbc = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vap = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vbp = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vcp = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nlet $d5b33d7c30034067$var$warnedGetUV = false;\nclass $d5b33d7c30034067$export$5a465592bfe74b48 {\n constructor(a = new $d5b33d7c30034067$export$64b5c384219d3699(), b = new $d5b33d7c30034067$export$64b5c384219d3699(), c = new $d5b33d7c30034067$export$64b5c384219d3699()){\n this.a = a;\n this.b = b;\n this.c = c;\n }\n static getNormal(a, b, c, target) {\n target.subVectors(c, b);\n $d5b33d7c30034067$var$_v0$1.subVectors(a, b);\n target.cross($d5b33d7c30034067$var$_v0$1);\n const targetLengthSq = target.lengthSq();\n if (targetLengthSq > 0) return target.multiplyScalar(1 / Math.sqrt(targetLengthSq));\n return target.set(0, 0, 0);\n }\n // static/instance method to calculate barycentric coordinates\n // based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n static getBarycoord(point, a, b, c, target) {\n $d5b33d7c30034067$var$_v0$1.subVectors(c, a);\n $d5b33d7c30034067$var$_v1$3.subVectors(b, a);\n $d5b33d7c30034067$var$_v2$2.subVectors(point, a);\n const dot00 = $d5b33d7c30034067$var$_v0$1.dot($d5b33d7c30034067$var$_v0$1);\n const dot01 = $d5b33d7c30034067$var$_v0$1.dot($d5b33d7c30034067$var$_v1$3);\n const dot02 = $d5b33d7c30034067$var$_v0$1.dot($d5b33d7c30034067$var$_v2$2);\n const dot11 = $d5b33d7c30034067$var$_v1$3.dot($d5b33d7c30034067$var$_v1$3);\n const dot12 = $d5b33d7c30034067$var$_v1$3.dot($d5b33d7c30034067$var$_v2$2);\n const denom = dot00 * dot11 - dot01 * dot01;\n // collinear or singular triangle\n if (denom === 0) // arbitrary location outside of triangle?\n // not sure if this is the best idea, maybe should be returning undefined\n return target.set(-2, -1, -1);\n const invDenom = 1 / denom;\n const u = (dot11 * dot02 - dot01 * dot12) * invDenom;\n const v = (dot00 * dot12 - dot01 * dot02) * invDenom;\n // barycentric coordinates must always sum to 1\n return target.set(1 - u - v, v, u);\n }\n static containsPoint(point, a, b, c) {\n this.getBarycoord(point, a, b, c, $d5b33d7c30034067$var$_v3$1);\n return $d5b33d7c30034067$var$_v3$1.x >= 0 && $d5b33d7c30034067$var$_v3$1.y >= 0 && $d5b33d7c30034067$var$_v3$1.x + $d5b33d7c30034067$var$_v3$1.y <= 1;\n }\n static getUV(point, p1, p2, p3, uv1, uv2, uv3, target) {\n if ($d5b33d7c30034067$var$warnedGetUV === false) {\n console.warn(\"THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().\");\n $d5b33d7c30034067$var$warnedGetUV = true;\n }\n return this.getInterpolation(point, p1, p2, p3, uv1, uv2, uv3, target);\n }\n static getInterpolation(point, p1, p2, p3, v1, v2, v3, target) {\n this.getBarycoord(point, p1, p2, p3, $d5b33d7c30034067$var$_v3$1);\n target.setScalar(0);\n target.addScaledVector(v1, $d5b33d7c30034067$var$_v3$1.x);\n target.addScaledVector(v2, $d5b33d7c30034067$var$_v3$1.y);\n target.addScaledVector(v3, $d5b33d7c30034067$var$_v3$1.z);\n return target;\n }\n static isFrontFacing(a, b, c, direction) {\n $d5b33d7c30034067$var$_v0$1.subVectors(c, b);\n $d5b33d7c30034067$var$_v1$3.subVectors(a, b);\n // strictly front facing\n return $d5b33d7c30034067$var$_v0$1.cross($d5b33d7c30034067$var$_v1$3).dot(direction) < 0 ? true : false;\n }\n set(a, b, c) {\n this.a.copy(a);\n this.b.copy(b);\n this.c.copy(c);\n return this;\n }\n setFromPointsAndIndices(points, i0, i1, i2) {\n this.a.copy(points[i0]);\n this.b.copy(points[i1]);\n this.c.copy(points[i2]);\n return this;\n }\n setFromAttributeAndIndices(attribute, i0, i1, i2) {\n this.a.fromBufferAttribute(attribute, i0);\n this.b.fromBufferAttribute(attribute, i1);\n this.c.fromBufferAttribute(attribute, i2);\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(triangle) {\n this.a.copy(triangle.a);\n this.b.copy(triangle.b);\n this.c.copy(triangle.c);\n return this;\n }\n getArea() {\n $d5b33d7c30034067$var$_v0$1.subVectors(this.c, this.b);\n $d5b33d7c30034067$var$_v1$3.subVectors(this.a, this.b);\n return $d5b33d7c30034067$var$_v0$1.cross($d5b33d7c30034067$var$_v1$3).length() * 0.5;\n }\n getMidpoint(target) {\n return target.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);\n }\n getNormal(target) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.getNormal(this.a, this.b, this.c, target);\n }\n getPlane(target) {\n return target.setFromCoplanarPoints(this.a, this.b, this.c);\n }\n getBarycoord(point, target) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.getBarycoord(point, this.a, this.b, this.c, target);\n }\n getUV(point, uv1, uv2, uv3, target) {\n if ($d5b33d7c30034067$var$warnedGetUV === false) {\n console.warn(\"THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().\");\n $d5b33d7c30034067$var$warnedGetUV = true;\n }\n return $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation(point, this.a, this.b, this.c, uv1, uv2, uv3, target);\n }\n getInterpolation(point, v1, v2, v3, target) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation(point, this.a, this.b, this.c, v1, v2, v3, target);\n }\n containsPoint(point) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.containsPoint(point, this.a, this.b, this.c);\n }\n isFrontFacing(direction) {\n return $d5b33d7c30034067$export$5a465592bfe74b48.isFrontFacing(this.a, this.b, this.c, direction);\n }\n intersectsBox(box) {\n return box.intersectsTriangle(this);\n }\n closestPointToPoint(p, target) {\n const a = this.a, b = this.b, c = this.c;\n let v, w;\n // algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n // published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n // under the accompanying license; see chapter 5.1.5 for detailed explanation.\n // basically, we're distinguishing which of the voronoi regions of the triangle\n // the point lies in with the minimum amount of redundant computation.\n $d5b33d7c30034067$var$_vab.subVectors(b, a);\n $d5b33d7c30034067$var$_vac.subVectors(c, a);\n $d5b33d7c30034067$var$_vap.subVectors(p, a);\n const d1 = $d5b33d7c30034067$var$_vab.dot($d5b33d7c30034067$var$_vap);\n const d2 = $d5b33d7c30034067$var$_vac.dot($d5b33d7c30034067$var$_vap);\n if (d1 <= 0 && d2 <= 0) // vertex region of A; barycentric coords (1, 0, 0)\n return target.copy(a);\n $d5b33d7c30034067$var$_vbp.subVectors(p, b);\n const d3 = $d5b33d7c30034067$var$_vab.dot($d5b33d7c30034067$var$_vbp);\n const d4 = $d5b33d7c30034067$var$_vac.dot($d5b33d7c30034067$var$_vbp);\n if (d3 >= 0 && d4 <= d3) // vertex region of B; barycentric coords (0, 1, 0)\n return target.copy(b);\n const vc = d1 * d4 - d3 * d2;\n if (vc <= 0 && d1 >= 0 && d3 <= 0) {\n v = d1 / (d1 - d3);\n // edge region of AB; barycentric coords (1-v, v, 0)\n return target.copy(a).addScaledVector($d5b33d7c30034067$var$_vab, v);\n }\n $d5b33d7c30034067$var$_vcp.subVectors(p, c);\n const d5 = $d5b33d7c30034067$var$_vab.dot($d5b33d7c30034067$var$_vcp);\n const d6 = $d5b33d7c30034067$var$_vac.dot($d5b33d7c30034067$var$_vcp);\n if (d6 >= 0 && d5 <= d6) // vertex region of C; barycentric coords (0, 0, 1)\n return target.copy(c);\n const vb = d5 * d2 - d1 * d6;\n if (vb <= 0 && d2 >= 0 && d6 <= 0) {\n w = d2 / (d2 - d6);\n // edge region of AC; barycentric coords (1-w, 0, w)\n return target.copy(a).addScaledVector($d5b33d7c30034067$var$_vac, w);\n }\n const va = d3 * d6 - d5 * d4;\n if (va <= 0 && d4 - d3 >= 0 && d5 - d6 >= 0) {\n $d5b33d7c30034067$var$_vbc.subVectors(c, b);\n w = (d4 - d3) / (d4 - d3 + (d5 - d6));\n // edge region of BC; barycentric coords (0, 1-w, w)\n return target.copy(b).addScaledVector($d5b33d7c30034067$var$_vbc, w); // edge region of BC\n }\n // face region\n const denom = 1 / (va + vb + vc);\n // u = va * denom\n v = vb * denom;\n w = vc * denom;\n return target.copy(a).addScaledVector($d5b33d7c30034067$var$_vab, v).addScaledVector($d5b33d7c30034067$var$_vac, w);\n }\n equals(triangle) {\n return triangle.a.equals(this.a) && triangle.b.equals(this.b) && triangle.c.equals(this.c);\n }\n}\nconst $d5b33d7c30034067$var$_colorKeywords = {\n \"aliceblue\": 0xF0F8FF,\n \"antiquewhite\": 0xFAEBD7,\n \"aqua\": 0x00FFFF,\n \"aquamarine\": 0x7FFFD4,\n \"azure\": 0xF0FFFF,\n \"beige\": 0xF5F5DC,\n \"bisque\": 0xFFE4C4,\n \"black\": 0x000000,\n \"blanchedalmond\": 0xFFEBCD,\n \"blue\": 0x0000FF,\n \"blueviolet\": 0x8A2BE2,\n \"brown\": 0xA52A2A,\n \"burlywood\": 0xDEB887,\n \"cadetblue\": 0x5F9EA0,\n \"chartreuse\": 0x7FFF00,\n \"chocolate\": 0xD2691E,\n \"coral\": 0xFF7F50,\n \"cornflowerblue\": 0x6495ED,\n \"cornsilk\": 0xFFF8DC,\n \"crimson\": 0xDC143C,\n \"cyan\": 0x00FFFF,\n \"darkblue\": 0x00008B,\n \"darkcyan\": 0x008B8B,\n \"darkgoldenrod\": 0xB8860B,\n \"darkgray\": 0xA9A9A9,\n \"darkgreen\": 0x006400,\n \"darkgrey\": 0xA9A9A9,\n \"darkkhaki\": 0xBDB76B,\n \"darkmagenta\": 0x8B008B,\n \"darkolivegreen\": 0x556B2F,\n \"darkorange\": 0xFF8C00,\n \"darkorchid\": 0x9932CC,\n \"darkred\": 0x8B0000,\n \"darksalmon\": 0xE9967A,\n \"darkseagreen\": 0x8FBC8F,\n \"darkslateblue\": 0x483D8B,\n \"darkslategray\": 0x2F4F4F,\n \"darkslategrey\": 0x2F4F4F,\n \"darkturquoise\": 0x00CED1,\n \"darkviolet\": 0x9400D3,\n \"deeppink\": 0xFF1493,\n \"deepskyblue\": 0x00BFFF,\n \"dimgray\": 0x696969,\n \"dimgrey\": 0x696969,\n \"dodgerblue\": 0x1E90FF,\n \"firebrick\": 0xB22222,\n \"floralwhite\": 0xFFFAF0,\n \"forestgreen\": 0x228B22,\n \"fuchsia\": 0xFF00FF,\n \"gainsboro\": 0xDCDCDC,\n \"ghostwhite\": 0xF8F8FF,\n \"gold\": 0xFFD700,\n \"goldenrod\": 0xDAA520,\n \"gray\": 0x808080,\n \"green\": 0x008000,\n \"greenyellow\": 0xADFF2F,\n \"grey\": 0x808080,\n \"honeydew\": 0xF0FFF0,\n \"hotpink\": 0xFF69B4,\n \"indianred\": 0xCD5C5C,\n \"indigo\": 0x4B0082,\n \"ivory\": 0xFFFFF0,\n \"khaki\": 0xF0E68C,\n \"lavender\": 0xE6E6FA,\n \"lavenderblush\": 0xFFF0F5,\n \"lawngreen\": 0x7CFC00,\n \"lemonchiffon\": 0xFFFACD,\n \"lightblue\": 0xADD8E6,\n \"lightcoral\": 0xF08080,\n \"lightcyan\": 0xE0FFFF,\n \"lightgoldenrodyellow\": 0xFAFAD2,\n \"lightgray\": 0xD3D3D3,\n \"lightgreen\": 0x90EE90,\n \"lightgrey\": 0xD3D3D3,\n \"lightpink\": 0xFFB6C1,\n \"lightsalmon\": 0xFFA07A,\n \"lightseagreen\": 0x20B2AA,\n \"lightskyblue\": 0x87CEFA,\n \"lightslategray\": 0x778899,\n \"lightslategrey\": 0x778899,\n \"lightsteelblue\": 0xB0C4DE,\n \"lightyellow\": 0xFFFFE0,\n \"lime\": 0x00FF00,\n \"limegreen\": 0x32CD32,\n \"linen\": 0xFAF0E6,\n \"magenta\": 0xFF00FF,\n \"maroon\": 0x800000,\n \"mediumaquamarine\": 0x66CDAA,\n \"mediumblue\": 0x0000CD,\n \"mediumorchid\": 0xBA55D3,\n \"mediumpurple\": 0x9370DB,\n \"mediumseagreen\": 0x3CB371,\n \"mediumslateblue\": 0x7B68EE,\n \"mediumspringgreen\": 0x00FA9A,\n \"mediumturquoise\": 0x48D1CC,\n \"mediumvioletred\": 0xC71585,\n \"midnightblue\": 0x191970,\n \"mintcream\": 0xF5FFFA,\n \"mistyrose\": 0xFFE4E1,\n \"moccasin\": 0xFFE4B5,\n \"navajowhite\": 0xFFDEAD,\n \"navy\": 0x000080,\n \"oldlace\": 0xFDF5E6,\n \"olive\": 0x808000,\n \"olivedrab\": 0x6B8E23,\n \"orange\": 0xFFA500,\n \"orangered\": 0xFF4500,\n \"orchid\": 0xDA70D6,\n \"palegoldenrod\": 0xEEE8AA,\n \"palegreen\": 0x98FB98,\n \"paleturquoise\": 0xAFEEEE,\n \"palevioletred\": 0xDB7093,\n \"papayawhip\": 0xFFEFD5,\n \"peachpuff\": 0xFFDAB9,\n \"peru\": 0xCD853F,\n \"pink\": 0xFFC0CB,\n \"plum\": 0xDDA0DD,\n \"powderblue\": 0xB0E0E6,\n \"purple\": 0x800080,\n \"rebeccapurple\": 0x663399,\n \"red\": 0xFF0000,\n \"rosybrown\": 0xBC8F8F,\n \"royalblue\": 0x4169E1,\n \"saddlebrown\": 0x8B4513,\n \"salmon\": 0xFA8072,\n \"sandybrown\": 0xF4A460,\n \"seagreen\": 0x2E8B57,\n \"seashell\": 0xFFF5EE,\n \"sienna\": 0xA0522D,\n \"silver\": 0xC0C0C0,\n \"skyblue\": 0x87CEEB,\n \"slateblue\": 0x6A5ACD,\n \"slategray\": 0x708090,\n \"slategrey\": 0x708090,\n \"snow\": 0xFFFAFA,\n \"springgreen\": 0x00FF7F,\n \"steelblue\": 0x4682B4,\n \"tan\": 0xD2B48C,\n \"teal\": 0x008080,\n \"thistle\": 0xD8BFD8,\n \"tomato\": 0xFF6347,\n \"turquoise\": 0x40E0D0,\n \"violet\": 0xEE82EE,\n \"wheat\": 0xF5DEB3,\n \"white\": 0xFFFFFF,\n \"whitesmoke\": 0xF5F5F5,\n \"yellow\": 0xFFFF00,\n \"yellowgreen\": 0x9ACD32\n};\nconst $d5b33d7c30034067$var$_hslA = {\n h: 0,\n s: 0,\n l: 0\n};\nconst $d5b33d7c30034067$var$_hslB = {\n h: 0,\n s: 0,\n l: 0\n};\nfunction $d5b33d7c30034067$var$hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 0.5) return q;\n if (t < 2 / 3) return p + (q - p) * 6 * (2 / 3 - t);\n return p;\n}\nclass $d5b33d7c30034067$export$892596cec99bc70e {\n constructor(r, g, b){\n this.isColor = true;\n this.r = 1;\n this.g = 1;\n this.b = 1;\n return this.set(r, g, b);\n }\n set(r, g, b) {\n if (g === undefined && b === undefined) {\n // r is THREE.Color, hex or string\n const value = r;\n if (value && value.isColor) this.copy(value);\n else if (typeof value === \"number\") this.setHex(value);\n else if (typeof value === \"string\") this.setStyle(value);\n } else this.setRGB(r, g, b);\n return this;\n }\n setScalar(scalar) {\n this.r = scalar;\n this.g = scalar;\n this.b = scalar;\n return this;\n }\n setHex(hex, colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n hex = Math.floor(hex);\n this.r = (hex >> 16 & 255) / 255;\n this.g = (hex >> 8 & 255) / 255;\n this.b = (hex & 255) / 255;\n $d5b33d7c30034067$export$5e6fd513f44698c.toWorkingColorSpace(this, colorSpace1);\n return this;\n }\n setRGB(r, g, b, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n this.r = r;\n this.g = g;\n this.b = b;\n $d5b33d7c30034067$export$5e6fd513f44698c.toWorkingColorSpace(this, colorSpace1);\n return this;\n }\n setHSL(h, s, l, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n // h,s,l ranges are in 0.0 - 1.0\n h = $d5b33d7c30034067$var$euclideanModulo(h, 1);\n s = $d5b33d7c30034067$var$clamp(s, 0, 1);\n l = $d5b33d7c30034067$var$clamp(l, 0, 1);\n if (s === 0) this.r = this.g = this.b = l;\n else {\n const p = l <= 0.5 ? l * (1 + s) : l + s - l * s;\n const q = 2 * l - p;\n this.r = $d5b33d7c30034067$var$hue2rgb(q, p, h + 1 / 3);\n this.g = $d5b33d7c30034067$var$hue2rgb(q, p, h);\n this.b = $d5b33d7c30034067$var$hue2rgb(q, p, h - 1 / 3);\n }\n $d5b33d7c30034067$export$5e6fd513f44698c.toWorkingColorSpace(this, colorSpace1);\n return this;\n }\n setStyle(style, colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n function handleAlpha(string) {\n if (string === undefined) return;\n if (parseFloat(string) < 1) console.warn(\"THREE.Color: Alpha component of \" + style + \" will be ignored.\");\n }\n let m;\n if (m = /^(\\w+)\\(([^\\)]*)\\)/.exec(style)) {\n // rgb / hsl\n let color;\n const name = m[1];\n const components = m[2];\n switch(name){\n case \"rgb\":\n case \"rgba\":\n if (color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n // rgb(255,0,0) rgba(255,0,0,0.5)\n handleAlpha(color[4]);\n return this.setRGB(Math.min(255, parseInt(color[1], 10)) / 255, Math.min(255, parseInt(color[2], 10)) / 255, Math.min(255, parseInt(color[3], 10)) / 255, colorSpace1);\n }\n if (color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n // rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n handleAlpha(color[4]);\n return this.setRGB(Math.min(100, parseInt(color[1], 10)) / 100, Math.min(100, parseInt(color[2], 10)) / 100, Math.min(100, parseInt(color[3], 10)) / 100, colorSpace1);\n }\n break;\n case \"hsl\":\n case \"hsla\":\n if (color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n // hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n handleAlpha(color[4]);\n return this.setHSL(parseFloat(color[1]) / 360, parseFloat(color[2]) / 100, parseFloat(color[3]) / 100, colorSpace1);\n }\n break;\n default:\n console.warn(\"THREE.Color: Unknown color model \" + style);\n }\n } else if (m = /^\\#([A-Fa-f\\d]+)$/.exec(style)) {\n // hex color\n const hex = m[1];\n const size = hex.length;\n if (size === 3) // #ff0\n return this.setRGB(parseInt(hex.charAt(0), 16) / 15, parseInt(hex.charAt(1), 16) / 15, parseInt(hex.charAt(2), 16) / 15, colorSpace1);\n else if (size === 6) // #ff0000\n return this.setHex(parseInt(hex, 16), colorSpace1);\n else console.warn(\"THREE.Color: Invalid hex color \" + style);\n } else if (style && style.length > 0) return this.setColorName(style, colorSpace1);\n return this;\n }\n setColorName(style, colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n // color keywords\n const hex = $d5b33d7c30034067$var$_colorKeywords[style.toLowerCase()];\n if (hex !== undefined) // red\n this.setHex(hex, colorSpace1);\n else // unknown color\n console.warn(\"THREE.Color: Unknown color \" + style);\n return this;\n }\n clone() {\n return new this.constructor(this.r, this.g, this.b);\n }\n copy(color) {\n this.r = color.r;\n this.g = color.g;\n this.b = color.b;\n return this;\n }\n copySRGBToLinear(color) {\n this.r = $d5b33d7c30034067$var$SRGBToLinear(color.r);\n this.g = $d5b33d7c30034067$var$SRGBToLinear(color.g);\n this.b = $d5b33d7c30034067$var$SRGBToLinear(color.b);\n return this;\n }\n copyLinearToSRGB(color) {\n this.r = $d5b33d7c30034067$var$LinearToSRGB(color.r);\n this.g = $d5b33d7c30034067$var$LinearToSRGB(color.g);\n this.b = $d5b33d7c30034067$var$LinearToSRGB(color.b);\n return this;\n }\n convertSRGBToLinear() {\n this.copySRGBToLinear(this);\n return this;\n }\n convertLinearToSRGB() {\n this.copyLinearToSRGB(this);\n return this;\n }\n getHex(colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n return Math.round($d5b33d7c30034067$var$clamp($d5b33d7c30034067$var$_color.r * 255, 0, 255)) * 65536 + Math.round($d5b33d7c30034067$var$clamp($d5b33d7c30034067$var$_color.g * 255, 0, 255)) * 256 + Math.round($d5b33d7c30034067$var$clamp($d5b33d7c30034067$var$_color.b * 255, 0, 255));\n }\n getHexString(colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n return (\"000000\" + this.getHex(colorSpace1).toString(16)).slice(-6);\n }\n getHSL(target, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n // h,s,l ranges are in 0.0 - 1.0\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n const r = $d5b33d7c30034067$var$_color.r, g = $d5b33d7c30034067$var$_color.g, b = $d5b33d7c30034067$var$_color.b;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let hue, saturation;\n const lightness = (min + max) / 2.0;\n if (min === max) {\n hue = 0;\n saturation = 0;\n } else {\n const delta = max - min;\n saturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min);\n switch(max){\n case r:\n hue = (g - b) / delta + (g < b ? 6 : 0);\n break;\n case g:\n hue = (b - r) / delta + 2;\n break;\n case b:\n hue = (r - g) / delta + 4;\n break;\n }\n hue /= 6;\n }\n target.h = hue;\n target.s = saturation;\n target.l = lightness;\n return target;\n }\n getRGB(target, colorSpace1 = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace) {\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n target.r = $d5b33d7c30034067$var$_color.r;\n target.g = $d5b33d7c30034067$var$_color.g;\n target.b = $d5b33d7c30034067$var$_color.b;\n return target;\n }\n getStyle(colorSpace1 = $d5b33d7c30034067$export$561f394b24edfcaa) {\n $d5b33d7c30034067$export$5e6fd513f44698c.fromWorkingColorSpace($d5b33d7c30034067$var$_color.copy(this), colorSpace1);\n const r = $d5b33d7c30034067$var$_color.r, g = $d5b33d7c30034067$var$_color.g, b = $d5b33d7c30034067$var$_color.b;\n if (colorSpace1 !== $d5b33d7c30034067$export$561f394b24edfcaa) // Requires CSS Color Module Level 4 (https://www.w3.org/TR/css-color-4/).\n return `color(${colorSpace1} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`;\n return `rgb(${Math.round(r * 255)},${Math.round(g * 255)},${Math.round(b * 255)})`;\n }\n offsetHSL(h, s, l) {\n this.getHSL($d5b33d7c30034067$var$_hslA);\n return this.setHSL($d5b33d7c30034067$var$_hslA.h + h, $d5b33d7c30034067$var$_hslA.s + s, $d5b33d7c30034067$var$_hslA.l + l);\n }\n add(color) {\n this.r += color.r;\n this.g += color.g;\n this.b += color.b;\n return this;\n }\n addColors(color1, color2) {\n this.r = color1.r + color2.r;\n this.g = color1.g + color2.g;\n this.b = color1.b + color2.b;\n return this;\n }\n addScalar(s) {\n this.r += s;\n this.g += s;\n this.b += s;\n return this;\n }\n sub(color) {\n this.r = Math.max(0, this.r - color.r);\n this.g = Math.max(0, this.g - color.g);\n this.b = Math.max(0, this.b - color.b);\n return this;\n }\n multiply(color) {\n this.r *= color.r;\n this.g *= color.g;\n this.b *= color.b;\n return this;\n }\n multiplyScalar(s) {\n this.r *= s;\n this.g *= s;\n this.b *= s;\n return this;\n }\n lerp(color, alpha) {\n this.r += (color.r - this.r) * alpha;\n this.g += (color.g - this.g) * alpha;\n this.b += (color.b - this.b) * alpha;\n return this;\n }\n lerpColors(color1, color2, alpha) {\n this.r = color1.r + (color2.r - color1.r) * alpha;\n this.g = color1.g + (color2.g - color1.g) * alpha;\n this.b = color1.b + (color2.b - color1.b) * alpha;\n return this;\n }\n lerpHSL(color, alpha) {\n this.getHSL($d5b33d7c30034067$var$_hslA);\n color.getHSL($d5b33d7c30034067$var$_hslB);\n const h = $d5b33d7c30034067$var$lerp($d5b33d7c30034067$var$_hslA.h, $d5b33d7c30034067$var$_hslB.h, alpha);\n const s = $d5b33d7c30034067$var$lerp($d5b33d7c30034067$var$_hslA.s, $d5b33d7c30034067$var$_hslB.s, alpha);\n const l = $d5b33d7c30034067$var$lerp($d5b33d7c30034067$var$_hslA.l, $d5b33d7c30034067$var$_hslB.l, alpha);\n this.setHSL(h, s, l);\n return this;\n }\n setFromVector3(v) {\n this.r = v.x;\n this.g = v.y;\n this.b = v.z;\n return this;\n }\n applyMatrix3(m) {\n const r = this.r, g = this.g, b = this.b;\n const e = m.elements;\n this.r = e[0] * r + e[3] * g + e[6] * b;\n this.g = e[1] * r + e[4] * g + e[7] * b;\n this.b = e[2] * r + e[5] * g + e[8] * b;\n return this;\n }\n equals(c) {\n return c.r === this.r && c.g === this.g && c.b === this.b;\n }\n fromArray(array, offset = 0) {\n this.r = array[offset];\n this.g = array[offset + 1];\n this.b = array[offset + 2];\n return this;\n }\n toArray(array = [], offset = 0) {\n array[offset] = this.r;\n array[offset + 1] = this.g;\n array[offset + 2] = this.b;\n return array;\n }\n fromBufferAttribute(attribute, index) {\n this.r = attribute.getX(index);\n this.g = attribute.getY(index);\n this.b = attribute.getZ(index);\n return this;\n }\n toJSON() {\n return this.getHex();\n }\n *[Symbol.iterator]() {\n yield this.r;\n yield this.g;\n yield this.b;\n }\n}\nconst $d5b33d7c30034067$var$_color = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\n$d5b33d7c30034067$export$892596cec99bc70e.NAMES = $d5b33d7c30034067$var$_colorKeywords;\nlet $d5b33d7c30034067$var$_materialId = 0;\nclass $d5b33d7c30034067$export$a2d8b23205c25948 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isMaterial = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_materialId++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.type = \"Material\";\n this.blending = $d5b33d7c30034067$export$5b29a26d96ee6af0;\n this.side = $d5b33d7c30034067$export$2ede184fc2998901;\n this.vertexColors = false;\n this.opacity = 1;\n this.transparent = false;\n this.alphaHash = false;\n this.blendSrc = $d5b33d7c30034067$export$d5773124e86cf28c;\n this.blendDst = $d5b33d7c30034067$export$11d468cc7f19e971;\n this.blendEquation = $d5b33d7c30034067$export$20183a0484ce21a0;\n this.blendSrcAlpha = null;\n this.blendDstAlpha = null;\n this.blendEquationAlpha = null;\n this.blendColor = new $d5b33d7c30034067$export$892596cec99bc70e(0, 0, 0);\n this.blendAlpha = 0;\n this.depthFunc = $d5b33d7c30034067$export$296f78a0b892f81a;\n this.depthTest = true;\n this.depthWrite = true;\n this.stencilWriteMask = 0xff;\n this.stencilFunc = $d5b33d7c30034067$export$14cf96713ddd97a8;\n this.stencilRef = 0;\n this.stencilFuncMask = 0xff;\n this.stencilFail = $d5b33d7c30034067$export$9f542ae4b5baca34;\n this.stencilZFail = $d5b33d7c30034067$export$9f542ae4b5baca34;\n this.stencilZPass = $d5b33d7c30034067$export$9f542ae4b5baca34;\n this.stencilWrite = false;\n this.clippingPlanes = null;\n this.clipIntersection = false;\n this.clipShadows = false;\n this.shadowSide = null;\n this.colorWrite = true;\n this.precision = null; // override the renderer's default precision for this material\n this.polygonOffset = false;\n this.polygonOffsetFactor = 0;\n this.polygonOffsetUnits = 0;\n this.dithering = false;\n this.alphaToCoverage = false;\n this.premultipliedAlpha = false;\n this.forceSinglePass = false;\n this.visible = true;\n this.toneMapped = true;\n this.userData = {};\n this.version = 0;\n this._alphaTest = 0;\n }\n get alphaTest() {\n return this._alphaTest;\n }\n set alphaTest(value) {\n if (this._alphaTest > 0 !== value > 0) this.version++;\n this._alphaTest = value;\n }\n onBuild() {}\n onBeforeRender() {}\n onBeforeCompile() {}\n customProgramCacheKey() {\n return this.onBeforeCompile.toString();\n }\n setValues(values) {\n if (values === undefined) return;\n for(const key in values){\n const newValue = values[key];\n if (newValue === undefined) {\n console.warn(`THREE.Material: parameter '${key}' has value of undefined.`);\n continue;\n }\n const currentValue = this[key];\n if (currentValue === undefined) {\n console.warn(`THREE.Material: '${key}' is not a property of THREE.${this.type}.`);\n continue;\n }\n if (currentValue && currentValue.isColor) currentValue.set(newValue);\n else if (currentValue && currentValue.isVector3 && newValue && newValue.isVector3) currentValue.copy(newValue);\n else this[key] = newValue;\n }\n }\n toJSON(meta) {\n const isRootObject = meta === undefined || typeof meta === \"string\";\n if (isRootObject) meta = {\n textures: {},\n images: {}\n };\n const data = {\n metadata: {\n version: 4.6,\n type: \"Material\",\n generator: \"Material.toJSON\"\n }\n };\n // standard Material serialization\n data.uuid = this.uuid;\n data.type = this.type;\n if (this.name !== \"\") data.name = this.name;\n if (this.color && this.color.isColor) data.color = this.color.getHex();\n if (this.roughness !== undefined) data.roughness = this.roughness;\n if (this.metalness !== undefined) data.metalness = this.metalness;\n if (this.sheen !== undefined) data.sheen = this.sheen;\n if (this.sheenColor && this.sheenColor.isColor) data.sheenColor = this.sheenColor.getHex();\n if (this.sheenRoughness !== undefined) data.sheenRoughness = this.sheenRoughness;\n if (this.emissive && this.emissive.isColor) data.emissive = this.emissive.getHex();\n if (this.emissiveIntensity && this.emissiveIntensity !== 1) data.emissiveIntensity = this.emissiveIntensity;\n if (this.specular && this.specular.isColor) data.specular = this.specular.getHex();\n if (this.specularIntensity !== undefined) data.specularIntensity = this.specularIntensity;\n if (this.specularColor && this.specularColor.isColor) data.specularColor = this.specularColor.getHex();\n if (this.shininess !== undefined) data.shininess = this.shininess;\n if (this.clearcoat !== undefined) data.clearcoat = this.clearcoat;\n if (this.clearcoatRoughness !== undefined) data.clearcoatRoughness = this.clearcoatRoughness;\n if (this.clearcoatMap && this.clearcoatMap.isTexture) data.clearcoatMap = this.clearcoatMap.toJSON(meta).uuid;\n if (this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture) data.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(meta).uuid;\n if (this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture) {\n data.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(meta).uuid;\n data.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n }\n if (this.iridescence !== undefined) data.iridescence = this.iridescence;\n if (this.iridescenceIOR !== undefined) data.iridescenceIOR = this.iridescenceIOR;\n if (this.iridescenceThicknessRange !== undefined) data.iridescenceThicknessRange = this.iridescenceThicknessRange;\n if (this.iridescenceMap && this.iridescenceMap.isTexture) data.iridescenceMap = this.iridescenceMap.toJSON(meta).uuid;\n if (this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture) data.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(meta).uuid;\n if (this.anisotropy !== undefined) data.anisotropy = this.anisotropy;\n if (this.anisotropyRotation !== undefined) data.anisotropyRotation = this.anisotropyRotation;\n if (this.anisotropyMap && this.anisotropyMap.isTexture) data.anisotropyMap = this.anisotropyMap.toJSON(meta).uuid;\n if (this.map && this.map.isTexture) data.map = this.map.toJSON(meta).uuid;\n if (this.matcap && this.matcap.isTexture) data.matcap = this.matcap.toJSON(meta).uuid;\n if (this.alphaMap && this.alphaMap.isTexture) data.alphaMap = this.alphaMap.toJSON(meta).uuid;\n if (this.lightMap && this.lightMap.isTexture) {\n data.lightMap = this.lightMap.toJSON(meta).uuid;\n data.lightMapIntensity = this.lightMapIntensity;\n }\n if (this.aoMap && this.aoMap.isTexture) {\n data.aoMap = this.aoMap.toJSON(meta).uuid;\n data.aoMapIntensity = this.aoMapIntensity;\n }\n if (this.bumpMap && this.bumpMap.isTexture) {\n data.bumpMap = this.bumpMap.toJSON(meta).uuid;\n data.bumpScale = this.bumpScale;\n }\n if (this.normalMap && this.normalMap.isTexture) {\n data.normalMap = this.normalMap.toJSON(meta).uuid;\n data.normalMapType = this.normalMapType;\n data.normalScale = this.normalScale.toArray();\n }\n if (this.displacementMap && this.displacementMap.isTexture) {\n data.displacementMap = this.displacementMap.toJSON(meta).uuid;\n data.displacementScale = this.displacementScale;\n data.displacementBias = this.displacementBias;\n }\n if (this.roughnessMap && this.roughnessMap.isTexture) data.roughnessMap = this.roughnessMap.toJSON(meta).uuid;\n if (this.metalnessMap && this.metalnessMap.isTexture) data.metalnessMap = this.metalnessMap.toJSON(meta).uuid;\n if (this.emissiveMap && this.emissiveMap.isTexture) data.emissiveMap = this.emissiveMap.toJSON(meta).uuid;\n if (this.specularMap && this.specularMap.isTexture) data.specularMap = this.specularMap.toJSON(meta).uuid;\n if (this.specularIntensityMap && this.specularIntensityMap.isTexture) data.specularIntensityMap = this.specularIntensityMap.toJSON(meta).uuid;\n if (this.specularColorMap && this.specularColorMap.isTexture) data.specularColorMap = this.specularColorMap.toJSON(meta).uuid;\n if (this.envMap && this.envMap.isTexture) {\n data.envMap = this.envMap.toJSON(meta).uuid;\n if (this.combine !== undefined) data.combine = this.combine;\n }\n if (this.envMapIntensity !== undefined) data.envMapIntensity = this.envMapIntensity;\n if (this.reflectivity !== undefined) data.reflectivity = this.reflectivity;\n if (this.refractionRatio !== undefined) data.refractionRatio = this.refractionRatio;\n if (this.gradientMap && this.gradientMap.isTexture) data.gradientMap = this.gradientMap.toJSON(meta).uuid;\n if (this.transmission !== undefined) data.transmission = this.transmission;\n if (this.transmissionMap && this.transmissionMap.isTexture) data.transmissionMap = this.transmissionMap.toJSON(meta).uuid;\n if (this.thickness !== undefined) data.thickness = this.thickness;\n if (this.thicknessMap && this.thicknessMap.isTexture) data.thicknessMap = this.thicknessMap.toJSON(meta).uuid;\n if (this.attenuationDistance !== undefined && this.attenuationDistance !== Infinity) data.attenuationDistance = this.attenuationDistance;\n if (this.attenuationColor !== undefined) data.attenuationColor = this.attenuationColor.getHex();\n if (this.size !== undefined) data.size = this.size;\n if (this.shadowSide !== null) data.shadowSide = this.shadowSide;\n if (this.sizeAttenuation !== undefined) data.sizeAttenuation = this.sizeAttenuation;\n if (this.blending !== $d5b33d7c30034067$export$5b29a26d96ee6af0) data.blending = this.blending;\n if (this.side !== $d5b33d7c30034067$export$2ede184fc2998901) data.side = this.side;\n if (this.vertexColors === true) data.vertexColors = true;\n if (this.opacity < 1) data.opacity = this.opacity;\n if (this.transparent === true) data.transparent = true;\n if (this.blendSrc !== $d5b33d7c30034067$export$d5773124e86cf28c) data.blendSrc = this.blendSrc;\n if (this.blendDst !== $d5b33d7c30034067$export$11d468cc7f19e971) data.blendDst = this.blendDst;\n if (this.blendEquation !== $d5b33d7c30034067$export$20183a0484ce21a0) data.blendEquation = this.blendEquation;\n if (this.blendSrcAlpha !== null) data.blendSrcAlpha = this.blendSrcAlpha;\n if (this.blendDstAlpha !== null) data.blendDstAlpha = this.blendDstAlpha;\n if (this.blendEquationAlpha !== null) data.blendEquationAlpha = this.blendEquationAlpha;\n if (this.blendColor && this.blendColor.isColor) data.blendColor = this.blendColor.getHex();\n if (this.blendAlpha !== 0) data.blendAlpha = this.blendAlpha;\n if (this.depthFunc !== $d5b33d7c30034067$export$296f78a0b892f81a) data.depthFunc = this.depthFunc;\n if (this.depthTest === false) data.depthTest = this.depthTest;\n if (this.depthWrite === false) data.depthWrite = this.depthWrite;\n if (this.colorWrite === false) data.colorWrite = this.colorWrite;\n if (this.stencilWriteMask !== 0xff) data.stencilWriteMask = this.stencilWriteMask;\n if (this.stencilFunc !== $d5b33d7c30034067$export$14cf96713ddd97a8) data.stencilFunc = this.stencilFunc;\n if (this.stencilRef !== 0) data.stencilRef = this.stencilRef;\n if (this.stencilFuncMask !== 0xff) data.stencilFuncMask = this.stencilFuncMask;\n if (this.stencilFail !== $d5b33d7c30034067$export$9f542ae4b5baca34) data.stencilFail = this.stencilFail;\n if (this.stencilZFail !== $d5b33d7c30034067$export$9f542ae4b5baca34) data.stencilZFail = this.stencilZFail;\n if (this.stencilZPass !== $d5b33d7c30034067$export$9f542ae4b5baca34) data.stencilZPass = this.stencilZPass;\n if (this.stencilWrite === true) data.stencilWrite = this.stencilWrite;\n // rotation (SpriteMaterial)\n if (this.rotation !== undefined && this.rotation !== 0) data.rotation = this.rotation;\n if (this.polygonOffset === true) data.polygonOffset = true;\n if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;\n if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;\n if (this.linewidth !== undefined && this.linewidth !== 1) data.linewidth = this.linewidth;\n if (this.dashSize !== undefined) data.dashSize = this.dashSize;\n if (this.gapSize !== undefined) data.gapSize = this.gapSize;\n if (this.scale !== undefined) data.scale = this.scale;\n if (this.dithering === true) data.dithering = true;\n if (this.alphaTest > 0) data.alphaTest = this.alphaTest;\n if (this.alphaHash === true) data.alphaHash = true;\n if (this.alphaToCoverage === true) data.alphaToCoverage = true;\n if (this.premultipliedAlpha === true) data.premultipliedAlpha = true;\n if (this.forceSinglePass === true) data.forceSinglePass = true;\n if (this.wireframe === true) data.wireframe = true;\n if (this.wireframeLinewidth > 1) data.wireframeLinewidth = this.wireframeLinewidth;\n if (this.wireframeLinecap !== \"round\") data.wireframeLinecap = this.wireframeLinecap;\n if (this.wireframeLinejoin !== \"round\") data.wireframeLinejoin = this.wireframeLinejoin;\n if (this.flatShading === true) data.flatShading = true;\n if (this.visible === false) data.visible = false;\n if (this.toneMapped === false) data.toneMapped = false;\n if (this.fog === false) data.fog = false;\n if (Object.keys(this.userData).length > 0) data.userData = this.userData;\n // TODO: Copied from Object3D.toJSON\n function extractFromCache(cache) {\n const values = [];\n for(const key in cache){\n const data = cache[key];\n delete data.metadata;\n values.push(data);\n }\n return values;\n }\n if (isRootObject) {\n const textures = extractFromCache(meta.textures);\n const images = extractFromCache(meta.images);\n if (textures.length > 0) data.textures = textures;\n if (images.length > 0) data.images = images;\n }\n return data;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.name = source.name;\n this.blending = source.blending;\n this.side = source.side;\n this.vertexColors = source.vertexColors;\n this.opacity = source.opacity;\n this.transparent = source.transparent;\n this.blendSrc = source.blendSrc;\n this.blendDst = source.blendDst;\n this.blendEquation = source.blendEquation;\n this.blendSrcAlpha = source.blendSrcAlpha;\n this.blendDstAlpha = source.blendDstAlpha;\n this.blendEquationAlpha = source.blendEquationAlpha;\n this.blendColor.copy(source.blendColor);\n this.blendAlpha = source.blendAlpha;\n this.depthFunc = source.depthFunc;\n this.depthTest = source.depthTest;\n this.depthWrite = source.depthWrite;\n this.stencilWriteMask = source.stencilWriteMask;\n this.stencilFunc = source.stencilFunc;\n this.stencilRef = source.stencilRef;\n this.stencilFuncMask = source.stencilFuncMask;\n this.stencilFail = source.stencilFail;\n this.stencilZFail = source.stencilZFail;\n this.stencilZPass = source.stencilZPass;\n this.stencilWrite = source.stencilWrite;\n const srcPlanes = source.clippingPlanes;\n let dstPlanes = null;\n if (srcPlanes !== null) {\n const n = srcPlanes.length;\n dstPlanes = new Array(n);\n for(let i = 0; i !== n; ++i)dstPlanes[i] = srcPlanes[i].clone();\n }\n this.clippingPlanes = dstPlanes;\n this.clipIntersection = source.clipIntersection;\n this.clipShadows = source.clipShadows;\n this.shadowSide = source.shadowSide;\n this.colorWrite = source.colorWrite;\n this.precision = source.precision;\n this.polygonOffset = source.polygonOffset;\n this.polygonOffsetFactor = source.polygonOffsetFactor;\n this.polygonOffsetUnits = source.polygonOffsetUnits;\n this.dithering = source.dithering;\n this.alphaTest = source.alphaTest;\n this.alphaHash = source.alphaHash;\n this.alphaToCoverage = source.alphaToCoverage;\n this.premultipliedAlpha = source.premultipliedAlpha;\n this.forceSinglePass = source.forceSinglePass;\n this.visible = source.visible;\n this.toneMapped = source.toneMapped;\n this.userData = JSON.parse(JSON.stringify(source.userData));\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n}\nclass $d5b33d7c30034067$export$55cbcc9b622fe1f5 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshBasicMaterial = true;\n this.type = \"MeshBasicMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // emissive\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.specularMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.combine = $d5b33d7c30034067$export$e50ac29801f1774d;\n this.reflectivity = 1;\n this.refractionRatio = 0.98;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.specularMap = source.specularMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.combine = source.combine;\n this.reflectivity = source.reflectivity;\n this.refractionRatio = source.refractionRatio;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.fog = source.fog;\n return this;\n }\n}\n// Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf\nconst $d5b33d7c30034067$var$_tables = /*@__PURE__*/ $d5b33d7c30034067$var$_generateTables();\nfunction $d5b33d7c30034067$var$_generateTables() {\n // float32 to float16 helpers\n const buffer = new ArrayBuffer(4);\n const floatView = new Float32Array(buffer);\n const uint32View = new Uint32Array(buffer);\n const baseTable = new Uint32Array(512);\n const shiftTable = new Uint32Array(512);\n for(let i = 0; i < 256; ++i){\n const e = i - 127;\n // very small number (0, -0)\n if (e < -27) {\n baseTable[i] = 0x0000;\n baseTable[i | 0x100] = 0x8000;\n shiftTable[i] = 24;\n shiftTable[i | 0x100] = 24;\n // small number (denorm)\n } else if (e < -14) {\n baseTable[i] = 0x0400 >> -e - 14;\n baseTable[i | 0x100] = 0x0400 >> -e - 14 | 0x8000;\n shiftTable[i] = -e - 1;\n shiftTable[i | 0x100] = -e - 1;\n // normal number\n } else if (e <= 15) {\n baseTable[i] = e + 15 << 10;\n baseTable[i | 0x100] = e + 15 << 10 | 0x8000;\n shiftTable[i] = 13;\n shiftTable[i | 0x100] = 13;\n // large number (Infinity, -Infinity)\n } else if (e < 128) {\n baseTable[i] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i] = 24;\n shiftTable[i | 0x100] = 24;\n // stay (NaN, Infinity, -Infinity)\n } else {\n baseTable[i] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i] = 13;\n shiftTable[i | 0x100] = 13;\n }\n }\n // float16 to float32 helpers\n const mantissaTable = new Uint32Array(2048);\n const exponentTable = new Uint32Array(64);\n const offsetTable = new Uint32Array(64);\n for(let i = 1; i < 1024; ++i){\n let m = i << 13; // zero pad mantissa bits\n let e = 0; // zero exponent\n // normalized\n while((m & 0x00800000) === 0){\n m <<= 1;\n e -= 0x00800000; // decrement exponent\n }\n m &= -8388609; // clear leading 1 bit\n e += 0x38800000; // adjust bias\n mantissaTable[i] = m | e;\n }\n for(let i = 1024; i < 2048; ++i)mantissaTable[i] = 0x38000000 + (i - 1024 << 13);\n for(let i = 1; i < 31; ++i)exponentTable[i] = i << 23;\n exponentTable[31] = 0x47800000;\n exponentTable[32] = 0x80000000;\n for(let i = 33; i < 63; ++i)exponentTable[i] = 0x80000000 + (i - 32 << 23);\n exponentTable[63] = 0xc7800000;\n for(let i = 1; i < 64; ++i)if (i !== 32) offsetTable[i] = 1024;\n return {\n floatView: floatView,\n uint32View: uint32View,\n baseTable: baseTable,\n shiftTable: shiftTable,\n mantissaTable: mantissaTable,\n exponentTable: exponentTable,\n offsetTable: offsetTable\n };\n}\n// float32 to float16\nfunction $d5b33d7c30034067$var$toHalfFloat(val) {\n if (Math.abs(val) > 65504) console.warn(\"THREE.DataUtils.toHalfFloat(): Value out of range.\");\n val = $d5b33d7c30034067$var$clamp(val, -65504, 65504);\n $d5b33d7c30034067$var$_tables.floatView[0] = val;\n const f = $d5b33d7c30034067$var$_tables.uint32View[0];\n const e = f >> 23 & 0x1ff;\n return $d5b33d7c30034067$var$_tables.baseTable[e] + ((f & 0x007fffff) >> $d5b33d7c30034067$var$_tables.shiftTable[e]);\n}\n// float16 to float32\nfunction $d5b33d7c30034067$var$fromHalfFloat(val) {\n const m = val >> 10;\n $d5b33d7c30034067$var$_tables.uint32View[0] = $d5b33d7c30034067$var$_tables.mantissaTable[$d5b33d7c30034067$var$_tables.offsetTable[m] + (val & 0x3ff)] + $d5b33d7c30034067$var$_tables.exponentTable[m];\n return $d5b33d7c30034067$var$_tables.floatView[0];\n}\nconst $d5b33d7c30034067$export$11ce8b759162cc80 = {\n toHalfFloat: $d5b33d7c30034067$var$toHalfFloat,\n fromHalfFloat: $d5b33d7c30034067$var$fromHalfFloat\n};\nconst $d5b33d7c30034067$var$_vector$8 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vector2$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nclass $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized = false){\n if (Array.isArray(array)) throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");\n this.isBufferAttribute = true;\n this.name = \"\";\n this.array = array;\n this.itemSize = itemSize;\n this.count = array !== undefined ? array.length / itemSize : 0;\n this.normalized = normalized;\n this.usage = $d5b33d7c30034067$export$763e8360f4d7f77d;\n this.updateRange = {\n offset: 0,\n count: -1\n };\n this.gpuType = $d5b33d7c30034067$export$f6d331659b644596;\n this.version = 0;\n }\n onUploadCallback() {}\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n setUsage(value) {\n this.usage = value;\n return this;\n }\n copy(source) {\n this.name = source.name;\n this.array = new source.array.constructor(source.array);\n this.itemSize = source.itemSize;\n this.count = source.count;\n this.normalized = source.normalized;\n this.usage = source.usage;\n this.gpuType = source.gpuType;\n return this;\n }\n copyAt(index1, attribute, index2) {\n index1 *= this.itemSize;\n index2 *= attribute.itemSize;\n for(let i = 0, l = this.itemSize; i < l; i++)this.array[index1 + i] = attribute.array[index2 + i];\n return this;\n }\n copyArray(array) {\n this.array.set(array);\n return this;\n }\n applyMatrix3(m) {\n if (this.itemSize === 2) for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector2$1.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector2$1.applyMatrix3(m);\n this.setXY(i, $d5b33d7c30034067$var$_vector2$1.x, $d5b33d7c30034067$var$_vector2$1.y);\n }\n else if (this.itemSize === 3) for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.applyMatrix3(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n applyMatrix4(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.applyMatrix4(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n applyNormalMatrix(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.applyNormalMatrix(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n transformDirection(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$8.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$8.transformDirection(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$8.x, $d5b33d7c30034067$var$_vector$8.y, $d5b33d7c30034067$var$_vector$8.z);\n }\n return this;\n }\n set(value, offset = 0) {\n // Matching BufferAttribute constructor, do not normalize the array.\n this.array.set(value, offset);\n return this;\n }\n getComponent(index, component) {\n let value = this.array[index * this.itemSize + component];\n if (this.normalized) value = $d5b33d7c30034067$var$denormalize(value, this.array);\n return value;\n }\n setComponent(index, component, value) {\n if (this.normalized) value = $d5b33d7c30034067$var$normalize(value, this.array);\n this.array[index * this.itemSize + component] = value;\n return this;\n }\n getX(index) {\n let x = this.array[index * this.itemSize];\n if (this.normalized) x = $d5b33d7c30034067$var$denormalize(x, this.array);\n return x;\n }\n setX(index, x) {\n if (this.normalized) x = $d5b33d7c30034067$var$normalize(x, this.array);\n this.array[index * this.itemSize] = x;\n return this;\n }\n getY(index) {\n let y = this.array[index * this.itemSize + 1];\n if (this.normalized) y = $d5b33d7c30034067$var$denormalize(y, this.array);\n return y;\n }\n setY(index, y) {\n if (this.normalized) y = $d5b33d7c30034067$var$normalize(y, this.array);\n this.array[index * this.itemSize + 1] = y;\n return this;\n }\n getZ(index) {\n let z = this.array[index * this.itemSize + 2];\n if (this.normalized) z = $d5b33d7c30034067$var$denormalize(z, this.array);\n return z;\n }\n setZ(index, z) {\n if (this.normalized) z = $d5b33d7c30034067$var$normalize(z, this.array);\n this.array[index * this.itemSize + 2] = z;\n return this;\n }\n getW(index) {\n let w = this.array[index * this.itemSize + 3];\n if (this.normalized) w = $d5b33d7c30034067$var$denormalize(w, this.array);\n return w;\n }\n setW(index, w) {\n if (this.normalized) w = $d5b33d7c30034067$var$normalize(w, this.array);\n this.array[index * this.itemSize + 3] = w;\n return this;\n }\n setXY(index, x, y) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n }\n this.array[index + 0] = x;\n this.array[index + 1] = y;\n return this;\n }\n setXYZ(index, x, y, z) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n }\n this.array[index + 0] = x;\n this.array[index + 1] = y;\n this.array[index + 2] = z;\n return this;\n }\n setXYZW(index, x, y, z, w) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n w = $d5b33d7c30034067$var$normalize(w, this.array);\n }\n this.array[index + 0] = x;\n this.array[index + 1] = y;\n this.array[index + 2] = z;\n this.array[index + 3] = w;\n return this;\n }\n onUpload(callback) {\n this.onUploadCallback = callback;\n return this;\n }\n clone() {\n return new this.constructor(this.array, this.itemSize).copy(this);\n }\n toJSON() {\n const data = {\n itemSize: this.itemSize,\n type: this.array.constructor.name,\n array: Array.from(this.array),\n normalized: this.normalized\n };\n if (this.name !== \"\") data.name = this.name;\n if (this.usage !== $d5b33d7c30034067$export$763e8360f4d7f77d) data.usage = this.usage;\n if (this.updateRange.offset !== 0 || this.updateRange.count !== -1) data.updateRange = this.updateRange;\n return data;\n }\n}\n//\nclass $d5b33d7c30034067$export$f9ff2d6a20248cbf extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Int8Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$cacc90cf35d11cdd extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint8Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$baaa85a1a812c157 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint8ClampedArray(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$2b755a102ccdcefe extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Int16Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$640a853f68025f2e extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint16Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$46b369aed2968a0a extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Int32Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$7eb8c9fa25cd5bd6 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint32Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$dbd3698c64958d69 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Uint16Array(array), itemSize, normalized);\n this.isFloat16BufferAttribute = true;\n }\n getX(index) {\n let x = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize]);\n if (this.normalized) x = $d5b33d7c30034067$var$denormalize(x, this.array);\n return x;\n }\n setX(index, x) {\n if (this.normalized) x = $d5b33d7c30034067$var$normalize(x, this.array);\n this.array[index * this.itemSize] = $d5b33d7c30034067$var$toHalfFloat(x);\n return this;\n }\n getY(index) {\n let y = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize + 1]);\n if (this.normalized) y = $d5b33d7c30034067$var$denormalize(y, this.array);\n return y;\n }\n setY(index, y) {\n if (this.normalized) y = $d5b33d7c30034067$var$normalize(y, this.array);\n this.array[index * this.itemSize + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n return this;\n }\n getZ(index) {\n let z = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize + 2]);\n if (this.normalized) z = $d5b33d7c30034067$var$denormalize(z, this.array);\n return z;\n }\n setZ(index, z) {\n if (this.normalized) z = $d5b33d7c30034067$var$normalize(z, this.array);\n this.array[index * this.itemSize + 2] = $d5b33d7c30034067$var$toHalfFloat(z);\n return this;\n }\n getW(index) {\n let w = $d5b33d7c30034067$var$fromHalfFloat(this.array[index * this.itemSize + 3]);\n if (this.normalized) w = $d5b33d7c30034067$var$denormalize(w, this.array);\n return w;\n }\n setW(index, w) {\n if (this.normalized) w = $d5b33d7c30034067$var$normalize(w, this.array);\n this.array[index * this.itemSize + 3] = $d5b33d7c30034067$var$toHalfFloat(w);\n return this;\n }\n setXY(index, x, y) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n }\n this.array[index + 0] = $d5b33d7c30034067$var$toHalfFloat(x);\n this.array[index + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n return this;\n }\n setXYZ(index, x, y, z) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n }\n this.array[index + 0] = $d5b33d7c30034067$var$toHalfFloat(x);\n this.array[index + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n this.array[index + 2] = $d5b33d7c30034067$var$toHalfFloat(z);\n return this;\n }\n setXYZW(index, x, y, z, w) {\n index *= this.itemSize;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n w = $d5b33d7c30034067$var$normalize(w, this.array);\n }\n this.array[index + 0] = $d5b33d7c30034067$var$toHalfFloat(x);\n this.array[index + 1] = $d5b33d7c30034067$var$toHalfFloat(y);\n this.array[index + 2] = $d5b33d7c30034067$var$toHalfFloat(z);\n this.array[index + 3] = $d5b33d7c30034067$var$toHalfFloat(w);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$cbe7a62641830ebd extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Float32Array(array), itemSize, normalized);\n }\n}\nclass $d5b33d7c30034067$export$9e0ade74842adbb8 extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized){\n super(new Float64Array(array), itemSize, normalized);\n }\n}\nlet $d5b33d7c30034067$var$_id$2 = 0;\nconst $d5b33d7c30034067$var$_m1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_obj = /*@__PURE__*/ new $d5b33d7c30034067$export$e4dd07dff30cc924();\nconst $d5b33d7c30034067$var$_offset = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_box$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_boxMorphTargets = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_vector$7 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$b7be63a67df8959 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isBufferGeometry = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_id$2++\n });\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.name = \"\";\n this.type = \"BufferGeometry\";\n this.index = null;\n this.attributes = {};\n this.morphAttributes = {};\n this.morphTargetsRelative = false;\n this.groups = [];\n this.boundingBox = null;\n this.boundingSphere = null;\n this.drawRange = {\n start: 0,\n count: Infinity\n };\n this.userData = {};\n }\n getIndex() {\n return this.index;\n }\n setIndex(index) {\n if (Array.isArray(index)) this.index = new ($d5b33d7c30034067$var$arrayNeedsUint32(index) ? $d5b33d7c30034067$export$7eb8c9fa25cd5bd6 : $d5b33d7c30034067$export$640a853f68025f2e)(index, 1);\n else this.index = index;\n return this;\n }\n getAttribute(name) {\n return this.attributes[name];\n }\n setAttribute(name, attribute) {\n this.attributes[name] = attribute;\n return this;\n }\n deleteAttribute(name) {\n delete this.attributes[name];\n return this;\n }\n hasAttribute(name) {\n return this.attributes[name] !== undefined;\n }\n addGroup(start, count, materialIndex = 0) {\n this.groups.push({\n start: start,\n count: count,\n materialIndex: materialIndex\n });\n }\n clearGroups() {\n this.groups = [];\n }\n setDrawRange(start, count) {\n this.drawRange.start = start;\n this.drawRange.count = count;\n }\n applyMatrix4(matrix) {\n const position = this.attributes.position;\n if (position !== undefined) {\n position.applyMatrix4(matrix);\n position.needsUpdate = true;\n }\n const normal = this.attributes.normal;\n if (normal !== undefined) {\n const normalMatrix = new $d5b33d7c30034067$export$8ff26dafa08918().getNormalMatrix(matrix);\n normal.applyNormalMatrix(normalMatrix);\n normal.needsUpdate = true;\n }\n const tangent = this.attributes.tangent;\n if (tangent !== undefined) {\n tangent.transformDirection(matrix);\n tangent.needsUpdate = true;\n }\n if (this.boundingBox !== null) this.computeBoundingBox();\n if (this.boundingSphere !== null) this.computeBoundingSphere();\n return this;\n }\n applyQuaternion(q) {\n $d5b33d7c30034067$var$_m1.makeRotationFromQuaternion(q);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n rotateX(angle) {\n // rotate geometry around world x-axis\n $d5b33d7c30034067$var$_m1.makeRotationX(angle);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n rotateY(angle) {\n // rotate geometry around world y-axis\n $d5b33d7c30034067$var$_m1.makeRotationY(angle);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n rotateZ(angle) {\n // rotate geometry around world z-axis\n $d5b33d7c30034067$var$_m1.makeRotationZ(angle);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n translate(x, y, z) {\n // translate geometry\n $d5b33d7c30034067$var$_m1.makeTranslation(x, y, z);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n scale(x, y, z) {\n // scale geometry\n $d5b33d7c30034067$var$_m1.makeScale(x, y, z);\n this.applyMatrix4($d5b33d7c30034067$var$_m1);\n return this;\n }\n lookAt(vector) {\n $d5b33d7c30034067$var$_obj.lookAt(vector);\n $d5b33d7c30034067$var$_obj.updateMatrix();\n this.applyMatrix4($d5b33d7c30034067$var$_obj.matrix);\n return this;\n }\n center() {\n this.computeBoundingBox();\n this.boundingBox.getCenter($d5b33d7c30034067$var$_offset).negate();\n this.translate($d5b33d7c30034067$var$_offset.x, $d5b33d7c30034067$var$_offset.y, $d5b33d7c30034067$var$_offset.z);\n return this;\n }\n setFromPoints(points) {\n const position = [];\n for(let i = 0, l = points.length; i < l; i++){\n const point = points[i];\n position.push(point.x, point.y, point.z || 0);\n }\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(position, 3));\n return this;\n }\n computeBoundingBox() {\n if (this.boundingBox === null) this.boundingBox = new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n const position = this.attributes.position;\n const morphAttributesPosition = this.morphAttributes.position;\n if (position && position.isGLBufferAttribute) {\n console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n this.boundingBox.set(new $d5b33d7c30034067$export$64b5c384219d3699(-Infinity, -Infinity, -Infinity), new $d5b33d7c30034067$export$64b5c384219d3699(Infinity, Infinity, Infinity));\n return;\n }\n if (position !== undefined) {\n this.boundingBox.setFromBufferAttribute(position);\n // process morph attributes if present\n if (morphAttributesPosition) for(let i = 0, il = morphAttributesPosition.length; i < il; i++){\n const morphAttribute = morphAttributesPosition[i];\n $d5b33d7c30034067$var$_box$1.setFromBufferAttribute(morphAttribute);\n if (this.morphTargetsRelative) {\n $d5b33d7c30034067$var$_vector$7.addVectors(this.boundingBox.min, $d5b33d7c30034067$var$_box$1.min);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_vector$7);\n $d5b33d7c30034067$var$_vector$7.addVectors(this.boundingBox.max, $d5b33d7c30034067$var$_box$1.max);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_vector$7);\n } else {\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_box$1.min);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_box$1.max);\n }\n }\n } else this.boundingBox.makeEmpty();\n if (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this);\n }\n computeBoundingSphere() {\n if (this.boundingSphere === null) this.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba();\n const position = this.attributes.position;\n const morphAttributesPosition = this.morphAttributes.position;\n if (position && position.isGLBufferAttribute) {\n console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n this.boundingSphere.set(new $d5b33d7c30034067$export$64b5c384219d3699(), Infinity);\n return;\n }\n if (position) {\n // first, find the center of the bounding sphere\n const center = this.boundingSphere.center;\n $d5b33d7c30034067$var$_box$1.setFromBufferAttribute(position);\n // process morph attributes if present\n if (morphAttributesPosition) for(let i = 0, il = morphAttributesPosition.length; i < il; i++){\n const morphAttribute = morphAttributesPosition[i];\n $d5b33d7c30034067$var$_boxMorphTargets.setFromBufferAttribute(morphAttribute);\n if (this.morphTargetsRelative) {\n $d5b33d7c30034067$var$_vector$7.addVectors($d5b33d7c30034067$var$_box$1.min, $d5b33d7c30034067$var$_boxMorphTargets.min);\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_vector$7);\n $d5b33d7c30034067$var$_vector$7.addVectors($d5b33d7c30034067$var$_box$1.max, $d5b33d7c30034067$var$_boxMorphTargets.max);\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_vector$7);\n } else {\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_boxMorphTargets.min);\n $d5b33d7c30034067$var$_box$1.expandByPoint($d5b33d7c30034067$var$_boxMorphTargets.max);\n }\n }\n $d5b33d7c30034067$var$_box$1.getCenter(center);\n // second, try to find a boundingSphere with a radius smaller than the\n // boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n let maxRadiusSq = 0;\n for(let i = 0, il = position.count; i < il; i++){\n $d5b33d7c30034067$var$_vector$7.fromBufferAttribute(position, i);\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared($d5b33d7c30034067$var$_vector$7));\n }\n // process morph attributes if present\n if (morphAttributesPosition) for(let i = 0, il = morphAttributesPosition.length; i < il; i++){\n const morphAttribute = morphAttributesPosition[i];\n const morphTargetsRelative = this.morphTargetsRelative;\n for(let j = 0, jl = morphAttribute.count; j < jl; j++){\n $d5b33d7c30034067$var$_vector$7.fromBufferAttribute(morphAttribute, j);\n if (morphTargetsRelative) {\n $d5b33d7c30034067$var$_offset.fromBufferAttribute(position, j);\n $d5b33d7c30034067$var$_vector$7.add($d5b33d7c30034067$var$_offset);\n }\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared($d5b33d7c30034067$var$_vector$7));\n }\n }\n this.boundingSphere.radius = Math.sqrt(maxRadiusSq);\n if (isNaN(this.boundingSphere.radius)) console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this);\n }\n }\n computeTangents() {\n const index = this.index;\n const attributes = this.attributes;\n // based on http://www.terathon.com/code/tangent.html\n // (per vertex tangents)\n if (index === null || attributes.position === undefined || attributes.normal === undefined || attributes.uv === undefined) {\n console.error(\"THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)\");\n return;\n }\n const indices = index.array;\n const positions = attributes.position.array;\n const normals = attributes.normal.array;\n const uvs = attributes.uv.array;\n const nVertices = positions.length / 3;\n if (this.hasAttribute(\"tangent\") === false) this.setAttribute(\"tangent\", new $d5b33d7c30034067$export$8dea267bd6bde117(new Float32Array(4 * nVertices), 4));\n const tangents = this.getAttribute(\"tangent\").array;\n const tan1 = [], tan2 = [];\n for(let i = 0; i < nVertices; i++){\n tan1[i] = new $d5b33d7c30034067$export$64b5c384219d3699();\n tan2[i] = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n const vA = new $d5b33d7c30034067$export$64b5c384219d3699(), vB = new $d5b33d7c30034067$export$64b5c384219d3699(), vC = new $d5b33d7c30034067$export$64b5c384219d3699(), uvA = new $d5b33d7c30034067$export$c977b3e384af9ae1(), uvB = new $d5b33d7c30034067$export$c977b3e384af9ae1(), uvC = new $d5b33d7c30034067$export$c977b3e384af9ae1(), sdir = new $d5b33d7c30034067$export$64b5c384219d3699(), tdir = new $d5b33d7c30034067$export$64b5c384219d3699();\n function handleTriangle(a, b, c) {\n vA.fromArray(positions, a * 3);\n vB.fromArray(positions, b * 3);\n vC.fromArray(positions, c * 3);\n uvA.fromArray(uvs, a * 2);\n uvB.fromArray(uvs, b * 2);\n uvC.fromArray(uvs, c * 2);\n vB.sub(vA);\n vC.sub(vA);\n uvB.sub(uvA);\n uvC.sub(uvA);\n const r = 1.0 / (uvB.x * uvC.y - uvC.x * uvB.y);\n // silently ignore degenerate uv triangles having coincident or colinear vertices\n if (!isFinite(r)) return;\n sdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC, -uvB.y).multiplyScalar(r);\n tdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB, -uvC.x).multiplyScalar(r);\n tan1[a].add(sdir);\n tan1[b].add(sdir);\n tan1[c].add(sdir);\n tan2[a].add(tdir);\n tan2[b].add(tdir);\n tan2[c].add(tdir);\n }\n let groups = this.groups;\n if (groups.length === 0) groups = [\n {\n start: 0,\n count: indices.length\n }\n ];\n for(let i = 0, il = groups.length; i < il; ++i){\n const group = groups[i];\n const start = group.start;\n const count = group.count;\n for(let j = start, jl = start + count; j < jl; j += 3)handleTriangle(indices[j + 0], indices[j + 1], indices[j + 2]);\n }\n const tmp = new $d5b33d7c30034067$export$64b5c384219d3699(), tmp2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const n = new $d5b33d7c30034067$export$64b5c384219d3699(), n2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n function handleVertex(v) {\n n.fromArray(normals, v * 3);\n n2.copy(n);\n const t = tan1[v];\n // Gram-Schmidt orthogonalize\n tmp.copy(t);\n tmp.sub(n.multiplyScalar(n.dot(t))).normalize();\n // Calculate handedness\n tmp2.crossVectors(n2, t);\n const test = tmp2.dot(tan2[v]);\n const w = test < 0.0 ? -1 : 1.0;\n tangents[v * 4] = tmp.x;\n tangents[v * 4 + 1] = tmp.y;\n tangents[v * 4 + 2] = tmp.z;\n tangents[v * 4 + 3] = w;\n }\n for(let i = 0, il = groups.length; i < il; ++i){\n const group = groups[i];\n const start = group.start;\n const count = group.count;\n for(let j = start, jl = start + count; j < jl; j += 3){\n handleVertex(indices[j + 0]);\n handleVertex(indices[j + 1]);\n handleVertex(indices[j + 2]);\n }\n }\n }\n computeVertexNormals() {\n const index = this.index;\n const positionAttribute = this.getAttribute(\"position\");\n if (positionAttribute !== undefined) {\n let normalAttribute = this.getAttribute(\"normal\");\n if (normalAttribute === undefined) {\n normalAttribute = new $d5b33d7c30034067$export$8dea267bd6bde117(new Float32Array(positionAttribute.count * 3), 3);\n this.setAttribute(\"normal\", normalAttribute);\n } else // reset existing normals to zero\n for(let i = 0, il = normalAttribute.count; i < il; i++)normalAttribute.setXYZ(i, 0, 0, 0);\n const pA = new $d5b33d7c30034067$export$64b5c384219d3699(), pB = new $d5b33d7c30034067$export$64b5c384219d3699(), pC = new $d5b33d7c30034067$export$64b5c384219d3699();\n const nA = new $d5b33d7c30034067$export$64b5c384219d3699(), nB = new $d5b33d7c30034067$export$64b5c384219d3699(), nC = new $d5b33d7c30034067$export$64b5c384219d3699();\n const cb = new $d5b33d7c30034067$export$64b5c384219d3699(), ab = new $d5b33d7c30034067$export$64b5c384219d3699();\n // indexed elements\n if (index) for(let i = 0, il = index.count; i < il; i += 3){\n const vA = index.getX(i + 0);\n const vB = index.getX(i + 1);\n const vC = index.getX(i + 2);\n pA.fromBufferAttribute(positionAttribute, vA);\n pB.fromBufferAttribute(positionAttribute, vB);\n pC.fromBufferAttribute(positionAttribute, vC);\n cb.subVectors(pC, pB);\n ab.subVectors(pA, pB);\n cb.cross(ab);\n nA.fromBufferAttribute(normalAttribute, vA);\n nB.fromBufferAttribute(normalAttribute, vB);\n nC.fromBufferAttribute(normalAttribute, vC);\n nA.add(cb);\n nB.add(cb);\n nC.add(cb);\n normalAttribute.setXYZ(vA, nA.x, nA.y, nA.z);\n normalAttribute.setXYZ(vB, nB.x, nB.y, nB.z);\n normalAttribute.setXYZ(vC, nC.x, nC.y, nC.z);\n }\n else // non-indexed elements (unconnected triangle soup)\n for(let i = 0, il = positionAttribute.count; i < il; i += 3){\n pA.fromBufferAttribute(positionAttribute, i + 0);\n pB.fromBufferAttribute(positionAttribute, i + 1);\n pC.fromBufferAttribute(positionAttribute, i + 2);\n cb.subVectors(pC, pB);\n ab.subVectors(pA, pB);\n cb.cross(ab);\n normalAttribute.setXYZ(i + 0, cb.x, cb.y, cb.z);\n normalAttribute.setXYZ(i + 1, cb.x, cb.y, cb.z);\n normalAttribute.setXYZ(i + 2, cb.x, cb.y, cb.z);\n }\n this.normalizeNormals();\n normalAttribute.needsUpdate = true;\n }\n }\n normalizeNormals() {\n const normals = this.attributes.normal;\n for(let i = 0, il = normals.count; i < il; i++){\n $d5b33d7c30034067$var$_vector$7.fromBufferAttribute(normals, i);\n $d5b33d7c30034067$var$_vector$7.normalize();\n normals.setXYZ(i, $d5b33d7c30034067$var$_vector$7.x, $d5b33d7c30034067$var$_vector$7.y, $d5b33d7c30034067$var$_vector$7.z);\n }\n }\n toNonIndexed() {\n function convertBufferAttribute(attribute, indices) {\n const array = attribute.array;\n const itemSize = attribute.itemSize;\n const normalized = attribute.normalized;\n const array2 = new array.constructor(indices.length * itemSize);\n let index = 0, index2 = 0;\n for(let i = 0, l = indices.length; i < l; i++){\n if (attribute.isInterleavedBufferAttribute) index = indices[i] * attribute.data.stride + attribute.offset;\n else index = indices[i] * itemSize;\n for(let j = 0; j < itemSize; j++)array2[index2++] = array[index++];\n }\n return new $d5b33d7c30034067$export$8dea267bd6bde117(array2, itemSize, normalized);\n }\n //\n if (this.index === null) {\n console.warn(\"THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.\");\n return this;\n }\n const geometry2 = new $d5b33d7c30034067$export$b7be63a67df8959();\n const indices = this.index.array;\n const attributes = this.attributes;\n // attributes\n for(const name in attributes){\n const attribute = attributes[name];\n const newAttribute = convertBufferAttribute(attribute, indices);\n geometry2.setAttribute(name, newAttribute);\n }\n // morph attributes\n const morphAttributes = this.morphAttributes;\n for(const name in morphAttributes){\n const morphArray = [];\n const morphAttribute = morphAttributes[name]; // morphAttribute: array of Float32BufferAttributes\n for(let i = 0, il = morphAttribute.length; i < il; i++){\n const attribute = morphAttribute[i];\n const newAttribute = convertBufferAttribute(attribute, indices);\n morphArray.push(newAttribute);\n }\n geometry2.morphAttributes[name] = morphArray;\n }\n geometry2.morphTargetsRelative = this.morphTargetsRelative;\n // groups\n const groups = this.groups;\n for(let i = 0, l = groups.length; i < l; i++){\n const group = groups[i];\n geometry2.addGroup(group.start, group.count, group.materialIndex);\n }\n return geometry2;\n }\n toJSON() {\n const data = {\n metadata: {\n version: 4.6,\n type: \"BufferGeometry\",\n generator: \"BufferGeometry.toJSON\"\n }\n };\n // standard BufferGeometry serialization\n data.uuid = this.uuid;\n data.type = this.type;\n if (this.name !== \"\") data.name = this.name;\n if (Object.keys(this.userData).length > 0) data.userData = this.userData;\n if (this.parameters !== undefined) {\n const parameters = this.parameters;\n for(const key in parameters)if (parameters[key] !== undefined) data[key] = parameters[key];\n return data;\n }\n // for simplicity the code assumes attributes are not shared across geometries, see #15811\n data.data = {\n attributes: {}\n };\n const index = this.index;\n if (index !== null) data.data.index = {\n type: index.array.constructor.name,\n array: Array.prototype.slice.call(index.array)\n };\n const attributes = this.attributes;\n for(const key in attributes){\n const attribute = attributes[key];\n data.data.attributes[key] = attribute.toJSON(data.data);\n }\n const morphAttributes = {};\n let hasMorphAttributes = false;\n for(const key in this.morphAttributes){\n const attributeArray = this.morphAttributes[key];\n const array = [];\n for(let i = 0, il = attributeArray.length; i < il; i++){\n const attribute = attributeArray[i];\n array.push(attribute.toJSON(data.data));\n }\n if (array.length > 0) {\n morphAttributes[key] = array;\n hasMorphAttributes = true;\n }\n }\n if (hasMorphAttributes) {\n data.data.morphAttributes = morphAttributes;\n data.data.morphTargetsRelative = this.morphTargetsRelative;\n }\n const groups = this.groups;\n if (groups.length > 0) data.data.groups = JSON.parse(JSON.stringify(groups));\n const boundingSphere = this.boundingSphere;\n if (boundingSphere !== null) data.data.boundingSphere = {\n center: boundingSphere.center.toArray(),\n radius: boundingSphere.radius\n };\n return data;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n // reset\n this.index = null;\n this.attributes = {};\n this.morphAttributes = {};\n this.groups = [];\n this.boundingBox = null;\n this.boundingSphere = null;\n // used for storing cloned, shared data\n const data = {};\n // name\n this.name = source.name;\n // index\n const index = source.index;\n if (index !== null) this.setIndex(index.clone(data));\n // attributes\n const attributes = source.attributes;\n for(const name in attributes){\n const attribute = attributes[name];\n this.setAttribute(name, attribute.clone(data));\n }\n // morph attributes\n const morphAttributes = source.morphAttributes;\n for(const name in morphAttributes){\n const array = [];\n const morphAttribute = morphAttributes[name]; // morphAttribute: array of Float32BufferAttributes\n for(let i = 0, l = morphAttribute.length; i < l; i++)array.push(morphAttribute[i].clone(data));\n this.morphAttributes[name] = array;\n }\n this.morphTargetsRelative = source.morphTargetsRelative;\n // groups\n const groups = source.groups;\n for(let i = 0, l = groups.length; i < l; i++){\n const group = groups[i];\n this.addGroup(group.start, group.count, group.materialIndex);\n }\n // bounding box\n const boundingBox = source.boundingBox;\n if (boundingBox !== null) this.boundingBox = boundingBox.clone();\n // bounding sphere\n const boundingSphere = source.boundingSphere;\n if (boundingSphere !== null) this.boundingSphere = boundingSphere.clone();\n // draw range\n this.drawRange.start = source.drawRange.start;\n this.drawRange.count = source.drawRange.count;\n // user data\n this.userData = source.userData;\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n}\nconst $d5b33d7c30034067$var$_inverseMatrix$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nconst $d5b33d7c30034067$var$_sphere$5 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_sphereHitAt = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vA$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vB$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vC$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_tempA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_morphA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_uvA$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvB$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvC$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_normalA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normalB = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normalC = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_intersectionPoint = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_intersectionPointWorld = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$e176487c05830cc5 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(geometry = new $d5b33d7c30034067$export$b7be63a67df8959(), material = new $d5b33d7c30034067$export$55cbcc9b622fe1f5()){\n super();\n this.isMesh = true;\n this.type = \"Mesh\";\n this.geometry = geometry;\n this.material = material;\n this.updateMorphTargets();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n if (source.morphTargetInfluences !== undefined) this.morphTargetInfluences = source.morphTargetInfluences.slice();\n if (source.morphTargetDictionary !== undefined) this.morphTargetDictionary = Object.assign({}, source.morphTargetDictionary);\n this.material = Array.isArray(source.material) ? source.material.slice() : source.material;\n this.geometry = source.geometry;\n return this;\n }\n updateMorphTargets() {\n const geometry = this.geometry;\n const morphAttributes = geometry.morphAttributes;\n const keys = Object.keys(morphAttributes);\n if (keys.length > 0) {\n const morphAttribute = morphAttributes[keys[0]];\n if (morphAttribute !== undefined) {\n this.morphTargetInfluences = [];\n this.morphTargetDictionary = {};\n for(let m = 0, ml = morphAttribute.length; m < ml; m++){\n const name = morphAttribute[m].name || String(m);\n this.morphTargetInfluences.push(0);\n this.morphTargetDictionary[name] = m;\n }\n }\n }\n }\n getVertexPosition(index, target) {\n const geometry = this.geometry;\n const position = geometry.attributes.position;\n const morphPosition = geometry.morphAttributes.position;\n const morphTargetsRelative = geometry.morphTargetsRelative;\n target.fromBufferAttribute(position, index);\n const morphInfluences = this.morphTargetInfluences;\n if (morphPosition && morphInfluences) {\n $d5b33d7c30034067$var$_morphA.set(0, 0, 0);\n for(let i = 0, il = morphPosition.length; i < il; i++){\n const influence = morphInfluences[i];\n const morphAttribute = morphPosition[i];\n if (influence === 0) continue;\n $d5b33d7c30034067$var$_tempA.fromBufferAttribute(morphAttribute, index);\n if (morphTargetsRelative) $d5b33d7c30034067$var$_morphA.addScaledVector($d5b33d7c30034067$var$_tempA, influence);\n else $d5b33d7c30034067$var$_morphA.addScaledVector($d5b33d7c30034067$var$_tempA.sub(target), influence);\n }\n target.add($d5b33d7c30034067$var$_morphA);\n }\n return target;\n }\n raycast(raycaster, intersects) {\n const geometry = this.geometry;\n const material = this.material;\n const matrixWorld = this.matrixWorld;\n if (material === undefined) return;\n // test with bounding sphere in world space\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$5.copy(geometry.boundingSphere);\n $d5b33d7c30034067$var$_sphere$5.applyMatrix4(matrixWorld);\n // check distance from ray origin to bounding sphere\n $d5b33d7c30034067$var$_ray$3.copy(raycaster.ray).recast(raycaster.near);\n if ($d5b33d7c30034067$var$_sphere$5.containsPoint($d5b33d7c30034067$var$_ray$3.origin) === false) {\n if ($d5b33d7c30034067$var$_ray$3.intersectSphere($d5b33d7c30034067$var$_sphere$5, $d5b33d7c30034067$var$_sphereHitAt) === null) return;\n if ($d5b33d7c30034067$var$_ray$3.origin.distanceToSquared($d5b33d7c30034067$var$_sphereHitAt) > (raycaster.far - raycaster.near) ** 2) return;\n }\n // convert ray to local space of mesh\n $d5b33d7c30034067$var$_inverseMatrix$3.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray$3.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix$3);\n // test with bounding box in local space\n if (geometry.boundingBox !== null) {\n if ($d5b33d7c30034067$var$_ray$3.intersectsBox(geometry.boundingBox) === false) return;\n }\n // test for intersections with geometry\n this._computeIntersections(raycaster, intersects, $d5b33d7c30034067$var$_ray$3);\n }\n _computeIntersections(raycaster, intersects, rayLocalSpace) {\n let intersection;\n const geometry = this.geometry;\n const material = this.material;\n const index = geometry.index;\n const position = geometry.attributes.position;\n const uv = geometry.attributes.uv;\n const uv1 = geometry.attributes.uv1;\n const normal = geometry.attributes.normal;\n const groups = geometry.groups;\n const drawRange = geometry.drawRange;\n if (index !== null) {\n // indexed buffer geometry\n if (Array.isArray(material)) for(let i = 0, il = groups.length; i < il; i++){\n const group = groups[i];\n const groupMaterial = material[group.materialIndex];\n const start = Math.max(group.start, drawRange.start);\n const end = Math.min(index.count, Math.min(group.start + group.count, drawRange.start + drawRange.count));\n for(let j = start, jl = end; j < jl; j += 3){\n const a = index.getX(j);\n const b = index.getX(j + 1);\n const c = index.getX(j + 2);\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(j / 3); // triangle number in indexed buffer semantics\n intersection.face.materialIndex = group.materialIndex;\n intersects.push(intersection);\n }\n }\n }\n else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(index.count, drawRange.start + drawRange.count);\n for(let i = start, il = end; i < il; i += 3){\n const a = index.getX(i);\n const b = index.getX(i + 1);\n const c = index.getX(i + 2);\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(i / 3); // triangle number in indexed buffer semantics\n intersects.push(intersection);\n }\n }\n }\n } else if (position !== undefined) {\n // non-indexed buffer geometry\n if (Array.isArray(material)) for(let i = 0, il = groups.length; i < il; i++){\n const group = groups[i];\n const groupMaterial = material[group.materialIndex];\n const start = Math.max(group.start, drawRange.start);\n const end = Math.min(position.count, Math.min(group.start + group.count, drawRange.start + drawRange.count));\n for(let j = start, jl = end; j < jl; j += 3){\n const a = j;\n const b = j + 1;\n const c = j + 2;\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(j / 3); // triangle number in non-indexed buffer semantics\n intersection.face.materialIndex = group.materialIndex;\n intersects.push(intersection);\n }\n }\n }\n else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(position.count, drawRange.start + drawRange.count);\n for(let i = start, il = end; i < il; i += 3){\n const a = i;\n const b = i + 1;\n const c = i + 2;\n intersection = $d5b33d7c30034067$var$checkGeometryIntersection(this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c);\n if (intersection) {\n intersection.faceIndex = Math.floor(i / 3); // triangle number in non-indexed buffer semantics\n intersects.push(intersection);\n }\n }\n }\n }\n }\n}\nfunction $d5b33d7c30034067$var$checkIntersection(object, material, raycaster, ray, pA, pB, pC, point) {\n let intersect;\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) intersect = ray.intersectTriangle(pC, pB, pA, true, point);\n else intersect = ray.intersectTriangle(pA, pB, pC, material.side === $d5b33d7c30034067$export$2ede184fc2998901, point);\n if (intersect === null) return null;\n $d5b33d7c30034067$var$_intersectionPointWorld.copy(point);\n $d5b33d7c30034067$var$_intersectionPointWorld.applyMatrix4(object.matrixWorld);\n const distance = raycaster.ray.origin.distanceTo($d5b33d7c30034067$var$_intersectionPointWorld);\n if (distance < raycaster.near || distance > raycaster.far) return null;\n return {\n distance: distance,\n point: $d5b33d7c30034067$var$_intersectionPointWorld.clone(),\n object: object\n };\n}\nfunction $d5b33d7c30034067$var$checkGeometryIntersection(object, material, raycaster, ray, uv, uv1, normal, a, b, c) {\n object.getVertexPosition(a, $d5b33d7c30034067$var$_vA$1);\n object.getVertexPosition(b, $d5b33d7c30034067$var$_vB$1);\n object.getVertexPosition(c, $d5b33d7c30034067$var$_vC$1);\n const intersection = $d5b33d7c30034067$var$checkIntersection(object, material, raycaster, ray, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_intersectionPoint);\n if (intersection) {\n if (uv) {\n $d5b33d7c30034067$var$_uvA$1.fromBufferAttribute(uv, a);\n $d5b33d7c30034067$var$_uvB$1.fromBufferAttribute(uv, b);\n $d5b33d7c30034067$var$_uvC$1.fromBufferAttribute(uv, c);\n intersection.uv = $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectionPoint, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_uvA$1, $d5b33d7c30034067$var$_uvB$1, $d5b33d7c30034067$var$_uvC$1, new $d5b33d7c30034067$export$c977b3e384af9ae1());\n }\n if (uv1) {\n $d5b33d7c30034067$var$_uvA$1.fromBufferAttribute(uv1, a);\n $d5b33d7c30034067$var$_uvB$1.fromBufferAttribute(uv1, b);\n $d5b33d7c30034067$var$_uvC$1.fromBufferAttribute(uv1, c);\n intersection.uv1 = $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectionPoint, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_uvA$1, $d5b33d7c30034067$var$_uvB$1, $d5b33d7c30034067$var$_uvC$1, new $d5b33d7c30034067$export$c977b3e384af9ae1());\n intersection.uv2 = intersection.uv1; // @deprecated, r152\n }\n if (normal) {\n $d5b33d7c30034067$var$_normalA.fromBufferAttribute(normal, a);\n $d5b33d7c30034067$var$_normalB.fromBufferAttribute(normal, b);\n $d5b33d7c30034067$var$_normalC.fromBufferAttribute(normal, c);\n intersection.normal = $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectionPoint, $d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, $d5b33d7c30034067$var$_normalA, $d5b33d7c30034067$var$_normalB, $d5b33d7c30034067$var$_normalC, new $d5b33d7c30034067$export$64b5c384219d3699());\n if (intersection.normal.dot(ray.direction) > 0) intersection.normal.multiplyScalar(-1);\n }\n const face = {\n a: a,\n b: b,\n c: c,\n normal: new $d5b33d7c30034067$export$64b5c384219d3699(),\n materialIndex: 0\n };\n $d5b33d7c30034067$export$5a465592bfe74b48.getNormal($d5b33d7c30034067$var$_vA$1, $d5b33d7c30034067$var$_vB$1, $d5b33d7c30034067$var$_vC$1, face.normal);\n intersection.face = face;\n }\n return intersection;\n}\nclass $d5b33d7c30034067$export$33e43285f7406bd5 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1){\n super();\n this.type = \"BoxGeometry\";\n this.parameters = {\n width: width,\n height: height,\n depth: depth,\n widthSegments: widthSegments,\n heightSegments: heightSegments,\n depthSegments: depthSegments\n };\n const scope = this;\n // segments\n widthSegments = Math.floor(widthSegments);\n heightSegments = Math.floor(heightSegments);\n depthSegments = Math.floor(depthSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n let numberOfVertices = 0;\n let groupStart = 0;\n // build each side of the box geometry\n buildPlane(\"z\", \"y\", \"x\", -1, -1, depth, height, width, depthSegments, heightSegments, 0); // px\n buildPlane(\"z\", \"y\", \"x\", 1, -1, depth, height, -width, depthSegments, heightSegments, 1); // nx\n buildPlane(\"x\", \"z\", \"y\", 1, 1, width, depth, height, widthSegments, depthSegments, 2); // py\n buildPlane(\"x\", \"z\", \"y\", 1, -1, width, depth, -height, widthSegments, depthSegments, 3); // ny\n buildPlane(\"x\", \"y\", \"z\", 1, -1, width, height, depth, widthSegments, heightSegments, 4); // pz\n buildPlane(\"x\", \"y\", \"z\", -1, -1, width, height, -depth, widthSegments, heightSegments, 5); // nz\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n function buildPlane(u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex) {\n const segmentWidth = width / gridX;\n const segmentHeight = height / gridY;\n const widthHalf = width / 2;\n const heightHalf = height / 2;\n const depthHalf = depth / 2;\n const gridX1 = gridX + 1;\n const gridY1 = gridY + 1;\n let vertexCounter = 0;\n let groupCount = 0;\n const vector = new $d5b33d7c30034067$export$64b5c384219d3699();\n // generate vertices, normals and uvs\n for(let iy = 0; iy < gridY1; iy++){\n const y = iy * segmentHeight - heightHalf;\n for(let ix = 0; ix < gridX1; ix++){\n const x = ix * segmentWidth - widthHalf;\n // set values to correct vector component\n vector[u] = x * udir;\n vector[v] = y * vdir;\n vector[w] = depthHalf;\n // now apply vector to vertex buffer\n vertices.push(vector.x, vector.y, vector.z);\n // set values to correct vector component\n vector[u] = 0;\n vector[v] = 0;\n vector[w] = depth > 0 ? 1 : -1;\n // now apply vector to normal buffer\n normals.push(vector.x, vector.y, vector.z);\n // uvs\n uvs.push(ix / gridX);\n uvs.push(1 - iy / gridY);\n // counters\n vertexCounter += 1;\n }\n }\n // indices\n // 1. you need three indices to draw a single face\n // 2. a single segment consists of two faces\n // 3. so we need to generate six (2*3) indices per segment\n for(let iy = 0; iy < gridY; iy++)for(let ix = 0; ix < gridX; ix++){\n const a = numberOfVertices + ix + gridX1 * iy;\n const b = numberOfVertices + ix + gridX1 * (iy + 1);\n const c = numberOfVertices + (ix + 1) + gridX1 * (iy + 1);\n const d = numberOfVertices + (ix + 1) + gridX1 * iy;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n // increase counter\n groupCount += 6;\n }\n // add a group to the geometry. this will ensure multi material support\n scope.addGroup(groupStart, groupCount, materialIndex);\n // calculate new start value for groups\n groupStart += groupCount;\n // update total number of vertices\n numberOfVertices += vertexCounter;\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$33e43285f7406bd5(data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments);\n }\n}\n/**\n * Uniform Utilities\n */ function $d5b33d7c30034067$var$cloneUniforms(src) {\n const dst = {};\n for(const u in src){\n dst[u] = {};\n for(const p in src[u]){\n const property = src[u][p];\n if (property && (property.isColor || property.isMatrix3 || property.isMatrix4 || property.isVector2 || property.isVector3 || property.isVector4 || property.isTexture || property.isQuaternion)) {\n if (property.isRenderTargetTexture) {\n console.warn(\"UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().\");\n dst[u][p] = null;\n } else dst[u][p] = property.clone();\n } else if (Array.isArray(property)) dst[u][p] = property.slice();\n else dst[u][p] = property;\n }\n }\n return dst;\n}\nfunction $d5b33d7c30034067$var$mergeUniforms(uniforms) {\n const merged = {};\n for(let u = 0; u < uniforms.length; u++){\n const tmp = $d5b33d7c30034067$var$cloneUniforms(uniforms[u]);\n for(const p in tmp)merged[p] = tmp[p];\n }\n return merged;\n}\nfunction $d5b33d7c30034067$var$cloneUniformsGroups(src) {\n const dst = [];\n for(let u = 0; u < src.length; u++)dst.push(src[u].clone());\n return dst;\n}\nfunction $d5b33d7c30034067$var$getUnlitUniformColorSpace(renderer) {\n if (renderer.getRenderTarget() === null) // https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398\n return renderer.outputColorSpace;\n return $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace;\n}\n// Legacy\nconst $d5b33d7c30034067$export$d8ecdf8615bfea69 = {\n clone: $d5b33d7c30034067$var$cloneUniforms,\n merge: $d5b33d7c30034067$var$mergeUniforms\n};\nvar $d5b33d7c30034067$var$default_vertex = \"void main() {\\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\nvar $d5b33d7c30034067$var$default_fragment = \"void main() {\\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\nclass $d5b33d7c30034067$export$83c7d75d550a8b0d extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isShaderMaterial = true;\n this.type = \"ShaderMaterial\";\n this.defines = {};\n this.uniforms = {};\n this.uniformsGroups = [];\n this.vertexShader = $d5b33d7c30034067$var$default_vertex;\n this.fragmentShader = $d5b33d7c30034067$var$default_fragment;\n this.linewidth = 1;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.fog = false; // set to use scene fog\n this.lights = false; // set to use scene lights\n this.clipping = false; // set to use user-defined clipping planes\n this.forceSinglePass = true;\n this.extensions = {\n derivatives: false,\n fragDepth: false,\n drawBuffers: false,\n shaderTextureLOD: false // set to use shader texture LOD\n };\n // When rendered geometry doesn't include these attributes but the material does,\n // use these default values in WebGL. This avoids errors when buffer data is missing.\n this.defaultAttributeValues = {\n \"color\": [\n 1,\n 1,\n 1\n ],\n \"uv\": [\n 0,\n 0\n ],\n \"uv1\": [\n 0,\n 0\n ]\n };\n this.index0AttributeName = undefined;\n this.uniformsNeedUpdate = false;\n this.glslVersion = null;\n if (parameters !== undefined) this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.fragmentShader = source.fragmentShader;\n this.vertexShader = source.vertexShader;\n this.uniforms = $d5b33d7c30034067$var$cloneUniforms(source.uniforms);\n this.uniformsGroups = $d5b33d7c30034067$var$cloneUniformsGroups(source.uniformsGroups);\n this.defines = Object.assign({}, source.defines);\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.fog = source.fog;\n this.lights = source.lights;\n this.clipping = source.clipping;\n this.extensions = Object.assign({}, source.extensions);\n this.glslVersion = source.glslVersion;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.glslVersion = this.glslVersion;\n data.uniforms = {};\n for(const name in this.uniforms){\n const uniform = this.uniforms[name];\n const value = uniform.value;\n if (value && value.isTexture) data.uniforms[name] = {\n type: \"t\",\n value: value.toJSON(meta).uuid\n };\n else if (value && value.isColor) data.uniforms[name] = {\n type: \"c\",\n value: value.getHex()\n };\n else if (value && value.isVector2) data.uniforms[name] = {\n type: \"v2\",\n value: value.toArray()\n };\n else if (value && value.isVector3) data.uniforms[name] = {\n type: \"v3\",\n value: value.toArray()\n };\n else if (value && value.isVector4) data.uniforms[name] = {\n type: \"v4\",\n value: value.toArray()\n };\n else if (value && value.isMatrix3) data.uniforms[name] = {\n type: \"m3\",\n value: value.toArray()\n };\n else if (value && value.isMatrix4) data.uniforms[name] = {\n type: \"m4\",\n value: value.toArray()\n };\n else data.uniforms[name] = {\n value: value\n };\n }\n if (Object.keys(this.defines).length > 0) data.defines = this.defines;\n data.vertexShader = this.vertexShader;\n data.fragmentShader = this.fragmentShader;\n data.lights = this.lights;\n data.clipping = this.clipping;\n const extensions = {};\n for(const key in this.extensions)if (this.extensions[key] === true) extensions[key] = true;\n if (Object.keys(extensions).length > 0) data.extensions = extensions;\n return data;\n }\n}\nclass $d5b33d7c30034067$export$79f141de891a5fed extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isCamera = true;\n this.type = \"Camera\";\n this.matrixWorldInverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.projectionMatrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.projectionMatrixInverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3;\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.matrixWorldInverse.copy(source.matrixWorldInverse);\n this.projectionMatrix.copy(source.projectionMatrix);\n this.projectionMatrixInverse.copy(source.projectionMatrixInverse);\n this.coordinateSystem = source.coordinateSystem;\n return this;\n }\n getWorldDirection(target) {\n return super.getWorldDirection(target).negate();\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n this.matrixWorldInverse.copy(this.matrixWorld).invert();\n }\n updateWorldMatrix(updateParents, updateChildren) {\n super.updateWorldMatrix(updateParents, updateChildren);\n this.matrixWorldInverse.copy(this.matrixWorld).invert();\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nclass $d5b33d7c30034067$export$74e4ae24825f68d7 extends $d5b33d7c30034067$export$79f141de891a5fed {\n constructor(fov = 50, aspect = 1, near = 0.1, far = 2000){\n super();\n this.isPerspectiveCamera = true;\n this.type = \"PerspectiveCamera\";\n this.fov = fov;\n this.zoom = 1;\n this.near = near;\n this.far = far;\n this.focus = 10;\n this.aspect = aspect;\n this.view = null;\n this.filmGauge = 35; // width of the film (default in millimeters)\n this.filmOffset = 0; // horizontal film offset (same unit as gauge)\n this.updateProjectionMatrix();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.fov = source.fov;\n this.zoom = source.zoom;\n this.near = source.near;\n this.far = source.far;\n this.focus = source.focus;\n this.aspect = source.aspect;\n this.view = source.view === null ? null : Object.assign({}, source.view);\n this.filmGauge = source.filmGauge;\n this.filmOffset = source.filmOffset;\n return this;\n }\n /**\n\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t *\n\t * The default film gauge is 35, so that the focal length can be specified for\n\t * a 35mm (full frame) camera.\n\t *\n\t * Values for focal length and film gauge must have the same unit.\n\t */ setFocalLength(focalLength) {\n /** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */ const vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n this.fov = $d5b33d7c30034067$var$RAD2DEG * 2 * Math.atan(vExtentSlope);\n this.updateProjectionMatrix();\n }\n /**\n\t * Calculates the focal length from the current .fov and .filmGauge.\n\t */ getFocalLength() {\n const vExtentSlope = Math.tan($d5b33d7c30034067$var$DEG2RAD * 0.5 * this.fov);\n return 0.5 * this.getFilmHeight() / vExtentSlope;\n }\n getEffectiveFOV() {\n return $d5b33d7c30034067$var$RAD2DEG * 2 * Math.atan(Math.tan($d5b33d7c30034067$var$DEG2RAD * 0.5 * this.fov) / this.zoom);\n }\n getFilmWidth() {\n // film not completely covered in portrait format (aspect < 1)\n return this.filmGauge * Math.min(this.aspect, 1);\n }\n getFilmHeight() {\n // film not completely covered in landscape format (aspect > 1)\n return this.filmGauge / Math.max(this.aspect, 1);\n }\n /**\n\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t * multi-monitor/multi-machine setups.\n\t *\n\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t * the monitors are in grid like this\n\t *\n\t * +---+---+---+\n\t * | A | B | C |\n\t * +---+---+---+\n\t * | D | E | F |\n\t * +---+---+---+\n\t *\n\t * then for each monitor you would call it like this\n\t *\n\t * const w = 1920;\n\t * const h = 1080;\n\t * const fullWidth = w * 3;\n\t * const fullHeight = h * 2;\n\t *\n\t * --A--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t * --B--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t * --C--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t * --D--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t * --E--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t * --F--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t *\n\t * Note there is no reason monitors have to be the same size or in a grid.\n\t */ setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n this.aspect = fullWidth / fullHeight;\n if (this.view === null) this.view = {\n enabled: true,\n fullWidth: 1,\n fullHeight: 1,\n offsetX: 0,\n offsetY: 0,\n width: 1,\n height: 1\n };\n this.view.enabled = true;\n this.view.fullWidth = fullWidth;\n this.view.fullHeight = fullHeight;\n this.view.offsetX = x;\n this.view.offsetY = y;\n this.view.width = width;\n this.view.height = height;\n this.updateProjectionMatrix();\n }\n clearViewOffset() {\n if (this.view !== null) this.view.enabled = false;\n this.updateProjectionMatrix();\n }\n updateProjectionMatrix() {\n const near = this.near;\n let top = near * Math.tan($d5b33d7c30034067$var$DEG2RAD * 0.5 * this.fov) / this.zoom;\n let height = 2 * top;\n let width = this.aspect * height;\n let left = -0.5 * width;\n const view = this.view;\n if (this.view !== null && this.view.enabled) {\n const fullWidth = view.fullWidth, fullHeight = view.fullHeight;\n left += view.offsetX * width / fullWidth;\n top -= view.offsetY * height / fullHeight;\n width *= view.width / fullWidth;\n height *= view.height / fullHeight;\n }\n const skew = this.filmOffset;\n if (skew !== 0) left += near * skew / this.getFilmWidth();\n this.projectionMatrix.makePerspective(left, left + width, top, top - height, near, this.far, this.coordinateSystem);\n this.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.fov = this.fov;\n data.object.zoom = this.zoom;\n data.object.near = this.near;\n data.object.far = this.far;\n data.object.focus = this.focus;\n data.object.aspect = this.aspect;\n if (this.view !== null) data.object.view = Object.assign({}, this.view);\n data.object.filmGauge = this.filmGauge;\n data.object.filmOffset = this.filmOffset;\n return data;\n }\n}\nconst $d5b33d7c30034067$var$fov = -90; // negative fov is not an error\nconst $d5b33d7c30034067$var$aspect = 1;\nclass $d5b33d7c30034067$export$d0cdd0bd804995de extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(near, far, renderTarget){\n super();\n this.type = \"CubeCamera\";\n this.renderTarget = renderTarget;\n this.coordinateSystem = null;\n this.activeMipmapLevel = 0;\n const cameraPX = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraPX.layers = this.layers;\n this.add(cameraPX);\n const cameraNX = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraNX.layers = this.layers;\n this.add(cameraNX);\n const cameraPY = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraPY.layers = this.layers;\n this.add(cameraPY);\n const cameraNY = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraNY.layers = this.layers;\n this.add(cameraNY);\n const cameraPZ = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraPZ.layers = this.layers;\n this.add(cameraPZ);\n const cameraNZ = new $d5b33d7c30034067$export$74e4ae24825f68d7($d5b33d7c30034067$var$fov, $d5b33d7c30034067$var$aspect, near, far);\n cameraNZ.layers = this.layers;\n this.add(cameraNZ);\n }\n updateCoordinateSystem() {\n const coordinateSystem = this.coordinateSystem;\n const cameras = this.children.concat();\n const [cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ] = cameras;\n for (const camera of cameras)this.remove(camera);\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) {\n cameraPX.up.set(0, 1, 0);\n cameraPX.lookAt(1, 0, 0);\n cameraNX.up.set(0, 1, 0);\n cameraNX.lookAt(-1, 0, 0);\n cameraPY.up.set(0, 0, -1);\n cameraPY.lookAt(0, 1, 0);\n cameraNY.up.set(0, 0, 1);\n cameraNY.lookAt(0, -1, 0);\n cameraPZ.up.set(0, 1, 0);\n cameraPZ.lookAt(0, 0, 1);\n cameraNZ.up.set(0, 1, 0);\n cameraNZ.lookAt(0, 0, -1);\n } else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) {\n cameraPX.up.set(0, -1, 0);\n cameraPX.lookAt(-1, 0, 0);\n cameraNX.up.set(0, -1, 0);\n cameraNX.lookAt(1, 0, 0);\n cameraPY.up.set(0, 0, 1);\n cameraPY.lookAt(0, 1, 0);\n cameraNY.up.set(0, 0, -1);\n cameraNY.lookAt(0, -1, 0);\n cameraPZ.up.set(0, -1, 0);\n cameraPZ.lookAt(0, 0, 1);\n cameraNZ.up.set(0, -1, 0);\n cameraNZ.lookAt(0, 0, -1);\n } else throw new Error(\"THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: \" + coordinateSystem);\n for (const camera of cameras){\n this.add(camera);\n camera.updateMatrixWorld();\n }\n }\n update(renderer, scene) {\n if (this.parent === null) this.updateMatrixWorld();\n const { renderTarget: renderTarget, activeMipmapLevel: activeMipmapLevel } = this;\n if (this.coordinateSystem !== renderer.coordinateSystem) {\n this.coordinateSystem = renderer.coordinateSystem;\n this.updateCoordinateSystem();\n }\n const [cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ] = this.children;\n const currentRenderTarget = renderer.getRenderTarget();\n const currentActiveCubeFace = renderer.getActiveCubeFace();\n const currentActiveMipmapLevel = renderer.getActiveMipmapLevel();\n const currentXrEnabled = renderer.xr.enabled;\n renderer.xr.enabled = false;\n const generateMipmaps = renderTarget.texture.generateMipmaps;\n renderTarget.texture.generateMipmaps = false;\n renderer.setRenderTarget(renderTarget, 0, activeMipmapLevel);\n renderer.render(scene, cameraPX);\n renderer.setRenderTarget(renderTarget, 1, activeMipmapLevel);\n renderer.render(scene, cameraNX);\n renderer.setRenderTarget(renderTarget, 2, activeMipmapLevel);\n renderer.render(scene, cameraPY);\n renderer.setRenderTarget(renderTarget, 3, activeMipmapLevel);\n renderer.render(scene, cameraNY);\n renderer.setRenderTarget(renderTarget, 4, activeMipmapLevel);\n renderer.render(scene, cameraPZ);\n // mipmaps are generated during the last call of render()\n // at this point, all sides of the cube render target are defined\n renderTarget.texture.generateMipmaps = generateMipmaps;\n renderer.setRenderTarget(renderTarget, 5, activeMipmapLevel);\n renderer.render(scene, cameraNZ);\n renderer.setRenderTarget(currentRenderTarget, currentActiveCubeFace, currentActiveMipmapLevel);\n renderer.xr.enabled = currentXrEnabled;\n renderTarget.texture.needsPMREMUpdate = true;\n }\n}\nclass $d5b33d7c30034067$export$ee2e5a18258a4049 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1){\n images = images !== undefined ? images : [];\n mapping = mapping !== undefined ? mapping : $d5b33d7c30034067$export$8759762a6477f2c4;\n super(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1);\n this.isCubeTexture = true;\n this.flipY = false;\n }\n get images() {\n return this.image;\n }\n set images(value) {\n this.image = value;\n }\n}\nclass $d5b33d7c30034067$export$ac386671d651941e extends $d5b33d7c30034067$export$3c052beb2e51e23f {\n constructor(size = 1, options = {}){\n super(size, size, options);\n this.isWebGLCubeRenderTarget = true;\n const image = {\n width: size,\n height: size,\n depth: 1\n };\n const images = [\n image,\n image,\n image,\n image,\n image,\n image\n ];\n if (options.encoding !== undefined) {\n // @deprecated, r152\n $d5b33d7c30034067$var$warnOnce(\"THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace.\");\n options.colorSpace = options.encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$bfcb490c2dd3db51;\n }\n this.texture = new $d5b33d7c30034067$export$ee2e5a18258a4049(images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace);\n // By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n // in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n // in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n // three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n // and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture\n // as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures).\n this.texture.isRenderTargetTexture = true;\n this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n }\n fromEquirectangularTexture(renderer, texture) {\n this.texture.type = texture.type;\n this.texture.colorSpace = texture.colorSpace;\n this.texture.generateMipmaps = texture.generateMipmaps;\n this.texture.minFilter = texture.minFilter;\n this.texture.magFilter = texture.magFilter;\n const shader = {\n uniforms: {\n tEquirect: {\n value: null\n }\n },\n vertexShader: /* glsl */ `\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,\n fragmentShader: /* glsl */ `\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`\n };\n const geometry = new $d5b33d7c30034067$export$33e43285f7406bd5(5, 5, 5);\n const material = new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"CubemapFromEquirect\",\n uniforms: $d5b33d7c30034067$var$cloneUniforms(shader.uniforms),\n vertexShader: shader.vertexShader,\n fragmentShader: shader.fragmentShader,\n side: $d5b33d7c30034067$export$d9f0486e75b5ace,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba\n });\n material.uniforms.tEquirect.value = texture;\n const mesh = new $d5b33d7c30034067$export$e176487c05830cc5(geometry, material);\n const currentMinFilter = texture.minFilter;\n // Avoid blurred poles\n if (texture.minFilter === $d5b33d7c30034067$export$5d8599b6a933fb1b) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n const camera = new $d5b33d7c30034067$export$d0cdd0bd804995de(1, 10, this);\n camera.update(renderer, mesh);\n texture.minFilter = currentMinFilter;\n mesh.geometry.dispose();\n mesh.material.dispose();\n return this;\n }\n clear(renderer, color, depth, stencil) {\n const currentRenderTarget = renderer.getRenderTarget();\n for(let i = 0; i < 6; i++){\n renderer.setRenderTarget(this, i);\n renderer.clear(color, depth, stencil);\n }\n renderer.setRenderTarget(currentRenderTarget);\n }\n}\nconst $d5b33d7c30034067$var$_vector1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vector2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normalMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918();\nclass $d5b33d7c30034067$export$7ff5ac152ef991b0 {\n constructor(normal = new $d5b33d7c30034067$export$64b5c384219d3699(1, 0, 0), constant = 0){\n this.isPlane = true;\n // normal is assumed to be normalized\n this.normal = normal;\n this.constant = constant;\n }\n set(normal, constant) {\n this.normal.copy(normal);\n this.constant = constant;\n return this;\n }\n setComponents(x, y, z, w) {\n this.normal.set(x, y, z);\n this.constant = w;\n return this;\n }\n setFromNormalAndCoplanarPoint(normal, point) {\n this.normal.copy(normal);\n this.constant = -point.dot(this.normal);\n return this;\n }\n setFromCoplanarPoints(a, b, c) {\n const normal = $d5b33d7c30034067$var$_vector1.subVectors(c, b).cross($d5b33d7c30034067$var$_vector2.subVectors(a, b)).normalize();\n // Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n this.setFromNormalAndCoplanarPoint(normal, a);\n return this;\n }\n copy(plane) {\n this.normal.copy(plane.normal);\n this.constant = plane.constant;\n return this;\n }\n normalize() {\n // Note: will lead to a divide by zero if the plane is invalid.\n const inverseNormalLength = 1.0 / this.normal.length();\n this.normal.multiplyScalar(inverseNormalLength);\n this.constant *= inverseNormalLength;\n return this;\n }\n negate() {\n this.constant *= -1;\n this.normal.negate();\n return this;\n }\n distanceToPoint(point) {\n return this.normal.dot(point) + this.constant;\n }\n distanceToSphere(sphere) {\n return this.distanceToPoint(sphere.center) - sphere.radius;\n }\n projectPoint(point, target) {\n return target.copy(point).addScaledVector(this.normal, -this.distanceToPoint(point));\n }\n intersectLine(line, target) {\n const direction = line.delta($d5b33d7c30034067$var$_vector1);\n const denominator = this.normal.dot(direction);\n if (denominator === 0) {\n // line is coplanar, return origin\n if (this.distanceToPoint(line.start) === 0) return target.copy(line.start);\n // Unsure if this is the correct method to handle this case.\n return null;\n }\n const t = -(line.start.dot(this.normal) + this.constant) / denominator;\n if (t < 0 || t > 1) return null;\n return target.copy(line.start).addScaledVector(direction, t);\n }\n intersectsLine(line) {\n // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n const startSign = this.distanceToPoint(line.start);\n const endSign = this.distanceToPoint(line.end);\n return startSign < 0 && endSign > 0 || endSign < 0 && startSign > 0;\n }\n intersectsBox(box) {\n return box.intersectsPlane(this);\n }\n intersectsSphere(sphere) {\n return sphere.intersectsPlane(this);\n }\n coplanarPoint(target) {\n return target.copy(this.normal).multiplyScalar(-this.constant);\n }\n applyMatrix4(matrix, optionalNormalMatrix) {\n const normalMatrix = optionalNormalMatrix || $d5b33d7c30034067$var$_normalMatrix.getNormalMatrix(matrix);\n const referencePoint = this.coplanarPoint($d5b33d7c30034067$var$_vector1).applyMatrix4(matrix);\n const normal = this.normal.applyMatrix3(normalMatrix).normalize();\n this.constant = -referencePoint.dot(normal);\n return this;\n }\n translate(offset) {\n this.constant -= offset.dot(this.normal);\n return this;\n }\n equals(plane) {\n return plane.normal.equals(this.normal) && plane.constant === this.constant;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_sphere$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_vector$6 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$35efe6f4c85463d2 {\n constructor(p0 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p1 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p2 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p3 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p4 = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), p5 = new $d5b33d7c30034067$export$7ff5ac152ef991b0()){\n this.planes = [\n p0,\n p1,\n p2,\n p3,\n p4,\n p5\n ];\n }\n set(p0, p1, p2, p3, p4, p5) {\n const planes = this.planes;\n planes[0].copy(p0);\n planes[1].copy(p1);\n planes[2].copy(p2);\n planes[3].copy(p3);\n planes[4].copy(p4);\n planes[5].copy(p5);\n return this;\n }\n copy(frustum) {\n const planes = this.planes;\n for(let i = 0; i < 6; i++)planes[i].copy(frustum.planes[i]);\n return this;\n }\n setFromProjectionMatrix(m, coordinateSystem = $d5b33d7c30034067$export$5a0e9190d10875d3) {\n const planes = this.planes;\n const me = m.elements;\n const me0 = me[0], me1 = me[1], me2 = me[2], me3 = me[3];\n const me4 = me[4], me5 = me[5], me6 = me[6], me7 = me[7];\n const me8 = me[8], me9 = me[9], me10 = me[10], me11 = me[11];\n const me12 = me[12], me13 = me[13], me14 = me[14], me15 = me[15];\n planes[0].setComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12).normalize();\n planes[1].setComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12).normalize();\n planes[2].setComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13).normalize();\n planes[3].setComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13).normalize();\n planes[4].setComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14).normalize();\n if (coordinateSystem === $d5b33d7c30034067$export$5a0e9190d10875d3) planes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize();\n else if (coordinateSystem === $d5b33d7c30034067$export$cc83beedcb9be9ac) planes[5].setComponents(me2, me6, me10, me14).normalize();\n else throw new Error(\"THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: \" + coordinateSystem);\n return this;\n }\n intersectsObject(object) {\n if (object.boundingSphere !== undefined) {\n if (object.boundingSphere === null) object.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$4.copy(object.boundingSphere).applyMatrix4(object.matrixWorld);\n } else {\n const geometry = object.geometry;\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$4.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld);\n }\n return this.intersectsSphere($d5b33d7c30034067$var$_sphere$4);\n }\n intersectsSprite(sprite) {\n $d5b33d7c30034067$var$_sphere$4.center.set(0, 0, 0);\n $d5b33d7c30034067$var$_sphere$4.radius = 0.7071067811865476;\n $d5b33d7c30034067$var$_sphere$4.applyMatrix4(sprite.matrixWorld);\n return this.intersectsSphere($d5b33d7c30034067$var$_sphere$4);\n }\n intersectsSphere(sphere) {\n const planes = this.planes;\n const center = sphere.center;\n const negRadius = -sphere.radius;\n for(let i = 0; i < 6; i++){\n const distance = planes[i].distanceToPoint(center);\n if (distance < negRadius) return false;\n }\n return true;\n }\n intersectsBox(box) {\n const planes = this.planes;\n for(let i = 0; i < 6; i++){\n const plane = planes[i];\n // corner at max distance\n $d5b33d7c30034067$var$_vector$6.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n $d5b33d7c30034067$var$_vector$6.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n $d5b33d7c30034067$var$_vector$6.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n if (plane.distanceToPoint($d5b33d7c30034067$var$_vector$6) < 0) return false;\n }\n return true;\n }\n containsPoint(point) {\n const planes = this.planes;\n for(let i = 0; i < 6; i++){\n if (planes[i].distanceToPoint(point) < 0) return false;\n }\n return true;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nfunction $d5b33d7c30034067$var$WebGLAnimation() {\n let context = null;\n let isAnimating = false;\n let animationLoop = null;\n let requestId = null;\n function onAnimationFrame(time, frame) {\n animationLoop(time, frame);\n requestId = context.requestAnimationFrame(onAnimationFrame);\n }\n return {\n start: function() {\n if (isAnimating === true) return;\n if (animationLoop === null) return;\n requestId = context.requestAnimationFrame(onAnimationFrame);\n isAnimating = true;\n },\n stop: function() {\n context.cancelAnimationFrame(requestId);\n isAnimating = false;\n },\n setAnimationLoop: function(callback) {\n animationLoop = callback;\n },\n setContext: function(value) {\n context = value;\n }\n };\n}\nfunction $d5b33d7c30034067$var$WebGLAttributes(gl, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n const buffers = new WeakMap();\n function createBuffer(attribute, bufferType) {\n const array = attribute.array;\n const usage = attribute.usage;\n const buffer = gl.createBuffer();\n gl.bindBuffer(bufferType, buffer);\n gl.bufferData(bufferType, array, usage);\n attribute.onUploadCallback();\n let type;\n if (array instanceof Float32Array) type = gl.FLOAT;\n else if (array instanceof Uint16Array) {\n if (attribute.isFloat16BufferAttribute) {\n if (isWebGL2) type = gl.HALF_FLOAT;\n else throw new Error(\"THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.\");\n } else type = gl.UNSIGNED_SHORT;\n } else if (array instanceof Int16Array) type = gl.SHORT;\n else if (array instanceof Uint32Array) type = gl.UNSIGNED_INT;\n else if (array instanceof Int32Array) type = gl.INT;\n else if (array instanceof Int8Array) type = gl.BYTE;\n else if (array instanceof Uint8Array) type = gl.UNSIGNED_BYTE;\n else if (array instanceof Uint8ClampedArray) type = gl.UNSIGNED_BYTE;\n else throw new Error(\"THREE.WebGLAttributes: Unsupported buffer data format: \" + array);\n return {\n buffer: buffer,\n type: type,\n bytesPerElement: array.BYTES_PER_ELEMENT,\n version: attribute.version\n };\n }\n function updateBuffer(buffer, attribute, bufferType) {\n const array = attribute.array;\n const updateRange = attribute.updateRange;\n gl.bindBuffer(bufferType, buffer);\n if (updateRange.count === -1) // Not using update ranges\n gl.bufferSubData(bufferType, 0, array);\n else {\n if (isWebGL2) gl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array, updateRange.offset, updateRange.count);\n else gl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array.subarray(updateRange.offset, updateRange.offset + updateRange.count));\n updateRange.count = -1; // reset range\n }\n attribute.onUploadCallback();\n }\n //\n function get(attribute) {\n if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n return buffers.get(attribute);\n }\n function remove(attribute) {\n if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n const data = buffers.get(attribute);\n if (data) {\n gl.deleteBuffer(data.buffer);\n buffers.delete(attribute);\n }\n }\n function update(attribute, bufferType) {\n if (attribute.isGLBufferAttribute) {\n const cached = buffers.get(attribute);\n if (!cached || cached.version < attribute.version) buffers.set(attribute, {\n buffer: attribute.buffer,\n type: attribute.type,\n bytesPerElement: attribute.elementSize,\n version: attribute.version\n });\n return;\n }\n if (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n const data = buffers.get(attribute);\n if (data === undefined) buffers.set(attribute, createBuffer(attribute, bufferType));\n else if (data.version < attribute.version) {\n updateBuffer(data.buffer, attribute, bufferType);\n data.version = attribute.version;\n }\n }\n return {\n get: get,\n remove: remove,\n update: update\n };\n}\nclass $d5b33d7c30034067$export$967d831af31f69ce extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(width = 1, height = 1, widthSegments = 1, heightSegments = 1){\n super();\n this.type = \"PlaneGeometry\";\n this.parameters = {\n width: width,\n height: height,\n widthSegments: widthSegments,\n heightSegments: heightSegments\n };\n const width_half = width / 2;\n const height_half = height / 2;\n const gridX = Math.floor(widthSegments);\n const gridY = Math.floor(heightSegments);\n const gridX1 = gridX + 1;\n const gridY1 = gridY + 1;\n const segment_width = width / gridX;\n const segment_height = height / gridY;\n //\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n for(let iy = 0; iy < gridY1; iy++){\n const y = iy * segment_height - height_half;\n for(let ix = 0; ix < gridX1; ix++){\n const x = ix * segment_width - width_half;\n vertices.push(x, -y, 0);\n normals.push(0, 0, 1);\n uvs.push(ix / gridX);\n uvs.push(1 - iy / gridY);\n }\n }\n for(let iy = 0; iy < gridY; iy++)for(let ix = 0; ix < gridX; ix++){\n const a = ix + gridX1 * iy;\n const b = ix + gridX1 * (iy + 1);\n const c = ix + 1 + gridX1 * (iy + 1);\n const d = ix + 1 + gridX1 * iy;\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$967d831af31f69ce(data.width, data.height, data.widthSegments, data.heightSegments);\n }\n}\nvar $d5b33d7c30034067$var$alphahash_fragment = \"#ifdef USE_ALPHAHASH\\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\\n#endif\";\nvar $d5b33d7c30034067$var$alphahash_pars_fragment = \"#ifdef USE_ALPHAHASH\\n\tconst float ALPHA_HASH_SCALE = 0.05;\\n\tfloat hash2D( vec2 value ) {\\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\\n\t}\\n\tfloat hash3D( vec3 value ) {\\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\\n\t}\\n\tfloat getAlphaHashThreshold( vec3 position ) {\\n\t\tfloat maxDeriv = max(\\n\t\t\tlength( dFdx( position.xyz ) ),\\n\t\t\tlength( dFdy( position.xyz ) )\\n\t\t);\\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\\n\t\tvec2 pixScales = vec2(\\n\t\t\texp2( floor( log2( pixScale ) ) ),\\n\t\t\texp2( ceil( log2( pixScale ) ) )\\n\t\t);\\n\t\tvec2 alpha = vec2(\\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\\n\t\t);\\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\\n\t\tvec3 cases = vec3(\\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\\n\t\t);\\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\\n\t\t\t: cases.z;\\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\\n#endif\";\nvar $d5b33d7c30034067$var$alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\tuniform sampler2D alphaMap;\\n#endif\";\nvar $d5b33d7c30034067$var$alphatest_fragment = \"#ifdef USE_ALPHATEST\\n\tif ( diffuseColor.a < alphaTest ) discard;\\n#endif\";\nvar $d5b33d7c30034067$var$alphatest_pars_fragment = \"#ifdef USE_ALPHATEST\\n\tuniform float alphaTest;\\n#endif\";\nvar $d5b33d7c30034067$var$aomap_fragment = \"#ifdef USE_AOMAP\\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\t#if defined( USE_CLEARCOAT ) \\n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\\n\t#endif\\n\t#if defined( USE_SHEEN ) \\n\t\tsheenSpecularIndirect *= ambientOcclusion;\\n\t#endif\\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\tuniform sampler2D aoMap;\\n\tuniform float aoMapIntensity;\\n#endif\";\nvar $d5b33d7c30034067$var$begin_vertex = \"vec3 transformed = vec3( position );\\n#ifdef USE_ALPHAHASH\\n\tvPosition = vec3( position );\\n#endif\";\nvar $d5b33d7c30034067$var$beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\nvar $d5b33d7c30034067$var$bsdfs = \"float G_BlinnPhong_Implicit( ) {\\n\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\\n\tvec3 halfDir = normalize( lightDir + viewDir );\\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\\n\tfloat G = G_BlinnPhong_Implicit( );\\n\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\treturn F * ( G * D );\\n} // validated\";\nvar $d5b33d7c30034067$var$iridescence_fragment = \"#ifdef USE_IRIDESCENCE\\n\tconst mat3 XYZ_TO_REC709 = mat3(\\n\t\t 3.2404542, -0.9692660, 0.0556434,\\n\t\t-1.5371385, 1.8760108, -0.2040259,\\n\t\t-0.4985314, 0.0415560, 1.0572252\\n\t);\\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\\n\t}\\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\\n\t}\\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\\n\t}\\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\\n\t\txyz /= 1.0685e-7;\\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\\n\t\treturn rgb;\\n\t}\\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\\n\t\tvec3 I;\\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\\n\t\tif ( cosTheta2Sq < 0.0 ) {\\n\t\t\treturn vec3( 1.0 );\\n\t\t}\\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\\n\t\tfloat T121 = 1.0 - R12;\\n\t\tfloat phi12 = 0.0;\\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\\n\t\tfloat phi21 = PI - phi12;\\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\\n\t\tvec3 phi23 = vec3( 0.0 );\\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\\n\t\tvec3 phi = vec3( phi21 ) + phi23;\\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\\n\t\tvec3 r123 = sqrt( R123 );\\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\\n\t\tvec3 C0 = R12 + Rs;\\n\t\tI = C0;\\n\t\tvec3 Cm = Rs - T121;\\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\\n\t\t\tCm *= r123;\\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\\n\t\t\tI += Cm * Sm;\\n\t\t}\\n\t\treturn max( I, vec3( 0.0 ) );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\tuniform sampler2D bumpMap;\\n\tuniform float bumpScale;\\n\tvec2 dHdxy_fwd() {\\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\\n\t\treturn vec2( dBx, dBy );\\n\t}\\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\\n\t\tvec3 vN = surf_norm;\\n\t\tvec3 R1 = cross( vSigmaY, vN );\\n\t\tvec3 R2 = cross( vN, vSigmaX );\\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\tvec4 plane;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\t\tplane = clippingPlanes[ i ];\\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\t\tbool clipped = true;\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\t\t\tplane = clippingPlanes[ i ];\\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t\tif ( clipped ) discard;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\tvarying vec3 vClipPosition;\\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\tvarying vec3 vClipPosition;\\n#endif\";\nvar $d5b33d7c30034067$var$clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\tvClipPosition = - mvPosition.xyz;\\n#endif\";\nvar $d5b33d7c30034067$var$color_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\tdiffuseColor *= vColor;\\n#elif defined( USE_COLOR )\\n\tdiffuseColor.rgb *= vColor;\\n#endif\";\nvar $d5b33d7c30034067$var$color_pars_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\tvarying vec4 vColor;\\n#elif defined( USE_COLOR )\\n\tvarying vec3 vColor;\\n#endif\";\nvar $d5b33d7c30034067$var$color_pars_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\tvarying vec4 vColor;\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\tvarying vec3 vColor;\\n#endif\";\nvar $d5b33d7c30034067$var$color_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\tvColor = vec4( 1.0 );\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\tvColor *= color;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\nvar $d5b33d7c30034067$var$common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nvec3 pow2( const in vec3 x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\treturn fract( sin( sn ) * c );\\n}\\n#ifdef HIGH_PRECISION\\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\tfloat precisionSafeLength( vec3 v ) {\\n\t\tfloat maxComponent = max3( abs( v ) );\\n\t\treturn length( v / maxComponent ) * maxComponent;\\n\t}\\n#endif\\nstruct IncidentLight {\\n\tvec3 color;\\n\tvec3 direction;\\n\tbool visible;\\n};\\nstruct ReflectedLight {\\n\tvec3 directDiffuse;\\n\tvec3 directSpecular;\\n\tvec3 indirectDiffuse;\\n\tvec3 indirectSpecular;\\n};\\n#ifdef USE_ALPHAHASH\\n\tvarying vec3 vPosition;\\n#endif\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\tmat3 tmp;\\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\treturn tmp;\\n}\\nfloat luminance( const in vec3 rgb ) {\\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\\n\treturn dot( weights, rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\treturn vec2( u, v );\\n}\\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\\n\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n}\\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n} // validated\";\nvar $d5b33d7c30034067$var$cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\t#define cubeUV_minMipLevel 4.0\\n\t#define cubeUV_minTileSize 16.0\\n\tfloat getFace( vec3 direction ) {\\n\t\tvec3 absDirection = abs( direction );\\n\t\tfloat face = - 1.0;\\n\t\tif ( absDirection.x > absDirection.z ) {\\n\t\t\tif ( absDirection.x > absDirection.y )\\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\t\t\telse\\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\t\t} else {\\n\t\t\tif ( absDirection.z > absDirection.y )\\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\t\t\telse\\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\t\t}\\n\t\treturn face;\\n\t}\\n\tvec2 getUV( vec3 direction, float face ) {\\n\t\tvec2 uv;\\n\t\tif ( face == 0.0 ) {\\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\t\t} else if ( face == 1.0 ) {\\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\t\t} else if ( face == 2.0 ) {\\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\t\t} else if ( face == 3.0 ) {\\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\t\t} else if ( face == 4.0 ) {\\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\t\t} else {\\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\t\t}\\n\t\treturn 0.5 * ( uv + 1.0 );\\n\t}\\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\t\tfloat face = getFace( direction );\\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\t\tfloat faceSize = exp2( mipInt );\\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\\n\t\tif ( face > 2.0 ) {\\n\t\t\tuv.y += faceSize;\\n\t\t\tface -= 3.0;\\n\t\t}\\n\t\tuv.x += face * faceSize;\\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\\n\t\t#ifdef texture2DGradEXT\\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\\n\t\t#else\\n\t\t\treturn texture2D( envMap, uv ).rgb;\\n\t\t#endif\\n\t}\\n\t#define cubeUV_r0 1.0\\n\t#define cubeUV_v0 0.339\\n\t#define cubeUV_m0 - 2.0\\n\t#define cubeUV_r1 0.8\\n\t#define cubeUV_v1 0.276\\n\t#define cubeUV_m1 - 1.0\\n\t#define cubeUV_r4 0.4\\n\t#define cubeUV_v4 0.046\\n\t#define cubeUV_m4 2.0\\n\t#define cubeUV_r5 0.305\\n\t#define cubeUV_v5 0.016\\n\t#define cubeUV_m5 3.0\\n\t#define cubeUV_r6 0.21\\n\t#define cubeUV_v6 0.0038\\n\t#define cubeUV_m6 4.0\\n\tfloat roughnessToMip( float roughness ) {\\n\t\tfloat mip = 0.0;\\n\t\tif ( roughness >= cubeUV_r1 ) {\\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\\n\t\t} else if ( roughness >= cubeUV_r4 ) {\\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\\n\t\t} else if ( roughness >= cubeUV_r5 ) {\\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\\n\t\t} else if ( roughness >= cubeUV_r6 ) {\\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\\n\t\t} else {\\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\\n\t\treturn mip;\\n\t}\\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\\n\t\tfloat mipF = fract( mip );\\n\t\tfloat mipInt = floor( mip );\\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\t\tif ( mipF == 0.0 ) {\\n\t\t\treturn vec4( color0, 1.0 );\\n\t\t} else {\\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\t\t}\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\tmat3 m = mat3( instanceMatrix );\\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\t#ifdef FLIP_SIDED\\n\t\ttransformedTangent = - transformedTangent;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\tuniform sampler2D displacementMap;\\n\tuniform float displacementScale;\\n\tuniform float displacementBias;\\n#endif\";\nvar $d5b33d7c30034067$var$displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\\n#endif\";\nvar $d5b33d7c30034067$var$emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\nvar $d5b33d7c30034067$var$emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\tuniform sampler2D emissiveMap;\\n#endif\";\nvar $d5b33d7c30034067$var$colorspace_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\nvar $d5b33d7c30034067$var$colorspace_pars_fragment = \"\\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\\n\tvec3( 0.8224621, 0.177538, 0.0 ),\\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\\n);\\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\\n);\\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\\n}\\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\\n}\\nvec4 LinearTransferOETF( in vec4 value ) {\\n\treturn value;\\n}\\nvec4 sRGBTransferOETF( in vec4 value ) {\\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\\n}\\nvec4 LinearToLinear( in vec4 value ) {\\n\treturn value;\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\treturn sRGBTransferOETF( value );\\n}\";\nvar $d5b33d7c30034067$var$envmap_fragment = \"#ifdef USE_ENVMAP\\n\t#ifdef ENV_WORLDPOS\\n\t\tvec3 cameraToFrag;\\n\t\tif ( isOrthographic ) {\\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\t\t} else {\\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\t\t}\\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\t\t#ifdef ENVMAP_MODE_REFLECTION\\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\t\t#else\\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\t\t#endif\\n\t#else\\n\t\tvec3 reflectVec = vReflect;\\n\t#endif\\n\t#ifdef ENVMAP_TYPE_CUBE\\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\t#else\\n\t\tvec4 envColor = vec4( 0.0 );\\n\t#endif\\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\t#elif defined( ENVMAP_BLENDING_MIX )\\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\t#elif defined( ENVMAP_BLENDING_ADD )\\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\tuniform float envMapIntensity;\\n\tuniform float flipEnvMap;\\n\t#ifdef ENVMAP_TYPE_CUBE\\n\t\tuniform samplerCube envMap;\\n\t#else\\n\t\tuniform sampler2D envMap;\\n\t#endif\\n\t\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\tuniform float reflectivity;\\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\t\t#define ENV_WORLDPOS\\n\t#endif\\n\t#ifdef ENV_WORLDPOS\\n\t\tvarying vec3 vWorldPosition;\\n\t\tuniform float refractionRatio;\\n\t#else\\n\t\tvarying vec3 vReflect;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\t\t#define ENV_WORLDPOS\\n\t#endif\\n\t#ifdef ENV_WORLDPOS\\n\t\t\\n\t\tvarying vec3 vWorldPosition;\\n\t#else\\n\t\tvarying vec3 vReflect;\\n\t\tuniform float refractionRatio;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_vertex = \"#ifdef USE_ENVMAP\\n\t#ifdef ENV_WORLDPOS\\n\t\tvWorldPosition = worldPosition.xyz;\\n\t#else\\n\t\tvec3 cameraToVertex;\\n\t\tif ( isOrthographic ) {\\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\t\t} else {\\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\t\t}\\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\t\t#ifdef ENVMAP_MODE_REFLECTION\\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\\n\t\t#else\\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\t\t#endif\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$fog_vertex = \"#ifdef USE_FOG\\n\tvFogDepth = - mvPosition.z;\\n#endif\";\nvar $d5b33d7c30034067$var$fog_pars_vertex = \"#ifdef USE_FOG\\n\tvarying float vFogDepth;\\n#endif\";\nvar $d5b33d7c30034067$var$fog_fragment = \"#ifdef USE_FOG\\n\t#ifdef FOG_EXP2\\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\\n\t#else\\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\\n\t#endif\\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\nvar $d5b33d7c30034067$var$fog_pars_fragment = \"#ifdef USE_FOG\\n\tuniform vec3 fogColor;\\n\tvarying float vFogDepth;\\n\t#ifdef FOG_EXP2\\n\t\tuniform float fogDensity;\\n\t#else\\n\t\tuniform float fogNear;\\n\t\tuniform float fogFar;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\tfloat dotNL = dot( normal, lightDirection );\\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\t#ifdef USE_GRADIENTMAP\\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\\n\t#else\\n\t\tvec2 fw = fwidth( coord ) * 0.5;\\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\\n\t#endif\\n}\";\nvar $d5b33d7c30034067$var$lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\\n#endif\";\nvar $d5b33d7c30034067$var$lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\tuniform sampler2D lightMap;\\n\tuniform float lightMapIntensity;\\n#endif\";\nvar $d5b33d7c30034067$var$lights_lambert_fragment = \"LambertMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularStrength = specularStrength;\";\nvar $d5b33d7c30034067$var$lights_lambert_pars_fragment = \"varying vec3 vViewPosition;\\nstruct LambertMaterial {\\n\tvec3 diffuseColor;\\n\tfloat specularStrength;\\n};\\nvoid 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 ) {\\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\\n\tvec3 irradiance = dotNL * directLight.color;\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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 ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert\";\nvar $d5b33d7c30034067$var$lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\n#if defined( USE_LIGHT_PROBES )\\n\tuniform vec3 lightProbe[ 9 ];\\n#endif\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\tvec3 irradiance = ambientLightColor;\\n\treturn irradiance;\\n}\\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\t#if defined ( LEGACY_LIGHTS )\\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\t\t}\\n\t\treturn 1.0;\\n\t#else\\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\t\tif ( cutoffDistance > 0.0 ) {\\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\t\t}\\n\t\treturn distanceFalloff;\\n\t#endif\\n}\\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\tstruct DirectionalLight {\\n\t\tvec3 direction;\\n\t\tvec3 color;\\n\t};\\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\\n\t\tlight.color = directionalLight.color;\\n\t\tlight.direction = directionalLight.direction;\\n\t\tlight.visible = true;\\n\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\tstruct PointLight {\\n\t\tvec3 position;\\n\t\tvec3 color;\\n\t\tfloat distance;\\n\t\tfloat decay;\\n\t};\\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\\n\t\tvec3 lVector = pointLight.position - geometryPosition;\\n\t\tlight.direction = normalize( lVector );\\n\t\tfloat lightDistance = length( lVector );\\n\t\tlight.color = pointLight.color;\\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\tstruct SpotLight {\\n\t\tvec3 position;\\n\t\tvec3 direction;\\n\t\tvec3 color;\\n\t\tfloat distance;\\n\t\tfloat decay;\\n\t\tfloat coneCos;\\n\t\tfloat penumbraCos;\\n\t};\\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\\n\t\tvec3 lVector = spotLight.position - geometryPosition;\\n\t\tlight.direction = normalize( lVector );\\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\t\tif ( spotAttenuation > 0.0 ) {\\n\t\t\tfloat lightDistance = length( lVector );\\n\t\t\tlight.color = spotLight.color * spotAttenuation;\\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\t\t} else {\\n\t\t\tlight.color = vec3( 0.0 );\\n\t\t\tlight.visible = false;\\n\t\t}\\n\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\tstruct RectAreaLight {\\n\t\tvec3 color;\\n\t\tvec3 position;\\n\t\tvec3 halfWidth;\\n\t\tvec3 halfHeight;\\n\t};\\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\tstruct HemisphereLight {\\n\t\tvec3 direction;\\n\t\tvec3 skyColor;\\n\t\tvec3 groundColor;\\n\t};\\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\t\treturn irradiance;\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$envmap_physical_pars_fragment = \"#ifdef USE_ENVMAP\\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\\n\t\t#else\\n\t\t\treturn vec3( 0.0 );\\n\t\t#endif\\n\t}\\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\t\t\treturn envMapColor.rgb * envMapIntensity;\\n\t\t#else\\n\t\t\treturn vec3( 0.0 );\\n\t\t#endif\\n\t}\\n\t#ifdef USE_ANISOTROPY\\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\\n\t\t\t#else\\n\t\t\t\treturn vec3( 0.0 );\\n\t\t\t#endif\\n\t\t}\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\nvar $d5b33d7c30034067$var$lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\nstruct ToonMaterial {\\n\tvec3 diffuseColor;\\n};\\nvoid 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 ) {\\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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 ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\";\nvar $d5b33d7c30034067$var$lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\nvar $d5b33d7c30034067$var$lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\nstruct BlinnPhongMaterial {\\n\tvec3 diffuseColor;\\n\tvec3 specularColor;\\n\tfloat specularShininess;\\n\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\\n\tvec3 irradiance = dotNL * directLight.color;\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid 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 ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\";\nvar $d5b33d7c30034067$var$lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\\nmaterial.roughness = min( material.roughness, 1.0 );\\n#ifdef IOR\\n\tmaterial.ior = ior;\\n\t#ifdef USE_SPECULAR\\n\t\tfloat specularIntensityFactor = specularIntensity;\\n\t\tvec3 specularColorFactor = specularColor;\\n\t\t#ifdef USE_SPECULAR_COLORMAP\\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\\n\t\t#endif\\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\\n\t\t#endif\\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\\n\t#else\\n\t\tfloat specularIntensityFactor = 1.0;\\n\t\tvec3 specularColorFactor = vec3( 1.0 );\\n\t\tmaterial.specularF90 = 1.0;\\n\t#endif\\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\\n#else\\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\\n\tmaterial.specularF90 = 1.0;\\n#endif\\n#ifdef USE_CLEARCOAT\\n\tmaterial.clearcoat = clearcoat;\\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\tmaterial.clearcoatF0 = vec3( 0.04 );\\n\tmaterial.clearcoatF90 = 1.0;\\n\t#ifdef USE_CLEARCOATMAP\\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\\n\t#endif\\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\\n\t#endif\\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\tmaterial.clearcoatRoughness += geometryRoughness;\\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\tmaterial.iridescence = iridescence;\\n\tmaterial.iridescenceIOR = iridescenceIOR;\\n\t#ifdef USE_IRIDESCENCEMAP\\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\\n\t#endif\\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\\n\t#else\\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\\n\t#endif\\n#endif\\n#ifdef USE_SHEEN\\n\tmaterial.sheenColor = sheenColor;\\n\t#ifdef USE_SHEEN_COLORMAP\\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\\n\t#endif\\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\\n\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\t#ifdef USE_ANISOTROPYMAP\\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\\n\t#else\\n\t\tvec2 anisotropyV = anisotropyVector;\\n\t#endif\\n\tmaterial.anisotropy = length( anisotropyV );\\n\tanisotropyV /= material.anisotropy;\\n\tmaterial.anisotropy = saturate( material.anisotropy );\\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\\n#endif\";\nvar $d5b33d7c30034067$var$lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\tvec3 diffuseColor;\\n\tfloat roughness;\\n\tvec3 specularColor;\\n\tfloat specularF90;\\n\t#ifdef USE_CLEARCOAT\\n\t\tfloat clearcoat;\\n\t\tfloat clearcoatRoughness;\\n\t\tvec3 clearcoatF0;\\n\t\tfloat clearcoatF90;\\n\t#endif\\n\t#ifdef USE_IRIDESCENCE\\n\t\tfloat iridescence;\\n\t\tfloat iridescenceIOR;\\n\t\tfloat iridescenceThickness;\\n\t\tvec3 iridescenceFresnel;\\n\t\tvec3 iridescenceF0;\\n\t#endif\\n\t#ifdef USE_SHEEN\\n\t\tvec3 sheenColor;\\n\t\tfloat sheenRoughness;\\n\t#endif\\n\t#ifdef IOR\\n\t\tfloat ior;\\n\t#endif\\n\t#ifdef USE_TRANSMISSION\\n\t\tfloat transmission;\\n\t\tfloat transmissionAlpha;\\n\t\tfloat thickness;\\n\t\tfloat attenuationDistance;\\n\t\tvec3 attenuationColor;\\n\t#endif\\n\t#ifdef USE_ANISOTROPY\\n\t\tfloat anisotropy;\\n\t\tfloat alphaT;\\n\t\tvec3 anisotropyT;\\n\t\tvec3 anisotropyB;\\n\t#endif\\n};\\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\\nvec3 sheenSpecularDirect = vec3( 0.0 );\\nvec3 sheenSpecularIndirect = vec3(0.0 );\\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\\n float x2 = x * x;\\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\\n}\\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\tfloat a2 = pow2( alpha );\\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\tfloat a2 = pow2( alpha );\\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\n#ifdef USE_ANISOTROPY\\n\tfloat 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 ) {\\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\\n\t\tfloat v = 0.5 / ( gv + gl );\\n\t\treturn saturate(v);\\n\t}\\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\\n\t\tfloat a2 = alphaT * alphaB;\\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\\n\t\thighp float v2 = dot( v, v );\\n\t\tfloat w2 = a2 / v2;\\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\\n\t}\\n#endif\\n#ifdef USE_CLEARCOAT\\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\\n\t\tvec3 f0 = material.clearcoatF0;\\n\t\tfloat f90 = material.clearcoatF90;\\n\t\tfloat roughness = material.clearcoatRoughness;\\n\t\tfloat alpha = pow2( roughness );\\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\t\tfloat D = D_GGX( alpha, dotNH );\\n\t\treturn F * ( V * D );\\n\t}\\n#endif\\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\\n\tvec3 f0 = material.specularColor;\\n\tfloat f90 = material.specularF90;\\n\tfloat roughness = material.roughness;\\n\tfloat alpha = pow2( roughness );\\n\tvec3 halfDir = normalize( lightDir + viewDir );\\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\t#ifdef USE_IRIDESCENCE\\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\\n\t#endif\\n\t#ifdef USE_ANISOTROPY\\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\\n\t#else\\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\t\tfloat D = D_GGX( alpha, dotNH );\\n\t#endif\\n\treturn F * ( V * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\tconst float LUT_SIZE = 64.0;\\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\tfloat dotNV = saturate( dot( N, V ) );\\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\tfloat l = length( f );\\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\tfloat x = dot( v1, v2 );\\n\tfloat y = abs( x );\\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\tfloat v = a / b;\\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\tvec3 lightNormal = cross( v1, v2 );\\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\tvec3 T1, T2;\\n\tT1 = normalize( V - N * dot( V, N ) );\\n\tT2 = - cross( N, T1 );\\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\tvec3 coords[ 4 ];\\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\tvec3 vectorFormFactor = vec3( 0.0 );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\treturn vec3( result );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie( float roughness, float dotNH ) {\\n\tfloat alpha = pow2( roughness );\\n\tfloat invAlpha = 1.0 / alpha;\\n\tfloat cos2h = dotNH * dotNH;\\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\\n}\\nfloat V_Neubelt( float dotNV, float dotNL ) {\\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\\n}\\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\\n\tvec3 halfDir = normalize( lightDir + viewDir );\\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\\n\tfloat V = V_Neubelt( dotNV, dotNL );\\n\treturn sheenColor * ( D * V );\\n}\\n#endif\\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tfloat r2 = roughness * roughness;\\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\\n\treturn saturate( DG * RECIPROCAL_PI );\\n}\\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\tvec4 r = roughness * c0 + c1;\\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\\n\treturn fab;\\n}\\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\treturn specularColor * fab.x + specularF90 * fab.y;\\n}\\n#ifdef USE_IRIDESCENCE\\nvoid 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 ) {\\n#else\\nvoid 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 ) {\\n#endif\\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\t#ifdef USE_IRIDESCENCE\\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\\n\t#else\\n\t\tvec3 Fr = specularColor;\\n\t#endif\\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\\n\tfloat Ess = fab.x + fab.y;\\n\tfloat Ems = 1.0 - Ess;\\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\tsingleScatter += FssEss;\\n\tmultiScatter += Fms * Ems;\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\tvoid 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 ) {\\n\t\tvec3 normal = geometryNormal;\\n\t\tvec3 viewDir = geometryViewDir;\\n\t\tvec3 position = geometryPosition;\\n\t\tvec3 lightPos = rectAreaLight.position;\\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\t\tvec3 lightColor = rectAreaLight.color;\\n\t\tfloat roughness = material.roughness;\\n\t\tvec3 rectCoords[ 4 ];\\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\t\tvec4 t1 = texture2D( ltc_1, uv );\\n\t\tvec4 t2 = texture2D( ltc_2, uv );\\n\t\tmat3 mInv = mat3(\\n\t\t\tvec3( t1.x, 0, t1.y ),\\n\t\t\tvec3( 0, 1, 0 ),\\n\t\t\tvec3( t1.z, 0, t1.w )\\n\t\t);\\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\\n\tvec3 irradiance = dotNL * directLight.color;\\n\t#ifdef USE_CLEARCOAT\\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\\n\t#endif\\n\t#ifdef USE_SHEEN\\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\\n\t#endif\\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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 ) {\\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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) {\\n\t#ifdef USE_CLEARCOAT\\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\\n\t#endif\\n\t#ifdef USE_SHEEN\\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\\n\t#endif\\n\tvec3 singleScattering = vec3( 0.0 );\\n\tvec3 multiScattering = vec3( 0.0 );\\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\t#ifdef USE_IRIDESCENCE\\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\\n\t#else\\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\\n\t#endif\\n\tvec3 totalScattering = singleScattering + multiScattering;\\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\\n\treflectedLight.indirectSpecular += radiance * singleScattering;\\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\t\t\t\tRE_Direct_Physical\\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\nvar $d5b33d7c30034067$var$lights_fragment_begin = \"\\nvec3 geometryPosition = - vViewPosition;\\nvec3 geometryNormal = normal;\\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\nvec3 geometryClearcoatNormal = vec3( 0.0 );\\n#ifdef USE_CLEARCOAT\\n\tgeometryClearcoatNormal = clearcoatNormal;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\\n\tif ( material.iridescenceThickness == 0.0 ) {\\n\t\tmaterial.iridescence = 0.0;\\n\t} else {\\n\t\tmaterial.iridescence = saturate( material.iridescence );\\n\t}\\n\tif ( material.iridescence > 0.0 ) {\\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\\n\t}\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\tPointLight pointLight;\\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\tPointLightShadow pointLightShadow;\\n\t#endif\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\t\tpointLight = pointLights[ i ];\\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\t\tpointLightShadow = pointLightShadows[ i ];\\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\t\t#endif\\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\tSpotLight spotLight;\\n\tvec4 spotColor;\\n\tvec3 spotLightCoord;\\n\tbool inSpotLightMap;\\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\tSpotLightShadow spotLightShadow;\\n\t#endif\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\t\tspotLight = spotLights[ i ];\\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\\n\t\t#else\\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\t\t#endif\\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\\n\t\t#endif\\n\t\t#undef SPOT_LIGHT_MAP_INDEX\\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\t\tspotLightShadow = spotLightShadows[ i ];\\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\t\t#endif\\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\tDirectionalLight directionalLight;\\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\tDirectionalLightShadow directionalLightShadow;\\n\t#endif\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\t\tdirectionalLight = directionalLights[ i ];\\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\t\t#endif\\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\tRectAreaLight rectAreaLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\t\trectAreaLight = rectAreaLights[ i ];\\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\tvec3 iblIrradiance = vec3( 0.0 );\\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\t#if defined( USE_LIGHT_PROBES )\\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\\n\t#endif\\n\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\tvec3 radiance = vec3( 0.0 );\\n\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\nvar $d5b33d7c30034067$var$lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\t#ifdef USE_LIGHTMAP\\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\t\tirradiance += lightMapIrradiance;\\n\t#endif\\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\\n\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\t#ifdef USE_ANISOTROPY\\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\\n\t#else\\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\\n\t#endif\\n\t#ifdef USE_CLEARCOAT\\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\tuniform float logDepthBufFC;\\n\tvarying float vFragDepth;\\n\tvarying float vIsPerspective;\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\t#ifdef USE_LOGDEPTHBUF_EXT\\n\t\tvarying float vFragDepth;\\n\t\tvarying float vIsPerspective;\\n\t#else\\n\t\tuniform float logDepthBufFC;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\t#ifdef USE_LOGDEPTHBUF_EXT\\n\t\tvFragDepth = 1.0 + gl_Position.w;\\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\t#else\\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\t\t\tgl_Position.z *= gl_Position.w;\\n\t\t}\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$map_fragment = \"#ifdef USE_MAP\\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\\n\t#ifdef DECODE_VIDEO_TEXTURE\\n\t\tsampledDiffuseColor = 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 );\\n\t\\n\t#endif\\n\tdiffuseColor *= sampledDiffuseColor;\\n#endif\";\nvar $d5b33d7c30034067$var$map_pars_fragment = \"#ifdef USE_MAP\\n\tuniform sampler2D map;\\n#endif\";\nvar $d5b33d7c30034067$var$map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\t#if defined( USE_POINTS_UV )\\n\t\tvec2 uv = vUv;\\n\t#else\\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\t#endif\\n#endif\\n#ifdef USE_MAP\\n\tdiffuseColor *= texture2D( map, uv );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\nvar $d5b33d7c30034067$var$map_particle_pars_fragment = \"#if defined( USE_POINTS_UV )\\n\tvarying vec2 vUv;\\n#else\\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\t\tuniform mat3 uvTransform;\\n\t#endif\\n#endif\\n#ifdef USE_MAP\\n\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tuniform sampler2D alphaMap;\\n#endif\";\nvar $d5b33d7c30034067$var$metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\\n\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\nvar $d5b33d7c30034067$var$metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\tuniform sampler2D metalnessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$morphcolor_vertex = \"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\\n\tvColor *= morphTargetBaseInfluence;\\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\t\t#if defined( USE_COLOR_ALPHA )\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\\n\t\t#elif defined( USE_COLOR )\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\\n\t\t#endif\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\tobjectNormal *= morphTargetBaseInfluence;\\n\t#ifdef MORPHTARGETS_TEXTURE\\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\\n\t\t}\\n\t#else\\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\tuniform float morphTargetBaseInfluence;\\n\t#ifdef MORPHTARGETS_TEXTURE\\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\\n\t\tuniform sampler2DArray morphTargetsTexture;\\n\t\tuniform ivec2 morphTargetsTextureSize;\\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\\n\t\t}\\n\t#else\\n\t\t#ifndef USE_MORPHNORMALS\\n\t\t\tuniform float morphTargetInfluences[ 8 ];\\n\t\t#else\\n\t\t\tuniform float morphTargetInfluences[ 4 ];\\n\t\t#endif\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\ttransformed *= morphTargetBaseInfluence;\\n\t#ifdef MORPHTARGETS_TEXTURE\\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\\n\t\t}\\n\t#else\\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\t\t#ifndef USE_MORPHNORMALS\\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\t\t#endif\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normal_fragment_begin = \"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\\n#ifdef FLAT_SHADED\\n\tvec3 fdx = dFdx( vViewPosition );\\n\tvec3 fdy = dFdy( vViewPosition );\\n\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\tvec3 normal = normalize( vNormal );\\n\t#ifdef DOUBLE_SIDED\\n\t\tnormal *= faceDirection;\\n\t#endif\\n#endif\\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\\n\t#ifdef USE_TANGENT\\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\t#else\\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\\n\t\t#if defined( USE_NORMALMAP )\\n\t\t\tvNormalMapUv\\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\\n\t\t\tvClearcoatNormalMapUv\\n\t\t#else\\n\t\t\tvUv\\n\t\t#endif\\n\t\t);\\n\t#endif\\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\t\ttbn[0] *= faceDirection;\\n\t\ttbn[1] *= faceDirection;\\n\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\t#ifdef USE_TANGENT\\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\t#else\\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\\n\t#endif\\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\t\ttbn2[0] *= faceDirection;\\n\t\ttbn2[1] *= faceDirection;\\n\t#endif\\n#endif\\nvec3 nonPerturbedNormal = normal;\";\nvar $d5b33d7c30034067$var$normal_fragment_maps = \"#ifdef USE_NORMALMAP_OBJECTSPACE\\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\t#ifdef FLIP_SIDED\\n\t\tnormal = - normal;\\n\t#endif\\n\t#ifdef DOUBLE_SIDED\\n\t\tnormal = normal * faceDirection;\\n\t#endif\\n\tnormal = normalize( normalMatrix * normal );\\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\tmapN.xy *= normalScale;\\n\tnormal = normalize( tbn * mapN );\\n#elif defined( USE_BUMPMAP )\\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\\n#endif\";\nvar $d5b33d7c30034067$var$normal_pars_fragment = \"#ifndef FLAT_SHADED\\n\tvarying vec3 vNormal;\\n\t#ifdef USE_TANGENT\\n\t\tvarying vec3 vTangent;\\n\t\tvarying vec3 vBitangent;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normal_pars_vertex = \"#ifndef FLAT_SHADED\\n\tvarying vec3 vNormal;\\n\t#ifdef USE_TANGENT\\n\t\tvarying vec3 vTangent;\\n\t\tvarying vec3 vBitangent;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normal_vertex = \"#ifndef FLAT_SHADED\\n\tvNormal = normalize( transformedNormal );\\n\t#ifdef USE_TANGENT\\n\t\tvTangent = normalize( transformedTangent );\\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\tuniform sampler2D normalMap;\\n\tuniform vec2 normalScale;\\n#endif\\n#ifdef USE_NORMALMAP_OBJECTSPACE\\n\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\\n\t\tvec2 st0 = dFdx( uv.st );\\n\t\tvec2 st1 = dFdy( uv.st );\\n\t\tvec3 N = surf_norm;\\n\t\tvec3 q1perp = cross( q1, N );\\n\t\tvec3 q0perp = cross( N, q0 );\\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\\n\t\treturn mat3( T * scale, B * scale, N );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$clearcoat_normal_fragment_begin = \"#ifdef USE_CLEARCOAT\\n\tvec3 clearcoatNormal = nonPerturbedNormal;\\n#endif\";\nvar $d5b33d7c30034067$var$clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\\n\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\\n#endif\";\nvar $d5b33d7c30034067$var$clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tuniform sampler2D clearcoatNormalMap;\\n\tuniform vec2 clearcoatNormalScale;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$iridescence_pars_fragment = \"#ifdef USE_IRIDESCENCEMAP\\n\tuniform sampler2D iridescenceMap;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tuniform sampler2D iridescenceThicknessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$opaque_fragment = \"#ifdef OPAQUE\\ndiffuseColor.a = 1.0;\\n#endif\\n#ifdef USE_TRANSMISSION\\ndiffuseColor.a *= material.transmissionAlpha;\\n#endif\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\";\nvar $d5b33d7c30034067$var$packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\treturn dot( v, UnpackFactors );\\n}\\nvec2 packDepthToRG( in highp float v ) {\\n\treturn packDepthToRGBA( v ).yx;\\n}\\nfloat unpackRGToDepth( const in highp vec2 v ) {\\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\treturn depth * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\\n}\";\nvar $d5b33d7c30034067$var$premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\nvar $d5b33d7c30034067$var$project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\nvar $d5b33d7c30034067$var$dithering_fragment = \"#ifdef DITHERING\\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\nvar $d5b33d7c30034067$var$dithering_pars_fragment = \"#ifdef DITHERING\\n\tvec3 dithering( vec3 color ) {\\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\t\treturn color + dither_shift_RGB;\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\\n\troughnessFactor *= texelRoughness.g;\\n#endif\";\nvar $d5b33d7c30034067$var$roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\tuniform sampler2D roughnessMap;\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmap_pars_fragment = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#if NUM_SPOT_LIGHT_MAPS > 0\\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tstruct DirectionalLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\t\tstruct SpotLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tstruct PointLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t\tfloat shadowCameraNear;\\n\t\t\tfloat shadowCameraFar;\\n\t\t};\\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\t#endif\\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\t}\\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\t}\\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\t\tfloat occlusion = 1.0;\\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\t\tfloat hard_shadow = step( compare , distribution.x );\\n\t\tif (hard_shadow != 1.0 ) {\\n\t\t\tfloat distance = compare - distribution.x ;\\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\t\t}\\n\t\treturn occlusion;\\n\t}\\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\t\tfloat shadow = 1.0;\\n\t\tshadowCoord.xyz /= shadowCoord.w;\\n\t\tshadowCoord.z += shadowBias;\\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\\n\t\tif ( frustumTest ) {\\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\\n\t\t\tfloat dx2 = dx0 / 2.0;\\n\t\t\tfloat dy2 = dy0 / 2.0;\\n\t\t\tfloat dx3 = dx1 / 2.0;\\n\t\t\tfloat dy3 = dy1 / 2.0;\\n\t\t\tshadow = (\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\t\t\t) * ( 1.0 / 17.0 );\\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\t\t\tfloat dx = texelSize.x;\\n\t\t\tfloat dy = texelSize.y;\\n\t\t\tvec2 uv = shadowCoord.xy;\\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\t\t\tuv -= f * texelSize;\\n\t\t\tshadow = (\\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\t\t\t\t\t f.x ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\t\t\t\t\t f.x ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t f.y ) +\\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t f.y ) +\\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\t\t\t\t\t\t f.x ),\\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\t\t\t\t\t\t f.x ),\\n\t\t\t\t\t f.y )\\n\t\t\t) * ( 1.0 / 9.0 );\\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\t\t#else\\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\t\t#endif\\n\t\t}\\n\t\treturn shadow;\\n\t}\\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\t\tvec3 absV = abs( v );\\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\t\tabsV *= scaleToCube;\\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\t\tvec2 planar = v.xy;\\n\t\tfloat almostATexel = 1.5 * texelSizeY;\\n\t\tfloat almostOne = 1.0 - almostATexel;\\n\t\tif ( absV.z >= almostOne ) {\\n\t\t\tif ( v.z > 0.0 )\\n\t\t\t\tplanar.x = 4.0 - v.x;\\n\t\t} else if ( absV.x >= almostOne ) {\\n\t\t\tfloat signX = sign( v.x );\\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\\n\t\t} else if ( absV.y >= almostOne ) {\\n\t\t\tfloat signY = sign( v.y );\\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\t\t\tplanar.y = v.z * signY - 2.0;\\n\t\t}\\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\t}\\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\t\tvec3 lightToPosition = shadowCoord.xyz;\\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\\n\t\tvec3 bd3D = normalize( lightToPosition );\\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\t\t\treturn (\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\t\t\t) * ( 1.0 / 9.0 );\\n\t\t#else\\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\t\t#endif\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmap_pars_vertex = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\t\tstruct DirectionalLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\t\tstruct SpotLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t};\\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\t\tstruct PointLightShadow {\\n\t\t\tfloat shadowBias;\\n\t\t\tfloat shadowNormalBias;\\n\t\t\tfloat shadowRadius;\\n\t\t\tvec2 shadowMapSize;\\n\t\t\tfloat shadowCameraNear;\\n\t\t\tfloat shadowCameraFar;\\n\t\t};\\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmap_vertex = \"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\tvec4 shadowWorldPosition;\\n#endif\\n#if defined( USE_SHADOWMAP )\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\t\t#pragma unroll_loop_start\\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\t\t}\\n\t\t#pragma unroll_loop_end\\n\t#endif\\n#endif\\n#if NUM_SPOT_LIGHT_COORDS > 0\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\\n\t\tshadowWorldPosition = worldPosition;\\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\\n\t\t#endif\\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\\n\t}\\n\t#pragma unroll_loop_end\\n#endif\";\nvar $d5b33d7c30034067$var$shadowmask_pars_fragment = \"float getShadowMask() {\\n\tfloat shadow = 1.0;\\n\t#ifdef USE_SHADOWMAP\\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\tDirectionalLightShadow directionalLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\t\tdirectionalLight = directionalLightShadows[ i ];\\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#endif\\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\tSpotLightShadow spotLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\t\tspotLight = spotLightShadows[ i ];\\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#endif\\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\tPointLightShadow pointLight;\\n\t#pragma unroll_loop_start\\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\t\tpointLight = pointLightShadows[ i ];\\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\t}\\n\t#pragma unroll_loop_end\\n\t#endif\\n\t#endif\\n\treturn shadow;\\n}\";\nvar $d5b33d7c30034067$var$skinbase_vertex = \"#ifdef USE_SKINNING\\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\nvar $d5b33d7c30034067$var$skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\tuniform mat4 bindMatrix;\\n\tuniform mat4 bindMatrixInverse;\\n\tuniform highp sampler2D boneTexture;\\n\tuniform int boneTextureSize;\\n\tmat4 getBoneMatrix( const in float i ) {\\n\t\tfloat j = i * 4.0;\\n\t\tfloat x = mod( j, float( boneTextureSize ) );\\n\t\tfloat y = floor( j / float( boneTextureSize ) );\\n\t\tfloat dx = 1.0 / float( boneTextureSize );\\n\t\tfloat dy = 1.0 / float( boneTextureSize );\\n\t\ty = dy * ( y + 0.5 );\\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\t\treturn bone;\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$skinning_vertex = \"#ifdef USE_SKINNING\\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\tvec4 skinned = vec4( 0.0 );\\n\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\nvar $d5b33d7c30034067$var$skinnormal_vertex = \"#ifdef USE_SKINNING\\n\tmat4 skinMatrix = mat4( 0.0 );\\n\tskinMatrix += skinWeight.x * boneMatX;\\n\tskinMatrix += skinWeight.y * boneMatY;\\n\tskinMatrix += skinWeight.z * boneMatZ;\\n\tskinMatrix += skinWeight.w * boneMatW;\\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\t#ifdef USE_TANGENT\\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\t#endif\\n#endif\";\nvar $d5b33d7c30034067$var$specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\\n\tspecularStrength = texelSpecular.r;\\n#else\\n\tspecularStrength = 1.0;\\n#endif\";\nvar $d5b33d7c30034067$var$specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\tuniform sampler2D specularMap;\\n#endif\";\nvar $d5b33d7c30034067$var$tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\nvar $d5b33d7c30034067$var$tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\treturn saturate( toneMappingExposure * color );\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\tcolor *= toneMappingExposure;\\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\tcolor *= toneMappingExposure;\\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\tconst mat3 ACESInputMat = mat3(\\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\\n\t);\\n\tconst mat3 ACESOutputMat = mat3(\\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\\n\t);\\n\tcolor *= toneMappingExposure / 0.6;\\n\tcolor = ACESInputMat * color;\\n\tcolor = RRTAndODTFit( color );\\n\tcolor = ACESOutputMat * color;\\n\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\nvar $d5b33d7c30034067$var$transmission_fragment = \"#ifdef USE_TRANSMISSION\\n\tmaterial.transmission = transmission;\\n\tmaterial.transmissionAlpha = 1.0;\\n\tmaterial.thickness = thickness;\\n\tmaterial.attenuationDistance = attenuationDistance;\\n\tmaterial.attenuationColor = attenuationColor;\\n\t#ifdef USE_TRANSMISSIONMAP\\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\\n\t#endif\\n\t#ifdef USE_THICKNESSMAP\\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\\n\t#endif\\n\tvec3 pos = vWorldPosition;\\n\tvec3 v = normalize( cameraPosition - pos );\\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\\n\tvec4 transmitted = getIBLVolumeRefraction(\\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\\n\t\tmaterial.attenuationColor, material.attenuationDistance );\\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\\n#endif\";\nvar $d5b33d7c30034067$var$transmission_pars_fragment = \"#ifdef USE_TRANSMISSION\\n\tuniform float transmission;\\n\tuniform float thickness;\\n\tuniform float attenuationDistance;\\n\tuniform vec3 attenuationColor;\\n\t#ifdef USE_TRANSMISSIONMAP\\n\t\tuniform sampler2D transmissionMap;\\n\t#endif\\n\t#ifdef USE_THICKNESSMAP\\n\t\tuniform sampler2D thicknessMap;\\n\t#endif\\n\tuniform vec2 transmissionSamplerSize;\\n\tuniform sampler2D transmissionSamplerMap;\\n\tuniform mat4 modelMatrix;\\n\tuniform mat4 projectionMatrix;\\n\tvarying vec3 vWorldPosition;\\n\tfloat w0( float a ) {\\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\\n\t}\\n\tfloat w1( float a ) {\\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\\n\t}\\n\tfloat w2( float a ){\\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\\n\t}\\n\tfloat w3( float a ) {\\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\\n\t}\\n\tfloat g0( float a ) {\\n\t\treturn w0( a ) + w1( a );\\n\t}\\n\tfloat g1( float a ) {\\n\t\treturn w2( a ) + w3( a );\\n\t}\\n\tfloat h0( float a ) {\\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\\n\t}\\n\tfloat h1( float a ) {\\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\\n\t}\\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\\n\t\tuv = uv * texelSize.zw + 0.5;\\n\t\tvec2 iuv = floor( uv );\\n\t\tvec2 fuv = fract( uv );\\n\t\tfloat g0x = g0( fuv.x );\\n\t\tfloat g1x = g1( fuv.x );\\n\t\tfloat h0x = h0( fuv.x );\\n\t\tfloat h1x = h1( fuv.x );\\n\t\tfloat h0y = h0( fuv.y );\\n\t\tfloat h1y = h1( fuv.y );\\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\\n\t}\\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\\n\t\treturn mix( fSample, cSample, fract( lod ) );\\n\t}\\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\\n\t\tvec3 modelScale;\\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\\n\t}\\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\\n\t}\\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\\n\t}\\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\\n\t\tif ( isinf( attenuationDistance ) ) {\\n\t\t\treturn vec3( 1.0 );\\n\t\t} else {\\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\\n\t\t}\\n\t}\\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\\n\t\tvec3 refractedRayExit = position + transmissionRay;\\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\\n\t\trefractionCoords += 1.0;\\n\t\trefractionCoords /= 2.0;\\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\\n\t}\\n#endif\";\nvar $d5b33d7c30034067$var$uv_pars_fragment = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\tuniform mat3 transmissionMapTransform;\\n\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\tuniform mat3 thicknessMapTransform;\\n\tvarying vec2 vThicknessMapUv;\\n#endif\";\nvar $d5b33d7c30034067$var$uv_pars_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\tuniform mat3 mapTransform;\\n\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tuniform mat3 alphaMapTransform;\\n\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\tuniform mat3 lightMapTransform;\\n\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\tuniform mat3 aoMapTransform;\\n\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\tuniform mat3 bumpMapTransform;\\n\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\tuniform mat3 normalMapTransform;\\n\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\tuniform mat3 displacementMapTransform;\\n\tvarying vec2 vDisplacementMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\tuniform mat3 emissiveMapTransform;\\n\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\tuniform mat3 metalnessMapTransform;\\n\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\tuniform mat3 roughnessMapTransform;\\n\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\tuniform mat3 anisotropyMapTransform;\\n\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\tuniform mat3 clearcoatMapTransform;\\n\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tuniform mat3 clearcoatNormalMapTransform;\\n\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tuniform mat3 clearcoatRoughnessMapTransform;\\n\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\tuniform mat3 sheenColorMapTransform;\\n\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\tuniform mat3 sheenRoughnessMapTransform;\\n\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\tuniform mat3 iridescenceMapTransform;\\n\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tuniform mat3 iridescenceThicknessMapTransform;\\n\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\tuniform mat3 specularMapTransform;\\n\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\tuniform mat3 specularColorMapTransform;\\n\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\tuniform mat3 specularIntensityMapTransform;\\n\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\tuniform mat3 transmissionMapTransform;\\n\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\tuniform mat3 thicknessMapTransform;\\n\tvarying vec2 vThicknessMapUv;\\n#endif\";\nvar $d5b33d7c30034067$var$uv_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\tvUv = vec3( uv, 1 ).xy;\\n#endif\\n#ifdef USE_MAP\\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_AOMAP\\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_BUMPMAP\\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_NORMALMAP\\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\";\nvar $d5b33d7c30034067$var$worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\\n\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\t#ifdef USE_INSTANCING\\n\t\tworldPosition = instanceMatrix * worldPosition;\\n\t#endif\\n\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\nconst $d5b33d7c30034067$var$vertex$h = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\nconst $d5b33d7c30034067$var$fragment$h = \"uniform sampler2D t2D;\\nuniform float backgroundIntensity;\\nvarying vec2 vUv;\\nvoid main() {\\n\tvec4 texColor = texture2D( t2D, vUv );\\n\t#ifdef DECODE_VIDEO_TEXTURE\\n\t\ttexColor = 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 );\\n\t#endif\\n\ttexColor.rgb *= backgroundIntensity;\\n\tgl_FragColor = texColor;\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$g = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvWorldDirection = transformDirection( position, modelMatrix );\\n\t#include \\n\t#include \\n\tgl_Position.z = gl_Position.w;\\n}\";\nconst $d5b33d7c30034067$var$fragment$g = \"#ifdef ENVMAP_TYPE_CUBE\\n\tuniform samplerCube envMap;\\n#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\tuniform sampler2D envMap;\\n#endif\\nuniform float flipEnvMap;\\nuniform float backgroundBlurriness;\\nuniform float backgroundIntensity;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\t#ifdef ENVMAP_TYPE_CUBE\\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\\n\t#else\\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\t#endif\\n\ttexColor.rgb *= backgroundIntensity;\\n\tgl_FragColor = texColor;\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$f = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvWorldDirection = transformDirection( position, modelMatrix );\\n\t#include \\n\t#include \\n\tgl_Position.z = gl_Position.w;\\n}\";\nconst $d5b33d7c30034067$var$fragment$f = \"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\nvoid main() {\\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\\n\tgl_FragColor = texColor;\\n\tgl_FragColor.a *= opacity;\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$e = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\t#include \\n\t#include \\n\t#ifdef USE_DISPLACEMENTMAP\\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvHighPrecisionZW = gl_Position.zw;\\n}\";\nconst $d5b33d7c30034067$var$fragment$e = \"#if DEPTH_PACKING == 3200\\n\tuniform float opacity;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( 1.0 );\\n\t#if DEPTH_PACKING == 3200\\n\t\tdiffuseColor.a = opacity;\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\t#if DEPTH_PACKING == 3200\\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\t#elif DEPTH_PACKING == 3201\\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\t#endif\\n}\";\nconst $d5b33d7c30034067$var$vertex$d = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#ifdef USE_DISPLACEMENTMAP\\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvWorldPosition = worldPosition.xyz;\\n}\";\nconst $d5b33d7c30034067$var$fragment$d = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main () {\\n\t#include \\n\tvec4 diffuseColor = vec4( 1.0 );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tfloat dist = length( vWorldPosition - referencePosition );\\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\tdist = saturate( dist );\\n\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\nconst $d5b33d7c30034067$var$vertex$c = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvWorldDirection = transformDirection( position, modelMatrix );\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$c = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\tvec3 direction = normalize( vWorldDirection );\\n\tvec2 sampleUV = equirectUv( direction );\\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$b = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\tvLineDistance = scale * lineDistance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$b = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\t\tdiscard;\\n\t}\\n\tvec3 outgoingLight = vec3( 0.0 );\\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\toutgoingLight = diffuseColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$a = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t\t#include \\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$a = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\t#ifdef USE_LIGHTMAP\\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\\n\t#else\\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\t#endif\\n\t#include \\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$9 = \"#define LAMBERT\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$9 = \"#define LAMBERT\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$8 = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n}\";\nconst $d5b33d7c30034067$var$fragment$8 = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 viewDir = normalize( vViewPosition );\\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\tvec3 y = cross( viewDir, x );\\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\t#ifdef USE_MATCAP\\n\t\tvec4 matcapColor = texture2D( matcap, uv );\\n\t#else\\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\\n\t#endif\\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$7 = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\nconst $d5b33d7c30034067$var$fragment$7 = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n\t#ifdef OPAQUE\\n\t\tgl_FragColor.a = 1.0;\\n\t#endif\\n}\";\nconst $d5b33d7c30034067$var$vertex$6 = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$6 = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$5 = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifdef USE_TRANSMISSION\\n\tvarying vec3 vWorldPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n#ifdef USE_TRANSMISSION\\n\tvWorldPosition = worldPosition.xyz;\\n#endif\\n}\";\nconst $d5b33d7c30034067$var$fragment$5 = \"#define STANDARD\\n#ifdef PHYSICAL\\n\t#define IOR\\n\t#define USE_SPECULAR\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef IOR\\n\tuniform float ior;\\n#endif\\n#ifdef USE_SPECULAR\\n\tuniform float specularIntensity;\\n\tuniform vec3 specularColor;\\n\t#ifdef USE_SPECULAR_COLORMAP\\n\t\tuniform sampler2D specularColorMap;\\n\t#endif\\n\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\t\tuniform sampler2D specularIntensityMap;\\n\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT\\n\tuniform float clearcoat;\\n\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\tuniform float iridescence;\\n\tuniform float iridescenceIOR;\\n\tuniform float iridescenceThicknessMinimum;\\n\tuniform float iridescenceThicknessMaximum;\\n#endif\\n#ifdef USE_SHEEN\\n\tuniform vec3 sheenColor;\\n\tuniform float sheenRoughness;\\n\t#ifdef USE_SHEEN_COLORMAP\\n\t\tuniform sampler2D sheenColorMap;\\n\t#endif\\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\t\tuniform sampler2D sheenRoughnessMap;\\n\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\tuniform vec2 anisotropyVector;\\n\t#ifdef USE_ANISOTROPYMAP\\n\t\tuniform sampler2D anisotropyMap;\\n\t#endif\\n#endif\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\\n\t#include \\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\\n\t#ifdef USE_SHEEN\\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\\n\t#endif\\n\t#ifdef USE_CLEARCOAT\\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$4 = \"#define TOON\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvViewPosition = - mvPosition.xyz;\\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$4 = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\tvec3 totalEmissiveRadiance = emissive;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$3 = \"uniform float size;\\nuniform float scale;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#ifdef USE_POINTS_UV\\n\tvarying vec2 vUv;\\n\tuniform mat3 uvTransform;\\n#endif\\nvoid main() {\\n\t#ifdef USE_POINTS_UV\\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\tgl_PointSize = size;\\n\t#ifdef USE_SIZEATTENUATION\\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\t#endif\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$3 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec3 outgoingLight = vec3( 0.0 );\\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\toutgoingLight = diffuseColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$2 = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$2 = \"uniform vec3 color;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$vertex$1 = \"uniform float rotation;\\nuniform vec2 center;\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\tvec2 scale;\\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\t#ifndef USE_SIZEATTENUATION\\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\\n\t#endif\\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\tvec2 rotatedPosition;\\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\tmvPosition.xy += rotatedPosition;\\n\tgl_Position = projectionMatrix * mvPosition;\\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$var$fragment$1 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\t#include \\n\tvec3 outgoingLight = vec3( 0.0 );\\n\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n\toutgoingLight = diffuseColor.rgb;\\n\t#include \\n\t#include \\n\t#include \\n\t#include \\n}\";\nconst $d5b33d7c30034067$export$955f9f2e84c43c8b = {\n alphahash_fragment: $d5b33d7c30034067$var$alphahash_fragment,\n alphahash_pars_fragment: $d5b33d7c30034067$var$alphahash_pars_fragment,\n alphamap_fragment: $d5b33d7c30034067$var$alphamap_fragment,\n alphamap_pars_fragment: $d5b33d7c30034067$var$alphamap_pars_fragment,\n alphatest_fragment: $d5b33d7c30034067$var$alphatest_fragment,\n alphatest_pars_fragment: $d5b33d7c30034067$var$alphatest_pars_fragment,\n aomap_fragment: $d5b33d7c30034067$var$aomap_fragment,\n aomap_pars_fragment: $d5b33d7c30034067$var$aomap_pars_fragment,\n begin_vertex: $d5b33d7c30034067$var$begin_vertex,\n beginnormal_vertex: $d5b33d7c30034067$var$beginnormal_vertex,\n bsdfs: $d5b33d7c30034067$var$bsdfs,\n iridescence_fragment: $d5b33d7c30034067$var$iridescence_fragment,\n bumpmap_pars_fragment: $d5b33d7c30034067$var$bumpmap_pars_fragment,\n clipping_planes_fragment: $d5b33d7c30034067$var$clipping_planes_fragment,\n clipping_planes_pars_fragment: $d5b33d7c30034067$var$clipping_planes_pars_fragment,\n clipping_planes_pars_vertex: $d5b33d7c30034067$var$clipping_planes_pars_vertex,\n clipping_planes_vertex: $d5b33d7c30034067$var$clipping_planes_vertex,\n color_fragment: $d5b33d7c30034067$var$color_fragment,\n color_pars_fragment: $d5b33d7c30034067$var$color_pars_fragment,\n color_pars_vertex: $d5b33d7c30034067$var$color_pars_vertex,\n color_vertex: $d5b33d7c30034067$var$color_vertex,\n common: $d5b33d7c30034067$var$common,\n cube_uv_reflection_fragment: $d5b33d7c30034067$var$cube_uv_reflection_fragment,\n defaultnormal_vertex: $d5b33d7c30034067$var$defaultnormal_vertex,\n displacementmap_pars_vertex: $d5b33d7c30034067$var$displacementmap_pars_vertex,\n displacementmap_vertex: $d5b33d7c30034067$var$displacementmap_vertex,\n emissivemap_fragment: $d5b33d7c30034067$var$emissivemap_fragment,\n emissivemap_pars_fragment: $d5b33d7c30034067$var$emissivemap_pars_fragment,\n colorspace_fragment: $d5b33d7c30034067$var$colorspace_fragment,\n colorspace_pars_fragment: $d5b33d7c30034067$var$colorspace_pars_fragment,\n envmap_fragment: $d5b33d7c30034067$var$envmap_fragment,\n envmap_common_pars_fragment: $d5b33d7c30034067$var$envmap_common_pars_fragment,\n envmap_pars_fragment: $d5b33d7c30034067$var$envmap_pars_fragment,\n envmap_pars_vertex: $d5b33d7c30034067$var$envmap_pars_vertex,\n envmap_physical_pars_fragment: $d5b33d7c30034067$var$envmap_physical_pars_fragment,\n envmap_vertex: $d5b33d7c30034067$var$envmap_vertex,\n fog_vertex: $d5b33d7c30034067$var$fog_vertex,\n fog_pars_vertex: $d5b33d7c30034067$var$fog_pars_vertex,\n fog_fragment: $d5b33d7c30034067$var$fog_fragment,\n fog_pars_fragment: $d5b33d7c30034067$var$fog_pars_fragment,\n gradientmap_pars_fragment: $d5b33d7c30034067$var$gradientmap_pars_fragment,\n lightmap_fragment: $d5b33d7c30034067$var$lightmap_fragment,\n lightmap_pars_fragment: $d5b33d7c30034067$var$lightmap_pars_fragment,\n lights_lambert_fragment: $d5b33d7c30034067$var$lights_lambert_fragment,\n lights_lambert_pars_fragment: $d5b33d7c30034067$var$lights_lambert_pars_fragment,\n lights_pars_begin: $d5b33d7c30034067$var$lights_pars_begin,\n lights_toon_fragment: $d5b33d7c30034067$var$lights_toon_fragment,\n lights_toon_pars_fragment: $d5b33d7c30034067$var$lights_toon_pars_fragment,\n lights_phong_fragment: $d5b33d7c30034067$var$lights_phong_fragment,\n lights_phong_pars_fragment: $d5b33d7c30034067$var$lights_phong_pars_fragment,\n lights_physical_fragment: $d5b33d7c30034067$var$lights_physical_fragment,\n lights_physical_pars_fragment: $d5b33d7c30034067$var$lights_physical_pars_fragment,\n lights_fragment_begin: $d5b33d7c30034067$var$lights_fragment_begin,\n lights_fragment_maps: $d5b33d7c30034067$var$lights_fragment_maps,\n lights_fragment_end: $d5b33d7c30034067$var$lights_fragment_end,\n logdepthbuf_fragment: $d5b33d7c30034067$var$logdepthbuf_fragment,\n logdepthbuf_pars_fragment: $d5b33d7c30034067$var$logdepthbuf_pars_fragment,\n logdepthbuf_pars_vertex: $d5b33d7c30034067$var$logdepthbuf_pars_vertex,\n logdepthbuf_vertex: $d5b33d7c30034067$var$logdepthbuf_vertex,\n map_fragment: $d5b33d7c30034067$var$map_fragment,\n map_pars_fragment: $d5b33d7c30034067$var$map_pars_fragment,\n map_particle_fragment: $d5b33d7c30034067$var$map_particle_fragment,\n map_particle_pars_fragment: $d5b33d7c30034067$var$map_particle_pars_fragment,\n metalnessmap_fragment: $d5b33d7c30034067$var$metalnessmap_fragment,\n metalnessmap_pars_fragment: $d5b33d7c30034067$var$metalnessmap_pars_fragment,\n morphcolor_vertex: $d5b33d7c30034067$var$morphcolor_vertex,\n morphnormal_vertex: $d5b33d7c30034067$var$morphnormal_vertex,\n morphtarget_pars_vertex: $d5b33d7c30034067$var$morphtarget_pars_vertex,\n morphtarget_vertex: $d5b33d7c30034067$var$morphtarget_vertex,\n normal_fragment_begin: $d5b33d7c30034067$var$normal_fragment_begin,\n normal_fragment_maps: $d5b33d7c30034067$var$normal_fragment_maps,\n normal_pars_fragment: $d5b33d7c30034067$var$normal_pars_fragment,\n normal_pars_vertex: $d5b33d7c30034067$var$normal_pars_vertex,\n normal_vertex: $d5b33d7c30034067$var$normal_vertex,\n normalmap_pars_fragment: $d5b33d7c30034067$var$normalmap_pars_fragment,\n clearcoat_normal_fragment_begin: $d5b33d7c30034067$var$clearcoat_normal_fragment_begin,\n clearcoat_normal_fragment_maps: $d5b33d7c30034067$var$clearcoat_normal_fragment_maps,\n clearcoat_pars_fragment: $d5b33d7c30034067$var$clearcoat_pars_fragment,\n iridescence_pars_fragment: $d5b33d7c30034067$var$iridescence_pars_fragment,\n opaque_fragment: $d5b33d7c30034067$var$opaque_fragment,\n packing: $d5b33d7c30034067$var$packing,\n premultiplied_alpha_fragment: $d5b33d7c30034067$var$premultiplied_alpha_fragment,\n project_vertex: $d5b33d7c30034067$var$project_vertex,\n dithering_fragment: $d5b33d7c30034067$var$dithering_fragment,\n dithering_pars_fragment: $d5b33d7c30034067$var$dithering_pars_fragment,\n roughnessmap_fragment: $d5b33d7c30034067$var$roughnessmap_fragment,\n roughnessmap_pars_fragment: $d5b33d7c30034067$var$roughnessmap_pars_fragment,\n shadowmap_pars_fragment: $d5b33d7c30034067$var$shadowmap_pars_fragment,\n shadowmap_pars_vertex: $d5b33d7c30034067$var$shadowmap_pars_vertex,\n shadowmap_vertex: $d5b33d7c30034067$var$shadowmap_vertex,\n shadowmask_pars_fragment: $d5b33d7c30034067$var$shadowmask_pars_fragment,\n skinbase_vertex: $d5b33d7c30034067$var$skinbase_vertex,\n skinning_pars_vertex: $d5b33d7c30034067$var$skinning_pars_vertex,\n skinning_vertex: $d5b33d7c30034067$var$skinning_vertex,\n skinnormal_vertex: $d5b33d7c30034067$var$skinnormal_vertex,\n specularmap_fragment: $d5b33d7c30034067$var$specularmap_fragment,\n specularmap_pars_fragment: $d5b33d7c30034067$var$specularmap_pars_fragment,\n tonemapping_fragment: $d5b33d7c30034067$var$tonemapping_fragment,\n tonemapping_pars_fragment: $d5b33d7c30034067$var$tonemapping_pars_fragment,\n transmission_fragment: $d5b33d7c30034067$var$transmission_fragment,\n transmission_pars_fragment: $d5b33d7c30034067$var$transmission_pars_fragment,\n uv_pars_fragment: $d5b33d7c30034067$var$uv_pars_fragment,\n uv_pars_vertex: $d5b33d7c30034067$var$uv_pars_vertex,\n uv_vertex: $d5b33d7c30034067$var$uv_vertex,\n worldpos_vertex: $d5b33d7c30034067$var$worldpos_vertex,\n background_vert: $d5b33d7c30034067$var$vertex$h,\n background_frag: $d5b33d7c30034067$var$fragment$h,\n backgroundCube_vert: $d5b33d7c30034067$var$vertex$g,\n backgroundCube_frag: $d5b33d7c30034067$var$fragment$g,\n cube_vert: $d5b33d7c30034067$var$vertex$f,\n cube_frag: $d5b33d7c30034067$var$fragment$f,\n depth_vert: $d5b33d7c30034067$var$vertex$e,\n depth_frag: $d5b33d7c30034067$var$fragment$e,\n distanceRGBA_vert: $d5b33d7c30034067$var$vertex$d,\n distanceRGBA_frag: $d5b33d7c30034067$var$fragment$d,\n equirect_vert: $d5b33d7c30034067$var$vertex$c,\n equirect_frag: $d5b33d7c30034067$var$fragment$c,\n linedashed_vert: $d5b33d7c30034067$var$vertex$b,\n linedashed_frag: $d5b33d7c30034067$var$fragment$b,\n meshbasic_vert: $d5b33d7c30034067$var$vertex$a,\n meshbasic_frag: $d5b33d7c30034067$var$fragment$a,\n meshlambert_vert: $d5b33d7c30034067$var$vertex$9,\n meshlambert_frag: $d5b33d7c30034067$var$fragment$9,\n meshmatcap_vert: $d5b33d7c30034067$var$vertex$8,\n meshmatcap_frag: $d5b33d7c30034067$var$fragment$8,\n meshnormal_vert: $d5b33d7c30034067$var$vertex$7,\n meshnormal_frag: $d5b33d7c30034067$var$fragment$7,\n meshphong_vert: $d5b33d7c30034067$var$vertex$6,\n meshphong_frag: $d5b33d7c30034067$var$fragment$6,\n meshphysical_vert: $d5b33d7c30034067$var$vertex$5,\n meshphysical_frag: $d5b33d7c30034067$var$fragment$5,\n meshtoon_vert: $d5b33d7c30034067$var$vertex$4,\n meshtoon_frag: $d5b33d7c30034067$var$fragment$4,\n points_vert: $d5b33d7c30034067$var$vertex$3,\n points_frag: $d5b33d7c30034067$var$fragment$3,\n shadow_vert: $d5b33d7c30034067$var$vertex$2,\n shadow_frag: $d5b33d7c30034067$var$fragment$2,\n sprite_vert: $d5b33d7c30034067$var$vertex$1,\n sprite_frag: $d5b33d7c30034067$var$fragment$1\n};\n/**\n * Uniforms library for shared webgl shaders\n */ const $d5b33d7c30034067$export$6643083551874bf5 = {\n common: {\n diffuse: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n },\n opacity: {\n value: 1.0\n },\n map: {\n value: null\n },\n mapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaMap: {\n value: null\n },\n alphaMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaTest: {\n value: 0\n }\n },\n specularmap: {\n specularMap: {\n value: null\n },\n specularMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n envmap: {\n envMap: {\n value: null\n },\n flipEnvMap: {\n value: -1\n },\n reflectivity: {\n value: 1.0\n },\n ior: {\n value: 1.5\n },\n refractionRatio: {\n value: 0.98\n }\n },\n aomap: {\n aoMap: {\n value: null\n },\n aoMapIntensity: {\n value: 1\n },\n aoMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n lightmap: {\n lightMap: {\n value: null\n },\n lightMapIntensity: {\n value: 1\n },\n lightMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n bumpmap: {\n bumpMap: {\n value: null\n },\n bumpMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n bumpScale: {\n value: 1\n }\n },\n normalmap: {\n normalMap: {\n value: null\n },\n normalMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n normalScale: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1)\n }\n },\n displacementmap: {\n displacementMap: {\n value: null\n },\n displacementMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n displacementScale: {\n value: 1\n },\n displacementBias: {\n value: 0\n }\n },\n emissivemap: {\n emissiveMap: {\n value: null\n },\n emissiveMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n metalnessmap: {\n metalnessMap: {\n value: null\n },\n metalnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n roughnessmap: {\n roughnessMap: {\n value: null\n },\n roughnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n gradientmap: {\n gradientMap: {\n value: null\n }\n },\n fog: {\n fogDensity: {\n value: 0.00025\n },\n fogNear: {\n value: 1\n },\n fogFar: {\n value: 2000\n },\n fogColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n }\n },\n lights: {\n ambientLightColor: {\n value: []\n },\n lightProbe: {\n value: []\n },\n directionalLights: {\n value: [],\n properties: {\n direction: {},\n color: {}\n }\n },\n directionalLightShadows: {\n value: [],\n properties: {\n shadowBias: {},\n shadowNormalBias: {},\n shadowRadius: {},\n shadowMapSize: {}\n }\n },\n directionalShadowMap: {\n value: []\n },\n directionalShadowMatrix: {\n value: []\n },\n spotLights: {\n value: [],\n properties: {\n color: {},\n position: {},\n direction: {},\n distance: {},\n coneCos: {},\n penumbraCos: {},\n decay: {}\n }\n },\n spotLightShadows: {\n value: [],\n properties: {\n shadowBias: {},\n shadowNormalBias: {},\n shadowRadius: {},\n shadowMapSize: {}\n }\n },\n spotLightMap: {\n value: []\n },\n spotShadowMap: {\n value: []\n },\n spotLightMatrix: {\n value: []\n },\n pointLights: {\n value: [],\n properties: {\n color: {},\n position: {},\n decay: {},\n distance: {}\n }\n },\n pointLightShadows: {\n value: [],\n properties: {\n shadowBias: {},\n shadowNormalBias: {},\n shadowRadius: {},\n shadowMapSize: {},\n shadowCameraNear: {},\n shadowCameraFar: {}\n }\n },\n pointShadowMap: {\n value: []\n },\n pointShadowMatrix: {\n value: []\n },\n hemisphereLights: {\n value: [],\n properties: {\n direction: {},\n skyColor: {},\n groundColor: {}\n }\n },\n // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n rectAreaLights: {\n value: [],\n properties: {\n color: {},\n position: {},\n width: {},\n height: {}\n }\n },\n ltc_1: {\n value: null\n },\n ltc_2: {\n value: null\n }\n },\n points: {\n diffuse: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n },\n opacity: {\n value: 1.0\n },\n size: {\n value: 1.0\n },\n scale: {\n value: 1.0\n },\n map: {\n value: null\n },\n alphaMap: {\n value: null\n },\n alphaMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaTest: {\n value: 0\n },\n uvTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n },\n sprite: {\n diffuse: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff)\n },\n opacity: {\n value: 1.0\n },\n center: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0.5)\n },\n rotation: {\n value: 0.0\n },\n map: {\n value: null\n },\n mapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaMap: {\n value: null\n },\n alphaMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n alphaTest: {\n value: 0\n }\n }\n};\nconst $d5b33d7c30034067$export$bee4a7d47f8f5014 = {\n basic: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.specularmap,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshbasic_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshbasic_frag\n },\n lambert: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.specularmap,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshlambert_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshlambert_frag\n },\n phong: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.specularmap,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n specular: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x111111)\n },\n shininess: {\n value: 30\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphong_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphong_frag\n },\n standard: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.envmap,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.roughnessmap,\n $d5b33d7c30034067$export$6643083551874bf5.metalnessmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n roughness: {\n value: 1.0\n },\n metalness: {\n value: 0.0\n },\n envMapIntensity: {\n value: 1\n } // temporary\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_frag\n },\n toon: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.aomap,\n $d5b33d7c30034067$export$6643083551874bf5.lightmap,\n $d5b33d7c30034067$export$6643083551874bf5.emissivemap,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.gradientmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n {\n emissive: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshtoon_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshtoon_frag\n },\n matcap: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n {\n matcap: {\n value: null\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshmatcap_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshmatcap_frag\n },\n points: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.points,\n $d5b33d7c30034067$export$6643083551874bf5.fog\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.points_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.points_frag\n },\n dashed: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n {\n scale: {\n value: 1\n },\n dashSize: {\n value: 1\n },\n totalSize: {\n value: 2\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.linedashed_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.linedashed_frag\n },\n depth: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.depth_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.depth_frag\n },\n normal: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.bumpmap,\n $d5b33d7c30034067$export$6643083551874bf5.normalmap,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n {\n opacity: {\n value: 1.0\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshnormal_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshnormal_frag\n },\n sprite: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.sprite,\n $d5b33d7c30034067$export$6643083551874bf5.fog\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.sprite_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.sprite_frag\n },\n background: {\n uniforms: {\n uvTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n t2D: {\n value: null\n },\n backgroundIntensity: {\n value: 1\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.background_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.background_frag\n },\n backgroundCube: {\n uniforms: {\n envMap: {\n value: null\n },\n flipEnvMap: {\n value: -1\n },\n backgroundBlurriness: {\n value: 0\n },\n backgroundIntensity: {\n value: 1\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.backgroundCube_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.backgroundCube_frag\n },\n cube: {\n uniforms: {\n tCube: {\n value: null\n },\n tFlip: {\n value: -1\n },\n opacity: {\n value: 1.0\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.cube_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.cube_frag\n },\n equirect: {\n uniforms: {\n tEquirect: {\n value: null\n }\n },\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.equirect_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.equirect_frag\n },\n distanceRGBA: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.common,\n $d5b33d7c30034067$export$6643083551874bf5.displacementmap,\n {\n referencePosition: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699()\n },\n nearDistance: {\n value: 1\n },\n farDistance: {\n value: 1000\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.distanceRGBA_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.distanceRGBA_frag\n },\n shadow: {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$6643083551874bf5.lights,\n $d5b33d7c30034067$export$6643083551874bf5.fog,\n {\n color: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x00000)\n },\n opacity: {\n value: 1.0\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.shadow_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.shadow_frag\n }\n};\n$d5b33d7c30034067$export$bee4a7d47f8f5014.physical = {\n uniforms: /*@__PURE__*/ $d5b33d7c30034067$var$mergeUniforms([\n $d5b33d7c30034067$export$bee4a7d47f8f5014.standard.uniforms,\n {\n clearcoat: {\n value: 0\n },\n clearcoatMap: {\n value: null\n },\n clearcoatMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n clearcoatNormalMap: {\n value: null\n },\n clearcoatNormalMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n clearcoatNormalScale: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1)\n },\n clearcoatRoughness: {\n value: 0\n },\n clearcoatRoughnessMap: {\n value: null\n },\n clearcoatRoughnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n iridescence: {\n value: 0\n },\n iridescenceMap: {\n value: null\n },\n iridescenceMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n iridescenceIOR: {\n value: 1.3\n },\n iridescenceThicknessMinimum: {\n value: 100\n },\n iridescenceThicknessMaximum: {\n value: 400\n },\n iridescenceThicknessMap: {\n value: null\n },\n iridescenceThicknessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n sheen: {\n value: 0\n },\n sheenColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n sheenColorMap: {\n value: null\n },\n sheenColorMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n sheenRoughness: {\n value: 1\n },\n sheenRoughnessMap: {\n value: null\n },\n sheenRoughnessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n transmission: {\n value: 0\n },\n transmissionMap: {\n value: null\n },\n transmissionMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n transmissionSamplerSize: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1()\n },\n transmissionSamplerMap: {\n value: null\n },\n thickness: {\n value: 0\n },\n thicknessMap: {\n value: null\n },\n thicknessMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n attenuationDistance: {\n value: 0\n },\n attenuationColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(0x000000)\n },\n specularColor: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e(1, 1, 1)\n },\n specularColorMap: {\n value: null\n },\n specularColorMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n specularIntensity: {\n value: 1\n },\n specularIntensityMap: {\n value: null\n },\n specularIntensityMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n },\n anisotropyVector: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1()\n },\n anisotropyMap: {\n value: null\n },\n anisotropyMapTransform: {\n value: /*@__PURE__*/ new $d5b33d7c30034067$export$8ff26dafa08918()\n }\n }\n ]),\n vertexShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_vert,\n fragmentShader: $d5b33d7c30034067$export$955f9f2e84c43c8b.meshphysical_frag\n};\nconst $d5b33d7c30034067$var$_rgb = {\n r: 0,\n b: 0,\n g: 0\n};\nfunction $d5b33d7c30034067$var$WebGLBackground(renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha) {\n const clearColor = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n let clearAlpha = alpha === true ? 0 : 1;\n let planeMesh;\n let boxMesh;\n let currentBackground = null;\n let currentBackgroundVersion = 0;\n let currentTonemapping = null;\n function render(renderList, scene) {\n let forceClear = false;\n let background = scene.isScene === true ? scene.background : null;\n if (background && background.isTexture) {\n const usePMREM = scene.backgroundBlurriness > 0; // use PMREM if the user wants to blur the background\n background = (usePMREM ? cubeuvmaps : cubemaps).get(background);\n }\n if (background === null) setClear(clearColor, clearAlpha);\n else if (background && background.isColor) {\n setClear(background, 1);\n forceClear = true;\n }\n const environmentBlendMode = renderer.xr.getEnvironmentBlendMode();\n if (environmentBlendMode === \"additive\") state.buffers.color.setClear(0, 0, 0, 1, premultipliedAlpha);\n else if (environmentBlendMode === \"alpha-blend\") state.buffers.color.setClear(0, 0, 0, 0, premultipliedAlpha);\n if (renderer.autoClear || forceClear) renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);\n if (background && (background.isCubeTexture || background.mapping === $d5b33d7c30034067$export$dbf3e70ff37af79)) {\n if (boxMesh === undefined) {\n boxMesh = new $d5b33d7c30034067$export$e176487c05830cc5(new $d5b33d7c30034067$export$33e43285f7406bd5(1, 1, 1), new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"BackgroundCubeMaterial\",\n uniforms: $d5b33d7c30034067$var$cloneUniforms($d5b33d7c30034067$export$bee4a7d47f8f5014.backgroundCube.uniforms),\n vertexShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.backgroundCube.vertexShader,\n fragmentShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.backgroundCube.fragmentShader,\n side: $d5b33d7c30034067$export$d9f0486e75b5ace,\n depthTest: false,\n depthWrite: false,\n fog: false\n }));\n boxMesh.geometry.deleteAttribute(\"normal\");\n boxMesh.geometry.deleteAttribute(\"uv\");\n boxMesh.onBeforeRender = function(renderer, scene, camera) {\n this.matrixWorld.copyPosition(camera.matrixWorld);\n };\n // add \"envMap\" material property so the renderer can evaluate it like for built-in materials\n Object.defineProperty(boxMesh.material, \"envMap\", {\n get: function() {\n return this.uniforms.envMap.value;\n }\n });\n objects.update(boxMesh);\n }\n boxMesh.material.uniforms.envMap.value = background;\n boxMesh.material.uniforms.flipEnvMap.value = background.isCubeTexture && background.isRenderTargetTexture === false ? -1 : 1;\n boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness;\n boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n boxMesh.material.toneMapped = $d5b33d7c30034067$export$5e6fd513f44698c.getTransfer(background.colorSpace) !== $d5b33d7c30034067$export$8d0a61916cc26abb;\n if (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n boxMesh.material.needsUpdate = true;\n currentBackground = background;\n currentBackgroundVersion = background.version;\n currentTonemapping = renderer.toneMapping;\n }\n boxMesh.layers.enableAll();\n // push to the pre-sorted opaque render list\n renderList.unshift(boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null);\n } else if (background && background.isTexture) {\n if (planeMesh === undefined) {\n planeMesh = new $d5b33d7c30034067$export$e176487c05830cc5(new $d5b33d7c30034067$export$967d831af31f69ce(2, 2), new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"BackgroundMaterial\",\n uniforms: $d5b33d7c30034067$var$cloneUniforms($d5b33d7c30034067$export$bee4a7d47f8f5014.background.uniforms),\n vertexShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.background.vertexShader,\n fragmentShader: $d5b33d7c30034067$export$bee4a7d47f8f5014.background.fragmentShader,\n side: $d5b33d7c30034067$export$2ede184fc2998901,\n depthTest: false,\n depthWrite: false,\n fog: false\n }));\n planeMesh.geometry.deleteAttribute(\"normal\");\n // add \"map\" material property so the renderer can evaluate it like for built-in materials\n Object.defineProperty(planeMesh.material, \"map\", {\n get: function() {\n return this.uniforms.t2D.value;\n }\n });\n objects.update(planeMesh);\n }\n planeMesh.material.uniforms.t2D.value = background;\n planeMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n planeMesh.material.toneMapped = $d5b33d7c30034067$export$5e6fd513f44698c.getTransfer(background.colorSpace) !== $d5b33d7c30034067$export$8d0a61916cc26abb;\n if (background.matrixAutoUpdate === true) background.updateMatrix();\n planeMesh.material.uniforms.uvTransform.value.copy(background.matrix);\n if (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n planeMesh.material.needsUpdate = true;\n currentBackground = background;\n currentBackgroundVersion = background.version;\n currentTonemapping = renderer.toneMapping;\n }\n planeMesh.layers.enableAll();\n // push to the pre-sorted opaque render list\n renderList.unshift(planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null);\n }\n }\n function setClear(color, alpha) {\n color.getRGB($d5b33d7c30034067$var$_rgb, $d5b33d7c30034067$var$getUnlitUniformColorSpace(renderer));\n state.buffers.color.setClear($d5b33d7c30034067$var$_rgb.r, $d5b33d7c30034067$var$_rgb.g, $d5b33d7c30034067$var$_rgb.b, alpha, premultipliedAlpha);\n }\n return {\n getClearColor: function() {\n return clearColor;\n },\n setClearColor: function(color, alpha = 1) {\n clearColor.set(color);\n clearAlpha = alpha;\n setClear(clearColor, clearAlpha);\n },\n getClearAlpha: function() {\n return clearAlpha;\n },\n setClearAlpha: function(alpha) {\n clearAlpha = alpha;\n setClear(clearColor, clearAlpha);\n },\n render: render\n };\n}\nfunction $d5b33d7c30034067$var$WebGLBindingStates(gl, extensions, attributes, capabilities) {\n const maxVertexAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n const extension = capabilities.isWebGL2 ? null : extensions.get(\"OES_vertex_array_object\");\n const vaoAvailable = capabilities.isWebGL2 || extension !== null;\n const bindingStates = {};\n const defaultState = createBindingState(null);\n let currentState = defaultState;\n let forceUpdate = false;\n function setup(object, material, program, geometry, index) {\n let updateBuffers = false;\n if (vaoAvailable) {\n const state = getBindingState(geometry, program, material);\n if (currentState !== state) {\n currentState = state;\n bindVertexArrayObject(currentState.object);\n }\n updateBuffers = needsUpdate(object, geometry, program, index);\n if (updateBuffers) saveCache(object, geometry, program, index);\n } else {\n const wireframe = material.wireframe === true;\n if (currentState.geometry !== geometry.id || currentState.program !== program.id || currentState.wireframe !== wireframe) {\n currentState.geometry = geometry.id;\n currentState.program = program.id;\n currentState.wireframe = wireframe;\n updateBuffers = true;\n }\n }\n if (index !== null) attributes.update(index, gl.ELEMENT_ARRAY_BUFFER);\n if (updateBuffers || forceUpdate) {\n forceUpdate = false;\n setupVertexAttributes(object, material, program, geometry);\n if (index !== null) gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, attributes.get(index).buffer);\n }\n }\n function createVertexArrayObject() {\n if (capabilities.isWebGL2) return gl.createVertexArray();\n return extension.createVertexArrayOES();\n }\n function bindVertexArrayObject(vao) {\n if (capabilities.isWebGL2) return gl.bindVertexArray(vao);\n return extension.bindVertexArrayOES(vao);\n }\n function deleteVertexArrayObject(vao) {\n if (capabilities.isWebGL2) return gl.deleteVertexArray(vao);\n return extension.deleteVertexArrayOES(vao);\n }\n function getBindingState(geometry, program, material) {\n const wireframe = material.wireframe === true;\n let programMap = bindingStates[geometry.id];\n if (programMap === undefined) {\n programMap = {};\n bindingStates[geometry.id] = programMap;\n }\n let stateMap = programMap[program.id];\n if (stateMap === undefined) {\n stateMap = {};\n programMap[program.id] = stateMap;\n }\n let state = stateMap[wireframe];\n if (state === undefined) {\n state = createBindingState(createVertexArrayObject());\n stateMap[wireframe] = state;\n }\n return state;\n }\n function createBindingState(vao) {\n const newAttributes = [];\n const enabledAttributes = [];\n const attributeDivisors = [];\n for(let i = 0; i < maxVertexAttributes; i++){\n newAttributes[i] = 0;\n enabledAttributes[i] = 0;\n attributeDivisors[i] = 0;\n }\n return {\n // for backward compatibility on non-VAO support browser\n geometry: null,\n program: null,\n wireframe: false,\n newAttributes: newAttributes,\n enabledAttributes: enabledAttributes,\n attributeDivisors: attributeDivisors,\n object: vao,\n attributes: {},\n index: null\n };\n }\n function needsUpdate(object, geometry, program, index) {\n const cachedAttributes = currentState.attributes;\n const geometryAttributes = geometry.attributes;\n let attributesNum = 0;\n const programAttributes = program.getAttributes();\n for(const name in programAttributes){\n const programAttribute = programAttributes[name];\n if (programAttribute.location >= 0) {\n const cachedAttribute = cachedAttributes[name];\n let geometryAttribute = geometryAttributes[name];\n if (geometryAttribute === undefined) {\n if (name === \"instanceMatrix\" && object.instanceMatrix) geometryAttribute = object.instanceMatrix;\n if (name === \"instanceColor\" && object.instanceColor) geometryAttribute = object.instanceColor;\n }\n if (cachedAttribute === undefined) return true;\n if (cachedAttribute.attribute !== geometryAttribute) return true;\n if (geometryAttribute && cachedAttribute.data !== geometryAttribute.data) return true;\n attributesNum++;\n }\n }\n if (currentState.attributesNum !== attributesNum) return true;\n if (currentState.index !== index) return true;\n return false;\n }\n function saveCache(object, geometry, program, index) {\n const cache = {};\n const attributes = geometry.attributes;\n let attributesNum = 0;\n const programAttributes = program.getAttributes();\n for(const name in programAttributes){\n const programAttribute = programAttributes[name];\n if (programAttribute.location >= 0) {\n let attribute = attributes[name];\n if (attribute === undefined) {\n if (name === \"instanceMatrix\" && object.instanceMatrix) attribute = object.instanceMatrix;\n if (name === \"instanceColor\" && object.instanceColor) attribute = object.instanceColor;\n }\n const data = {};\n data.attribute = attribute;\n if (attribute && attribute.data) data.data = attribute.data;\n cache[name] = data;\n attributesNum++;\n }\n }\n currentState.attributes = cache;\n currentState.attributesNum = attributesNum;\n currentState.index = index;\n }\n function initAttributes() {\n const newAttributes = currentState.newAttributes;\n for(let i = 0, il = newAttributes.length; i < il; i++)newAttributes[i] = 0;\n }\n function enableAttribute(attribute) {\n enableAttributeAndDivisor(attribute, 0);\n }\n function enableAttributeAndDivisor(attribute, meshPerAttribute) {\n const newAttributes = currentState.newAttributes;\n const enabledAttributes = currentState.enabledAttributes;\n const attributeDivisors = currentState.attributeDivisors;\n newAttributes[attribute] = 1;\n if (enabledAttributes[attribute] === 0) {\n gl.enableVertexAttribArray(attribute);\n enabledAttributes[attribute] = 1;\n }\n if (attributeDivisors[attribute] !== meshPerAttribute) {\n const extension = capabilities.isWebGL2 ? gl : extensions.get(\"ANGLE_instanced_arrays\");\n extension[capabilities.isWebGL2 ? \"vertexAttribDivisor\" : \"vertexAttribDivisorANGLE\"](attribute, meshPerAttribute);\n attributeDivisors[attribute] = meshPerAttribute;\n }\n }\n function disableUnusedAttributes() {\n const newAttributes = currentState.newAttributes;\n const enabledAttributes = currentState.enabledAttributes;\n for(let i = 0, il = enabledAttributes.length; i < il; i++)if (enabledAttributes[i] !== newAttributes[i]) {\n gl.disableVertexAttribArray(i);\n enabledAttributes[i] = 0;\n }\n }\n function vertexAttribPointer(index, size, type, normalized, stride, offset, integer) {\n if (integer === true) gl.vertexAttribIPointer(index, size, type, stride, offset);\n else gl.vertexAttribPointer(index, size, type, normalized, stride, offset);\n }\n function setupVertexAttributes(object, material, program, geometry) {\n if (capabilities.isWebGL2 === false && (object.isInstancedMesh || geometry.isInstancedBufferGeometry)) {\n if (extensions.get(\"ANGLE_instanced_arrays\") === null) return;\n }\n initAttributes();\n const geometryAttributes = geometry.attributes;\n const programAttributes = program.getAttributes();\n const materialDefaultAttributeValues = material.defaultAttributeValues;\n for(const name in programAttributes){\n const programAttribute = programAttributes[name];\n if (programAttribute.location >= 0) {\n let geometryAttribute = geometryAttributes[name];\n if (geometryAttribute === undefined) {\n if (name === \"instanceMatrix\" && object.instanceMatrix) geometryAttribute = object.instanceMatrix;\n if (name === \"instanceColor\" && object.instanceColor) geometryAttribute = object.instanceColor;\n }\n if (geometryAttribute !== undefined) {\n const normalized = geometryAttribute.normalized;\n const size = geometryAttribute.itemSize;\n const attribute = attributes.get(geometryAttribute);\n // TODO Attribute may not be available on context restore\n if (attribute === undefined) continue;\n const buffer = attribute.buffer;\n const type = attribute.type;\n const bytesPerElement = attribute.bytesPerElement;\n // check for integer attributes (WebGL 2 only)\n const integer = capabilities.isWebGL2 === true && (type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === $d5b33d7c30034067$export$5c612977753abe2);\n if (geometryAttribute.isInterleavedBufferAttribute) {\n const data = geometryAttribute.data;\n const stride = data.stride;\n const offset = geometryAttribute.offset;\n if (data.isInstancedInterleavedBuffer) {\n for(let i = 0; i < programAttribute.locationSize; i++)enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);\n if (object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined) geometry._maxInstanceCount = data.meshPerAttribute * data.count;\n } else for(let i = 0; i < programAttribute.locationSize; i++)enableAttribute(programAttribute.location + i);\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n for(let i = 0; i < programAttribute.locationSize; i++)vertexAttribPointer(programAttribute.location + i, size / programAttribute.locationSize, type, normalized, stride * bytesPerElement, (offset + size / programAttribute.locationSize * i) * bytesPerElement, integer);\n } else {\n if (geometryAttribute.isInstancedBufferAttribute) {\n for(let i = 0; i < programAttribute.locationSize; i++)enableAttributeAndDivisor(programAttribute.location + i, geometryAttribute.meshPerAttribute);\n if (object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined) geometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n } else for(let i = 0; i < programAttribute.locationSize; i++)enableAttribute(programAttribute.location + i);\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n for(let i = 0; i < programAttribute.locationSize; i++)vertexAttribPointer(programAttribute.location + i, size / programAttribute.locationSize, type, normalized, size * bytesPerElement, size / programAttribute.locationSize * i * bytesPerElement, integer);\n }\n } else if (materialDefaultAttributeValues !== undefined) {\n const value = materialDefaultAttributeValues[name];\n if (value !== undefined) switch(value.length){\n case 2:\n gl.vertexAttrib2fv(programAttribute.location, value);\n break;\n case 3:\n gl.vertexAttrib3fv(programAttribute.location, value);\n break;\n case 4:\n gl.vertexAttrib4fv(programAttribute.location, value);\n break;\n default:\n gl.vertexAttrib1fv(programAttribute.location, value);\n }\n }\n }\n }\n disableUnusedAttributes();\n }\n function dispose() {\n reset();\n for(const geometryId in bindingStates){\n const programMap = bindingStates[geometryId];\n for(const programId in programMap){\n const stateMap = programMap[programId];\n for(const wireframe in stateMap){\n deleteVertexArrayObject(stateMap[wireframe].object);\n delete stateMap[wireframe];\n }\n delete programMap[programId];\n }\n delete bindingStates[geometryId];\n }\n }\n function releaseStatesOfGeometry(geometry) {\n if (bindingStates[geometry.id] === undefined) return;\n const programMap = bindingStates[geometry.id];\n for(const programId in programMap){\n const stateMap = programMap[programId];\n for(const wireframe in stateMap){\n deleteVertexArrayObject(stateMap[wireframe].object);\n delete stateMap[wireframe];\n }\n delete programMap[programId];\n }\n delete bindingStates[geometry.id];\n }\n function releaseStatesOfProgram(program) {\n for(const geometryId in bindingStates){\n const programMap = bindingStates[geometryId];\n if (programMap[program.id] === undefined) continue;\n const stateMap = programMap[program.id];\n for(const wireframe in stateMap){\n deleteVertexArrayObject(stateMap[wireframe].object);\n delete stateMap[wireframe];\n }\n delete programMap[program.id];\n }\n }\n function reset() {\n resetDefaultState();\n forceUpdate = true;\n if (currentState === defaultState) return;\n currentState = defaultState;\n bindVertexArrayObject(currentState.object);\n }\n // for backward-compatibility\n function resetDefaultState() {\n defaultState.geometry = null;\n defaultState.program = null;\n defaultState.wireframe = false;\n }\n return {\n setup: setup,\n reset: reset,\n resetDefaultState: resetDefaultState,\n dispose: dispose,\n releaseStatesOfGeometry: releaseStatesOfGeometry,\n releaseStatesOfProgram: releaseStatesOfProgram,\n initAttributes: initAttributes,\n enableAttribute: enableAttribute,\n disableUnusedAttributes: disableUnusedAttributes\n };\n}\nfunction $d5b33d7c30034067$var$WebGLBufferRenderer(gl, extensions, info, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n let mode;\n function setMode(value) {\n mode = value;\n }\n function render(start, count) {\n gl.drawArrays(mode, start, count);\n info.update(count, mode, 1);\n }\n function renderInstances(start, count, primcount) {\n if (primcount === 0) return;\n let extension, methodName;\n if (isWebGL2) {\n extension = gl;\n methodName = \"drawArraysInstanced\";\n } else {\n extension = extensions.get(\"ANGLE_instanced_arrays\");\n methodName = \"drawArraysInstancedANGLE\";\n if (extension === null) {\n console.error(\"THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");\n return;\n }\n }\n extension[methodName](mode, start, count, primcount);\n info.update(count, mode, primcount);\n }\n //\n this.setMode = setMode;\n this.render = render;\n this.renderInstances = renderInstances;\n}\nfunction $d5b33d7c30034067$var$WebGLCapabilities(gl, extensions, parameters) {\n let maxAnisotropy;\n function getMaxAnisotropy() {\n if (maxAnisotropy !== undefined) return maxAnisotropy;\n if (extensions.has(\"EXT_texture_filter_anisotropic\") === true) {\n const extension = extensions.get(\"EXT_texture_filter_anisotropic\");\n maxAnisotropy = gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT);\n } else maxAnisotropy = 0;\n return maxAnisotropy;\n }\n function getMaxPrecision(precision) {\n if (precision === \"highp\") {\n if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) return \"highp\";\n precision = \"mediump\";\n }\n if (precision === \"mediump\") {\n if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) return \"mediump\";\n }\n return \"lowp\";\n }\n const isWebGL2 = typeof WebGL2RenderingContext !== \"undefined\" && gl.constructor.name === \"WebGL2RenderingContext\";\n let precision = parameters.precision !== undefined ? parameters.precision : \"highp\";\n const maxPrecision = getMaxPrecision(precision);\n if (maxPrecision !== precision) {\n console.warn(\"THREE.WebGLRenderer:\", precision, \"not supported, using\", maxPrecision, \"instead.\");\n precision = maxPrecision;\n }\n const drawBuffers = isWebGL2 || extensions.has(\"WEBGL_draw_buffers\");\n const logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n const maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n const maxVertexTextures = gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);\n const maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n const maxCubemapSize = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);\n const maxAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n const maxVertexUniforms = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);\n const maxVaryings = gl.getParameter(gl.MAX_VARYING_VECTORS);\n const maxFragmentUniforms = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);\n const vertexTextures = maxVertexTextures > 0;\n const floatFragmentTextures = isWebGL2 || extensions.has(\"OES_texture_float\");\n const floatVertexTextures = vertexTextures && floatFragmentTextures;\n const maxSamples = isWebGL2 ? gl.getParameter(gl.MAX_SAMPLES) : 0;\n return {\n isWebGL2: isWebGL2,\n drawBuffers: drawBuffers,\n getMaxAnisotropy: getMaxAnisotropy,\n getMaxPrecision: getMaxPrecision,\n precision: precision,\n logarithmicDepthBuffer: logarithmicDepthBuffer,\n maxTextures: maxTextures,\n maxVertexTextures: maxVertexTextures,\n maxTextureSize: maxTextureSize,\n maxCubemapSize: maxCubemapSize,\n maxAttributes: maxAttributes,\n maxVertexUniforms: maxVertexUniforms,\n maxVaryings: maxVaryings,\n maxFragmentUniforms: maxFragmentUniforms,\n vertexTextures: vertexTextures,\n floatFragmentTextures: floatFragmentTextures,\n floatVertexTextures: floatVertexTextures,\n maxSamples: maxSamples\n };\n}\nfunction $d5b33d7c30034067$var$WebGLClipping(properties) {\n const scope = this;\n let globalState = null, numGlobalPlanes = 0, localClippingEnabled = false, renderingShadows = false;\n const plane = new $d5b33d7c30034067$export$7ff5ac152ef991b0(), viewNormalMatrix = new $d5b33d7c30034067$export$8ff26dafa08918(), uniform = {\n value: null,\n needsUpdate: false\n };\n this.uniform = uniform;\n this.numPlanes = 0;\n this.numIntersection = 0;\n this.init = function(planes, enableLocalClipping) {\n const enabled = planes.length !== 0 || enableLocalClipping || // enable state of previous frame - the clipping code has to\n // run another frame in order to reset the state:\n numGlobalPlanes !== 0 || localClippingEnabled;\n localClippingEnabled = enableLocalClipping;\n numGlobalPlanes = planes.length;\n return enabled;\n };\n this.beginShadows = function() {\n renderingShadows = true;\n projectPlanes(null);\n };\n this.endShadows = function() {\n renderingShadows = false;\n };\n this.setGlobalState = function(planes, camera) {\n globalState = projectPlanes(planes, camera, 0);\n };\n this.setState = function(material, camera, useCache) {\n const planes = material.clippingPlanes, clipIntersection = material.clipIntersection, clipShadows = material.clipShadows;\n const materialProperties = properties.get(material);\n if (!localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && !clipShadows) {\n // there's no local clipping\n if (renderingShadows) // there's no global clipping\n projectPlanes(null);\n else resetGlobalState();\n } else {\n const nGlobal = renderingShadows ? 0 : numGlobalPlanes, lGlobal = nGlobal * 4;\n let dstArray = materialProperties.clippingState || null;\n uniform.value = dstArray; // ensure unique state\n dstArray = projectPlanes(planes, camera, lGlobal, useCache);\n for(let i = 0; i !== lGlobal; ++i)dstArray[i] = globalState[i];\n materialProperties.clippingState = dstArray;\n this.numIntersection = clipIntersection ? this.numPlanes : 0;\n this.numPlanes += nGlobal;\n }\n };\n function resetGlobalState() {\n if (uniform.value !== globalState) {\n uniform.value = globalState;\n uniform.needsUpdate = numGlobalPlanes > 0;\n }\n scope.numPlanes = numGlobalPlanes;\n scope.numIntersection = 0;\n }\n function projectPlanes(planes, camera, dstOffset, skipTransform) {\n const nPlanes = planes !== null ? planes.length : 0;\n let dstArray = null;\n if (nPlanes !== 0) {\n dstArray = uniform.value;\n if (skipTransform !== true || dstArray === null) {\n const flatSize = dstOffset + nPlanes * 4, viewMatrix = camera.matrixWorldInverse;\n viewNormalMatrix.getNormalMatrix(viewMatrix);\n if (dstArray === null || dstArray.length < flatSize) dstArray = new Float32Array(flatSize);\n for(let i = 0, i4 = dstOffset; i !== nPlanes; ++i, i4 += 4){\n plane.copy(planes[i]).applyMatrix4(viewMatrix, viewNormalMatrix);\n plane.normal.toArray(dstArray, i4);\n dstArray[i4 + 3] = plane.constant;\n }\n }\n uniform.value = dstArray;\n uniform.needsUpdate = true;\n }\n scope.numPlanes = nPlanes;\n scope.numIntersection = 0;\n return dstArray;\n }\n}\nfunction $d5b33d7c30034067$var$WebGLCubeMaps(renderer) {\n let cubemaps = new WeakMap();\n function mapTextureMapping(texture, mapping) {\n if (mapping === $d5b33d7c30034067$export$d64030b316d3b087) texture.mapping = $d5b33d7c30034067$export$8759762a6477f2c4;\n else if (mapping === $d5b33d7c30034067$export$ee99d97d46898098) texture.mapping = $d5b33d7c30034067$export$dc59f8aed047f61d;\n return texture;\n }\n function get(texture) {\n if (texture && texture.isTexture && texture.isRenderTargetTexture === false) {\n const mapping = texture.mapping;\n if (mapping === $d5b33d7c30034067$export$d64030b316d3b087 || mapping === $d5b33d7c30034067$export$ee99d97d46898098) {\n if (cubemaps.has(texture)) {\n const cubemap = cubemaps.get(texture).texture;\n return mapTextureMapping(cubemap, texture.mapping);\n } else {\n const image = texture.image;\n if (image && image.height > 0) {\n const renderTarget = new $d5b33d7c30034067$export$ac386671d651941e(image.height / 2);\n renderTarget.fromEquirectangularTexture(renderer, texture);\n cubemaps.set(texture, renderTarget);\n texture.addEventListener(\"dispose\", onTextureDispose);\n return mapTextureMapping(renderTarget.texture, texture.mapping);\n } else // image not yet ready. try the conversion next frame\n return null;\n }\n }\n }\n return texture;\n }\n function onTextureDispose(event) {\n const texture = event.target;\n texture.removeEventListener(\"dispose\", onTextureDispose);\n const cubemap = cubemaps.get(texture);\n if (cubemap !== undefined) {\n cubemaps.delete(texture);\n cubemap.dispose();\n }\n }\n function dispose() {\n cubemaps = new WeakMap();\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nclass $d5b33d7c30034067$export$9ebf355ee4ed261b extends $d5b33d7c30034067$export$79f141de891a5fed {\n constructor(left = -1, right = 1, top = 1, bottom = -1, near = 0.1, far = 2000){\n super();\n this.isOrthographicCamera = true;\n this.type = \"OrthographicCamera\";\n this.zoom = 1;\n this.view = null;\n this.left = left;\n this.right = right;\n this.top = top;\n this.bottom = bottom;\n this.near = near;\n this.far = far;\n this.updateProjectionMatrix();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.left = source.left;\n this.right = source.right;\n this.top = source.top;\n this.bottom = source.bottom;\n this.near = source.near;\n this.far = source.far;\n this.zoom = source.zoom;\n this.view = source.view === null ? null : Object.assign({}, source.view);\n return this;\n }\n setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n if (this.view === null) this.view = {\n enabled: true,\n fullWidth: 1,\n fullHeight: 1,\n offsetX: 0,\n offsetY: 0,\n width: 1,\n height: 1\n };\n this.view.enabled = true;\n this.view.fullWidth = fullWidth;\n this.view.fullHeight = fullHeight;\n this.view.offsetX = x;\n this.view.offsetY = y;\n this.view.width = width;\n this.view.height = height;\n this.updateProjectionMatrix();\n }\n clearViewOffset() {\n if (this.view !== null) this.view.enabled = false;\n this.updateProjectionMatrix();\n }\n updateProjectionMatrix() {\n const dx = (this.right - this.left) / (2 * this.zoom);\n const dy = (this.top - this.bottom) / (2 * this.zoom);\n const cx = (this.right + this.left) / 2;\n const cy = (this.top + this.bottom) / 2;\n let left = cx - dx;\n let right = cx + dx;\n let top = cy + dy;\n let bottom = cy - dy;\n if (this.view !== null && this.view.enabled) {\n const scaleW = (this.right - this.left) / this.view.fullWidth / this.zoom;\n const scaleH = (this.top - this.bottom) / this.view.fullHeight / this.zoom;\n left += scaleW * this.view.offsetX;\n right = left + scaleW * this.view.width;\n top -= scaleH * this.view.offsetY;\n bottom = top - scaleH * this.view.height;\n }\n this.projectionMatrix.makeOrthographic(left, right, top, bottom, this.near, this.far, this.coordinateSystem);\n this.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.zoom = this.zoom;\n data.object.left = this.left;\n data.object.right = this.right;\n data.object.top = this.top;\n data.object.bottom = this.bottom;\n data.object.near = this.near;\n data.object.far = this.far;\n if (this.view !== null) data.object.view = Object.assign({}, this.view);\n return data;\n }\n}\nconst $d5b33d7c30034067$var$LOD_MIN = 4;\n// The standard deviations (radians) associated with the extra mips. These are\n// chosen to approximate a Trowbridge-Reitz distribution function times the\n// geometric shadowing function. These sigma values squared must match the\n// variance #defines in cube_uv_reflection_fragment.glsl.js.\nconst $d5b33d7c30034067$var$EXTRA_LOD_SIGMA = [\n 0.125,\n 0.215,\n 0.35,\n 0.446,\n 0.526,\n 0.582\n];\n// The maximum length of the blur for loop. Smaller sigmas will use fewer\n// samples and exit early, but not recompile the shader.\nconst $d5b33d7c30034067$var$MAX_SAMPLES = 20;\nconst $d5b33d7c30034067$var$_flatCamera = /*@__PURE__*/ new $d5b33d7c30034067$export$9ebf355ee4ed261b();\nconst $d5b33d7c30034067$var$_clearColor = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\nlet $d5b33d7c30034067$var$_oldTarget = null;\nlet $d5b33d7c30034067$var$_oldActiveCubeFace = 0;\nlet $d5b33d7c30034067$var$_oldActiveMipmapLevel = 0;\n// Golden Ratio\nconst $d5b33d7c30034067$var$PHI = (1 + Math.sqrt(5)) / 2;\nconst $d5b33d7c30034067$var$INV_PHI = 1 / $d5b33d7c30034067$var$PHI;\n// Vertices of a dodecahedron (except the opposites, which represent the\n// same axis), used as axis directions evenly spread on a sphere.\nconst $d5b33d7c30034067$var$_axisDirections = [\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-1, 1, 1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, -1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-1, 1, -1),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, $d5b33d7c30034067$var$PHI, $d5b33d7c30034067$var$INV_PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(0, $d5b33d7c30034067$var$PHI, -$d5b33d7c30034067$var$INV_PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699($d5b33d7c30034067$var$INV_PHI, 0, $d5b33d7c30034067$var$PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-$d5b33d7c30034067$var$INV_PHI, 0, $d5b33d7c30034067$var$PHI),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699($d5b33d7c30034067$var$PHI, $d5b33d7c30034067$var$INV_PHI, 0),\n /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699(-$d5b33d7c30034067$var$PHI, $d5b33d7c30034067$var$INV_PHI, 0)\n];\n/**\n * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n * (PMREM) from a cubeMap environment texture. This allows different levels of\n * blur to be quickly accessed based on material roughness. It is packed into a\n * special CubeUV format that allows us to perform custom interpolation so that\n * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n * higher roughness levels. In this way we maintain resolution to smoothly\n * interpolate diffuse lighting while limiting sampling computation.\n *\n * Paper: Fast, Accurate Image-Based Lighting\n * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view\n*/ class $d5b33d7c30034067$export$6add42717753e221 {\n constructor(renderer){\n this._renderer = renderer;\n this._pingPongRenderTarget = null;\n this._lodMax = 0;\n this._cubeSize = 0;\n this._lodPlanes = [];\n this._sizeLods = [];\n this._sigmas = [];\n this._blurMaterial = null;\n this._cubemapMaterial = null;\n this._equirectMaterial = null;\n this._compileMaterial(this._blurMaterial);\n }\n /**\n\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t * is placed at the origin).\n\t */ fromScene(scene, sigma = 0, near = 0.1, far = 100) {\n $d5b33d7c30034067$var$_oldTarget = this._renderer.getRenderTarget();\n $d5b33d7c30034067$var$_oldActiveCubeFace = this._renderer.getActiveCubeFace();\n $d5b33d7c30034067$var$_oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel();\n this._setSize(256);\n const cubeUVRenderTarget = this._allocateTargets();\n cubeUVRenderTarget.depthBuffer = true;\n this._sceneToCubeUV(scene, near, far, cubeUVRenderTarget);\n if (sigma > 0) this._blur(cubeUVRenderTarget, 0, 0, sigma);\n this._applyPMREM(cubeUVRenderTarget);\n this._cleanup(cubeUVRenderTarget);\n return cubeUVRenderTarget;\n }\n /**\n\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t * or HDR. The ideal input image size is 1k (1024 x 512),\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */ fromEquirectangular(equirectangular, renderTarget = null) {\n return this._fromTexture(equirectangular, renderTarget);\n }\n /**\n\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t * or HDR. The ideal input cube size is 256 x 256,\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */ fromCubemap(cubemap, renderTarget = null) {\n return this._fromTexture(cubemap, renderTarget);\n }\n /**\n\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */ compileCubemapShader() {\n if (this._cubemapMaterial === null) {\n this._cubemapMaterial = $d5b33d7c30034067$var$_getCubemapMaterial();\n this._compileMaterial(this._cubemapMaterial);\n }\n }\n /**\n\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */ compileEquirectangularShader() {\n if (this._equirectMaterial === null) {\n this._equirectMaterial = $d5b33d7c30034067$var$_getEquirectMaterial();\n this._compileMaterial(this._equirectMaterial);\n }\n }\n /**\n\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t * one of them will cause any others to also become unusable.\n\t */ dispose() {\n this._dispose();\n if (this._cubemapMaterial !== null) this._cubemapMaterial.dispose();\n if (this._equirectMaterial !== null) this._equirectMaterial.dispose();\n }\n // private interface\n _setSize(cubeSize) {\n this._lodMax = Math.floor(Math.log2(cubeSize));\n this._cubeSize = Math.pow(2, this._lodMax);\n }\n _dispose() {\n if (this._blurMaterial !== null) this._blurMaterial.dispose();\n if (this._pingPongRenderTarget !== null) this._pingPongRenderTarget.dispose();\n for(let i = 0; i < this._lodPlanes.length; i++)this._lodPlanes[i].dispose();\n }\n _cleanup(outputTarget) {\n this._renderer.setRenderTarget($d5b33d7c30034067$var$_oldTarget, $d5b33d7c30034067$var$_oldActiveCubeFace, $d5b33d7c30034067$var$_oldActiveMipmapLevel);\n outputTarget.scissorTest = false;\n $d5b33d7c30034067$var$_setViewport(outputTarget, 0, 0, outputTarget.width, outputTarget.height);\n }\n _fromTexture(texture, renderTarget) {\n if (texture.mapping === $d5b33d7c30034067$export$8759762a6477f2c4 || texture.mapping === $d5b33d7c30034067$export$dc59f8aed047f61d) this._setSize(texture.image.length === 0 ? 16 : texture.image[0].width || texture.image[0].image.width);\n else this._setSize(texture.image.width / 4);\n $d5b33d7c30034067$var$_oldTarget = this._renderer.getRenderTarget();\n $d5b33d7c30034067$var$_oldActiveCubeFace = this._renderer.getActiveCubeFace();\n $d5b33d7c30034067$var$_oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel();\n const cubeUVRenderTarget = renderTarget || this._allocateTargets();\n this._textureToCubeUV(texture, cubeUVRenderTarget);\n this._applyPMREM(cubeUVRenderTarget);\n this._cleanup(cubeUVRenderTarget);\n return cubeUVRenderTarget;\n }\n _allocateTargets() {\n const width = 3 * Math.max(this._cubeSize, 112);\n const height = 4 * this._cubeSize;\n const params = {\n magFilter: $d5b33d7c30034067$export$8a72f490b25c56c8,\n minFilter: $d5b33d7c30034067$export$8a72f490b25c56c8,\n generateMipmaps: false,\n type: $d5b33d7c30034067$export$2697304443f382bc,\n format: $d5b33d7c30034067$export$3f8bb04b555a363c,\n colorSpace: $d5b33d7c30034067$export$42429b3acfb233a4,\n depthBuffer: false\n };\n const cubeUVRenderTarget = $d5b33d7c30034067$var$_createRenderTarget(width, height, params);\n if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== width || this._pingPongRenderTarget.height !== height) {\n if (this._pingPongRenderTarget !== null) this._dispose();\n this._pingPongRenderTarget = $d5b33d7c30034067$var$_createRenderTarget(width, height, params);\n const { _lodMax: _lodMax } = this;\n ({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = $d5b33d7c30034067$var$_createPlanes(_lodMax));\n this._blurMaterial = $d5b33d7c30034067$var$_getBlurShader(_lodMax, width, height);\n }\n return cubeUVRenderTarget;\n }\n _compileMaterial(material) {\n const tmpMesh = new $d5b33d7c30034067$export$e176487c05830cc5(this._lodPlanes[0], material);\n this._renderer.compile(tmpMesh, $d5b33d7c30034067$var$_flatCamera);\n }\n _sceneToCubeUV(scene, near, far, cubeUVRenderTarget) {\n const fov = 90;\n const aspect = 1;\n const cubeCamera = new $d5b33d7c30034067$export$74e4ae24825f68d7(fov, aspect, near, far);\n const upSign = [\n 1,\n -1,\n 1,\n 1,\n 1,\n 1\n ];\n const forwardSign = [\n 1,\n 1,\n 1,\n -1,\n -1,\n -1\n ];\n const renderer = this._renderer;\n const originalAutoClear = renderer.autoClear;\n const toneMapping = renderer.toneMapping;\n renderer.getClearColor($d5b33d7c30034067$var$_clearColor);\n renderer.toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n renderer.autoClear = false;\n const backgroundMaterial = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n name: \"PMREM.Background\",\n side: $d5b33d7c30034067$export$d9f0486e75b5ace,\n depthWrite: false,\n depthTest: false\n });\n const backgroundBox = new $d5b33d7c30034067$export$e176487c05830cc5(new $d5b33d7c30034067$export$33e43285f7406bd5(), backgroundMaterial);\n let useSolidColor = false;\n const background = scene.background;\n if (background) {\n if (background.isColor) {\n backgroundMaterial.color.copy(background);\n scene.background = null;\n useSolidColor = true;\n }\n } else {\n backgroundMaterial.color.copy($d5b33d7c30034067$var$_clearColor);\n useSolidColor = true;\n }\n for(let i = 0; i < 6; i++){\n const col = i % 3;\n if (col === 0) {\n cubeCamera.up.set(0, upSign[i], 0);\n cubeCamera.lookAt(forwardSign[i], 0, 0);\n } else if (col === 1) {\n cubeCamera.up.set(0, 0, upSign[i]);\n cubeCamera.lookAt(0, forwardSign[i], 0);\n } else {\n cubeCamera.up.set(0, upSign[i], 0);\n cubeCamera.lookAt(0, 0, forwardSign[i]);\n }\n const size = this._cubeSize;\n $d5b33d7c30034067$var$_setViewport(cubeUVRenderTarget, col * size, i > 2 ? size : 0, size, size);\n renderer.setRenderTarget(cubeUVRenderTarget);\n if (useSolidColor) renderer.render(backgroundBox, cubeCamera);\n renderer.render(scene, cubeCamera);\n }\n backgroundBox.geometry.dispose();\n backgroundBox.material.dispose();\n renderer.toneMapping = toneMapping;\n renderer.autoClear = originalAutoClear;\n scene.background = background;\n }\n _textureToCubeUV(texture, cubeUVRenderTarget) {\n const renderer = this._renderer;\n const isCubeTexture = texture.mapping === $d5b33d7c30034067$export$8759762a6477f2c4 || texture.mapping === $d5b33d7c30034067$export$dc59f8aed047f61d;\n if (isCubeTexture) {\n if (this._cubemapMaterial === null) this._cubemapMaterial = $d5b33d7c30034067$var$_getCubemapMaterial();\n this._cubemapMaterial.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;\n } else if (this._equirectMaterial === null) this._equirectMaterial = $d5b33d7c30034067$var$_getEquirectMaterial();\n const material = isCubeTexture ? this._cubemapMaterial : this._equirectMaterial;\n const mesh = new $d5b33d7c30034067$export$e176487c05830cc5(this._lodPlanes[0], material);\n const uniforms = material.uniforms;\n uniforms[\"envMap\"].value = texture;\n const size = this._cubeSize;\n $d5b33d7c30034067$var$_setViewport(cubeUVRenderTarget, 0, 0, 3 * size, 2 * size);\n renderer.setRenderTarget(cubeUVRenderTarget);\n renderer.render(mesh, $d5b33d7c30034067$var$_flatCamera);\n }\n _applyPMREM(cubeUVRenderTarget) {\n const renderer = this._renderer;\n const autoClear = renderer.autoClear;\n renderer.autoClear = false;\n for(let i = 1; i < this._lodPlanes.length; i++){\n const sigma = Math.sqrt(this._sigmas[i] * this._sigmas[i] - this._sigmas[i - 1] * this._sigmas[i - 1]);\n const poleAxis = $d5b33d7c30034067$var$_axisDirections[(i - 1) % $d5b33d7c30034067$var$_axisDirections.length];\n this._blur(cubeUVRenderTarget, i - 1, i, sigma, poleAxis);\n }\n renderer.autoClear = autoClear;\n }\n /**\n\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t * accurate at the poles, but still does a decent job.\n\t */ _blur(cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis) {\n const pingPongRenderTarget = this._pingPongRenderTarget;\n this._halfBlur(cubeUVRenderTarget, pingPongRenderTarget, lodIn, lodOut, sigma, \"latitudinal\", poleAxis);\n this._halfBlur(pingPongRenderTarget, cubeUVRenderTarget, lodOut, lodOut, sigma, \"longitudinal\", poleAxis);\n }\n _halfBlur(targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis) {\n const renderer = this._renderer;\n const blurMaterial = this._blurMaterial;\n if (direction !== \"latitudinal\" && direction !== \"longitudinal\") console.error(\"blur direction must be either latitudinal or longitudinal!\");\n // Number of standard deviations at which to cut off the discrete approximation.\n const STANDARD_DEVIATIONS = 3;\n const blurMesh = new $d5b33d7c30034067$export$e176487c05830cc5(this._lodPlanes[lodOut], blurMaterial);\n const blurUniforms = blurMaterial.uniforms;\n const pixels = this._sizeLods[lodIn] - 1;\n const radiansPerPixel = isFinite(sigmaRadians) ? Math.PI / (2 * pixels) : 2 * Math.PI / (2 * $d5b33d7c30034067$var$MAX_SAMPLES - 1);\n const sigmaPixels = sigmaRadians / radiansPerPixel;\n const samples = isFinite(sigmaRadians) ? 1 + Math.floor(STANDARD_DEVIATIONS * sigmaPixels) : $d5b33d7c30034067$var$MAX_SAMPLES;\n if (samples > $d5b33d7c30034067$var$MAX_SAMPLES) console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${$d5b33d7c30034067$var$MAX_SAMPLES}`);\n const weights = [];\n let sum = 0;\n for(let i = 0; i < $d5b33d7c30034067$var$MAX_SAMPLES; ++i){\n const x = i / sigmaPixels;\n const weight = Math.exp(-x * x / 2);\n weights.push(weight);\n if (i === 0) sum += weight;\n else if (i < samples) sum += 2 * weight;\n }\n for(let i = 0; i < weights.length; i++)weights[i] = weights[i] / sum;\n blurUniforms[\"envMap\"].value = targetIn.texture;\n blurUniforms[\"samples\"].value = samples;\n blurUniforms[\"weights\"].value = weights;\n blurUniforms[\"latitudinal\"].value = direction === \"latitudinal\";\n if (poleAxis) blurUniforms[\"poleAxis\"].value = poleAxis;\n const { _lodMax: _lodMax } = this;\n blurUniforms[\"dTheta\"].value = radiansPerPixel;\n blurUniforms[\"mipInt\"].value = _lodMax - lodIn;\n const outputSize = this._sizeLods[lodOut];\n const x = 3 * outputSize * (lodOut > _lodMax - $d5b33d7c30034067$var$LOD_MIN ? lodOut - _lodMax + $d5b33d7c30034067$var$LOD_MIN : 0);\n const y = 4 * (this._cubeSize - outputSize);\n $d5b33d7c30034067$var$_setViewport(targetOut, x, y, 3 * outputSize, 2 * outputSize);\n renderer.setRenderTarget(targetOut);\n renderer.render(blurMesh, $d5b33d7c30034067$var$_flatCamera);\n }\n}\nfunction $d5b33d7c30034067$var$_createPlanes(lodMax) {\n const lodPlanes = [];\n const sizeLods = [];\n const sigmas = [];\n let lod = lodMax;\n const totalLods = lodMax - $d5b33d7c30034067$var$LOD_MIN + 1 + $d5b33d7c30034067$var$EXTRA_LOD_SIGMA.length;\n for(let i = 0; i < totalLods; i++){\n const sizeLod = Math.pow(2, lod);\n sizeLods.push(sizeLod);\n let sigma = 1.0 / sizeLod;\n if (i > lodMax - $d5b33d7c30034067$var$LOD_MIN) sigma = $d5b33d7c30034067$var$EXTRA_LOD_SIGMA[i - lodMax + $d5b33d7c30034067$var$LOD_MIN - 1];\n else if (i === 0) sigma = 0;\n sigmas.push(sigma);\n const texelSize = 1.0 / (sizeLod - 2);\n const min = -texelSize;\n const max = 1 + texelSize;\n const uv1 = [\n min,\n min,\n max,\n min,\n max,\n max,\n min,\n min,\n max,\n max,\n min,\n max\n ];\n const cubeFaces = 6;\n const vertices = 6;\n const positionSize = 3;\n const uvSize = 2;\n const faceIndexSize = 1;\n const position = new Float32Array(positionSize * vertices * cubeFaces);\n const uv = new Float32Array(uvSize * vertices * cubeFaces);\n const faceIndex = new Float32Array(faceIndexSize * vertices * cubeFaces);\n for(let face = 0; face < cubeFaces; face++){\n const x = face % 3 * 2 / 3 - 1;\n const y = face > 2 ? 0 : -1;\n const coordinates = [\n x,\n y,\n 0,\n x + 2 / 3,\n y,\n 0,\n x + 2 / 3,\n y + 1,\n 0,\n x,\n y,\n 0,\n x + 2 / 3,\n y + 1,\n 0,\n x,\n y + 1,\n 0\n ];\n position.set(coordinates, positionSize * vertices * face);\n uv.set(uv1, uvSize * vertices * face);\n const fill = [\n face,\n face,\n face,\n face,\n face,\n face\n ];\n faceIndex.set(fill, faceIndexSize * vertices * face);\n }\n const planes = new $d5b33d7c30034067$export$b7be63a67df8959();\n planes.setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117(position, positionSize));\n planes.setAttribute(\"uv\", new $d5b33d7c30034067$export$8dea267bd6bde117(uv, uvSize));\n planes.setAttribute(\"faceIndex\", new $d5b33d7c30034067$export$8dea267bd6bde117(faceIndex, faceIndexSize));\n lodPlanes.push(planes);\n if (lod > $d5b33d7c30034067$var$LOD_MIN) lod--;\n }\n return {\n lodPlanes: lodPlanes,\n sizeLods: sizeLods,\n sigmas: sigmas\n };\n}\nfunction $d5b33d7c30034067$var$_createRenderTarget(width, height, params) {\n const cubeUVRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(width, height, params);\n cubeUVRenderTarget.texture.mapping = $d5b33d7c30034067$export$dbf3e70ff37af79;\n cubeUVRenderTarget.texture.name = \"PMREM.cubeUv\";\n cubeUVRenderTarget.scissorTest = true;\n return cubeUVRenderTarget;\n}\nfunction $d5b33d7c30034067$var$_setViewport(target, x, y, width, height) {\n target.viewport.set(x, y, width, height);\n target.scissor.set(x, y, width, height);\n}\nfunction $d5b33d7c30034067$var$_getBlurShader(lodMax, width, height) {\n const weights = new Float32Array($d5b33d7c30034067$var$MAX_SAMPLES);\n const poleAxis = new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0);\n const shaderMaterial = new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"SphericalGaussianBlur\",\n defines: {\n \"n\": $d5b33d7c30034067$var$MAX_SAMPLES,\n \"CUBEUV_TEXEL_WIDTH\": 1.0 / width,\n \"CUBEUV_TEXEL_HEIGHT\": 1.0 / height,\n \"CUBEUV_MAX_MIP\": `${lodMax}.0`\n },\n uniforms: {\n \"envMap\": {\n value: null\n },\n \"samples\": {\n value: 1\n },\n \"weights\": {\n value: weights\n },\n \"latitudinal\": {\n value: false\n },\n \"dTheta\": {\n value: 0\n },\n \"mipInt\": {\n value: 0\n },\n \"poleAxis\": {\n value: poleAxis\n }\n },\n vertexShader: $d5b33d7c30034067$var$_getCommonVertexShader(),\n fragmentShader: /* glsl */ `\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t`,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba,\n depthTest: false,\n depthWrite: false\n });\n return shaderMaterial;\n}\nfunction $d5b33d7c30034067$var$_getEquirectMaterial() {\n return new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"EquirectangularToCubeUV\",\n uniforms: {\n \"envMap\": {\n value: null\n }\n },\n vertexShader: $d5b33d7c30034067$var$_getCommonVertexShader(),\n fragmentShader: /* glsl */ `\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t`,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba,\n depthTest: false,\n depthWrite: false\n });\n}\nfunction $d5b33d7c30034067$var$_getCubemapMaterial() {\n return new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n name: \"CubemapToCubeUV\",\n uniforms: {\n \"envMap\": {\n value: null\n },\n \"flipEnvMap\": {\n value: -1\n }\n },\n vertexShader: $d5b33d7c30034067$var$_getCommonVertexShader(),\n fragmentShader: /* glsl */ `\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t`,\n blending: $d5b33d7c30034067$export$63b8d6b580fc65ba,\n depthTest: false,\n depthWrite: false\n });\n}\nfunction $d5b33d7c30034067$var$_getCommonVertexShader() {\n return /* glsl */ `\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`;\n}\nfunction $d5b33d7c30034067$var$WebGLCubeUVMaps(renderer) {\n let cubeUVmaps = new WeakMap();\n let pmremGenerator = null;\n function get(texture) {\n if (texture && texture.isTexture) {\n const mapping = texture.mapping;\n const isEquirectMap = mapping === $d5b33d7c30034067$export$d64030b316d3b087 || mapping === $d5b33d7c30034067$export$ee99d97d46898098;\n const isCubeMap = mapping === $d5b33d7c30034067$export$8759762a6477f2c4 || mapping === $d5b33d7c30034067$export$dc59f8aed047f61d;\n // equirect/cube map to cubeUV conversion\n if (isEquirectMap || isCubeMap) {\n if (texture.isRenderTargetTexture && texture.needsPMREMUpdate === true) {\n texture.needsPMREMUpdate = false;\n let renderTarget = cubeUVmaps.get(texture);\n if (pmremGenerator === null) pmremGenerator = new $d5b33d7c30034067$export$6add42717753e221(renderer);\n renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular(texture, renderTarget) : pmremGenerator.fromCubemap(texture, renderTarget);\n cubeUVmaps.set(texture, renderTarget);\n return renderTarget.texture;\n } else {\n if (cubeUVmaps.has(texture)) return cubeUVmaps.get(texture).texture;\n else {\n const image = texture.image;\n if (isEquirectMap && image && image.height > 0 || isCubeMap && image && isCubeTextureComplete(image)) {\n if (pmremGenerator === null) pmremGenerator = new $d5b33d7c30034067$export$6add42717753e221(renderer);\n const renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular(texture) : pmremGenerator.fromCubemap(texture);\n cubeUVmaps.set(texture, renderTarget);\n texture.addEventListener(\"dispose\", onTextureDispose);\n return renderTarget.texture;\n } else // image not yet ready. try the conversion next frame\n return null;\n }\n }\n }\n }\n return texture;\n }\n function isCubeTextureComplete(image) {\n let count = 0;\n const length = 6;\n for(let i = 0; i < length; i++)if (image[i] !== undefined) count++;\n return count === length;\n }\n function onTextureDispose(event) {\n const texture = event.target;\n texture.removeEventListener(\"dispose\", onTextureDispose);\n const cubemapUV = cubeUVmaps.get(texture);\n if (cubemapUV !== undefined) {\n cubeUVmaps.delete(texture);\n cubemapUV.dispose();\n }\n }\n function dispose() {\n cubeUVmaps = new WeakMap();\n if (pmremGenerator !== null) {\n pmremGenerator.dispose();\n pmremGenerator = null;\n }\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$WebGLExtensions(gl) {\n const extensions = {};\n function getExtension(name) {\n if (extensions[name] !== undefined) return extensions[name];\n let extension;\n switch(name){\n case \"WEBGL_depth_texture\":\n extension = gl.getExtension(\"WEBGL_depth_texture\") || gl.getExtension(\"MOZ_WEBGL_depth_texture\") || gl.getExtension(\"WEBKIT_WEBGL_depth_texture\");\n break;\n case \"EXT_texture_filter_anisotropic\":\n extension = gl.getExtension(\"EXT_texture_filter_anisotropic\") || gl.getExtension(\"MOZ_EXT_texture_filter_anisotropic\") || gl.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\");\n break;\n case \"WEBGL_compressed_texture_s3tc\":\n extension = gl.getExtension(\"WEBGL_compressed_texture_s3tc\") || gl.getExtension(\"MOZ_WEBGL_compressed_texture_s3tc\") || gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\");\n break;\n case \"WEBGL_compressed_texture_pvrtc\":\n extension = gl.getExtension(\"WEBGL_compressed_texture_pvrtc\") || gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\");\n break;\n default:\n extension = gl.getExtension(name);\n }\n extensions[name] = extension;\n return extension;\n }\n return {\n has: function(name) {\n return getExtension(name) !== null;\n },\n init: function(capabilities) {\n if (capabilities.isWebGL2) getExtension(\"EXT_color_buffer_float\");\n else {\n getExtension(\"WEBGL_depth_texture\");\n getExtension(\"OES_texture_float\");\n getExtension(\"OES_texture_half_float\");\n getExtension(\"OES_texture_half_float_linear\");\n getExtension(\"OES_standard_derivatives\");\n getExtension(\"OES_element_index_uint\");\n getExtension(\"OES_vertex_array_object\");\n getExtension(\"ANGLE_instanced_arrays\");\n }\n getExtension(\"OES_texture_float_linear\");\n getExtension(\"EXT_color_buffer_half_float\");\n getExtension(\"WEBGL_multisampled_render_to_texture\");\n },\n get: function(name) {\n const extension = getExtension(name);\n if (extension === null) console.warn(\"THREE.WebGLRenderer: \" + name + \" extension not supported.\");\n return extension;\n }\n };\n}\nfunction $d5b33d7c30034067$var$WebGLGeometries(gl, attributes, info, bindingStates) {\n const geometries = {};\n const wireframeAttributes = new WeakMap();\n function onGeometryDispose(event) {\n const geometry = event.target;\n if (geometry.index !== null) attributes.remove(geometry.index);\n for(const name in geometry.attributes)attributes.remove(geometry.attributes[name]);\n for(const name in geometry.morphAttributes){\n const array = geometry.morphAttributes[name];\n for(let i = 0, l = array.length; i < l; i++)attributes.remove(array[i]);\n }\n geometry.removeEventListener(\"dispose\", onGeometryDispose);\n delete geometries[geometry.id];\n const attribute = wireframeAttributes.get(geometry);\n if (attribute) {\n attributes.remove(attribute);\n wireframeAttributes.delete(geometry);\n }\n bindingStates.releaseStatesOfGeometry(geometry);\n if (geometry.isInstancedBufferGeometry === true) delete geometry._maxInstanceCount;\n //\n info.memory.geometries--;\n }\n function get(object, geometry) {\n if (geometries[geometry.id] === true) return geometry;\n geometry.addEventListener(\"dispose\", onGeometryDispose);\n geometries[geometry.id] = true;\n info.memory.geometries++;\n return geometry;\n }\n function update(geometry) {\n const geometryAttributes = geometry.attributes;\n // Updating index buffer in VAO now. See WebGLBindingStates.\n for(const name in geometryAttributes)attributes.update(geometryAttributes[name], gl.ARRAY_BUFFER);\n // morph targets\n const morphAttributes = geometry.morphAttributes;\n for(const name in morphAttributes){\n const array = morphAttributes[name];\n for(let i = 0, l = array.length; i < l; i++)attributes.update(array[i], gl.ARRAY_BUFFER);\n }\n }\n function updateWireframeAttribute(geometry) {\n const indices = [];\n const geometryIndex = geometry.index;\n const geometryPosition = geometry.attributes.position;\n let version = 0;\n if (geometryIndex !== null) {\n const array = geometryIndex.array;\n version = geometryIndex.version;\n for(let i = 0, l = array.length; i < l; i += 3){\n const a = array[i + 0];\n const b = array[i + 1];\n const c = array[i + 2];\n indices.push(a, b, b, c, c, a);\n }\n } else if (geometryPosition !== undefined) {\n const array = geometryPosition.array;\n version = geometryPosition.version;\n for(let i = 0, l = array.length / 3 - 1; i < l; i += 3){\n const a = i + 0;\n const b = i + 1;\n const c = i + 2;\n indices.push(a, b, b, c, c, a);\n }\n } else return;\n const attribute = new ($d5b33d7c30034067$var$arrayNeedsUint32(indices) ? $d5b33d7c30034067$export$7eb8c9fa25cd5bd6 : $d5b33d7c30034067$export$640a853f68025f2e)(indices, 1);\n attribute.version = version;\n // Updating index buffer in VAO now. See WebGLBindingStates\n //\n const previousAttribute = wireframeAttributes.get(geometry);\n if (previousAttribute) attributes.remove(previousAttribute);\n //\n wireframeAttributes.set(geometry, attribute);\n }\n function getWireframeAttribute(geometry) {\n const currentAttribute = wireframeAttributes.get(geometry);\n if (currentAttribute) {\n const geometryIndex = geometry.index;\n if (geometryIndex !== null) // if the attribute is obsolete, create a new one\n {\n if (currentAttribute.version < geometryIndex.version) updateWireframeAttribute(geometry);\n }\n } else updateWireframeAttribute(geometry);\n return wireframeAttributes.get(geometry);\n }\n return {\n get: get,\n update: update,\n getWireframeAttribute: getWireframeAttribute\n };\n}\nfunction $d5b33d7c30034067$var$WebGLIndexedBufferRenderer(gl, extensions, info, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n let mode;\n function setMode(value) {\n mode = value;\n }\n let type, bytesPerElement;\n function setIndex(value) {\n type = value.type;\n bytesPerElement = value.bytesPerElement;\n }\n function render(start, count) {\n gl.drawElements(mode, count, type, start * bytesPerElement);\n info.update(count, mode, 1);\n }\n function renderInstances(start, count, primcount) {\n if (primcount === 0) return;\n let extension, methodName;\n if (isWebGL2) {\n extension = gl;\n methodName = \"drawElementsInstanced\";\n } else {\n extension = extensions.get(\"ANGLE_instanced_arrays\");\n methodName = \"drawElementsInstancedANGLE\";\n if (extension === null) {\n console.error(\"THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.\");\n return;\n }\n }\n extension[methodName](mode, count, type, start * bytesPerElement, primcount);\n info.update(count, mode, primcount);\n }\n //\n this.setMode = setMode;\n this.setIndex = setIndex;\n this.render = render;\n this.renderInstances = renderInstances;\n}\nfunction $d5b33d7c30034067$var$WebGLInfo(gl) {\n const memory = {\n geometries: 0,\n textures: 0\n };\n const render = {\n frame: 0,\n calls: 0,\n triangles: 0,\n points: 0,\n lines: 0\n };\n function update(count, mode, instanceCount) {\n render.calls++;\n switch(mode){\n case gl.TRIANGLES:\n render.triangles += instanceCount * (count / 3);\n break;\n case gl.LINES:\n render.lines += instanceCount * (count / 2);\n break;\n case gl.LINE_STRIP:\n render.lines += instanceCount * (count - 1);\n break;\n case gl.LINE_LOOP:\n render.lines += instanceCount * count;\n break;\n case gl.POINTS:\n render.points += instanceCount * count;\n break;\n default:\n console.error(\"THREE.WebGLInfo: Unknown draw mode:\", mode);\n break;\n }\n }\n function reset() {\n render.calls = 0;\n render.triangles = 0;\n render.points = 0;\n render.lines = 0;\n }\n return {\n memory: memory,\n render: render,\n programs: null,\n autoReset: true,\n reset: reset,\n update: update\n };\n}\nfunction $d5b33d7c30034067$var$numericalSort(a, b) {\n return a[0] - b[0];\n}\nfunction $d5b33d7c30034067$var$absNumericalSort(a, b) {\n return Math.abs(b[1]) - Math.abs(a[1]);\n}\nfunction $d5b33d7c30034067$var$WebGLMorphtargets(gl, capabilities, textures) {\n const influencesList = {};\n const morphInfluences = new Float32Array(8);\n const morphTextures = new WeakMap();\n const morph = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const workInfluences = [];\n for(let i = 0; i < 8; i++)workInfluences[i] = [\n i,\n 0\n ];\n function update(object, geometry, program) {\n const objectInfluences = object.morphTargetInfluences;\n if (capabilities.isWebGL2 === true) {\n // instead of using attributes, the WebGL 2 code path encodes morph targets\n // into an array of data textures. Each layer represents a single morph target.\n const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n const morphTargetsCount = morphAttribute !== undefined ? morphAttribute.length : 0;\n let entry = morphTextures.get(geometry);\n if (entry === undefined || entry.count !== morphTargetsCount) {\n if (entry !== undefined) entry.texture.dispose();\n const hasMorphPosition = geometry.morphAttributes.position !== undefined;\n const hasMorphNormals = geometry.morphAttributes.normal !== undefined;\n const hasMorphColors = geometry.morphAttributes.color !== undefined;\n const morphTargets = geometry.morphAttributes.position || [];\n const morphNormals = geometry.morphAttributes.normal || [];\n const morphColors = geometry.morphAttributes.color || [];\n let vertexDataCount = 0;\n if (hasMorphPosition === true) vertexDataCount = 1;\n if (hasMorphNormals === true) vertexDataCount = 2;\n if (hasMorphColors === true) vertexDataCount = 3;\n let width = geometry.attributes.position.count * vertexDataCount;\n let height = 1;\n if (width > capabilities.maxTextureSize) {\n height = Math.ceil(width / capabilities.maxTextureSize);\n width = capabilities.maxTextureSize;\n }\n const buffer = new Float32Array(width * height * 4 * morphTargetsCount);\n const texture = new $d5b33d7c30034067$export$dfac6c8e811406a3(buffer, width, height, morphTargetsCount);\n texture.type = $d5b33d7c30034067$export$f6d331659b644596;\n texture.needsUpdate = true;\n // fill buffer\n const vertexDataStride = vertexDataCount * 4;\n for(let i = 0; i < morphTargetsCount; i++){\n const morphTarget = morphTargets[i];\n const morphNormal = morphNormals[i];\n const morphColor = morphColors[i];\n const offset = width * height * 4 * i;\n for(let j = 0; j < morphTarget.count; j++){\n const stride = j * vertexDataStride;\n if (hasMorphPosition === true) {\n morph.fromBufferAttribute(morphTarget, j);\n buffer[offset + stride + 0] = morph.x;\n buffer[offset + stride + 1] = morph.y;\n buffer[offset + stride + 2] = morph.z;\n buffer[offset + stride + 3] = 0;\n }\n if (hasMorphNormals === true) {\n morph.fromBufferAttribute(morphNormal, j);\n buffer[offset + stride + 4] = morph.x;\n buffer[offset + stride + 5] = morph.y;\n buffer[offset + stride + 6] = morph.z;\n buffer[offset + stride + 7] = 0;\n }\n if (hasMorphColors === true) {\n morph.fromBufferAttribute(morphColor, j);\n buffer[offset + stride + 8] = morph.x;\n buffer[offset + stride + 9] = morph.y;\n buffer[offset + stride + 10] = morph.z;\n buffer[offset + stride + 11] = morphColor.itemSize === 4 ? morph.w : 1;\n }\n }\n }\n entry = {\n count: morphTargetsCount,\n texture: texture,\n size: new $d5b33d7c30034067$export$c977b3e384af9ae1(width, height)\n };\n morphTextures.set(geometry, entry);\n function disposeTexture() {\n texture.dispose();\n morphTextures.delete(geometry);\n geometry.removeEventListener(\"dispose\", disposeTexture);\n }\n geometry.addEventListener(\"dispose\", disposeTexture);\n }\n //\n let morphInfluencesSum = 0;\n for(let i = 0; i < objectInfluences.length; i++)morphInfluencesSum += objectInfluences[i];\n const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n program.getUniforms().setValue(gl, \"morphTargetBaseInfluence\", morphBaseInfluence);\n program.getUniforms().setValue(gl, \"morphTargetInfluences\", objectInfluences);\n program.getUniforms().setValue(gl, \"morphTargetsTexture\", entry.texture, textures);\n program.getUniforms().setValue(gl, \"morphTargetsTextureSize\", entry.size);\n } else {\n // When object doesn't have morph target influences defined, we treat it as a 0-length array\n // This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n const length = objectInfluences === undefined ? 0 : objectInfluences.length;\n let influences = influencesList[geometry.id];\n if (influences === undefined || influences.length !== length) {\n // initialise list\n influences = [];\n for(let i = 0; i < length; i++)influences[i] = [\n i,\n 0\n ];\n influencesList[geometry.id] = influences;\n }\n // Collect influences\n for(let i = 0; i < length; i++){\n const influence = influences[i];\n influence[0] = i;\n influence[1] = objectInfluences[i];\n }\n influences.sort($d5b33d7c30034067$var$absNumericalSort);\n for(let i = 0; i < 8; i++)if (i < length && influences[i][1]) {\n workInfluences[i][0] = influences[i][0];\n workInfluences[i][1] = influences[i][1];\n } else {\n workInfluences[i][0] = Number.MAX_SAFE_INTEGER;\n workInfluences[i][1] = 0;\n }\n workInfluences.sort($d5b33d7c30034067$var$numericalSort);\n const morphTargets = geometry.morphAttributes.position;\n const morphNormals = geometry.morphAttributes.normal;\n let morphInfluencesSum = 0;\n for(let i = 0; i < 8; i++){\n const influence = workInfluences[i];\n const index = influence[0];\n const value = influence[1];\n if (index !== Number.MAX_SAFE_INTEGER && value) {\n if (morphTargets && geometry.getAttribute(\"morphTarget\" + i) !== morphTargets[index]) geometry.setAttribute(\"morphTarget\" + i, morphTargets[index]);\n if (morphNormals && geometry.getAttribute(\"morphNormal\" + i) !== morphNormals[index]) geometry.setAttribute(\"morphNormal\" + i, morphNormals[index]);\n morphInfluences[i] = value;\n morphInfluencesSum += value;\n } else {\n if (morphTargets && geometry.hasAttribute(\"morphTarget\" + i) === true) geometry.deleteAttribute(\"morphTarget\" + i);\n if (morphNormals && geometry.hasAttribute(\"morphNormal\" + i) === true) geometry.deleteAttribute(\"morphNormal\" + i);\n morphInfluences[i] = 0;\n }\n }\n // GLSL shader uses formula baseinfluence * base + sum(target * influence)\n // This allows us to switch between absolute morphs and relative morphs without changing shader code\n // When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n program.getUniforms().setValue(gl, \"morphTargetBaseInfluence\", morphBaseInfluence);\n program.getUniforms().setValue(gl, \"morphTargetInfluences\", morphInfluences);\n }\n }\n return {\n update: update\n };\n}\nfunction $d5b33d7c30034067$var$WebGLObjects(gl, geometries, attributes, info) {\n let updateMap = new WeakMap();\n function update(object) {\n const frame = info.render.frame;\n const geometry = object.geometry;\n const buffergeometry = geometries.get(object, geometry);\n // Update once per frame\n if (updateMap.get(buffergeometry) !== frame) {\n geometries.update(buffergeometry);\n updateMap.set(buffergeometry, frame);\n }\n if (object.isInstancedMesh) {\n if (object.hasEventListener(\"dispose\", onInstancedMeshDispose) === false) object.addEventListener(\"dispose\", onInstancedMeshDispose);\n if (updateMap.get(object) !== frame) {\n attributes.update(object.instanceMatrix, gl.ARRAY_BUFFER);\n if (object.instanceColor !== null) attributes.update(object.instanceColor, gl.ARRAY_BUFFER);\n updateMap.set(object, frame);\n }\n }\n if (object.isSkinnedMesh) {\n const skeleton = object.skeleton;\n if (updateMap.get(skeleton) !== frame) {\n skeleton.update();\n updateMap.set(skeleton, frame);\n }\n }\n return buffergeometry;\n }\n function dispose() {\n updateMap = new WeakMap();\n }\n function onInstancedMeshDispose(event) {\n const instancedMesh = event.target;\n instancedMesh.removeEventListener(\"dispose\", onInstancedMeshDispose);\n attributes.remove(instancedMesh.instanceMatrix);\n if (instancedMesh.instanceColor !== null) attributes.remove(instancedMesh.instanceColor);\n }\n return {\n update: update,\n dispose: dispose\n };\n}\n/**\n * Uniforms of a program.\n * Those form a tree structure with a special top-level container for the root,\n * which you get by calling 'new WebGLUniforms( gl, program )'.\n *\n *\n * Properties of inner nodes including the top-level container:\n *\n * .seq - array of nested uniforms\n * .map - nested uniforms by name\n *\n *\n * Methods of all nodes except the top-level container:\n *\n * .setValue( gl, value, [textures] )\n *\n * \t\tuploads a uniform value(s)\n * \tthe 'textures' parameter is needed for sampler uniforms\n *\n *\n * Static methods of the top-level container (textures factorizations):\n *\n * .upload( gl, seq, values, textures )\n *\n * \t\tsets uniforms in 'seq' to 'values[id].value'\n *\n * .seqWithValue( seq, values ) : filteredSeq\n *\n * \t\tfilters 'seq' entries with corresponding entry in values\n *\n *\n * Methods of the top-level container (textures factorizations):\n *\n * .setValue( gl, name, value, textures )\n *\n * \t\tsets uniform with name 'name' to 'value'\n *\n * .setOptional( gl, obj, prop )\n *\n * \t\tlike .set for an optional property of the object\n *\n */ const $d5b33d7c30034067$var$emptyTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$5431306cf43de24a();\nconst $d5b33d7c30034067$var$emptyArrayTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$dfac6c8e811406a3();\nconst $d5b33d7c30034067$var$empty3dTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$d7a3086320f856db();\nconst $d5b33d7c30034067$var$emptyCubeTexture = /*@__PURE__*/ new $d5b33d7c30034067$export$ee2e5a18258a4049();\n// --- Utilities ---\n// Array Caches (provide typed arrays for temporary by size)\nconst $d5b33d7c30034067$var$arrayCacheF32 = [];\nconst $d5b33d7c30034067$var$arrayCacheI32 = [];\n// Float32Array caches used for uploading Matrix uniforms\nconst $d5b33d7c30034067$var$mat4array = new Float32Array(16);\nconst $d5b33d7c30034067$var$mat3array = new Float32Array(9);\nconst $d5b33d7c30034067$var$mat2array = new Float32Array(4);\n// Flattening for arrays of vectors and matrices\nfunction $d5b33d7c30034067$var$flatten(array, nBlocks, blockSize) {\n const firstElem = array[0];\n if (firstElem <= 0 || firstElem > 0) return array;\n // unoptimized: ! isNaN( firstElem )\n // see http://jacksondunstan.com/articles/983\n const n = nBlocks * blockSize;\n let r = $d5b33d7c30034067$var$arrayCacheF32[n];\n if (r === undefined) {\n r = new Float32Array(n);\n $d5b33d7c30034067$var$arrayCacheF32[n] = r;\n }\n if (nBlocks !== 0) {\n firstElem.toArray(r, 0);\n for(let i = 1, offset = 0; i !== nBlocks; ++i){\n offset += blockSize;\n array[i].toArray(r, offset);\n }\n }\n return r;\n}\nfunction $d5b33d7c30034067$var$arraysEqual(a, b) {\n if (a.length !== b.length) return false;\n for(let i = 0, l = a.length; i < l; i++){\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\nfunction $d5b33d7c30034067$var$copyArray(a, b) {\n for(let i = 0, l = b.length; i < l; i++)a[i] = b[i];\n}\n// Texture unit allocation\nfunction $d5b33d7c30034067$var$allocTexUnits(textures, n) {\n let r = $d5b33d7c30034067$var$arrayCacheI32[n];\n if (r === undefined) {\n r = new Int32Array(n);\n $d5b33d7c30034067$var$arrayCacheI32[n] = r;\n }\n for(let i = 0; i !== n; ++i)r[i] = textures.allocateTextureUnit();\n return r;\n}\n// --- Setters ---\n// Note: Defining these methods externally, because they come in a bunch\n// and this way their names minify.\n// Single scalar\nfunction $d5b33d7c30034067$var$setValueV1f(gl, v) {\n const cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1f(this.addr, v);\n cache[0] = v;\n}\n// Single float vector (from flat array or THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2f(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y) {\n gl.uniform2f(this.addr, v.x, v.y);\n cache[0] = v.x;\n cache[1] = v.y;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform2fv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV3f(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n gl.uniform3f(this.addr, v.x, v.y, v.z);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n }\n } else if (v.r !== undefined) {\n if (cache[0] !== v.r || cache[1] !== v.g || cache[2] !== v.b) {\n gl.uniform3f(this.addr, v.r, v.g, v.b);\n cache[0] = v.r;\n cache[1] = v.g;\n cache[2] = v.b;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform3fv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV4f(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n gl.uniform4f(this.addr, v.x, v.y, v.z, v.w);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n cache[3] = v.w;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform4fv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\n// Single matrix (from flat array or THREE.MatrixN)\nfunction $d5b33d7c30034067$var$setValueM2(gl, v) {\n const cache = this.cache;\n const elements = v.elements;\n if (elements === undefined) {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniformMatrix2fv(this.addr, false, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, elements)) return;\n $d5b33d7c30034067$var$mat2array.set(elements);\n gl.uniformMatrix2fv(this.addr, false, $d5b33d7c30034067$var$mat2array);\n $d5b33d7c30034067$var$copyArray(cache, elements);\n }\n}\nfunction $d5b33d7c30034067$var$setValueM3(gl, v) {\n const cache = this.cache;\n const elements = v.elements;\n if (elements === undefined) {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniformMatrix3fv(this.addr, false, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, elements)) return;\n $d5b33d7c30034067$var$mat3array.set(elements);\n gl.uniformMatrix3fv(this.addr, false, $d5b33d7c30034067$var$mat3array);\n $d5b33d7c30034067$var$copyArray(cache, elements);\n }\n}\nfunction $d5b33d7c30034067$var$setValueM4(gl, v) {\n const cache = this.cache;\n const elements = v.elements;\n if (elements === undefined) {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniformMatrix4fv(this.addr, false, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, elements)) return;\n $d5b33d7c30034067$var$mat4array.set(elements);\n gl.uniformMatrix4fv(this.addr, false, $d5b33d7c30034067$var$mat4array);\n $d5b33d7c30034067$var$copyArray(cache, elements);\n }\n}\n// Single integer / boolean\nfunction $d5b33d7c30034067$var$setValueV1i(gl, v) {\n const cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1i(this.addr, v);\n cache[0] = v;\n}\n// Single integer / boolean vector (from flat array or THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2i(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y) {\n gl.uniform2i(this.addr, v.x, v.y);\n cache[0] = v.x;\n cache[1] = v.y;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform2iv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV3i(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n gl.uniform3i(this.addr, v.x, v.y, v.z);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform3iv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV4i(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n gl.uniform4i(this.addr, v.x, v.y, v.z, v.w);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n cache[3] = v.w;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform4iv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\n// Single unsigned integer\nfunction $d5b33d7c30034067$var$setValueV1ui(gl, v) {\n const cache = this.cache;\n if (cache[0] === v) return;\n gl.uniform1ui(this.addr, v);\n cache[0] = v;\n}\n// Single unsigned integer vector (from flat array or THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2ui(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y) {\n gl.uniform2ui(this.addr, v.x, v.y);\n cache[0] = v.x;\n cache[1] = v.y;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform2uiv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV3ui(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n gl.uniform3ui(this.addr, v.x, v.y, v.z);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform3uiv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\nfunction $d5b33d7c30034067$var$setValueV4ui(gl, v) {\n const cache = this.cache;\n if (v.x !== undefined) {\n if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n gl.uniform4ui(this.addr, v.x, v.y, v.z, v.w);\n cache[0] = v.x;\n cache[1] = v.y;\n cache[2] = v.z;\n cache[3] = v.w;\n }\n } else {\n if ($d5b33d7c30034067$var$arraysEqual(cache, v)) return;\n gl.uniform4uiv(this.addr, v);\n $d5b33d7c30034067$var$copyArray(cache, v);\n }\n}\n// Single texture (2D / Cube)\nfunction $d5b33d7c30034067$var$setValueT1(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTexture2D(v || $d5b33d7c30034067$var$emptyTexture, unit);\n}\nfunction $d5b33d7c30034067$var$setValueT3D1(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTexture3D(v || $d5b33d7c30034067$var$empty3dTexture, unit);\n}\nfunction $d5b33d7c30034067$var$setValueT6(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTextureCube(v || $d5b33d7c30034067$var$emptyCubeTexture, unit);\n}\nfunction $d5b33d7c30034067$var$setValueT2DArray1(gl, v, textures) {\n const cache = this.cache;\n const unit = textures.allocateTextureUnit();\n if (cache[0] !== unit) {\n gl.uniform1i(this.addr, unit);\n cache[0] = unit;\n }\n textures.setTexture2DArray(v || $d5b33d7c30034067$var$emptyArrayTexture, unit);\n}\n// Helper to pick the right setter for the singular case\nfunction $d5b33d7c30034067$var$getSingularSetter(type) {\n switch(type){\n case 0x1406:\n return $d5b33d7c30034067$var$setValueV1f; // FLOAT\n case 0x8b50:\n return $d5b33d7c30034067$var$setValueV2f; // _VEC2\n case 0x8b51:\n return $d5b33d7c30034067$var$setValueV3f; // _VEC3\n case 0x8b52:\n return $d5b33d7c30034067$var$setValueV4f; // _VEC4\n case 0x8b5a:\n return $d5b33d7c30034067$var$setValueM2; // _MAT2\n case 0x8b5b:\n return $d5b33d7c30034067$var$setValueM3; // _MAT3\n case 0x8b5c:\n return $d5b33d7c30034067$var$setValueM4; // _MAT4\n case 0x1404:\n case 0x8b56:\n return $d5b33d7c30034067$var$setValueV1i; // INT, BOOL\n case 0x8b53:\n case 0x8b57:\n return $d5b33d7c30034067$var$setValueV2i; // _VEC2\n case 0x8b54:\n case 0x8b58:\n return $d5b33d7c30034067$var$setValueV3i; // _VEC3\n case 0x8b55:\n case 0x8b59:\n return $d5b33d7c30034067$var$setValueV4i; // _VEC4\n case 0x1405:\n return $d5b33d7c30034067$var$setValueV1ui; // UINT\n case 0x8dc6:\n return $d5b33d7c30034067$var$setValueV2ui; // _VEC2\n case 0x8dc7:\n return $d5b33d7c30034067$var$setValueV3ui; // _VEC3\n case 0x8dc8:\n return $d5b33d7c30034067$var$setValueV4ui; // _VEC4\n case 0x8b5e:\n case 0x8d66:\n case 0x8dca:\n case 0x8dd2:\n case 0x8b62:\n return $d5b33d7c30034067$var$setValueT1;\n case 0x8b5f:\n case 0x8dcb:\n case 0x8dd3:\n return $d5b33d7c30034067$var$setValueT3D1;\n case 0x8b60:\n case 0x8dcc:\n case 0x8dd4:\n case 0x8dc5:\n return $d5b33d7c30034067$var$setValueT6;\n case 0x8dc1:\n case 0x8dcf:\n case 0x8dd7:\n case 0x8dc4:\n return $d5b33d7c30034067$var$setValueT2DArray1;\n }\n}\n// Array of scalars\nfunction $d5b33d7c30034067$var$setValueV1fArray(gl, v) {\n gl.uniform1fv(this.addr, v);\n}\n// Array of vectors (from flat array or array of THREE.VectorN)\nfunction $d5b33d7c30034067$var$setValueV2fArray(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 2);\n gl.uniform2fv(this.addr, data);\n}\nfunction $d5b33d7c30034067$var$setValueV3fArray(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 3);\n gl.uniform3fv(this.addr, data);\n}\nfunction $d5b33d7c30034067$var$setValueV4fArray(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 4);\n gl.uniform4fv(this.addr, data);\n}\n// Array of matrices (from flat array or array of THREE.MatrixN)\nfunction $d5b33d7c30034067$var$setValueM2Array(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 4);\n gl.uniformMatrix2fv(this.addr, false, data);\n}\nfunction $d5b33d7c30034067$var$setValueM3Array(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 9);\n gl.uniformMatrix3fv(this.addr, false, data);\n}\nfunction $d5b33d7c30034067$var$setValueM4Array(gl, v) {\n const data = $d5b33d7c30034067$var$flatten(v, this.size, 16);\n gl.uniformMatrix4fv(this.addr, false, data);\n}\n// Array of integer / boolean\nfunction $d5b33d7c30034067$var$setValueV1iArray(gl, v) {\n gl.uniform1iv(this.addr, v);\n}\n// Array of integer / boolean vectors (from flat array)\nfunction $d5b33d7c30034067$var$setValueV2iArray(gl, v) {\n gl.uniform2iv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV3iArray(gl, v) {\n gl.uniform3iv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV4iArray(gl, v) {\n gl.uniform4iv(this.addr, v);\n}\n// Array of unsigned integer\nfunction $d5b33d7c30034067$var$setValueV1uiArray(gl, v) {\n gl.uniform1uiv(this.addr, v);\n}\n// Array of unsigned integer vectors (from flat array)\nfunction $d5b33d7c30034067$var$setValueV2uiArray(gl, v) {\n gl.uniform2uiv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV3uiArray(gl, v) {\n gl.uniform3uiv(this.addr, v);\n}\nfunction $d5b33d7c30034067$var$setValueV4uiArray(gl, v) {\n gl.uniform4uiv(this.addr, v);\n}\n// Array of textures (2D / 3D / Cube / 2DArray)\nfunction $d5b33d7c30034067$var$setValueT1Array(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTexture2D(v[i] || $d5b33d7c30034067$var$emptyTexture, units[i]);\n}\nfunction $d5b33d7c30034067$var$setValueT3DArray(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTexture3D(v[i] || $d5b33d7c30034067$var$empty3dTexture, units[i]);\n}\nfunction $d5b33d7c30034067$var$setValueT6Array(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTextureCube(v[i] || $d5b33d7c30034067$var$emptyCubeTexture, units[i]);\n}\nfunction $d5b33d7c30034067$var$setValueT2DArrayArray(gl, v, textures) {\n const cache = this.cache;\n const n = v.length;\n const units = $d5b33d7c30034067$var$allocTexUnits(textures, n);\n if (!$d5b33d7c30034067$var$arraysEqual(cache, units)) {\n gl.uniform1iv(this.addr, units);\n $d5b33d7c30034067$var$copyArray(cache, units);\n }\n for(let i = 0; i !== n; ++i)textures.setTexture2DArray(v[i] || $d5b33d7c30034067$var$emptyArrayTexture, units[i]);\n}\n// Helper to pick the right setter for a pure (bottom-level) array\nfunction $d5b33d7c30034067$var$getPureArraySetter(type) {\n switch(type){\n case 0x1406:\n return $d5b33d7c30034067$var$setValueV1fArray; // FLOAT\n case 0x8b50:\n return $d5b33d7c30034067$var$setValueV2fArray; // _VEC2\n case 0x8b51:\n return $d5b33d7c30034067$var$setValueV3fArray; // _VEC3\n case 0x8b52:\n return $d5b33d7c30034067$var$setValueV4fArray; // _VEC4\n case 0x8b5a:\n return $d5b33d7c30034067$var$setValueM2Array; // _MAT2\n case 0x8b5b:\n return $d5b33d7c30034067$var$setValueM3Array; // _MAT3\n case 0x8b5c:\n return $d5b33d7c30034067$var$setValueM4Array; // _MAT4\n case 0x1404:\n case 0x8b56:\n return $d5b33d7c30034067$var$setValueV1iArray; // INT, BOOL\n case 0x8b53:\n case 0x8b57:\n return $d5b33d7c30034067$var$setValueV2iArray; // _VEC2\n case 0x8b54:\n case 0x8b58:\n return $d5b33d7c30034067$var$setValueV3iArray; // _VEC3\n case 0x8b55:\n case 0x8b59:\n return $d5b33d7c30034067$var$setValueV4iArray; // _VEC4\n case 0x1405:\n return $d5b33d7c30034067$var$setValueV1uiArray; // UINT\n case 0x8dc6:\n return $d5b33d7c30034067$var$setValueV2uiArray; // _VEC2\n case 0x8dc7:\n return $d5b33d7c30034067$var$setValueV3uiArray; // _VEC3\n case 0x8dc8:\n return $d5b33d7c30034067$var$setValueV4uiArray; // _VEC4\n case 0x8b5e:\n case 0x8d66:\n case 0x8dca:\n case 0x8dd2:\n case 0x8b62:\n return $d5b33d7c30034067$var$setValueT1Array;\n case 0x8b5f:\n case 0x8dcb:\n case 0x8dd3:\n return $d5b33d7c30034067$var$setValueT3DArray;\n case 0x8b60:\n case 0x8dcc:\n case 0x8dd4:\n case 0x8dc5:\n return $d5b33d7c30034067$var$setValueT6Array;\n case 0x8dc1:\n case 0x8dcf:\n case 0x8dd7:\n case 0x8dc4:\n return $d5b33d7c30034067$var$setValueT2DArrayArray;\n }\n}\n// --- Uniform Classes ---\nclass $d5b33d7c30034067$var$SingleUniform {\n constructor(id, activeInfo, addr){\n this.id = id;\n this.addr = addr;\n this.cache = [];\n this.setValue = $d5b33d7c30034067$var$getSingularSetter(activeInfo.type);\n // this.path = activeInfo.name; // DEBUG\n }\n}\nclass $d5b33d7c30034067$var$PureArrayUniform {\n constructor(id, activeInfo, addr){\n this.id = id;\n this.addr = addr;\n this.cache = [];\n this.size = activeInfo.size;\n this.setValue = $d5b33d7c30034067$var$getPureArraySetter(activeInfo.type);\n // this.path = activeInfo.name; // DEBUG\n }\n}\nclass $d5b33d7c30034067$var$StructuredUniform {\n constructor(id){\n this.id = id;\n this.seq = [];\n this.map = {};\n }\n setValue(gl, value, textures) {\n const seq = this.seq;\n for(let i = 0, n = seq.length; i !== n; ++i){\n const u = seq[i];\n u.setValue(gl, value[u.id], textures);\n }\n }\n}\n// --- Top-level ---\n// Parser - builds up the property tree from the path strings\nconst $d5b33d7c30034067$var$RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g;\n// extracts\n// \t- the identifier (member name or array index)\n// - followed by an optional right bracket (found when array index)\n// - followed by an optional left bracket or dot (type of subscript)\n//\n// Note: These portions can be read in a non-overlapping fashion and\n// allow straightforward parsing of the hierarchy that WebGL encodes\n// in the uniform names.\nfunction $d5b33d7c30034067$var$addUniform(container, uniformObject) {\n container.seq.push(uniformObject);\n container.map[uniformObject.id] = uniformObject;\n}\nfunction $d5b33d7c30034067$var$parseUniform(activeInfo, addr, container) {\n const path = activeInfo.name, pathLength = path.length;\n // reset RegExp object, because of the early exit of a previous run\n $d5b33d7c30034067$var$RePathPart.lastIndex = 0;\n while(true){\n const match = $d5b33d7c30034067$var$RePathPart.exec(path), matchEnd = $d5b33d7c30034067$var$RePathPart.lastIndex;\n let id = match[1];\n const idIsIndex = match[2] === \"]\", subscript = match[3];\n if (idIsIndex) id = id | 0; // convert to integer\n if (subscript === undefined || subscript === \"[\" && matchEnd + 2 === pathLength) {\n // bare name or \"pure\" bottom-level array \"[0]\" suffix\n $d5b33d7c30034067$var$addUniform(container, subscript === undefined ? new $d5b33d7c30034067$var$SingleUniform(id, activeInfo, addr) : new $d5b33d7c30034067$var$PureArrayUniform(id, activeInfo, addr));\n break;\n } else {\n // step into inner node / create it in case it doesn't exist\n const map = container.map;\n let next = map[id];\n if (next === undefined) {\n next = new $d5b33d7c30034067$var$StructuredUniform(id);\n $d5b33d7c30034067$var$addUniform(container, next);\n }\n container = next;\n }\n }\n}\n// Root Container\nclass $d5b33d7c30034067$var$WebGLUniforms {\n constructor(gl, program){\n this.seq = [];\n this.map = {};\n const n = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n for(let i = 0; i < n; ++i){\n const info = gl.getActiveUniform(program, i), addr = gl.getUniformLocation(program, info.name);\n $d5b33d7c30034067$var$parseUniform(info, addr, this);\n }\n }\n setValue(gl, name, value, textures) {\n const u = this.map[name];\n if (u !== undefined) u.setValue(gl, value, textures);\n }\n setOptional(gl, object, name) {\n const v = object[name];\n if (v !== undefined) this.setValue(gl, name, v);\n }\n static upload(gl, seq, values, textures) {\n for(let i = 0, n = seq.length; i !== n; ++i){\n const u = seq[i], v = values[u.id];\n if (v.needsUpdate !== false) // note: always updating when .needsUpdate is undefined\n u.setValue(gl, v.value, textures);\n }\n }\n static seqWithValue(seq, values) {\n const r = [];\n for(let i = 0, n = seq.length; i !== n; ++i){\n const u = seq[i];\n if (u.id in values) r.push(u);\n }\n return r;\n }\n}\nfunction $d5b33d7c30034067$var$WebGLShader(gl, type, string) {\n const shader = gl.createShader(type);\n gl.shaderSource(shader, string);\n gl.compileShader(shader);\n return shader;\n}\n// From https://www.khronos.org/registry/webgl/extensions/KHR_parallel_shader_compile/\nconst $d5b33d7c30034067$var$COMPLETION_STATUS_KHR = 0x91B1;\nlet $d5b33d7c30034067$var$programIdCount = 0;\nfunction $d5b33d7c30034067$var$handleSource(string, errorLine) {\n const lines = string.split(\"\\n\");\n const lines2 = [];\n const from = Math.max(errorLine - 6, 0);\n const to = Math.min(errorLine + 6, lines.length);\n for(let i = from; i < to; i++){\n const line = i + 1;\n lines2.push(`${line === errorLine ? \">\" : \" \"} ${line}: ${lines[i]}`);\n }\n return lines2.join(\"\\n\");\n}\nfunction $d5b33d7c30034067$var$getEncodingComponents(colorSpace1) {\n const workingPrimaries = $d5b33d7c30034067$export$5e6fd513f44698c.getPrimaries($d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace);\n const encodingPrimaries = $d5b33d7c30034067$export$5e6fd513f44698c.getPrimaries(colorSpace1);\n let gamutMapping;\n if (workingPrimaries === encodingPrimaries) gamutMapping = \"\";\n else if (workingPrimaries === $d5b33d7c30034067$export$ef371755dbe7f98a && encodingPrimaries === $d5b33d7c30034067$export$ce9118f9eaae3bb2) gamutMapping = \"LinearDisplayP3ToLinearSRGB\";\n else if (workingPrimaries === $d5b33d7c30034067$export$ce9118f9eaae3bb2 && encodingPrimaries === $d5b33d7c30034067$export$ef371755dbe7f98a) gamutMapping = \"LinearSRGBToLinearDisplayP3\";\n switch(colorSpace1){\n case $d5b33d7c30034067$export$42429b3acfb233a4:\n case $d5b33d7c30034067$export$c0dc1bc7e964761:\n return [\n gamutMapping,\n \"LinearTransferOETF\"\n ];\n case $d5b33d7c30034067$export$561f394b24edfcaa:\n case $d5b33d7c30034067$export$626af19ae879bdf6:\n return [\n gamutMapping,\n \"sRGBTransferOETF\"\n ];\n default:\n console.warn(\"THREE.WebGLProgram: Unsupported color space:\", colorSpace1);\n return [\n gamutMapping,\n \"LinearTransferOETF\"\n ];\n }\n}\nfunction $d5b33d7c30034067$var$getShaderErrors(gl, shader, type) {\n const status = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n const errors = gl.getShaderInfoLog(shader).trim();\n if (status && errors === \"\") return \"\";\n const errorMatches = /ERROR: 0:(\\d+)/.exec(errors);\n if (errorMatches) {\n // --enable-privileged-webgl-extension\n // console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n const errorLine = parseInt(errorMatches[1]);\n return type.toUpperCase() + \"\\n\\n\" + errors + \"\\n\\n\" + $d5b33d7c30034067$var$handleSource(gl.getShaderSource(shader), errorLine);\n } else return errors;\n}\nfunction $d5b33d7c30034067$var$getTexelEncodingFunction(functionName, colorSpace1) {\n const components = $d5b33d7c30034067$var$getEncodingComponents(colorSpace1);\n return `vec4 ${functionName}( vec4 value ) { return ${components[0]}( ${components[1]}( value ) ); }`;\n}\nfunction $d5b33d7c30034067$var$getToneMappingFunction(functionName, toneMapping) {\n let toneMappingName;\n switch(toneMapping){\n case $d5b33d7c30034067$export$98f52c2a46c598ca:\n toneMappingName = \"Linear\";\n break;\n case $d5b33d7c30034067$export$74b25e54b3bcd548:\n toneMappingName = \"Reinhard\";\n break;\n case $d5b33d7c30034067$export$932b3dd283d4a366:\n toneMappingName = \"OptimizedCineon\";\n break;\n case $d5b33d7c30034067$export$a0d98fe6d7e4af64:\n toneMappingName = \"ACESFilmic\";\n break;\n case $d5b33d7c30034067$export$2c7b09c1e9abfb5e:\n toneMappingName = \"Custom\";\n break;\n default:\n console.warn(\"THREE.WebGLProgram: Unsupported toneMapping:\", toneMapping);\n toneMappingName = \"Linear\";\n }\n return \"vec3 \" + functionName + \"( vec3 color ) { return \" + toneMappingName + \"ToneMapping( color ); }\";\n}\nfunction $d5b33d7c30034067$var$generateExtensions(parameters) {\n const chunks = [\n parameters.extensionDerivatives || !!parameters.envMapCubeUVHeight || parameters.bumpMap || parameters.normalMapTangentSpace || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === \"physical\" ? \"#extension GL_OES_standard_derivatives : enable\" : \"\",\n (parameters.extensionFragDepth || parameters.logarithmicDepthBuffer) && parameters.rendererExtensionFragDepth ? \"#extension GL_EXT_frag_depth : enable\" : \"\",\n parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ? \"#extension GL_EXT_draw_buffers : require\" : \"\",\n (parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission) && parameters.rendererExtensionShaderTextureLod ? \"#extension GL_EXT_shader_texture_lod : enable\" : \"\"\n ];\n return chunks.filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n}\nfunction $d5b33d7c30034067$var$generateDefines(defines) {\n const chunks = [];\n for(const name in defines){\n const value = defines[name];\n if (value === false) continue;\n chunks.push(\"#define \" + name + \" \" + value);\n }\n return chunks.join(\"\\n\");\n}\nfunction $d5b33d7c30034067$var$fetchAttributeLocations(gl, program) {\n const attributes = {};\n const n = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);\n for(let i = 0; i < n; i++){\n const info = gl.getActiveAttrib(program, i);\n const name = info.name;\n let locationSize = 1;\n if (info.type === gl.FLOAT_MAT2) locationSize = 2;\n if (info.type === gl.FLOAT_MAT3) locationSize = 3;\n if (info.type === gl.FLOAT_MAT4) locationSize = 4;\n // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n attributes[name] = {\n type: info.type,\n location: gl.getAttribLocation(program, name),\n locationSize: locationSize\n };\n }\n return attributes;\n}\nfunction $d5b33d7c30034067$var$filterEmptyLine(string) {\n return string !== \"\";\n}\nfunction $d5b33d7c30034067$var$replaceLightNums(string, parameters) {\n const numSpotLightCoords = parameters.numSpotLightShadows + parameters.numSpotLightMaps - parameters.numSpotLightShadowsWithMaps;\n return string.replace(/NUM_DIR_LIGHTS/g, parameters.numDirLights).replace(/NUM_SPOT_LIGHTS/g, parameters.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g, parameters.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g, numSpotLightCoords).replace(/NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, parameters.numPointLights).replace(/NUM_HEMI_LIGHTS/g, parameters.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g, parameters.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows);\n}\nfunction $d5b33d7c30034067$var$replaceClippingPlaneNums(string, parameters) {\n return string.replace(/NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, parameters.numClippingPlanes - parameters.numClipIntersection);\n}\n// Resolve Includes\nconst $d5b33d7c30034067$var$includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\nfunction $d5b33d7c30034067$var$resolveIncludes(string) {\n return string.replace($d5b33d7c30034067$var$includePattern, $d5b33d7c30034067$var$includeReplacer);\n}\nconst $d5b33d7c30034067$var$shaderChunkMap = new Map([\n [\n \"encodings_fragment\",\n \"colorspace_fragment\"\n ],\n [\n \"encodings_pars_fragment\",\n \"colorspace_pars_fragment\"\n ],\n [\n \"output_fragment\",\n \"opaque_fragment\"\n ]\n]);\nfunction $d5b33d7c30034067$var$includeReplacer(match, include) {\n let string = $d5b33d7c30034067$export$955f9f2e84c43c8b[include];\n if (string === undefined) {\n const newInclude = $d5b33d7c30034067$var$shaderChunkMap.get(include);\n if (newInclude !== undefined) {\n string = $d5b33d7c30034067$export$955f9f2e84c43c8b[newInclude];\n console.warn('THREE.WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.', include, newInclude);\n } else throw new Error(\"Can not resolve #include <\" + include + \">\");\n }\n return $d5b33d7c30034067$var$resolveIncludes(string);\n}\n// Unroll Loops\nconst $d5b33d7c30034067$var$unrollLoopPattern = /#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;\nfunction $d5b33d7c30034067$var$unrollLoops(string) {\n return string.replace($d5b33d7c30034067$var$unrollLoopPattern, $d5b33d7c30034067$var$loopReplacer);\n}\nfunction $d5b33d7c30034067$var$loopReplacer(match, start, end, snippet) {\n let string = \"\";\n for(let i = parseInt(start); i < parseInt(end); i++)string += snippet.replace(/\\[\\s*i\\s*\\]/g, \"[ \" + i + \" ]\").replace(/UNROLLED_LOOP_INDEX/g, i);\n return string;\n}\n//\nfunction $d5b33d7c30034067$var$generatePrecision(parameters) {\n let precisionstring = \"precision \" + parameters.precision + \" float;\\nprecision \" + parameters.precision + \" int;\";\n if (parameters.precision === \"highp\") precisionstring += \"\\n#define HIGH_PRECISION\";\n else if (parameters.precision === \"mediump\") precisionstring += \"\\n#define MEDIUM_PRECISION\";\n else if (parameters.precision === \"lowp\") precisionstring += \"\\n#define LOW_PRECISION\";\n return precisionstring;\n}\nfunction $d5b33d7c30034067$var$generateShadowMapTypeDefine(parameters) {\n let shadowMapTypeDefine = \"SHADOWMAP_TYPE_BASIC\";\n if (parameters.shadowMapType === $d5b33d7c30034067$export$5813f879eee7cd88) shadowMapTypeDefine = \"SHADOWMAP_TYPE_PCF\";\n else if (parameters.shadowMapType === $d5b33d7c30034067$export$a47c4b43a1be34f0) shadowMapTypeDefine = \"SHADOWMAP_TYPE_PCF_SOFT\";\n else if (parameters.shadowMapType === $d5b33d7c30034067$export$896ae1ade6c829c4) shadowMapTypeDefine = \"SHADOWMAP_TYPE_VSM\";\n return shadowMapTypeDefine;\n}\nfunction $d5b33d7c30034067$var$generateEnvMapTypeDefine(parameters) {\n let envMapTypeDefine = \"ENVMAP_TYPE_CUBE\";\n if (parameters.envMap) switch(parameters.envMapMode){\n case $d5b33d7c30034067$export$8759762a6477f2c4:\n case $d5b33d7c30034067$export$dc59f8aed047f61d:\n envMapTypeDefine = \"ENVMAP_TYPE_CUBE\";\n break;\n case $d5b33d7c30034067$export$dbf3e70ff37af79:\n envMapTypeDefine = \"ENVMAP_TYPE_CUBE_UV\";\n break;\n }\n return envMapTypeDefine;\n}\nfunction $d5b33d7c30034067$var$generateEnvMapModeDefine(parameters) {\n let envMapModeDefine = \"ENVMAP_MODE_REFLECTION\";\n if (parameters.envMap) switch(parameters.envMapMode){\n case $d5b33d7c30034067$export$dc59f8aed047f61d:\n envMapModeDefine = \"ENVMAP_MODE_REFRACTION\";\n break;\n }\n return envMapModeDefine;\n}\nfunction $d5b33d7c30034067$var$generateEnvMapBlendingDefine(parameters) {\n let envMapBlendingDefine = \"ENVMAP_BLENDING_NONE\";\n if (parameters.envMap) switch(parameters.combine){\n case $d5b33d7c30034067$export$e50ac29801f1774d:\n envMapBlendingDefine = \"ENVMAP_BLENDING_MULTIPLY\";\n break;\n case $d5b33d7c30034067$export$9f9d94f963c85479:\n envMapBlendingDefine = \"ENVMAP_BLENDING_MIX\";\n break;\n case $d5b33d7c30034067$export$e641dc52bc3494aa:\n envMapBlendingDefine = \"ENVMAP_BLENDING_ADD\";\n break;\n }\n return envMapBlendingDefine;\n}\nfunction $d5b33d7c30034067$var$generateCubeUVSize(parameters) {\n const imageHeight = parameters.envMapCubeUVHeight;\n if (imageHeight === null) return null;\n const maxMip = Math.log2(imageHeight) - 2;\n const texelHeight = 1.0 / imageHeight;\n const texelWidth = 1.0 / (3 * Math.max(Math.pow(2, maxMip), 112));\n return {\n texelWidth: texelWidth,\n texelHeight: texelHeight,\n maxMip: maxMip\n };\n}\nfunction $d5b33d7c30034067$var$WebGLProgram(renderer, cacheKey, parameters, bindingStates) {\n // TODO Send this event to Three.js DevTools\n // console.log( 'WebGLProgram', cacheKey );\n const gl = renderer.getContext();\n const defines = parameters.defines;\n let vertexShader = parameters.vertexShader;\n let fragmentShader = parameters.fragmentShader;\n const shadowMapTypeDefine = $d5b33d7c30034067$var$generateShadowMapTypeDefine(parameters);\n const envMapTypeDefine = $d5b33d7c30034067$var$generateEnvMapTypeDefine(parameters);\n const envMapModeDefine = $d5b33d7c30034067$var$generateEnvMapModeDefine(parameters);\n const envMapBlendingDefine = $d5b33d7c30034067$var$generateEnvMapBlendingDefine(parameters);\n const envMapCubeUVSize = $d5b33d7c30034067$var$generateCubeUVSize(parameters);\n const customExtensions = parameters.isWebGL2 ? \"\" : $d5b33d7c30034067$var$generateExtensions(parameters);\n const customDefines = $d5b33d7c30034067$var$generateDefines(defines);\n const program = gl.createProgram();\n let prefixVertex, prefixFragment;\n let versionString = parameters.glslVersion ? \"#version \" + parameters.glslVersion + \"\\n\" : \"\";\n if (parameters.isRawShaderMaterial) {\n prefixVertex = [\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n if (prefixVertex.length > 0) prefixVertex += \"\\n\";\n prefixFragment = [\n customExtensions,\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n if (prefixFragment.length > 0) prefixFragment += \"\\n\";\n } else {\n prefixVertex = [\n $d5b33d7c30034067$var$generatePrecision(parameters),\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines,\n parameters.instancing ? \"#define USE_INSTANCING\" : \"\",\n parameters.instancingColor ? \"#define USE_INSTANCING_COLOR\" : \"\",\n parameters.useFog && parameters.fog ? \"#define USE_FOG\" : \"\",\n parameters.useFog && parameters.fogExp2 ? \"#define FOG_EXP2\" : \"\",\n parameters.map ? \"#define USE_MAP\" : \"\",\n parameters.envMap ? \"#define USE_ENVMAP\" : \"\",\n parameters.envMap ? \"#define \" + envMapModeDefine : \"\",\n parameters.lightMap ? \"#define USE_LIGHTMAP\" : \"\",\n parameters.aoMap ? \"#define USE_AOMAP\" : \"\",\n parameters.bumpMap ? \"#define USE_BUMPMAP\" : \"\",\n parameters.normalMap ? \"#define USE_NORMALMAP\" : \"\",\n parameters.normalMapObjectSpace ? \"#define USE_NORMALMAP_OBJECTSPACE\" : \"\",\n parameters.normalMapTangentSpace ? \"#define USE_NORMALMAP_TANGENTSPACE\" : \"\",\n parameters.displacementMap ? \"#define USE_DISPLACEMENTMAP\" : \"\",\n parameters.emissiveMap ? \"#define USE_EMISSIVEMAP\" : \"\",\n parameters.anisotropy ? \"#define USE_ANISOTROPY\" : \"\",\n parameters.anisotropyMap ? \"#define USE_ANISOTROPYMAP\" : \"\",\n parameters.clearcoatMap ? \"#define USE_CLEARCOATMAP\" : \"\",\n parameters.clearcoatRoughnessMap ? \"#define USE_CLEARCOAT_ROUGHNESSMAP\" : \"\",\n parameters.clearcoatNormalMap ? \"#define USE_CLEARCOAT_NORMALMAP\" : \"\",\n parameters.iridescenceMap ? \"#define USE_IRIDESCENCEMAP\" : \"\",\n parameters.iridescenceThicknessMap ? \"#define USE_IRIDESCENCE_THICKNESSMAP\" : \"\",\n parameters.specularMap ? \"#define USE_SPECULARMAP\" : \"\",\n parameters.specularColorMap ? \"#define USE_SPECULAR_COLORMAP\" : \"\",\n parameters.specularIntensityMap ? \"#define USE_SPECULAR_INTENSITYMAP\" : \"\",\n parameters.roughnessMap ? \"#define USE_ROUGHNESSMAP\" : \"\",\n parameters.metalnessMap ? \"#define USE_METALNESSMAP\" : \"\",\n parameters.alphaMap ? \"#define USE_ALPHAMAP\" : \"\",\n parameters.alphaHash ? \"#define USE_ALPHAHASH\" : \"\",\n parameters.transmission ? \"#define USE_TRANSMISSION\" : \"\",\n parameters.transmissionMap ? \"#define USE_TRANSMISSIONMAP\" : \"\",\n parameters.thicknessMap ? \"#define USE_THICKNESSMAP\" : \"\",\n parameters.sheenColorMap ? \"#define USE_SHEEN_COLORMAP\" : \"\",\n parameters.sheenRoughnessMap ? \"#define USE_SHEEN_ROUGHNESSMAP\" : \"\",\n //\n parameters.mapUv ? \"#define MAP_UV \" + parameters.mapUv : \"\",\n parameters.alphaMapUv ? \"#define ALPHAMAP_UV \" + parameters.alphaMapUv : \"\",\n parameters.lightMapUv ? \"#define LIGHTMAP_UV \" + parameters.lightMapUv : \"\",\n parameters.aoMapUv ? \"#define AOMAP_UV \" + parameters.aoMapUv : \"\",\n parameters.emissiveMapUv ? \"#define EMISSIVEMAP_UV \" + parameters.emissiveMapUv : \"\",\n parameters.bumpMapUv ? \"#define BUMPMAP_UV \" + parameters.bumpMapUv : \"\",\n parameters.normalMapUv ? \"#define NORMALMAP_UV \" + parameters.normalMapUv : \"\",\n parameters.displacementMapUv ? \"#define DISPLACEMENTMAP_UV \" + parameters.displacementMapUv : \"\",\n parameters.metalnessMapUv ? \"#define METALNESSMAP_UV \" + parameters.metalnessMapUv : \"\",\n parameters.roughnessMapUv ? \"#define ROUGHNESSMAP_UV \" + parameters.roughnessMapUv : \"\",\n parameters.anisotropyMapUv ? \"#define ANISOTROPYMAP_UV \" + parameters.anisotropyMapUv : \"\",\n parameters.clearcoatMapUv ? \"#define CLEARCOATMAP_UV \" + parameters.clearcoatMapUv : \"\",\n parameters.clearcoatNormalMapUv ? \"#define CLEARCOAT_NORMALMAP_UV \" + parameters.clearcoatNormalMapUv : \"\",\n parameters.clearcoatRoughnessMapUv ? \"#define CLEARCOAT_ROUGHNESSMAP_UV \" + parameters.clearcoatRoughnessMapUv : \"\",\n parameters.iridescenceMapUv ? \"#define IRIDESCENCEMAP_UV \" + parameters.iridescenceMapUv : \"\",\n parameters.iridescenceThicknessMapUv ? \"#define IRIDESCENCE_THICKNESSMAP_UV \" + parameters.iridescenceThicknessMapUv : \"\",\n parameters.sheenColorMapUv ? \"#define SHEEN_COLORMAP_UV \" + parameters.sheenColorMapUv : \"\",\n parameters.sheenRoughnessMapUv ? \"#define SHEEN_ROUGHNESSMAP_UV \" + parameters.sheenRoughnessMapUv : \"\",\n parameters.specularMapUv ? \"#define SPECULARMAP_UV \" + parameters.specularMapUv : \"\",\n parameters.specularColorMapUv ? \"#define SPECULAR_COLORMAP_UV \" + parameters.specularColorMapUv : \"\",\n parameters.specularIntensityMapUv ? \"#define SPECULAR_INTENSITYMAP_UV \" + parameters.specularIntensityMapUv : \"\",\n parameters.transmissionMapUv ? \"#define TRANSMISSIONMAP_UV \" + parameters.transmissionMapUv : \"\",\n parameters.thicknessMapUv ? \"#define THICKNESSMAP_UV \" + parameters.thicknessMapUv : \"\",\n //\n parameters.vertexTangents && parameters.flatShading === false ? \"#define USE_TANGENT\" : \"\",\n parameters.vertexColors ? \"#define USE_COLOR\" : \"\",\n parameters.vertexAlphas ? \"#define USE_COLOR_ALPHA\" : \"\",\n parameters.vertexUv1s ? \"#define USE_UV1\" : \"\",\n parameters.vertexUv2s ? \"#define USE_UV2\" : \"\",\n parameters.vertexUv3s ? \"#define USE_UV3\" : \"\",\n parameters.pointsUvs ? \"#define USE_POINTS_UV\" : \"\",\n parameters.flatShading ? \"#define FLAT_SHADED\" : \"\",\n parameters.skinning ? \"#define USE_SKINNING\" : \"\",\n parameters.morphTargets ? \"#define USE_MORPHTARGETS\" : \"\",\n parameters.morphNormals && parameters.flatShading === false ? \"#define USE_MORPHNORMALS\" : \"\",\n parameters.morphColors && parameters.isWebGL2 ? \"#define USE_MORPHCOLORS\" : \"\",\n parameters.morphTargetsCount > 0 && parameters.isWebGL2 ? \"#define MORPHTARGETS_TEXTURE\" : \"\",\n parameters.morphTargetsCount > 0 && parameters.isWebGL2 ? \"#define MORPHTARGETS_TEXTURE_STRIDE \" + parameters.morphTextureStride : \"\",\n parameters.morphTargetsCount > 0 && parameters.isWebGL2 ? \"#define MORPHTARGETS_COUNT \" + parameters.morphTargetsCount : \"\",\n parameters.doubleSided ? \"#define DOUBLE_SIDED\" : \"\",\n parameters.flipSided ? \"#define FLIP_SIDED\" : \"\",\n parameters.shadowMapEnabled ? \"#define USE_SHADOWMAP\" : \"\",\n parameters.shadowMapEnabled ? \"#define \" + shadowMapTypeDefine : \"\",\n parameters.sizeAttenuation ? \"#define USE_SIZEATTENUATION\" : \"\",\n parameters.numLightProbes > 0 ? \"#define USE_LIGHT_PROBES\" : \"\",\n parameters.useLegacyLights ? \"#define LEGACY_LIGHTS\" : \"\",\n parameters.logarithmicDepthBuffer ? \"#define USE_LOGDEPTHBUF\" : \"\",\n parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? \"#define USE_LOGDEPTHBUF_EXT\" : \"\",\n \"uniform mat4 modelMatrix;\",\n \"uniform mat4 modelViewMatrix;\",\n \"uniform mat4 projectionMatrix;\",\n \"uniform mat4 viewMatrix;\",\n \"uniform mat3 normalMatrix;\",\n \"uniform vec3 cameraPosition;\",\n \"uniform bool isOrthographic;\",\n \"#ifdef USE_INSTANCING\",\n \"\tattribute mat4 instanceMatrix;\",\n \"#endif\",\n \"#ifdef USE_INSTANCING_COLOR\",\n \"\tattribute vec3 instanceColor;\",\n \"#endif\",\n \"attribute vec3 position;\",\n \"attribute vec3 normal;\",\n \"attribute vec2 uv;\",\n \"#ifdef USE_UV1\",\n \"\tattribute vec2 uv1;\",\n \"#endif\",\n \"#ifdef USE_UV2\",\n \"\tattribute vec2 uv2;\",\n \"#endif\",\n \"#ifdef USE_UV3\",\n \"\tattribute vec2 uv3;\",\n \"#endif\",\n \"#ifdef USE_TANGENT\",\n \"\tattribute vec4 tangent;\",\n \"#endif\",\n \"#if defined( USE_COLOR_ALPHA )\",\n \"\tattribute vec4 color;\",\n \"#elif defined( USE_COLOR )\",\n \"\tattribute vec3 color;\",\n \"#endif\",\n \"#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )\",\n \"\tattribute vec3 morphTarget0;\",\n \"\tattribute vec3 morphTarget1;\",\n \"\tattribute vec3 morphTarget2;\",\n \"\tattribute vec3 morphTarget3;\",\n \"\t#ifdef USE_MORPHNORMALS\",\n \"\t\tattribute vec3 morphNormal0;\",\n \"\t\tattribute vec3 morphNormal1;\",\n \"\t\tattribute vec3 morphNormal2;\",\n \"\t\tattribute vec3 morphNormal3;\",\n \"\t#else\",\n \"\t\tattribute vec3 morphTarget4;\",\n \"\t\tattribute vec3 morphTarget5;\",\n \"\t\tattribute vec3 morphTarget6;\",\n \"\t\tattribute vec3 morphTarget7;\",\n \"\t#endif\",\n \"#endif\",\n \"#ifdef USE_SKINNING\",\n \"\tattribute vec4 skinIndex;\",\n \"\tattribute vec4 skinWeight;\",\n \"#endif\",\n \"\\n\"\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n prefixFragment = [\n customExtensions,\n $d5b33d7c30034067$var$generatePrecision(parameters),\n \"#define SHADER_TYPE \" + parameters.shaderType,\n \"#define SHADER_NAME \" + parameters.shaderName,\n customDefines,\n parameters.useFog && parameters.fog ? \"#define USE_FOG\" : \"\",\n parameters.useFog && parameters.fogExp2 ? \"#define FOG_EXP2\" : \"\",\n parameters.map ? \"#define USE_MAP\" : \"\",\n parameters.matcap ? \"#define USE_MATCAP\" : \"\",\n parameters.envMap ? \"#define USE_ENVMAP\" : \"\",\n parameters.envMap ? \"#define \" + envMapTypeDefine : \"\",\n parameters.envMap ? \"#define \" + envMapModeDefine : \"\",\n parameters.envMap ? \"#define \" + envMapBlendingDefine : \"\",\n envMapCubeUVSize ? \"#define CUBEUV_TEXEL_WIDTH \" + envMapCubeUVSize.texelWidth : \"\",\n envMapCubeUVSize ? \"#define CUBEUV_TEXEL_HEIGHT \" + envMapCubeUVSize.texelHeight : \"\",\n envMapCubeUVSize ? \"#define CUBEUV_MAX_MIP \" + envMapCubeUVSize.maxMip + \".0\" : \"\",\n parameters.lightMap ? \"#define USE_LIGHTMAP\" : \"\",\n parameters.aoMap ? \"#define USE_AOMAP\" : \"\",\n parameters.bumpMap ? \"#define USE_BUMPMAP\" : \"\",\n parameters.normalMap ? \"#define USE_NORMALMAP\" : \"\",\n parameters.normalMapObjectSpace ? \"#define USE_NORMALMAP_OBJECTSPACE\" : \"\",\n parameters.normalMapTangentSpace ? \"#define USE_NORMALMAP_TANGENTSPACE\" : \"\",\n parameters.emissiveMap ? \"#define USE_EMISSIVEMAP\" : \"\",\n parameters.anisotropy ? \"#define USE_ANISOTROPY\" : \"\",\n parameters.anisotropyMap ? \"#define USE_ANISOTROPYMAP\" : \"\",\n parameters.clearcoat ? \"#define USE_CLEARCOAT\" : \"\",\n parameters.clearcoatMap ? \"#define USE_CLEARCOATMAP\" : \"\",\n parameters.clearcoatRoughnessMap ? \"#define USE_CLEARCOAT_ROUGHNESSMAP\" : \"\",\n parameters.clearcoatNormalMap ? \"#define USE_CLEARCOAT_NORMALMAP\" : \"\",\n parameters.iridescence ? \"#define USE_IRIDESCENCE\" : \"\",\n parameters.iridescenceMap ? \"#define USE_IRIDESCENCEMAP\" : \"\",\n parameters.iridescenceThicknessMap ? \"#define USE_IRIDESCENCE_THICKNESSMAP\" : \"\",\n parameters.specularMap ? \"#define USE_SPECULARMAP\" : \"\",\n parameters.specularColorMap ? \"#define USE_SPECULAR_COLORMAP\" : \"\",\n parameters.specularIntensityMap ? \"#define USE_SPECULAR_INTENSITYMAP\" : \"\",\n parameters.roughnessMap ? \"#define USE_ROUGHNESSMAP\" : \"\",\n parameters.metalnessMap ? \"#define USE_METALNESSMAP\" : \"\",\n parameters.alphaMap ? \"#define USE_ALPHAMAP\" : \"\",\n parameters.alphaTest ? \"#define USE_ALPHATEST\" : \"\",\n parameters.alphaHash ? \"#define USE_ALPHAHASH\" : \"\",\n parameters.sheen ? \"#define USE_SHEEN\" : \"\",\n parameters.sheenColorMap ? \"#define USE_SHEEN_COLORMAP\" : \"\",\n parameters.sheenRoughnessMap ? \"#define USE_SHEEN_ROUGHNESSMAP\" : \"\",\n parameters.transmission ? \"#define USE_TRANSMISSION\" : \"\",\n parameters.transmissionMap ? \"#define USE_TRANSMISSIONMAP\" : \"\",\n parameters.thicknessMap ? \"#define USE_THICKNESSMAP\" : \"\",\n parameters.vertexTangents && parameters.flatShading === false ? \"#define USE_TANGENT\" : \"\",\n parameters.vertexColors || parameters.instancingColor ? \"#define USE_COLOR\" : \"\",\n parameters.vertexAlphas ? \"#define USE_COLOR_ALPHA\" : \"\",\n parameters.vertexUv1s ? \"#define USE_UV1\" : \"\",\n parameters.vertexUv2s ? \"#define USE_UV2\" : \"\",\n parameters.vertexUv3s ? \"#define USE_UV3\" : \"\",\n parameters.pointsUvs ? \"#define USE_POINTS_UV\" : \"\",\n parameters.gradientMap ? \"#define USE_GRADIENTMAP\" : \"\",\n parameters.flatShading ? \"#define FLAT_SHADED\" : \"\",\n parameters.doubleSided ? \"#define DOUBLE_SIDED\" : \"\",\n parameters.flipSided ? \"#define FLIP_SIDED\" : \"\",\n parameters.shadowMapEnabled ? \"#define USE_SHADOWMAP\" : \"\",\n parameters.shadowMapEnabled ? \"#define \" + shadowMapTypeDefine : \"\",\n parameters.premultipliedAlpha ? \"#define PREMULTIPLIED_ALPHA\" : \"\",\n parameters.numLightProbes > 0 ? \"#define USE_LIGHT_PROBES\" : \"\",\n parameters.useLegacyLights ? \"#define LEGACY_LIGHTS\" : \"\",\n parameters.decodeVideoTexture ? \"#define DECODE_VIDEO_TEXTURE\" : \"\",\n parameters.logarithmicDepthBuffer ? \"#define USE_LOGDEPTHBUF\" : \"\",\n parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? \"#define USE_LOGDEPTHBUF_EXT\" : \"\",\n \"uniform mat4 viewMatrix;\",\n \"uniform vec3 cameraPosition;\",\n \"uniform bool isOrthographic;\",\n parameters.toneMapping !== $d5b33d7c30034067$export$9fcb6b4294603b2 ? \"#define TONE_MAPPING\" : \"\",\n parameters.toneMapping !== $d5b33d7c30034067$export$9fcb6b4294603b2 ? $d5b33d7c30034067$export$955f9f2e84c43c8b[\"tonemapping_pars_fragment\"] : \"\",\n parameters.toneMapping !== $d5b33d7c30034067$export$9fcb6b4294603b2 ? $d5b33d7c30034067$var$getToneMappingFunction(\"toneMapping\", parameters.toneMapping) : \"\",\n parameters.dithering ? \"#define DITHERING\" : \"\",\n parameters.opaque ? \"#define OPAQUE\" : \"\",\n $d5b33d7c30034067$export$955f9f2e84c43c8b[\"colorspace_pars_fragment\"],\n $d5b33d7c30034067$var$getTexelEncodingFunction(\"linearToOutputTexel\", parameters.outputColorSpace),\n parameters.useDepthPacking ? \"#define DEPTH_PACKING \" + parameters.depthPacking : \"\",\n \"\\n\"\n ].filter($d5b33d7c30034067$var$filterEmptyLine).join(\"\\n\");\n }\n vertexShader = $d5b33d7c30034067$var$resolveIncludes(vertexShader);\n vertexShader = $d5b33d7c30034067$var$replaceLightNums(vertexShader, parameters);\n vertexShader = $d5b33d7c30034067$var$replaceClippingPlaneNums(vertexShader, parameters);\n fragmentShader = $d5b33d7c30034067$var$resolveIncludes(fragmentShader);\n fragmentShader = $d5b33d7c30034067$var$replaceLightNums(fragmentShader, parameters);\n fragmentShader = $d5b33d7c30034067$var$replaceClippingPlaneNums(fragmentShader, parameters);\n vertexShader = $d5b33d7c30034067$var$unrollLoops(vertexShader);\n fragmentShader = $d5b33d7c30034067$var$unrollLoops(fragmentShader);\n if (parameters.isWebGL2 && parameters.isRawShaderMaterial !== true) {\n // GLSL 3.0 conversion for built-in materials and ShaderMaterial\n versionString = \"#version 300 es\\n\";\n prefixVertex = [\n \"precision mediump sampler2DArray;\",\n \"#define attribute in\",\n \"#define varying out\",\n \"#define texture2D texture\"\n ].join(\"\\n\") + \"\\n\" + prefixVertex;\n prefixFragment = [\n \"precision mediump sampler2DArray;\",\n \"#define varying in\",\n parameters.glslVersion === $d5b33d7c30034067$export$f63012db5506e7dd ? \"\" : \"layout(location = 0) out highp vec4 pc_fragColor;\",\n parameters.glslVersion === $d5b33d7c30034067$export$f63012db5506e7dd ? \"\" : \"#define gl_FragColor pc_fragColor\",\n \"#define gl_FragDepthEXT gl_FragDepth\",\n \"#define texture2D texture\",\n \"#define textureCube texture\",\n \"#define texture2DProj textureProj\",\n \"#define texture2DLodEXT textureLod\",\n \"#define texture2DProjLodEXT textureProjLod\",\n \"#define textureCubeLodEXT textureLod\",\n \"#define texture2DGradEXT textureGrad\",\n \"#define texture2DProjGradEXT textureProjGrad\",\n \"#define textureCubeGradEXT textureGrad\"\n ].join(\"\\n\") + \"\\n\" + prefixFragment;\n }\n const vertexGlsl = versionString + prefixVertex + vertexShader;\n const fragmentGlsl = versionString + prefixFragment + fragmentShader;\n // console.log( '*VERTEX*', vertexGlsl );\n // console.log( '*FRAGMENT*', fragmentGlsl );\n const glVertexShader = $d5b33d7c30034067$var$WebGLShader(gl, gl.VERTEX_SHADER, vertexGlsl);\n const glFragmentShader = $d5b33d7c30034067$var$WebGLShader(gl, gl.FRAGMENT_SHADER, fragmentGlsl);\n gl.attachShader(program, glVertexShader);\n gl.attachShader(program, glFragmentShader);\n // Force a particular attribute to index 0.\n if (parameters.index0AttributeName !== undefined) gl.bindAttribLocation(program, 0, parameters.index0AttributeName);\n else if (parameters.morphTargets === true) // programs with morphTargets displace position out of attribute 0\n gl.bindAttribLocation(program, 0, \"position\");\n gl.linkProgram(program);\n function onFirstUse(self1) {\n // check for link errors\n if (renderer.debug.checkShaderErrors) {\n const programLog = gl.getProgramInfoLog(program).trim();\n const vertexLog = gl.getShaderInfoLog(glVertexShader).trim();\n const fragmentLog = gl.getShaderInfoLog(glFragmentShader).trim();\n let runnable = true;\n let haveDiagnostics = true;\n if (gl.getProgramParameter(program, gl.LINK_STATUS) === false) {\n runnable = false;\n if (typeof renderer.debug.onShaderError === \"function\") renderer.debug.onShaderError(gl, program, glVertexShader, glFragmentShader);\n else {\n // default error reporting\n const vertexErrors = $d5b33d7c30034067$var$getShaderErrors(gl, glVertexShader, \"vertex\");\n const fragmentErrors = $d5b33d7c30034067$var$getShaderErrors(gl, glFragmentShader, \"fragment\");\n console.error(\"THREE.WebGLProgram: Shader Error \" + gl.getError() + \" - \" + \"VALIDATE_STATUS \" + gl.getProgramParameter(program, gl.VALIDATE_STATUS) + \"\\n\\n\" + \"Program Info Log: \" + programLog + \"\\n\" + vertexErrors + \"\\n\" + fragmentErrors);\n }\n } else if (programLog !== \"\") console.warn(\"THREE.WebGLProgram: Program Info Log:\", programLog);\n else if (vertexLog === \"\" || fragmentLog === \"\") haveDiagnostics = false;\n if (haveDiagnostics) self1.diagnostics = {\n runnable: runnable,\n programLog: programLog,\n vertexShader: {\n log: vertexLog,\n prefix: prefixVertex\n },\n fragmentShader: {\n log: fragmentLog,\n prefix: prefixFragment\n }\n };\n }\n // Clean up\n // Crashes in iOS9 and iOS10. #18402\n // gl.detachShader( program, glVertexShader );\n // gl.detachShader( program, glFragmentShader );\n gl.deleteShader(glVertexShader);\n gl.deleteShader(glFragmentShader);\n cachedUniforms = new $d5b33d7c30034067$var$WebGLUniforms(gl, program);\n cachedAttributes = $d5b33d7c30034067$var$fetchAttributeLocations(gl, program);\n }\n // set up caching for uniform locations\n let cachedUniforms;\n this.getUniforms = function() {\n if (cachedUniforms === undefined) // Populates cachedUniforms and cachedAttributes\n onFirstUse(this);\n return cachedUniforms;\n };\n // set up caching for attribute locations\n let cachedAttributes;\n this.getAttributes = function() {\n if (cachedAttributes === undefined) // Populates cachedAttributes and cachedUniforms\n onFirstUse(this);\n return cachedAttributes;\n };\n // indicate when the program is ready to be used. if the KHR_parallel_shader_compile extension isn't supported,\n // flag the program as ready immediately. It may cause a stall when it's first used.\n let programReady = parameters.rendererExtensionParallelShaderCompile === false;\n this.isReady = function() {\n if (programReady === false) programReady = gl.getProgramParameter(program, $d5b33d7c30034067$var$COMPLETION_STATUS_KHR);\n return programReady;\n };\n // free resource\n this.destroy = function() {\n bindingStates.releaseStatesOfProgram(this);\n gl.deleteProgram(program);\n this.program = undefined;\n };\n //\n this.type = parameters.shaderType;\n this.name = parameters.shaderName;\n this.id = $d5b33d7c30034067$var$programIdCount++;\n this.cacheKey = cacheKey;\n this.usedTimes = 1;\n this.program = program;\n this.vertexShader = glVertexShader;\n this.fragmentShader = glFragmentShader;\n return this;\n}\nlet $d5b33d7c30034067$var$_id$1 = 0;\nclass $d5b33d7c30034067$var$WebGLShaderCache {\n constructor(){\n this.shaderCache = new Map();\n this.materialCache = new Map();\n }\n update(material) {\n const vertexShader = material.vertexShader;\n const fragmentShader = material.fragmentShader;\n const vertexShaderStage = this._getShaderStage(vertexShader);\n const fragmentShaderStage = this._getShaderStage(fragmentShader);\n const materialShaders = this._getShaderCacheForMaterial(material);\n if (materialShaders.has(vertexShaderStage) === false) {\n materialShaders.add(vertexShaderStage);\n vertexShaderStage.usedTimes++;\n }\n if (materialShaders.has(fragmentShaderStage) === false) {\n materialShaders.add(fragmentShaderStage);\n fragmentShaderStage.usedTimes++;\n }\n return this;\n }\n remove(material) {\n const materialShaders = this.materialCache.get(material);\n for (const shaderStage of materialShaders){\n shaderStage.usedTimes--;\n if (shaderStage.usedTimes === 0) this.shaderCache.delete(shaderStage.code);\n }\n this.materialCache.delete(material);\n return this;\n }\n getVertexShaderID(material) {\n return this._getShaderStage(material.vertexShader).id;\n }\n getFragmentShaderID(material) {\n return this._getShaderStage(material.fragmentShader).id;\n }\n dispose() {\n this.shaderCache.clear();\n this.materialCache.clear();\n }\n _getShaderCacheForMaterial(material) {\n const cache = this.materialCache;\n let set = cache.get(material);\n if (set === undefined) {\n set = new Set();\n cache.set(material, set);\n }\n return set;\n }\n _getShaderStage(code) {\n const cache = this.shaderCache;\n let stage = cache.get(code);\n if (stage === undefined) {\n stage = new $d5b33d7c30034067$var$WebGLShaderStage(code);\n cache.set(code, stage);\n }\n return stage;\n }\n}\nclass $d5b33d7c30034067$var$WebGLShaderStage {\n constructor(code){\n this.id = $d5b33d7c30034067$var$_id$1++;\n this.code = code;\n this.usedTimes = 0;\n }\n}\nfunction $d5b33d7c30034067$var$WebGLPrograms(renderer, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping) {\n const _programLayers = new $d5b33d7c30034067$export$89312ce47c0ca777();\n const _customShaders = new $d5b33d7c30034067$var$WebGLShaderCache();\n const programs = [];\n const IS_WEBGL2 = capabilities.isWebGL2;\n const logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n const SUPPORTS_VERTEX_TEXTURES = capabilities.vertexTextures;\n let precision = capabilities.precision;\n const shaderIDs = {\n MeshDepthMaterial: \"depth\",\n MeshDistanceMaterial: \"distanceRGBA\",\n MeshNormalMaterial: \"normal\",\n MeshBasicMaterial: \"basic\",\n MeshLambertMaterial: \"lambert\",\n MeshPhongMaterial: \"phong\",\n MeshToonMaterial: \"toon\",\n MeshStandardMaterial: \"physical\",\n MeshPhysicalMaterial: \"physical\",\n MeshMatcapMaterial: \"matcap\",\n LineBasicMaterial: \"basic\",\n LineDashedMaterial: \"dashed\",\n PointsMaterial: \"points\",\n ShadowMaterial: \"shadow\",\n SpriteMaterial: \"sprite\"\n };\n function getChannel(value) {\n if (value === 0) return \"uv\";\n return `uv${value}`;\n }\n function getParameters(material, lights, shadows, scene, object) {\n const fog = scene.fog;\n const geometry = object.geometry;\n const environment = material.isMeshStandardMaterial ? scene.environment : null;\n const envMap = (material.isMeshStandardMaterial ? cubeuvmaps : cubemaps).get(material.envMap || environment);\n const envMapCubeUVHeight = !!envMap && envMap.mapping === $d5b33d7c30034067$export$dbf3e70ff37af79 ? envMap.image.height : null;\n const shaderID = shaderIDs[material.type];\n // heuristics to create shader parameters according to lights in the scene\n // (not to blow over maxLights budget)\n if (material.precision !== null) {\n precision = capabilities.getMaxPrecision(material.precision);\n if (precision !== material.precision) console.warn(\"THREE.WebGLProgram.getParameters:\", material.precision, \"not supported, using\", precision, \"instead.\");\n }\n //\n const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n const morphTargetsCount = morphAttribute !== undefined ? morphAttribute.length : 0;\n let morphTextureStride = 0;\n if (geometry.morphAttributes.position !== undefined) morphTextureStride = 1;\n if (geometry.morphAttributes.normal !== undefined) morphTextureStride = 2;\n if (geometry.morphAttributes.color !== undefined) morphTextureStride = 3;\n //\n let vertexShader, fragmentShader;\n let customVertexShaderID, customFragmentShaderID;\n if (shaderID) {\n const shader = $d5b33d7c30034067$export$bee4a7d47f8f5014[shaderID];\n vertexShader = shader.vertexShader;\n fragmentShader = shader.fragmentShader;\n } else {\n vertexShader = material.vertexShader;\n fragmentShader = material.fragmentShader;\n _customShaders.update(material);\n customVertexShaderID = _customShaders.getVertexShaderID(material);\n customFragmentShaderID = _customShaders.getFragmentShaderID(material);\n }\n const currentRenderTarget = renderer.getRenderTarget();\n const IS_INSTANCEDMESH = object.isInstancedMesh === true;\n const HAS_MAP = !!material.map;\n const HAS_MATCAP = !!material.matcap;\n const HAS_ENVMAP = !!envMap;\n const HAS_AOMAP = !!material.aoMap;\n const HAS_LIGHTMAP = !!material.lightMap;\n const HAS_BUMPMAP = !!material.bumpMap;\n const HAS_NORMALMAP = !!material.normalMap;\n const HAS_DISPLACEMENTMAP = !!material.displacementMap;\n const HAS_EMISSIVEMAP = !!material.emissiveMap;\n const HAS_METALNESSMAP = !!material.metalnessMap;\n const HAS_ROUGHNESSMAP = !!material.roughnessMap;\n const HAS_ANISOTROPY = material.anisotropy > 0;\n const HAS_CLEARCOAT = material.clearcoat > 0;\n const HAS_IRIDESCENCE = material.iridescence > 0;\n const HAS_SHEEN = material.sheen > 0;\n const HAS_TRANSMISSION = material.transmission > 0;\n const HAS_ANISOTROPYMAP = HAS_ANISOTROPY && !!material.anisotropyMap;\n const HAS_CLEARCOATMAP = HAS_CLEARCOAT && !!material.clearcoatMap;\n const HAS_CLEARCOAT_NORMALMAP = HAS_CLEARCOAT && !!material.clearcoatNormalMap;\n const HAS_CLEARCOAT_ROUGHNESSMAP = HAS_CLEARCOAT && !!material.clearcoatRoughnessMap;\n const HAS_IRIDESCENCEMAP = HAS_IRIDESCENCE && !!material.iridescenceMap;\n const HAS_IRIDESCENCE_THICKNESSMAP = HAS_IRIDESCENCE && !!material.iridescenceThicknessMap;\n const HAS_SHEEN_COLORMAP = HAS_SHEEN && !!material.sheenColorMap;\n const HAS_SHEEN_ROUGHNESSMAP = HAS_SHEEN && !!material.sheenRoughnessMap;\n const HAS_SPECULARMAP = !!material.specularMap;\n const HAS_SPECULAR_COLORMAP = !!material.specularColorMap;\n const HAS_SPECULAR_INTENSITYMAP = !!material.specularIntensityMap;\n const HAS_TRANSMISSIONMAP = HAS_TRANSMISSION && !!material.transmissionMap;\n const HAS_THICKNESSMAP = HAS_TRANSMISSION && !!material.thicknessMap;\n const HAS_GRADIENTMAP = !!material.gradientMap;\n const HAS_ALPHAMAP = !!material.alphaMap;\n const HAS_ALPHATEST = material.alphaTest > 0;\n const HAS_ALPHAHASH = !!material.alphaHash;\n const HAS_EXTENSIONS = !!material.extensions;\n const HAS_ATTRIBUTE_UV1 = !!geometry.attributes.uv1;\n const HAS_ATTRIBUTE_UV2 = !!geometry.attributes.uv2;\n const HAS_ATTRIBUTE_UV3 = !!geometry.attributes.uv3;\n let toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n if (material.toneMapped) {\n if (currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true) toneMapping = renderer.toneMapping;\n }\n const parameters = {\n isWebGL2: IS_WEBGL2,\n shaderID: shaderID,\n shaderType: material.type,\n shaderName: material.name,\n vertexShader: vertexShader,\n fragmentShader: fragmentShader,\n defines: material.defines,\n customVertexShaderID: customVertexShaderID,\n customFragmentShaderID: customFragmentShaderID,\n isRawShaderMaterial: material.isRawShaderMaterial === true,\n glslVersion: material.glslVersion,\n precision: precision,\n instancing: IS_INSTANCEDMESH,\n instancingColor: IS_INSTANCEDMESH && object.instanceColor !== null,\n supportsVertexTextures: SUPPORTS_VERTEX_TEXTURES,\n outputColorSpace: currentRenderTarget === null ? renderer.outputColorSpace : currentRenderTarget.isXRRenderTarget === true ? currentRenderTarget.texture.colorSpace : $d5b33d7c30034067$export$42429b3acfb233a4,\n map: HAS_MAP,\n matcap: HAS_MATCAP,\n envMap: HAS_ENVMAP,\n envMapMode: HAS_ENVMAP && envMap.mapping,\n envMapCubeUVHeight: envMapCubeUVHeight,\n aoMap: HAS_AOMAP,\n lightMap: HAS_LIGHTMAP,\n bumpMap: HAS_BUMPMAP,\n normalMap: HAS_NORMALMAP,\n displacementMap: SUPPORTS_VERTEX_TEXTURES && HAS_DISPLACEMENTMAP,\n emissiveMap: HAS_EMISSIVEMAP,\n normalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === $d5b33d7c30034067$export$9990ad26f9db5b2c,\n normalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === $d5b33d7c30034067$export$2852a58ebdac27b8,\n metalnessMap: HAS_METALNESSMAP,\n roughnessMap: HAS_ROUGHNESSMAP,\n anisotropy: HAS_ANISOTROPY,\n anisotropyMap: HAS_ANISOTROPYMAP,\n clearcoat: HAS_CLEARCOAT,\n clearcoatMap: HAS_CLEARCOATMAP,\n clearcoatNormalMap: HAS_CLEARCOAT_NORMALMAP,\n clearcoatRoughnessMap: HAS_CLEARCOAT_ROUGHNESSMAP,\n iridescence: HAS_IRIDESCENCE,\n iridescenceMap: HAS_IRIDESCENCEMAP,\n iridescenceThicknessMap: HAS_IRIDESCENCE_THICKNESSMAP,\n sheen: HAS_SHEEN,\n sheenColorMap: HAS_SHEEN_COLORMAP,\n sheenRoughnessMap: HAS_SHEEN_ROUGHNESSMAP,\n specularMap: HAS_SPECULARMAP,\n specularColorMap: HAS_SPECULAR_COLORMAP,\n specularIntensityMap: HAS_SPECULAR_INTENSITYMAP,\n transmission: HAS_TRANSMISSION,\n transmissionMap: HAS_TRANSMISSIONMAP,\n thicknessMap: HAS_THICKNESSMAP,\n gradientMap: HAS_GRADIENTMAP,\n opaque: material.transparent === false && material.blending === $d5b33d7c30034067$export$5b29a26d96ee6af0,\n alphaMap: HAS_ALPHAMAP,\n alphaTest: HAS_ALPHATEST,\n alphaHash: HAS_ALPHAHASH,\n combine: material.combine,\n //\n mapUv: HAS_MAP && getChannel(material.map.channel),\n aoMapUv: HAS_AOMAP && getChannel(material.aoMap.channel),\n lightMapUv: HAS_LIGHTMAP && getChannel(material.lightMap.channel),\n bumpMapUv: HAS_BUMPMAP && getChannel(material.bumpMap.channel),\n normalMapUv: HAS_NORMALMAP && getChannel(material.normalMap.channel),\n displacementMapUv: HAS_DISPLACEMENTMAP && getChannel(material.displacementMap.channel),\n emissiveMapUv: HAS_EMISSIVEMAP && getChannel(material.emissiveMap.channel),\n metalnessMapUv: HAS_METALNESSMAP && getChannel(material.metalnessMap.channel),\n roughnessMapUv: HAS_ROUGHNESSMAP && getChannel(material.roughnessMap.channel),\n anisotropyMapUv: HAS_ANISOTROPYMAP && getChannel(material.anisotropyMap.channel),\n clearcoatMapUv: HAS_CLEARCOATMAP && getChannel(material.clearcoatMap.channel),\n clearcoatNormalMapUv: HAS_CLEARCOAT_NORMALMAP && getChannel(material.clearcoatNormalMap.channel),\n clearcoatRoughnessMapUv: HAS_CLEARCOAT_ROUGHNESSMAP && getChannel(material.clearcoatRoughnessMap.channel),\n iridescenceMapUv: HAS_IRIDESCENCEMAP && getChannel(material.iridescenceMap.channel),\n iridescenceThicknessMapUv: HAS_IRIDESCENCE_THICKNESSMAP && getChannel(material.iridescenceThicknessMap.channel),\n sheenColorMapUv: HAS_SHEEN_COLORMAP && getChannel(material.sheenColorMap.channel),\n sheenRoughnessMapUv: HAS_SHEEN_ROUGHNESSMAP && getChannel(material.sheenRoughnessMap.channel),\n specularMapUv: HAS_SPECULARMAP && getChannel(material.specularMap.channel),\n specularColorMapUv: HAS_SPECULAR_COLORMAP && getChannel(material.specularColorMap.channel),\n specularIntensityMapUv: HAS_SPECULAR_INTENSITYMAP && getChannel(material.specularIntensityMap.channel),\n transmissionMapUv: HAS_TRANSMISSIONMAP && getChannel(material.transmissionMap.channel),\n thicknessMapUv: HAS_THICKNESSMAP && getChannel(material.thicknessMap.channel),\n alphaMapUv: HAS_ALPHAMAP && getChannel(material.alphaMap.channel),\n //\n vertexTangents: !!geometry.attributes.tangent && (HAS_NORMALMAP || HAS_ANISOTROPY),\n vertexColors: material.vertexColors,\n vertexAlphas: material.vertexColors === true && !!geometry.attributes.color && geometry.attributes.color.itemSize === 4,\n vertexUv1s: HAS_ATTRIBUTE_UV1,\n vertexUv2s: HAS_ATTRIBUTE_UV2,\n vertexUv3s: HAS_ATTRIBUTE_UV3,\n pointsUvs: object.isPoints === true && !!geometry.attributes.uv && (HAS_MAP || HAS_ALPHAMAP),\n fog: !!fog,\n useFog: material.fog === true,\n fogExp2: fog && fog.isFogExp2,\n flatShading: material.flatShading === true,\n sizeAttenuation: material.sizeAttenuation === true,\n logarithmicDepthBuffer: logarithmicDepthBuffer,\n skinning: object.isSkinnedMesh === true,\n morphTargets: geometry.morphAttributes.position !== undefined,\n morphNormals: geometry.morphAttributes.normal !== undefined,\n morphColors: geometry.morphAttributes.color !== undefined,\n morphTargetsCount: morphTargetsCount,\n morphTextureStride: morphTextureStride,\n numDirLights: lights.directional.length,\n numPointLights: lights.point.length,\n numSpotLights: lights.spot.length,\n numSpotLightMaps: lights.spotLightMap.length,\n numRectAreaLights: lights.rectArea.length,\n numHemiLights: lights.hemi.length,\n numDirLightShadows: lights.directionalShadowMap.length,\n numPointLightShadows: lights.pointShadowMap.length,\n numSpotLightShadows: lights.spotShadowMap.length,\n numSpotLightShadowsWithMaps: lights.numSpotLightShadowsWithMaps,\n numLightProbes: lights.numLightProbes,\n numClippingPlanes: clipping.numPlanes,\n numClipIntersection: clipping.numIntersection,\n dithering: material.dithering,\n shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n shadowMapType: renderer.shadowMap.type,\n toneMapping: toneMapping,\n useLegacyLights: renderer._useLegacyLights,\n decodeVideoTexture: HAS_MAP && material.map.isVideoTexture === true && $d5b33d7c30034067$export$5e6fd513f44698c.getTransfer(material.map.colorSpace) === $d5b33d7c30034067$export$8d0a61916cc26abb,\n premultipliedAlpha: material.premultipliedAlpha,\n doubleSided: material.side === $d5b33d7c30034067$export$3b296b6f144d5b03,\n flipSided: material.side === $d5b33d7c30034067$export$d9f0486e75b5ace,\n useDepthPacking: material.depthPacking >= 0,\n depthPacking: material.depthPacking || 0,\n index0AttributeName: material.index0AttributeName,\n extensionDerivatives: HAS_EXTENSIONS && material.extensions.derivatives === true,\n extensionFragDepth: HAS_EXTENSIONS && material.extensions.fragDepth === true,\n extensionDrawBuffers: HAS_EXTENSIONS && material.extensions.drawBuffers === true,\n extensionShaderTextureLOD: HAS_EXTENSIONS && material.extensions.shaderTextureLOD === true,\n rendererExtensionFragDepth: IS_WEBGL2 || extensions.has(\"EXT_frag_depth\"),\n rendererExtensionDrawBuffers: IS_WEBGL2 || extensions.has(\"WEBGL_draw_buffers\"),\n rendererExtensionShaderTextureLod: IS_WEBGL2 || extensions.has(\"EXT_shader_texture_lod\"),\n rendererExtensionParallelShaderCompile: extensions.has(\"KHR_parallel_shader_compile\"),\n customProgramCacheKey: material.customProgramCacheKey()\n };\n return parameters;\n }\n function getProgramCacheKey(parameters) {\n const array = [];\n if (parameters.shaderID) array.push(parameters.shaderID);\n else {\n array.push(parameters.customVertexShaderID);\n array.push(parameters.customFragmentShaderID);\n }\n if (parameters.defines !== undefined) for(const name in parameters.defines){\n array.push(name);\n array.push(parameters.defines[name]);\n }\n if (parameters.isRawShaderMaterial === false) {\n getProgramCacheKeyParameters(array, parameters);\n getProgramCacheKeyBooleans(array, parameters);\n array.push(renderer.outputColorSpace);\n }\n array.push(parameters.customProgramCacheKey);\n return array.join();\n }\n function getProgramCacheKeyParameters(array, parameters) {\n array.push(parameters.precision);\n array.push(parameters.outputColorSpace);\n array.push(parameters.envMapMode);\n array.push(parameters.envMapCubeUVHeight);\n array.push(parameters.mapUv);\n array.push(parameters.alphaMapUv);\n array.push(parameters.lightMapUv);\n array.push(parameters.aoMapUv);\n array.push(parameters.bumpMapUv);\n array.push(parameters.normalMapUv);\n array.push(parameters.displacementMapUv);\n array.push(parameters.emissiveMapUv);\n array.push(parameters.metalnessMapUv);\n array.push(parameters.roughnessMapUv);\n array.push(parameters.anisotropyMapUv);\n array.push(parameters.clearcoatMapUv);\n array.push(parameters.clearcoatNormalMapUv);\n array.push(parameters.clearcoatRoughnessMapUv);\n array.push(parameters.iridescenceMapUv);\n array.push(parameters.iridescenceThicknessMapUv);\n array.push(parameters.sheenColorMapUv);\n array.push(parameters.sheenRoughnessMapUv);\n array.push(parameters.specularMapUv);\n array.push(parameters.specularColorMapUv);\n array.push(parameters.specularIntensityMapUv);\n array.push(parameters.transmissionMapUv);\n array.push(parameters.thicknessMapUv);\n array.push(parameters.combine);\n array.push(parameters.fogExp2);\n array.push(parameters.sizeAttenuation);\n array.push(parameters.morphTargetsCount);\n array.push(parameters.morphAttributeCount);\n array.push(parameters.numDirLights);\n array.push(parameters.numPointLights);\n array.push(parameters.numSpotLights);\n array.push(parameters.numSpotLightMaps);\n array.push(parameters.numHemiLights);\n array.push(parameters.numRectAreaLights);\n array.push(parameters.numDirLightShadows);\n array.push(parameters.numPointLightShadows);\n array.push(parameters.numSpotLightShadows);\n array.push(parameters.numSpotLightShadowsWithMaps);\n array.push(parameters.numLightProbes);\n array.push(parameters.shadowMapType);\n array.push(parameters.toneMapping);\n array.push(parameters.numClippingPlanes);\n array.push(parameters.numClipIntersection);\n array.push(parameters.depthPacking);\n }\n function getProgramCacheKeyBooleans(array, parameters) {\n _programLayers.disableAll();\n if (parameters.isWebGL2) _programLayers.enable(0);\n if (parameters.supportsVertexTextures) _programLayers.enable(1);\n if (parameters.instancing) _programLayers.enable(2);\n if (parameters.instancingColor) _programLayers.enable(3);\n if (parameters.matcap) _programLayers.enable(4);\n if (parameters.envMap) _programLayers.enable(5);\n if (parameters.normalMapObjectSpace) _programLayers.enable(6);\n if (parameters.normalMapTangentSpace) _programLayers.enable(7);\n if (parameters.clearcoat) _programLayers.enable(8);\n if (parameters.iridescence) _programLayers.enable(9);\n if (parameters.alphaTest) _programLayers.enable(10);\n if (parameters.vertexColors) _programLayers.enable(11);\n if (parameters.vertexAlphas) _programLayers.enable(12);\n if (parameters.vertexUv1s) _programLayers.enable(13);\n if (parameters.vertexUv2s) _programLayers.enable(14);\n if (parameters.vertexUv3s) _programLayers.enable(15);\n if (parameters.vertexTangents) _programLayers.enable(16);\n if (parameters.anisotropy) _programLayers.enable(17);\n if (parameters.alphaHash) _programLayers.enable(18);\n array.push(_programLayers.mask);\n _programLayers.disableAll();\n if (parameters.fog) _programLayers.enable(0);\n if (parameters.useFog) _programLayers.enable(1);\n if (parameters.flatShading) _programLayers.enable(2);\n if (parameters.logarithmicDepthBuffer) _programLayers.enable(3);\n if (parameters.skinning) _programLayers.enable(4);\n if (parameters.morphTargets) _programLayers.enable(5);\n if (parameters.morphNormals) _programLayers.enable(6);\n if (parameters.morphColors) _programLayers.enable(7);\n if (parameters.premultipliedAlpha) _programLayers.enable(8);\n if (parameters.shadowMapEnabled) _programLayers.enable(9);\n if (parameters.useLegacyLights) _programLayers.enable(10);\n if (parameters.doubleSided) _programLayers.enable(11);\n if (parameters.flipSided) _programLayers.enable(12);\n if (parameters.useDepthPacking) _programLayers.enable(13);\n if (parameters.dithering) _programLayers.enable(14);\n if (parameters.transmission) _programLayers.enable(15);\n if (parameters.sheen) _programLayers.enable(16);\n if (parameters.opaque) _programLayers.enable(17);\n if (parameters.pointsUvs) _programLayers.enable(18);\n if (parameters.decodeVideoTexture) _programLayers.enable(19);\n array.push(_programLayers.mask);\n }\n function getUniforms(material) {\n const shaderID = shaderIDs[material.type];\n let uniforms;\n if (shaderID) {\n const shader = $d5b33d7c30034067$export$bee4a7d47f8f5014[shaderID];\n uniforms = $d5b33d7c30034067$export$d8ecdf8615bfea69.clone(shader.uniforms);\n } else uniforms = material.uniforms;\n return uniforms;\n }\n function acquireProgram(parameters, cacheKey) {\n let program;\n // Check if code has been already compiled\n for(let p = 0, pl = programs.length; p < pl; p++){\n const preexistingProgram = programs[p];\n if (preexistingProgram.cacheKey === cacheKey) {\n program = preexistingProgram;\n ++program.usedTimes;\n break;\n }\n }\n if (program === undefined) {\n program = new $d5b33d7c30034067$var$WebGLProgram(renderer, cacheKey, parameters, bindingStates);\n programs.push(program);\n }\n return program;\n }\n function releaseProgram(program) {\n if (--program.usedTimes === 0) {\n // Remove from unordered set\n const i = programs.indexOf(program);\n programs[i] = programs[programs.length - 1];\n programs.pop();\n // Free WebGL resources\n program.destroy();\n }\n }\n function releaseShaderCache(material) {\n _customShaders.remove(material);\n }\n function dispose() {\n _customShaders.dispose();\n }\n return {\n getParameters: getParameters,\n getProgramCacheKey: getProgramCacheKey,\n getUniforms: getUniforms,\n acquireProgram: acquireProgram,\n releaseProgram: releaseProgram,\n releaseShaderCache: releaseShaderCache,\n // Exposed for resource monitoring & error feedback via renderer.info:\n programs: programs,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$WebGLProperties() {\n let properties = new WeakMap();\n function get(object) {\n let map = properties.get(object);\n if (map === undefined) {\n map = {};\n properties.set(object, map);\n }\n return map;\n }\n function remove(object) {\n properties.delete(object);\n }\n function update(object, key, value) {\n properties.get(object)[key] = value;\n }\n function dispose() {\n properties = new WeakMap();\n }\n return {\n get: get,\n remove: remove,\n update: update,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$painterSortStable(a, b) {\n if (a.groupOrder !== b.groupOrder) return a.groupOrder - b.groupOrder;\n else if (a.renderOrder !== b.renderOrder) return a.renderOrder - b.renderOrder;\n else if (a.material.id !== b.material.id) return a.material.id - b.material.id;\n else if (a.z !== b.z) return a.z - b.z;\n else return a.id - b.id;\n}\nfunction $d5b33d7c30034067$var$reversePainterSortStable(a, b) {\n if (a.groupOrder !== b.groupOrder) return a.groupOrder - b.groupOrder;\n else if (a.renderOrder !== b.renderOrder) return a.renderOrder - b.renderOrder;\n else if (a.z !== b.z) return b.z - a.z;\n else return a.id - b.id;\n}\nfunction $d5b33d7c30034067$var$WebGLRenderList() {\n const renderItems = [];\n let renderItemsIndex = 0;\n const opaque = [];\n const transmissive = [];\n const transparent = [];\n function init() {\n renderItemsIndex = 0;\n opaque.length = 0;\n transmissive.length = 0;\n transparent.length = 0;\n }\n function getNextRenderItem(object, geometry, material, groupOrder, z, group) {\n let renderItem = renderItems[renderItemsIndex];\n if (renderItem === undefined) {\n renderItem = {\n id: object.id,\n object: object,\n geometry: geometry,\n material: material,\n groupOrder: groupOrder,\n renderOrder: object.renderOrder,\n z: z,\n group: group\n };\n renderItems[renderItemsIndex] = renderItem;\n } else {\n renderItem.id = object.id;\n renderItem.object = object;\n renderItem.geometry = geometry;\n renderItem.material = material;\n renderItem.groupOrder = groupOrder;\n renderItem.renderOrder = object.renderOrder;\n renderItem.z = z;\n renderItem.group = group;\n }\n renderItemsIndex++;\n return renderItem;\n }\n function push(object, geometry, material, groupOrder, z, group) {\n const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n if (material.transmission > 0.0) transmissive.push(renderItem);\n else if (material.transparent === true) transparent.push(renderItem);\n else opaque.push(renderItem);\n }\n function unshift(object, geometry, material, groupOrder, z, group) {\n const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n if (material.transmission > 0.0) transmissive.unshift(renderItem);\n else if (material.transparent === true) transparent.unshift(renderItem);\n else opaque.unshift(renderItem);\n }\n function sort(customOpaqueSort, customTransparentSort) {\n if (opaque.length > 1) opaque.sort(customOpaqueSort || $d5b33d7c30034067$var$painterSortStable);\n if (transmissive.length > 1) transmissive.sort(customTransparentSort || $d5b33d7c30034067$var$reversePainterSortStable);\n if (transparent.length > 1) transparent.sort(customTransparentSort || $d5b33d7c30034067$var$reversePainterSortStable);\n }\n function finish() {\n // Clear references from inactive renderItems in the list\n for(let i = renderItemsIndex, il = renderItems.length; i < il; i++){\n const renderItem = renderItems[i];\n if (renderItem.id === null) break;\n renderItem.id = null;\n renderItem.object = null;\n renderItem.geometry = null;\n renderItem.material = null;\n renderItem.group = null;\n }\n }\n return {\n opaque: opaque,\n transmissive: transmissive,\n transparent: transparent,\n init: init,\n push: push,\n unshift: unshift,\n finish: finish,\n sort: sort\n };\n}\nfunction $d5b33d7c30034067$var$WebGLRenderLists() {\n let lists = new WeakMap();\n function get(scene, renderCallDepth) {\n const listArray = lists.get(scene);\n let list;\n if (listArray === undefined) {\n list = new $d5b33d7c30034067$var$WebGLRenderList();\n lists.set(scene, [\n list\n ]);\n } else if (renderCallDepth >= listArray.length) {\n list = new $d5b33d7c30034067$var$WebGLRenderList();\n listArray.push(list);\n } else list = listArray[renderCallDepth];\n return list;\n }\n function dispose() {\n lists = new WeakMap();\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nfunction $d5b33d7c30034067$var$UniformsCache() {\n const lights = {};\n return {\n get: function(light) {\n if (lights[light.id] !== undefined) return lights[light.id];\n let uniforms;\n switch(light.type){\n case \"DirectionalLight\":\n uniforms = {\n direction: new $d5b33d7c30034067$export$64b5c384219d3699(),\n color: new $d5b33d7c30034067$export$892596cec99bc70e()\n };\n break;\n case \"SpotLight\":\n uniforms = {\n position: new $d5b33d7c30034067$export$64b5c384219d3699(),\n direction: new $d5b33d7c30034067$export$64b5c384219d3699(),\n color: new $d5b33d7c30034067$export$892596cec99bc70e(),\n distance: 0,\n coneCos: 0,\n penumbraCos: 0,\n decay: 0\n };\n break;\n case \"PointLight\":\n uniforms = {\n position: new $d5b33d7c30034067$export$64b5c384219d3699(),\n color: new $d5b33d7c30034067$export$892596cec99bc70e(),\n distance: 0,\n decay: 0\n };\n break;\n case \"HemisphereLight\":\n uniforms = {\n direction: new $d5b33d7c30034067$export$64b5c384219d3699(),\n skyColor: new $d5b33d7c30034067$export$892596cec99bc70e(),\n groundColor: new $d5b33d7c30034067$export$892596cec99bc70e()\n };\n break;\n case \"RectAreaLight\":\n uniforms = {\n color: new $d5b33d7c30034067$export$892596cec99bc70e(),\n position: new $d5b33d7c30034067$export$64b5c384219d3699(),\n halfWidth: new $d5b33d7c30034067$export$64b5c384219d3699(),\n halfHeight: new $d5b33d7c30034067$export$64b5c384219d3699()\n };\n break;\n }\n lights[light.id] = uniforms;\n return uniforms;\n }\n };\n}\nfunction $d5b33d7c30034067$var$ShadowUniformsCache() {\n const lights = {};\n return {\n get: function(light) {\n if (lights[light.id] !== undefined) return lights[light.id];\n let uniforms;\n switch(light.type){\n case \"DirectionalLight\":\n uniforms = {\n shadowBias: 0,\n shadowNormalBias: 0,\n shadowRadius: 1,\n shadowMapSize: new $d5b33d7c30034067$export$c977b3e384af9ae1()\n };\n break;\n case \"SpotLight\":\n uniforms = {\n shadowBias: 0,\n shadowNormalBias: 0,\n shadowRadius: 1,\n shadowMapSize: new $d5b33d7c30034067$export$c977b3e384af9ae1()\n };\n break;\n case \"PointLight\":\n uniforms = {\n shadowBias: 0,\n shadowNormalBias: 0,\n shadowRadius: 1,\n shadowMapSize: new $d5b33d7c30034067$export$c977b3e384af9ae1(),\n shadowCameraNear: 1,\n shadowCameraFar: 1000\n };\n break;\n }\n lights[light.id] = uniforms;\n return uniforms;\n }\n };\n}\nlet $d5b33d7c30034067$var$nextVersion = 0;\nfunction $d5b33d7c30034067$var$shadowCastingAndTexturingLightsFirst(lightA, lightB) {\n return (lightB.castShadow ? 2 : 0) - (lightA.castShadow ? 2 : 0) + (lightB.map ? 1 : 0) - (lightA.map ? 1 : 0);\n}\nfunction $d5b33d7c30034067$var$WebGLLights(extensions, capabilities) {\n const cache = new $d5b33d7c30034067$var$UniformsCache();\n const shadowCache = $d5b33d7c30034067$var$ShadowUniformsCache();\n const state = {\n version: 0,\n hash: {\n directionalLength: -1,\n pointLength: -1,\n spotLength: -1,\n rectAreaLength: -1,\n hemiLength: -1,\n numDirectionalShadows: -1,\n numPointShadows: -1,\n numSpotShadows: -1,\n numSpotMaps: -1,\n numLightProbes: -1\n },\n ambient: [\n 0,\n 0,\n 0\n ],\n probe: [],\n directional: [],\n directionalShadow: [],\n directionalShadowMap: [],\n directionalShadowMatrix: [],\n spot: [],\n spotLightMap: [],\n spotShadow: [],\n spotShadowMap: [],\n spotLightMatrix: [],\n rectArea: [],\n rectAreaLTC1: null,\n rectAreaLTC2: null,\n point: [],\n pointShadow: [],\n pointShadowMap: [],\n pointShadowMatrix: [],\n hemi: [],\n numSpotLightShadowsWithMaps: 0,\n numLightProbes: 0\n };\n for(let i = 0; i < 9; i++)state.probe.push(new $d5b33d7c30034067$export$64b5c384219d3699());\n const vector3 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const matrix4 = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n const matrix42 = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n function setup(lights, useLegacyLights) {\n let r = 0, g = 0, b = 0;\n for(let i = 0; i < 9; i++)state.probe[i].set(0, 0, 0);\n let directionalLength = 0;\n let pointLength = 0;\n let spotLength = 0;\n let rectAreaLength = 0;\n let hemiLength = 0;\n let numDirectionalShadows = 0;\n let numPointShadows = 0;\n let numSpotShadows = 0;\n let numSpotMaps = 0;\n let numSpotShadowsWithMaps = 0;\n let numLightProbes = 0;\n // ordering : [shadow casting + map texturing, map texturing, shadow casting, none ]\n lights.sort($d5b33d7c30034067$var$shadowCastingAndTexturingLightsFirst);\n // artist-friendly light intensity scaling factor\n const scaleFactor = useLegacyLights === true ? Math.PI : 1;\n for(let i = 0, l = lights.length; i < l; i++){\n const light = lights[i];\n const color = light.color;\n const intensity = light.intensity;\n const distance = light.distance;\n const shadowMap = light.shadow && light.shadow.map ? light.shadow.map.texture : null;\n if (light.isAmbientLight) {\n r += color.r * intensity * scaleFactor;\n g += color.g * intensity * scaleFactor;\n b += color.b * intensity * scaleFactor;\n } else if (light.isLightProbe) {\n for(let j = 0; j < 9; j++)state.probe[j].addScaledVector(light.sh.coefficients[j], intensity);\n numLightProbes++;\n } else if (light.isDirectionalLight) {\n const uniforms = cache.get(light);\n uniforms.color.copy(light.color).multiplyScalar(light.intensity * scaleFactor);\n if (light.castShadow) {\n const shadow = light.shadow;\n const shadowUniforms = shadowCache.get(light);\n shadowUniforms.shadowBias = shadow.bias;\n shadowUniforms.shadowNormalBias = shadow.normalBias;\n shadowUniforms.shadowRadius = shadow.radius;\n shadowUniforms.shadowMapSize = shadow.mapSize;\n state.directionalShadow[directionalLength] = shadowUniforms;\n state.directionalShadowMap[directionalLength] = shadowMap;\n state.directionalShadowMatrix[directionalLength] = light.shadow.matrix;\n numDirectionalShadows++;\n }\n state.directional[directionalLength] = uniforms;\n directionalLength++;\n } else if (light.isSpotLight) {\n const uniforms = cache.get(light);\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.color.copy(color).multiplyScalar(intensity * scaleFactor);\n uniforms.distance = distance;\n uniforms.coneCos = Math.cos(light.angle);\n uniforms.penumbraCos = Math.cos(light.angle * (1 - light.penumbra));\n uniforms.decay = light.decay;\n state.spot[spotLength] = uniforms;\n const shadow = light.shadow;\n if (light.map) {\n state.spotLightMap[numSpotMaps] = light.map;\n numSpotMaps++;\n // make sure the lightMatrix is up to date\n // TODO : do it if required only\n shadow.updateMatrices(light);\n if (light.castShadow) numSpotShadowsWithMaps++;\n }\n state.spotLightMatrix[spotLength] = shadow.matrix;\n if (light.castShadow) {\n const shadowUniforms = shadowCache.get(light);\n shadowUniforms.shadowBias = shadow.bias;\n shadowUniforms.shadowNormalBias = shadow.normalBias;\n shadowUniforms.shadowRadius = shadow.radius;\n shadowUniforms.shadowMapSize = shadow.mapSize;\n state.spotShadow[spotLength] = shadowUniforms;\n state.spotShadowMap[spotLength] = shadowMap;\n numSpotShadows++;\n }\n spotLength++;\n } else if (light.isRectAreaLight) {\n const uniforms = cache.get(light);\n uniforms.color.copy(color).multiplyScalar(intensity);\n uniforms.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n uniforms.halfHeight.set(0.0, light.height * 0.5, 0.0);\n state.rectArea[rectAreaLength] = uniforms;\n rectAreaLength++;\n } else if (light.isPointLight) {\n const uniforms = cache.get(light);\n uniforms.color.copy(light.color).multiplyScalar(light.intensity * scaleFactor);\n uniforms.distance = light.distance;\n uniforms.decay = light.decay;\n if (light.castShadow) {\n const shadow = light.shadow;\n const shadowUniforms = shadowCache.get(light);\n shadowUniforms.shadowBias = shadow.bias;\n shadowUniforms.shadowNormalBias = shadow.normalBias;\n shadowUniforms.shadowRadius = shadow.radius;\n shadowUniforms.shadowMapSize = shadow.mapSize;\n shadowUniforms.shadowCameraNear = shadow.camera.near;\n shadowUniforms.shadowCameraFar = shadow.camera.far;\n state.pointShadow[pointLength] = shadowUniforms;\n state.pointShadowMap[pointLength] = shadowMap;\n state.pointShadowMatrix[pointLength] = light.shadow.matrix;\n numPointShadows++;\n }\n state.point[pointLength] = uniforms;\n pointLength++;\n } else if (light.isHemisphereLight) {\n const uniforms = cache.get(light);\n uniforms.skyColor.copy(light.color).multiplyScalar(intensity * scaleFactor);\n uniforms.groundColor.copy(light.groundColor).multiplyScalar(intensity * scaleFactor);\n state.hemi[hemiLength] = uniforms;\n hemiLength++;\n }\n }\n if (rectAreaLength > 0) {\n if (capabilities.isWebGL2) {\n // WebGL 2\n state.rectAreaLTC1 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_1;\n state.rectAreaLTC2 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_2;\n } else {\n // WebGL 1\n if (extensions.has(\"OES_texture_float_linear\") === true) {\n state.rectAreaLTC1 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_1;\n state.rectAreaLTC2 = $d5b33d7c30034067$export$6643083551874bf5.LTC_FLOAT_2;\n } else if (extensions.has(\"OES_texture_half_float_linear\") === true) {\n state.rectAreaLTC1 = $d5b33d7c30034067$export$6643083551874bf5.LTC_HALF_1;\n state.rectAreaLTC2 = $d5b33d7c30034067$export$6643083551874bf5.LTC_HALF_2;\n } else console.error(\"THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.\");\n }\n }\n state.ambient[0] = r;\n state.ambient[1] = g;\n state.ambient[2] = b;\n const hash = state.hash;\n if (hash.directionalLength !== directionalLength || hash.pointLength !== pointLength || hash.spotLength !== spotLength || hash.rectAreaLength !== rectAreaLength || hash.hemiLength !== hemiLength || hash.numDirectionalShadows !== numDirectionalShadows || hash.numPointShadows !== numPointShadows || hash.numSpotShadows !== numSpotShadows || hash.numSpotMaps !== numSpotMaps || hash.numLightProbes !== numLightProbes) {\n state.directional.length = directionalLength;\n state.spot.length = spotLength;\n state.rectArea.length = rectAreaLength;\n state.point.length = pointLength;\n state.hemi.length = hemiLength;\n state.directionalShadow.length = numDirectionalShadows;\n state.directionalShadowMap.length = numDirectionalShadows;\n state.pointShadow.length = numPointShadows;\n state.pointShadowMap.length = numPointShadows;\n state.spotShadow.length = numSpotShadows;\n state.spotShadowMap.length = numSpotShadows;\n state.directionalShadowMatrix.length = numDirectionalShadows;\n state.pointShadowMatrix.length = numPointShadows;\n state.spotLightMatrix.length = numSpotShadows + numSpotMaps - numSpotShadowsWithMaps;\n state.spotLightMap.length = numSpotMaps;\n state.numSpotLightShadowsWithMaps = numSpotShadowsWithMaps;\n state.numLightProbes = numLightProbes;\n hash.directionalLength = directionalLength;\n hash.pointLength = pointLength;\n hash.spotLength = spotLength;\n hash.rectAreaLength = rectAreaLength;\n hash.hemiLength = hemiLength;\n hash.numDirectionalShadows = numDirectionalShadows;\n hash.numPointShadows = numPointShadows;\n hash.numSpotShadows = numSpotShadows;\n hash.numSpotMaps = numSpotMaps;\n hash.numLightProbes = numLightProbes;\n state.version = $d5b33d7c30034067$var$nextVersion++;\n }\n }\n function setupView(lights, camera) {\n let directionalLength = 0;\n let pointLength = 0;\n let spotLength = 0;\n let rectAreaLength = 0;\n let hemiLength = 0;\n const viewMatrix = camera.matrixWorldInverse;\n for(let i = 0, l = lights.length; i < l; i++){\n const light = lights[i];\n if (light.isDirectionalLight) {\n const uniforms = state.directional[directionalLength];\n uniforms.direction.setFromMatrixPosition(light.matrixWorld);\n vector3.setFromMatrixPosition(light.target.matrixWorld);\n uniforms.direction.sub(vector3);\n uniforms.direction.transformDirection(viewMatrix);\n directionalLength++;\n } else if (light.isSpotLight) {\n const uniforms = state.spot[spotLength];\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.position.applyMatrix4(viewMatrix);\n uniforms.direction.setFromMatrixPosition(light.matrixWorld);\n vector3.setFromMatrixPosition(light.target.matrixWorld);\n uniforms.direction.sub(vector3);\n uniforms.direction.transformDirection(viewMatrix);\n spotLength++;\n } else if (light.isRectAreaLight) {\n const uniforms = state.rectArea[rectAreaLength];\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.position.applyMatrix4(viewMatrix);\n // extract local rotation of light to derive width/height half vectors\n matrix42.identity();\n matrix4.copy(light.matrixWorld);\n matrix4.premultiply(viewMatrix);\n matrix42.extractRotation(matrix4);\n uniforms.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n uniforms.halfHeight.set(0.0, light.height * 0.5, 0.0);\n uniforms.halfWidth.applyMatrix4(matrix42);\n uniforms.halfHeight.applyMatrix4(matrix42);\n rectAreaLength++;\n } else if (light.isPointLight) {\n const uniforms = state.point[pointLength];\n uniforms.position.setFromMatrixPosition(light.matrixWorld);\n uniforms.position.applyMatrix4(viewMatrix);\n pointLength++;\n } else if (light.isHemisphereLight) {\n const uniforms = state.hemi[hemiLength];\n uniforms.direction.setFromMatrixPosition(light.matrixWorld);\n uniforms.direction.transformDirection(viewMatrix);\n hemiLength++;\n }\n }\n }\n return {\n setup: setup,\n setupView: setupView,\n state: state\n };\n}\nfunction $d5b33d7c30034067$var$WebGLRenderState(extensions, capabilities) {\n const lights = new $d5b33d7c30034067$var$WebGLLights(extensions, capabilities);\n const lightsArray = [];\n const shadowsArray = [];\n function init() {\n lightsArray.length = 0;\n shadowsArray.length = 0;\n }\n function pushLight(light) {\n lightsArray.push(light);\n }\n function pushShadow(shadowLight) {\n shadowsArray.push(shadowLight);\n }\n function setupLights(useLegacyLights) {\n lights.setup(lightsArray, useLegacyLights);\n }\n function setupLightsView(camera) {\n lights.setupView(lightsArray, camera);\n }\n const state = {\n lightsArray: lightsArray,\n shadowsArray: shadowsArray,\n lights: lights\n };\n return {\n init: init,\n state: state,\n setupLights: setupLights,\n setupLightsView: setupLightsView,\n pushLight: pushLight,\n pushShadow: pushShadow\n };\n}\nfunction $d5b33d7c30034067$var$WebGLRenderStates(extensions, capabilities) {\n let renderStates = new WeakMap();\n function get(scene, renderCallDepth = 0) {\n const renderStateArray = renderStates.get(scene);\n let renderState;\n if (renderStateArray === undefined) {\n renderState = new $d5b33d7c30034067$var$WebGLRenderState(extensions, capabilities);\n renderStates.set(scene, [\n renderState\n ]);\n } else if (renderCallDepth >= renderStateArray.length) {\n renderState = new $d5b33d7c30034067$var$WebGLRenderState(extensions, capabilities);\n renderStateArray.push(renderState);\n } else renderState = renderStateArray[renderCallDepth];\n return renderState;\n }\n function dispose() {\n renderStates = new WeakMap();\n }\n return {\n get: get,\n dispose: dispose\n };\n}\nclass $d5b33d7c30034067$export$2698c22ec13825db extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshDepthMaterial = true;\n this.type = \"MeshDepthMaterial\";\n this.depthPacking = $d5b33d7c30034067$export$deeb383078690b50;\n this.map = null;\n this.alphaMap = null;\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.depthPacking = source.depthPacking;\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$33e187ed002f2a19 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshDistanceMaterial = true;\n this.type = \"MeshDistanceMaterial\";\n this.map = null;\n this.alphaMap = null;\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$vertex = \"void main() {\\n\tgl_Position = vec4( position, 1.0 );\\n}\";\nconst $d5b33d7c30034067$var$fragment = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include \\nvoid main() {\\n\tconst float samples = float( VSM_SAMPLES );\\n\tfloat mean = 0.0;\\n\tfloat squared_mean = 0.0;\\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\\n\tfor ( float i = 0.0; i < samples; i ++ ) {\\n\t\tfloat uvOffset = uvStart + i * uvStride;\\n\t\t#ifdef HORIZONTAL_PASS\\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\\n\t\t\tmean += distribution.x;\\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\t\t#else\\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\\n\t\t\tmean += depth;\\n\t\t\tsquared_mean += depth * depth;\\n\t\t#endif\\n\t}\\n\tmean = mean / samples;\\n\tsquared_mean = squared_mean / samples;\\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\nfunction $d5b33d7c30034067$var$WebGLShadowMap(_renderer, _objects, _capabilities) {\n let _frustum = new $d5b33d7c30034067$export$35efe6f4c85463d2();\n const _shadowMapSize = new $d5b33d7c30034067$export$c977b3e384af9ae1(), _viewportSize = new $d5b33d7c30034067$export$c977b3e384af9ae1(), _viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3(), _depthMaterial = new $d5b33d7c30034067$export$2698c22ec13825db({\n depthPacking: $d5b33d7c30034067$export$8f910f4c4f73df11\n }), _distanceMaterial = new $d5b33d7c30034067$export$33e187ed002f2a19(), _materialCache = {}, _maxTextureSize = _capabilities.maxTextureSize;\n const shadowSide = {\n [$d5b33d7c30034067$export$2ede184fc2998901]: $d5b33d7c30034067$export$d9f0486e75b5ace,\n [$d5b33d7c30034067$export$d9f0486e75b5ace]: $d5b33d7c30034067$export$2ede184fc2998901,\n [$d5b33d7c30034067$export$3b296b6f144d5b03]: $d5b33d7c30034067$export$3b296b6f144d5b03\n };\n const shadowMaterialVertical = new $d5b33d7c30034067$export$83c7d75d550a8b0d({\n defines: {\n VSM_SAMPLES: 8\n },\n uniforms: {\n shadow_pass: {\n value: null\n },\n resolution: {\n value: new $d5b33d7c30034067$export$c977b3e384af9ae1()\n },\n radius: {\n value: 4.0\n }\n },\n vertexShader: $d5b33d7c30034067$var$vertex,\n fragmentShader: $d5b33d7c30034067$var$fragment\n });\n const shadowMaterialHorizontal = shadowMaterialVertical.clone();\n shadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n const fullScreenTri = new $d5b33d7c30034067$export$b7be63a67df8959();\n fullScreenTri.setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117(new Float32Array([\n -1,\n -1,\n 0.5,\n 3,\n -1,\n 0.5,\n -1,\n 3,\n 0.5\n ]), 3));\n const fullScreenMesh = new $d5b33d7c30034067$export$e176487c05830cc5(fullScreenTri, shadowMaterialVertical);\n const scope = this;\n this.enabled = false;\n this.autoUpdate = true;\n this.needsUpdate = false;\n this.type = $d5b33d7c30034067$export$5813f879eee7cd88;\n let _previousType = this.type;\n this.render = function(lights, scene, camera) {\n if (scope.enabled === false) return;\n if (scope.autoUpdate === false && scope.needsUpdate === false) return;\n if (lights.length === 0) return;\n const currentRenderTarget = _renderer.getRenderTarget();\n const activeCubeFace = _renderer.getActiveCubeFace();\n const activeMipmapLevel = _renderer.getActiveMipmapLevel();\n const _state = _renderer.state;\n // Set GL state for depth map.\n _state.setBlending($d5b33d7c30034067$export$63b8d6b580fc65ba);\n _state.buffers.color.setClear(1, 1, 1, 1);\n _state.buffers.depth.setTest(true);\n _state.setScissorTest(false);\n // check for shadow map type changes\n const toVSM = _previousType !== $d5b33d7c30034067$export$896ae1ade6c829c4 && this.type === $d5b33d7c30034067$export$896ae1ade6c829c4;\n const fromVSM = _previousType === $d5b33d7c30034067$export$896ae1ade6c829c4 && this.type !== $d5b33d7c30034067$export$896ae1ade6c829c4;\n // render depth map\n for(let i = 0, il = lights.length; i < il; i++){\n const light = lights[i];\n const shadow = light.shadow;\n if (shadow === undefined) {\n console.warn(\"THREE.WebGLShadowMap:\", light, \"has no shadow.\");\n continue;\n }\n if (shadow.autoUpdate === false && shadow.needsUpdate === false) continue;\n _shadowMapSize.copy(shadow.mapSize);\n const shadowFrameExtents = shadow.getFrameExtents();\n _shadowMapSize.multiply(shadowFrameExtents);\n _viewportSize.copy(shadow.mapSize);\n if (_shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize) {\n if (_shadowMapSize.x > _maxTextureSize) {\n _viewportSize.x = Math.floor(_maxTextureSize / shadowFrameExtents.x);\n _shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n shadow.mapSize.x = _viewportSize.x;\n }\n if (_shadowMapSize.y > _maxTextureSize) {\n _viewportSize.y = Math.floor(_maxTextureSize / shadowFrameExtents.y);\n _shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n shadow.mapSize.y = _viewportSize.y;\n }\n }\n if (shadow.map === null || toVSM === true || fromVSM === true) {\n const pars = this.type !== $d5b33d7c30034067$export$896ae1ade6c829c4 ? {\n minFilter: $d5b33d7c30034067$export$727aa5ec3fe39bf0,\n magFilter: $d5b33d7c30034067$export$727aa5ec3fe39bf0\n } : {};\n if (shadow.map !== null) shadow.map.dispose();\n shadow.map = new $d5b33d7c30034067$export$3c052beb2e51e23f(_shadowMapSize.x, _shadowMapSize.y, pars);\n shadow.map.texture.name = light.name + \".shadowMap\";\n shadow.camera.updateProjectionMatrix();\n }\n _renderer.setRenderTarget(shadow.map);\n _renderer.clear();\n const viewportCount = shadow.getViewportCount();\n for(let vp = 0; vp < viewportCount; vp++){\n const viewport = shadow.getViewport(vp);\n _viewport.set(_viewportSize.x * viewport.x, _viewportSize.y * viewport.y, _viewportSize.x * viewport.z, _viewportSize.y * viewport.w);\n _state.viewport(_viewport);\n shadow.updateMatrices(light, vp);\n _frustum = shadow.getFrustum();\n renderObject(scene, camera, shadow.camera, light, this.type);\n }\n // do blur pass for VSM\n if (shadow.isPointLightShadow !== true && this.type === $d5b33d7c30034067$export$896ae1ade6c829c4) VSMPass(shadow, camera);\n shadow.needsUpdate = false;\n }\n _previousType = this.type;\n scope.needsUpdate = false;\n _renderer.setRenderTarget(currentRenderTarget, activeCubeFace, activeMipmapLevel);\n };\n function VSMPass(shadow, camera) {\n const geometry = _objects.update(fullScreenMesh);\n if (shadowMaterialVertical.defines.VSM_SAMPLES !== shadow.blurSamples) {\n shadowMaterialVertical.defines.VSM_SAMPLES = shadow.blurSamples;\n shadowMaterialHorizontal.defines.VSM_SAMPLES = shadow.blurSamples;\n shadowMaterialVertical.needsUpdate = true;\n shadowMaterialHorizontal.needsUpdate = true;\n }\n if (shadow.mapPass === null) shadow.mapPass = new $d5b33d7c30034067$export$3c052beb2e51e23f(_shadowMapSize.x, _shadowMapSize.y);\n // vertical pass\n shadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n shadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n shadowMaterialVertical.uniforms.radius.value = shadow.radius;\n _renderer.setRenderTarget(shadow.mapPass);\n _renderer.clear();\n _renderer.renderBufferDirect(camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null);\n // horizontal pass\n shadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n shadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n shadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n _renderer.setRenderTarget(shadow.map);\n _renderer.clear();\n _renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);\n }\n function getDepthMaterial(object, material, light, type) {\n let result = null;\n const customMaterial = light.isPointLight === true ? object.customDistanceMaterial : object.customDepthMaterial;\n if (customMaterial !== undefined) result = customMaterial;\n else {\n result = light.isPointLight === true ? _distanceMaterial : _depthMaterial;\n if (_renderer.localClippingEnabled && material.clipShadows === true && Array.isArray(material.clippingPlanes) && material.clippingPlanes.length !== 0 || material.displacementMap && material.displacementScale !== 0 || material.alphaMap && material.alphaTest > 0 || material.map && material.alphaTest > 0) {\n // in this case we need a unique material instance reflecting the\n // appropriate state\n const keyA = result.uuid, keyB = material.uuid;\n let materialsForVariant = _materialCache[keyA];\n if (materialsForVariant === undefined) {\n materialsForVariant = {};\n _materialCache[keyA] = materialsForVariant;\n }\n let cachedMaterial = materialsForVariant[keyB];\n if (cachedMaterial === undefined) {\n cachedMaterial = result.clone();\n materialsForVariant[keyB] = cachedMaterial;\n }\n result = cachedMaterial;\n }\n }\n result.visible = material.visible;\n result.wireframe = material.wireframe;\n if (type === $d5b33d7c30034067$export$896ae1ade6c829c4) result.side = material.shadowSide !== null ? material.shadowSide : material.side;\n else result.side = material.shadowSide !== null ? material.shadowSide : shadowSide[material.side];\n result.alphaMap = material.alphaMap;\n result.alphaTest = material.alphaTest;\n result.map = material.map;\n result.clipShadows = material.clipShadows;\n result.clippingPlanes = material.clippingPlanes;\n result.clipIntersection = material.clipIntersection;\n result.displacementMap = material.displacementMap;\n result.displacementScale = material.displacementScale;\n result.displacementBias = material.displacementBias;\n result.wireframeLinewidth = material.wireframeLinewidth;\n result.linewidth = material.linewidth;\n if (light.isPointLight === true && result.isMeshDistanceMaterial === true) {\n const materialProperties = _renderer.properties.get(result);\n materialProperties.light = light;\n }\n return result;\n }\n function renderObject(object, camera, shadowCamera, light, type) {\n if (object.visible === false) return;\n const visible = object.layers.test(camera.layers);\n if (visible && (object.isMesh || object.isLine || object.isPoints)) {\n if ((object.castShadow || object.receiveShadow && type === $d5b33d7c30034067$export$896ae1ade6c829c4) && (!object.frustumCulled || _frustum.intersectsObject(object))) {\n object.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse, object.matrixWorld);\n const geometry = _objects.update(object);\n const material = object.material;\n if (Array.isArray(material)) {\n const groups = geometry.groups;\n for(let k = 0, kl = groups.length; k < kl; k++){\n const group = groups[k];\n const groupMaterial = material[group.materialIndex];\n if (groupMaterial && groupMaterial.visible) {\n const depthMaterial = getDepthMaterial(object, groupMaterial, light, type);\n _renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);\n }\n }\n } else if (material.visible) {\n const depthMaterial = getDepthMaterial(object, material, light, type);\n _renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);\n }\n }\n }\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)renderObject(children[i], camera, shadowCamera, light, type);\n }\n}\nfunction $d5b33d7c30034067$var$WebGLState(gl, extensions, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n function ColorBuffer() {\n let locked = false;\n const color = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n let currentColorMask = null;\n const currentColorClear = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, 0, 0);\n return {\n setMask: function(colorMask) {\n if (currentColorMask !== colorMask && !locked) {\n gl.colorMask(colorMask, colorMask, colorMask, colorMask);\n currentColorMask = colorMask;\n }\n },\n setLocked: function(lock) {\n locked = lock;\n },\n setClear: function(r, g, b, a, premultipliedAlpha) {\n if (premultipliedAlpha === true) {\n r *= a;\n g *= a;\n b *= a;\n }\n color.set(r, g, b, a);\n if (currentColorClear.equals(color) === false) {\n gl.clearColor(r, g, b, a);\n currentColorClear.copy(color);\n }\n },\n reset: function() {\n locked = false;\n currentColorMask = null;\n currentColorClear.set(-1, 0, 0, 0); // set to invalid state\n }\n };\n }\n function DepthBuffer() {\n let locked = false;\n let currentDepthMask = null;\n let currentDepthFunc = null;\n let currentDepthClear = null;\n return {\n setTest: function(depthTest) {\n if (depthTest) enable(gl.DEPTH_TEST);\n else disable(gl.DEPTH_TEST);\n },\n setMask: function(depthMask) {\n if (currentDepthMask !== depthMask && !locked) {\n gl.depthMask(depthMask);\n currentDepthMask = depthMask;\n }\n },\n setFunc: function(depthFunc) {\n if (currentDepthFunc !== depthFunc) {\n switch(depthFunc){\n case $d5b33d7c30034067$export$69025ce147cee220:\n gl.depthFunc(gl.NEVER);\n break;\n case $d5b33d7c30034067$export$7182eb52ea3b3f04:\n gl.depthFunc(gl.ALWAYS);\n break;\n case $d5b33d7c30034067$export$eedccec66ab7ebe:\n gl.depthFunc(gl.LESS);\n break;\n case $d5b33d7c30034067$export$296f78a0b892f81a:\n gl.depthFunc(gl.LEQUAL);\n break;\n case $d5b33d7c30034067$export$a60d398fc7b7590e:\n gl.depthFunc(gl.EQUAL);\n break;\n case $d5b33d7c30034067$export$7d7234c1240a1fc4:\n gl.depthFunc(gl.GEQUAL);\n break;\n case $d5b33d7c30034067$export$c5e2c52991f30937:\n gl.depthFunc(gl.GREATER);\n break;\n case $d5b33d7c30034067$export$2f843afa843d8916:\n gl.depthFunc(gl.NOTEQUAL);\n break;\n default:\n gl.depthFunc(gl.LEQUAL);\n }\n currentDepthFunc = depthFunc;\n }\n },\n setLocked: function(lock) {\n locked = lock;\n },\n setClear: function(depth) {\n if (currentDepthClear !== depth) {\n gl.clearDepth(depth);\n currentDepthClear = depth;\n }\n },\n reset: function() {\n locked = false;\n currentDepthMask = null;\n currentDepthFunc = null;\n currentDepthClear = null;\n }\n };\n }\n function StencilBuffer() {\n let locked = false;\n let currentStencilMask = null;\n let currentStencilFunc = null;\n let currentStencilRef = null;\n let currentStencilFuncMask = null;\n let currentStencilFail = null;\n let currentStencilZFail = null;\n let currentStencilZPass = null;\n let currentStencilClear = null;\n return {\n setTest: function(stencilTest) {\n if (!locked) {\n if (stencilTest) enable(gl.STENCIL_TEST);\n else disable(gl.STENCIL_TEST);\n }\n },\n setMask: function(stencilMask) {\n if (currentStencilMask !== stencilMask && !locked) {\n gl.stencilMask(stencilMask);\n currentStencilMask = stencilMask;\n }\n },\n setFunc: function(stencilFunc, stencilRef, stencilMask) {\n if (currentStencilFunc !== stencilFunc || currentStencilRef !== stencilRef || currentStencilFuncMask !== stencilMask) {\n gl.stencilFunc(stencilFunc, stencilRef, stencilMask);\n currentStencilFunc = stencilFunc;\n currentStencilRef = stencilRef;\n currentStencilFuncMask = stencilMask;\n }\n },\n setOp: function(stencilFail, stencilZFail, stencilZPass) {\n if (currentStencilFail !== stencilFail || currentStencilZFail !== stencilZFail || currentStencilZPass !== stencilZPass) {\n gl.stencilOp(stencilFail, stencilZFail, stencilZPass);\n currentStencilFail = stencilFail;\n currentStencilZFail = stencilZFail;\n currentStencilZPass = stencilZPass;\n }\n },\n setLocked: function(lock) {\n locked = lock;\n },\n setClear: function(stencil) {\n if (currentStencilClear !== stencil) {\n gl.clearStencil(stencil);\n currentStencilClear = stencil;\n }\n },\n reset: function() {\n locked = false;\n currentStencilMask = null;\n currentStencilFunc = null;\n currentStencilRef = null;\n currentStencilFuncMask = null;\n currentStencilFail = null;\n currentStencilZFail = null;\n currentStencilZPass = null;\n currentStencilClear = null;\n }\n };\n }\n //\n const colorBuffer = new ColorBuffer();\n const depthBuffer = new DepthBuffer();\n const stencilBuffer = new StencilBuffer();\n const uboBindings = new WeakMap();\n const uboProgramMap = new WeakMap();\n let enabledCapabilities = {};\n let currentBoundFramebuffers = {};\n let currentDrawbuffers = new WeakMap();\n let defaultDrawbuffers = [];\n let currentProgram = null;\n let currentBlendingEnabled = false;\n let currentBlending = null;\n let currentBlendEquation = null;\n let currentBlendSrc = null;\n let currentBlendDst = null;\n let currentBlendEquationAlpha = null;\n let currentBlendSrcAlpha = null;\n let currentBlendDstAlpha = null;\n let currentBlendColor = new $d5b33d7c30034067$export$892596cec99bc70e(0, 0, 0);\n let currentBlendAlpha = 0;\n let currentPremultipledAlpha = false;\n let currentFlipSided = null;\n let currentCullFace = null;\n let currentLineWidth = null;\n let currentPolygonOffsetFactor = null;\n let currentPolygonOffsetUnits = null;\n const maxTextures = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);\n let lineWidthAvailable = false;\n let version = 0;\n const glVersion = gl.getParameter(gl.VERSION);\n if (glVersion.indexOf(\"WebGL\") !== -1) {\n version = parseFloat(/^WebGL (\\d)/.exec(glVersion)[1]);\n lineWidthAvailable = version >= 1.0;\n } else if (glVersion.indexOf(\"OpenGL ES\") !== -1) {\n version = parseFloat(/^OpenGL ES (\\d)/.exec(glVersion)[1]);\n lineWidthAvailable = version >= 2.0;\n }\n let currentTextureSlot = null;\n let currentBoundTextures = {};\n const scissorParam = gl.getParameter(gl.SCISSOR_BOX);\n const viewportParam = gl.getParameter(gl.VIEWPORT);\n const currentScissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3().fromArray(scissorParam);\n const currentViewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3().fromArray(viewportParam);\n function createTexture(type, target, count, dimensions) {\n const data = new Uint8Array(4); // 4 is required to match default unpack alignment of 4.\n const texture = gl.createTexture();\n gl.bindTexture(type, texture);\n gl.texParameteri(type, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(type, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n for(let i = 0; i < count; i++)if (isWebGL2 && (type === gl.TEXTURE_3D || type === gl.TEXTURE_2D_ARRAY)) gl.texImage3D(target, 0, gl.RGBA, 1, 1, dimensions, 0, gl.RGBA, gl.UNSIGNED_BYTE, data);\n else gl.texImage2D(target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data);\n return texture;\n }\n const emptyTextures = {};\n emptyTextures[gl.TEXTURE_2D] = createTexture(gl.TEXTURE_2D, gl.TEXTURE_2D, 1);\n emptyTextures[gl.TEXTURE_CUBE_MAP] = createTexture(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_CUBE_MAP_POSITIVE_X, 6);\n if (isWebGL2) {\n emptyTextures[gl.TEXTURE_2D_ARRAY] = createTexture(gl.TEXTURE_2D_ARRAY, gl.TEXTURE_2D_ARRAY, 1, 1);\n emptyTextures[gl.TEXTURE_3D] = createTexture(gl.TEXTURE_3D, gl.TEXTURE_3D, 1, 1);\n }\n // init\n colorBuffer.setClear(0, 0, 0, 1);\n depthBuffer.setClear(1);\n stencilBuffer.setClear(0);\n enable(gl.DEPTH_TEST);\n depthBuffer.setFunc($d5b33d7c30034067$export$296f78a0b892f81a);\n setFlipSided(false);\n setCullFace($d5b33d7c30034067$export$b9a7b4fc5cb15f9b);\n enable(gl.CULL_FACE);\n setBlending($d5b33d7c30034067$export$63b8d6b580fc65ba);\n //\n function enable(id) {\n if (enabledCapabilities[id] !== true) {\n gl.enable(id);\n enabledCapabilities[id] = true;\n }\n }\n function disable(id) {\n if (enabledCapabilities[id] !== false) {\n gl.disable(id);\n enabledCapabilities[id] = false;\n }\n }\n function bindFramebuffer(target, framebuffer) {\n if (currentBoundFramebuffers[target] !== framebuffer) {\n gl.bindFramebuffer(target, framebuffer);\n currentBoundFramebuffers[target] = framebuffer;\n if (isWebGL2) {\n // gl.DRAW_FRAMEBUFFER is equivalent to gl.FRAMEBUFFER\n if (target === gl.DRAW_FRAMEBUFFER) currentBoundFramebuffers[gl.FRAMEBUFFER] = framebuffer;\n if (target === gl.FRAMEBUFFER) currentBoundFramebuffers[gl.DRAW_FRAMEBUFFER] = framebuffer;\n }\n return true;\n }\n return false;\n }\n function drawBuffers(renderTarget, framebuffer) {\n let drawBuffers = defaultDrawbuffers;\n let needsUpdate = false;\n if (renderTarget) {\n drawBuffers = currentDrawbuffers.get(framebuffer);\n if (drawBuffers === undefined) {\n drawBuffers = [];\n currentDrawbuffers.set(framebuffer, drawBuffers);\n }\n if (renderTarget.isWebGLMultipleRenderTargets) {\n const textures = renderTarget.texture;\n if (drawBuffers.length !== textures.length || drawBuffers[0] !== gl.COLOR_ATTACHMENT0) {\n for(let i = 0, il = textures.length; i < il; i++)drawBuffers[i] = gl.COLOR_ATTACHMENT0 + i;\n drawBuffers.length = textures.length;\n needsUpdate = true;\n }\n } else if (drawBuffers[0] !== gl.COLOR_ATTACHMENT0) {\n drawBuffers[0] = gl.COLOR_ATTACHMENT0;\n needsUpdate = true;\n }\n } else if (drawBuffers[0] !== gl.BACK) {\n drawBuffers[0] = gl.BACK;\n needsUpdate = true;\n }\n if (needsUpdate) {\n if (capabilities.isWebGL2) gl.drawBuffers(drawBuffers);\n else extensions.get(\"WEBGL_draw_buffers\").drawBuffersWEBGL(drawBuffers);\n }\n }\n function useProgram(program) {\n if (currentProgram !== program) {\n gl.useProgram(program);\n currentProgram = program;\n return true;\n }\n return false;\n }\n const equationToGL = {\n [$d5b33d7c30034067$export$20183a0484ce21a0]: gl.FUNC_ADD,\n [$d5b33d7c30034067$export$73e0df5177988548]: gl.FUNC_SUBTRACT,\n [$d5b33d7c30034067$export$28e582859cbec660]: gl.FUNC_REVERSE_SUBTRACT\n };\n if (isWebGL2) {\n equationToGL[$d5b33d7c30034067$export$c8c1508da8d0600c] = gl.MIN;\n equationToGL[$d5b33d7c30034067$export$99948c02fb51055f] = gl.MAX;\n } else {\n const extension = extensions.get(\"EXT_blend_minmax\");\n if (extension !== null) {\n equationToGL[$d5b33d7c30034067$export$c8c1508da8d0600c] = extension.MIN_EXT;\n equationToGL[$d5b33d7c30034067$export$99948c02fb51055f] = extension.MAX_EXT;\n }\n }\n const factorToGL = {\n [$d5b33d7c30034067$export$2110f05edf778d3d]: gl.ZERO,\n [$d5b33d7c30034067$export$8805bad65e24940e]: gl.ONE,\n [$d5b33d7c30034067$export$7fbe15b28d28cf52]: gl.SRC_COLOR,\n [$d5b33d7c30034067$export$d5773124e86cf28c]: gl.SRC_ALPHA,\n [$d5b33d7c30034067$export$c05e2a1fc8609506]: gl.SRC_ALPHA_SATURATE,\n [$d5b33d7c30034067$export$ef5f2dd8ffac5574]: gl.DST_COLOR,\n [$d5b33d7c30034067$export$a78aed1ca2a87192]: gl.DST_ALPHA,\n [$d5b33d7c30034067$export$947829af9f2c17f6]: gl.ONE_MINUS_SRC_COLOR,\n [$d5b33d7c30034067$export$11d468cc7f19e971]: gl.ONE_MINUS_SRC_ALPHA,\n [$d5b33d7c30034067$export$56b85b2686ab16]: gl.ONE_MINUS_DST_COLOR,\n [$d5b33d7c30034067$export$5d0fe17fd8773bac]: gl.ONE_MINUS_DST_ALPHA,\n [$d5b33d7c30034067$export$7dd8f434fd59075]: gl.CONSTANT_COLOR,\n [$d5b33d7c30034067$export$99c8d898a9afbcee]: gl.ONE_MINUS_CONSTANT_COLOR,\n [$d5b33d7c30034067$export$310cd2be38d13b56]: gl.CONSTANT_ALPHA,\n [$d5b33d7c30034067$export$db77b8fbcf45dbf4]: gl.ONE_MINUS_CONSTANT_ALPHA\n };\n function setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, blendColor, blendAlpha, premultipliedAlpha) {\n if (blending === $d5b33d7c30034067$export$63b8d6b580fc65ba) {\n if (currentBlendingEnabled === true) {\n disable(gl.BLEND);\n currentBlendingEnabled = false;\n }\n return;\n }\n if (currentBlendingEnabled === false) {\n enable(gl.BLEND);\n currentBlendingEnabled = true;\n }\n if (blending !== $d5b33d7c30034067$export$eda4864c68df1fa2) {\n if (blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha) {\n if (currentBlendEquation !== $d5b33d7c30034067$export$20183a0484ce21a0 || currentBlendEquationAlpha !== $d5b33d7c30034067$export$20183a0484ce21a0) {\n gl.blendEquation(gl.FUNC_ADD);\n currentBlendEquation = $d5b33d7c30034067$export$20183a0484ce21a0;\n currentBlendEquationAlpha = $d5b33d7c30034067$export$20183a0484ce21a0;\n }\n if (premultipliedAlpha) switch(blending){\n case $d5b33d7c30034067$export$5b29a26d96ee6af0:\n gl.blendFuncSeparate(gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n break;\n case $d5b33d7c30034067$export$777d8f9551c2216b:\n gl.blendFunc(gl.ONE, gl.ONE);\n break;\n case $d5b33d7c30034067$export$cdfa06f868e2e467:\n gl.blendFuncSeparate(gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE);\n break;\n case $d5b33d7c30034067$export$4138e1c684b46a20:\n gl.blendFuncSeparate(gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA);\n break;\n default:\n console.error(\"THREE.WebGLState: Invalid blending: \", blending);\n break;\n }\n else switch(blending){\n case $d5b33d7c30034067$export$5b29a26d96ee6af0:\n gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n break;\n case $d5b33d7c30034067$export$777d8f9551c2216b:\n gl.blendFunc(gl.SRC_ALPHA, gl.ONE);\n break;\n case $d5b33d7c30034067$export$cdfa06f868e2e467:\n gl.blendFuncSeparate(gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE);\n break;\n case $d5b33d7c30034067$export$4138e1c684b46a20:\n gl.blendFunc(gl.ZERO, gl.SRC_COLOR);\n break;\n default:\n console.error(\"THREE.WebGLState: Invalid blending: \", blending);\n break;\n }\n currentBlendSrc = null;\n currentBlendDst = null;\n currentBlendSrcAlpha = null;\n currentBlendDstAlpha = null;\n currentBlendColor.set(0, 0, 0);\n currentBlendAlpha = 0;\n currentBlending = blending;\n currentPremultipledAlpha = premultipliedAlpha;\n }\n return;\n }\n // custom blending\n blendEquationAlpha = blendEquationAlpha || blendEquation;\n blendSrcAlpha = blendSrcAlpha || blendSrc;\n blendDstAlpha = blendDstAlpha || blendDst;\n if (blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha) {\n gl.blendEquationSeparate(equationToGL[blendEquation], equationToGL[blendEquationAlpha]);\n currentBlendEquation = blendEquation;\n currentBlendEquationAlpha = blendEquationAlpha;\n }\n if (blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha) {\n gl.blendFuncSeparate(factorToGL[blendSrc], factorToGL[blendDst], factorToGL[blendSrcAlpha], factorToGL[blendDstAlpha]);\n currentBlendSrc = blendSrc;\n currentBlendDst = blendDst;\n currentBlendSrcAlpha = blendSrcAlpha;\n currentBlendDstAlpha = blendDstAlpha;\n }\n if (blendColor.equals(currentBlendColor) === false || blendAlpha !== currentBlendAlpha) {\n gl.blendColor(blendColor.r, blendColor.g, blendColor.b, blendAlpha);\n currentBlendColor.copy(blendColor);\n currentBlendAlpha = blendAlpha;\n }\n currentBlending = blending;\n currentPremultipledAlpha = false;\n }\n function setMaterial(material, frontFaceCW) {\n material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 ? disable(gl.CULL_FACE) : enable(gl.CULL_FACE);\n let flipSided = material.side === $d5b33d7c30034067$export$d9f0486e75b5ace;\n if (frontFaceCW) flipSided = !flipSided;\n setFlipSided(flipSided);\n material.blending === $d5b33d7c30034067$export$5b29a26d96ee6af0 && material.transparent === false ? setBlending($d5b33d7c30034067$export$63b8d6b580fc65ba) : setBlending(material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.blendColor, material.blendAlpha, material.premultipliedAlpha);\n depthBuffer.setFunc(material.depthFunc);\n depthBuffer.setTest(material.depthTest);\n depthBuffer.setMask(material.depthWrite);\n colorBuffer.setMask(material.colorWrite);\n const stencilWrite = material.stencilWrite;\n stencilBuffer.setTest(stencilWrite);\n if (stencilWrite) {\n stencilBuffer.setMask(material.stencilWriteMask);\n stencilBuffer.setFunc(material.stencilFunc, material.stencilRef, material.stencilFuncMask);\n stencilBuffer.setOp(material.stencilFail, material.stencilZFail, material.stencilZPass);\n }\n setPolygonOffset(material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits);\n material.alphaToCoverage === true ? enable(gl.SAMPLE_ALPHA_TO_COVERAGE) : disable(gl.SAMPLE_ALPHA_TO_COVERAGE);\n }\n //\n function setFlipSided(flipSided) {\n if (currentFlipSided !== flipSided) {\n if (flipSided) gl.frontFace(gl.CW);\n else gl.frontFace(gl.CCW);\n currentFlipSided = flipSided;\n }\n }\n function setCullFace(cullFace) {\n if (cullFace !== $d5b33d7c30034067$export$3237e1f2c1ea1f44) {\n enable(gl.CULL_FACE);\n if (cullFace !== currentCullFace) {\n if (cullFace === $d5b33d7c30034067$export$b9a7b4fc5cb15f9b) gl.cullFace(gl.BACK);\n else if (cullFace === $d5b33d7c30034067$export$b8058bcc7037d3f3) gl.cullFace(gl.FRONT);\n else gl.cullFace(gl.FRONT_AND_BACK);\n }\n } else disable(gl.CULL_FACE);\n currentCullFace = cullFace;\n }\n function setLineWidth(width) {\n if (width !== currentLineWidth) {\n if (lineWidthAvailable) gl.lineWidth(width);\n currentLineWidth = width;\n }\n }\n function setPolygonOffset(polygonOffset, factor, units) {\n if (polygonOffset) {\n enable(gl.POLYGON_OFFSET_FILL);\n if (currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units) {\n gl.polygonOffset(factor, units);\n currentPolygonOffsetFactor = factor;\n currentPolygonOffsetUnits = units;\n }\n } else disable(gl.POLYGON_OFFSET_FILL);\n }\n function setScissorTest(scissorTest) {\n if (scissorTest) enable(gl.SCISSOR_TEST);\n else disable(gl.SCISSOR_TEST);\n }\n // texture\n function activeTexture(webglSlot) {\n if (webglSlot === undefined) webglSlot = gl.TEXTURE0 + maxTextures - 1;\n if (currentTextureSlot !== webglSlot) {\n gl.activeTexture(webglSlot);\n currentTextureSlot = webglSlot;\n }\n }\n function bindTexture(webglType, webglTexture, webglSlot) {\n if (webglSlot === undefined) {\n if (currentTextureSlot === null) webglSlot = gl.TEXTURE0 + maxTextures - 1;\n else webglSlot = currentTextureSlot;\n }\n let boundTexture = currentBoundTextures[webglSlot];\n if (boundTexture === undefined) {\n boundTexture = {\n type: undefined,\n texture: undefined\n };\n currentBoundTextures[webglSlot] = boundTexture;\n }\n if (boundTexture.type !== webglType || boundTexture.texture !== webglTexture) {\n if (currentTextureSlot !== webglSlot) {\n gl.activeTexture(webglSlot);\n currentTextureSlot = webglSlot;\n }\n gl.bindTexture(webglType, webglTexture || emptyTextures[webglType]);\n boundTexture.type = webglType;\n boundTexture.texture = webglTexture;\n }\n }\n function unbindTexture() {\n const boundTexture = currentBoundTextures[currentTextureSlot];\n if (boundTexture !== undefined && boundTexture.type !== undefined) {\n gl.bindTexture(boundTexture.type, null);\n boundTexture.type = undefined;\n boundTexture.texture = undefined;\n }\n }\n function compressedTexImage2D() {\n try {\n gl.compressedTexImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function compressedTexImage3D() {\n try {\n gl.compressedTexImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texSubImage2D() {\n try {\n gl.texSubImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texSubImage3D() {\n try {\n gl.texSubImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function compressedTexSubImage2D() {\n try {\n gl.compressedTexSubImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function compressedTexSubImage3D() {\n try {\n gl.compressedTexSubImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texStorage2D() {\n try {\n gl.texStorage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texStorage3D() {\n try {\n gl.texStorage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texImage2D() {\n try {\n gl.texImage2D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n function texImage3D() {\n try {\n gl.texImage3D.apply(gl, arguments);\n } catch (error) {\n console.error(\"THREE.WebGLState:\", error);\n }\n }\n //\n function scissor(scissor) {\n if (currentScissor.equals(scissor) === false) {\n gl.scissor(scissor.x, scissor.y, scissor.z, scissor.w);\n currentScissor.copy(scissor);\n }\n }\n function viewport(viewport) {\n if (currentViewport.equals(viewport) === false) {\n gl.viewport(viewport.x, viewport.y, viewport.z, viewport.w);\n currentViewport.copy(viewport);\n }\n }\n function updateUBOMapping(uniformsGroup, program) {\n let mapping = uboProgramMap.get(program);\n if (mapping === undefined) {\n mapping = new WeakMap();\n uboProgramMap.set(program, mapping);\n }\n let blockIndex = mapping.get(uniformsGroup);\n if (blockIndex === undefined) {\n blockIndex = gl.getUniformBlockIndex(program, uniformsGroup.name);\n mapping.set(uniformsGroup, blockIndex);\n }\n }\n function uniformBlockBinding(uniformsGroup, program) {\n const mapping = uboProgramMap.get(program);\n const blockIndex = mapping.get(uniformsGroup);\n if (uboBindings.get(program) !== blockIndex) {\n // bind shader specific block index to global block point\n gl.uniformBlockBinding(program, blockIndex, uniformsGroup.__bindingPointIndex);\n uboBindings.set(program, blockIndex);\n }\n }\n //\n function reset() {\n // reset state\n gl.disable(gl.BLEND);\n gl.disable(gl.CULL_FACE);\n gl.disable(gl.DEPTH_TEST);\n gl.disable(gl.POLYGON_OFFSET_FILL);\n gl.disable(gl.SCISSOR_TEST);\n gl.disable(gl.STENCIL_TEST);\n gl.disable(gl.SAMPLE_ALPHA_TO_COVERAGE);\n gl.blendEquation(gl.FUNC_ADD);\n gl.blendFunc(gl.ONE, gl.ZERO);\n gl.blendFuncSeparate(gl.ONE, gl.ZERO, gl.ONE, gl.ZERO);\n gl.blendColor(0, 0, 0, 0);\n gl.colorMask(true, true, true, true);\n gl.clearColor(0, 0, 0, 0);\n gl.depthMask(true);\n gl.depthFunc(gl.LESS);\n gl.clearDepth(1);\n gl.stencilMask(0xffffffff);\n gl.stencilFunc(gl.ALWAYS, 0, 0xffffffff);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n gl.clearStencil(0);\n gl.cullFace(gl.BACK);\n gl.frontFace(gl.CCW);\n gl.polygonOffset(0, 0);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n if (isWebGL2 === true) {\n gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, null);\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, null);\n }\n gl.useProgram(null);\n gl.lineWidth(1);\n gl.scissor(0, 0, gl.canvas.width, gl.canvas.height);\n gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);\n // reset internals\n enabledCapabilities = {};\n currentTextureSlot = null;\n currentBoundTextures = {};\n currentBoundFramebuffers = {};\n currentDrawbuffers = new WeakMap();\n defaultDrawbuffers = [];\n currentProgram = null;\n currentBlendingEnabled = false;\n currentBlending = null;\n currentBlendEquation = null;\n currentBlendSrc = null;\n currentBlendDst = null;\n currentBlendEquationAlpha = null;\n currentBlendSrcAlpha = null;\n currentBlendDstAlpha = null;\n currentBlendColor = new $d5b33d7c30034067$export$892596cec99bc70e(0, 0, 0);\n currentBlendAlpha = 0;\n currentPremultipledAlpha = false;\n currentFlipSided = null;\n currentCullFace = null;\n currentLineWidth = null;\n currentPolygonOffsetFactor = null;\n currentPolygonOffsetUnits = null;\n currentScissor.set(0, 0, gl.canvas.width, gl.canvas.height);\n currentViewport.set(0, 0, gl.canvas.width, gl.canvas.height);\n colorBuffer.reset();\n depthBuffer.reset();\n stencilBuffer.reset();\n }\n return {\n buffers: {\n color: colorBuffer,\n depth: depthBuffer,\n stencil: stencilBuffer\n },\n enable: enable,\n disable: disable,\n bindFramebuffer: bindFramebuffer,\n drawBuffers: drawBuffers,\n useProgram: useProgram,\n setBlending: setBlending,\n setMaterial: setMaterial,\n setFlipSided: setFlipSided,\n setCullFace: setCullFace,\n setLineWidth: setLineWidth,\n setPolygonOffset: setPolygonOffset,\n setScissorTest: setScissorTest,\n activeTexture: activeTexture,\n bindTexture: bindTexture,\n unbindTexture: unbindTexture,\n compressedTexImage2D: compressedTexImage2D,\n compressedTexImage3D: compressedTexImage3D,\n texImage2D: texImage2D,\n texImage3D: texImage3D,\n updateUBOMapping: updateUBOMapping,\n uniformBlockBinding: uniformBlockBinding,\n texStorage2D: texStorage2D,\n texStorage3D: texStorage3D,\n texSubImage2D: texSubImage2D,\n texSubImage3D: texSubImage3D,\n compressedTexSubImage2D: compressedTexSubImage2D,\n compressedTexSubImage3D: compressedTexSubImage3D,\n scissor: scissor,\n viewport: viewport,\n reset: reset\n };\n}\nfunction $d5b33d7c30034067$var$WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info) {\n const isWebGL2 = capabilities.isWebGL2;\n const maxTextures = capabilities.maxTextures;\n const maxCubemapSize = capabilities.maxCubemapSize;\n const maxTextureSize = capabilities.maxTextureSize;\n const maxSamples = capabilities.maxSamples;\n const multisampledRTTExt = extensions.has(\"WEBGL_multisampled_render_to_texture\") ? extensions.get(\"WEBGL_multisampled_render_to_texture\") : null;\n const supportsInvalidateFramebuffer = typeof navigator === \"undefined\" ? false : /OculusBrowser/g.test(navigator.userAgent);\n const _videoTextures = new WeakMap();\n let _canvas;\n const _sources = new WeakMap(); // maps WebglTexture objects to instances of Source\n // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n // also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n // Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n let useOffscreenCanvas = false;\n try {\n useOffscreenCanvas = typeof OffscreenCanvas !== \"undefined\" && new OffscreenCanvas(1, 1).getContext(\"2d\") !== null;\n } catch (err) {\n // Ignore any errors\n }\n function createCanvas(width, height) {\n // Use OffscreenCanvas when available. Specially needed in web workers\n return useOffscreenCanvas ? // eslint-disable-next-line compat/compat\n new OffscreenCanvas(width, height) : $d5b33d7c30034067$var$createElementNS(\"canvas\");\n }\n function resizeImage(image, needsPowerOfTwo, needsNewCanvas, maxSize) {\n let scale = 1;\n // handle case if texture exceeds max size\n if (image.width > maxSize || image.height > maxSize) scale = maxSize / Math.max(image.width, image.height);\n // only perform resize if necessary\n if (scale < 1 || needsPowerOfTwo === true) {\n // only perform resize for certain image types\n if (typeof HTMLImageElement !== \"undefined\" && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== \"undefined\" && image instanceof HTMLCanvasElement || typeof ImageBitmap !== \"undefined\" && image instanceof ImageBitmap) {\n const floor = needsPowerOfTwo ? $d5b33d7c30034067$var$floorPowerOfTwo : Math.floor;\n const width = floor(scale * image.width);\n const height = floor(scale * image.height);\n if (_canvas === undefined) _canvas = createCanvas(width, height);\n // cube textures can't reuse the same canvas\n const canvas = needsNewCanvas ? createCanvas(width, height) : _canvas;\n canvas.width = width;\n canvas.height = height;\n const context = canvas.getContext(\"2d\");\n context.drawImage(image, 0, 0, width, height);\n console.warn(\"THREE.WebGLRenderer: Texture has been resized from (\" + image.width + \"x\" + image.height + \") to (\" + width + \"x\" + height + \").\");\n return canvas;\n } else {\n if (\"data\" in image) console.warn(\"THREE.WebGLRenderer: Image in DataTexture is too big (\" + image.width + \"x\" + image.height + \").\");\n return image;\n }\n }\n return image;\n }\n function isPowerOfTwo$1(image) {\n return $d5b33d7c30034067$var$isPowerOfTwo(image.width) && $d5b33d7c30034067$var$isPowerOfTwo(image.height);\n }\n function textureNeedsPowerOfTwo(texture) {\n if (isWebGL2) return false;\n return texture.wrapS !== $d5b33d7c30034067$export$9d9334239a5a5e06 || texture.wrapT !== $d5b33d7c30034067$export$9d9334239a5a5e06 || texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8;\n }\n function textureNeedsGenerateMipmaps(texture, supportsMips) {\n return texture.generateMipmaps && supportsMips && texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8;\n }\n function generateMipmap(target) {\n _gl.generateMipmap(target);\n }\n function getInternalFormat(internalFormatName, glFormat, glType, colorSpace1, forceLinearTransfer = false) {\n if (isWebGL2 === false) return glFormat;\n if (internalFormatName !== null) {\n if (_gl[internalFormatName] !== undefined) return _gl[internalFormatName];\n console.warn(\"THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '\" + internalFormatName + \"'\");\n }\n let internalFormat = glFormat;\n if (glFormat === _gl.RED) {\n if (glType === _gl.FLOAT) internalFormat = _gl.R32F;\n if (glType === _gl.HALF_FLOAT) internalFormat = _gl.R16F;\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.R8;\n }\n if (glFormat === _gl.RED_INTEGER) {\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.R8UI;\n if (glType === _gl.UNSIGNED_SHORT) internalFormat = _gl.R16UI;\n if (glType === _gl.UNSIGNED_INT) internalFormat = _gl.R32UI;\n if (glType === _gl.BYTE) internalFormat = _gl.R8I;\n if (glType === _gl.SHORT) internalFormat = _gl.R16I;\n if (glType === _gl.INT) internalFormat = _gl.R32I;\n }\n if (glFormat === _gl.RG) {\n if (glType === _gl.FLOAT) internalFormat = _gl.RG32F;\n if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RG16F;\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.RG8;\n }\n if (glFormat === _gl.RGBA) {\n const transfer = forceLinearTransfer ? $d5b33d7c30034067$export$f197347d588c1b4a : $d5b33d7c30034067$export$5e6fd513f44698c.getTransfer(colorSpace1);\n if (glType === _gl.FLOAT) internalFormat = _gl.RGBA32F;\n if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RGBA16F;\n if (glType === _gl.UNSIGNED_BYTE) internalFormat = transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;\n if (glType === _gl.UNSIGNED_SHORT_4_4_4_4) internalFormat = _gl.RGBA4;\n if (glType === _gl.UNSIGNED_SHORT_5_5_5_1) internalFormat = _gl.RGB5_A1;\n }\n if (internalFormat === _gl.R16F || internalFormat === _gl.R32F || internalFormat === _gl.RG16F || internalFormat === _gl.RG32F || internalFormat === _gl.RGBA16F || internalFormat === _gl.RGBA32F) extensions.get(\"EXT_color_buffer_float\");\n return internalFormat;\n }\n function getMipLevels(texture, image, supportsMips) {\n if (textureNeedsGenerateMipmaps(texture, supportsMips) === true || texture.isFramebufferTexture && texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8) return Math.log2(Math.max(image.width, image.height)) + 1;\n else if (texture.mipmaps !== undefined && texture.mipmaps.length > 0) // user-defined mipmaps\n return texture.mipmaps.length;\n else if (texture.isCompressedTexture && Array.isArray(texture.image)) return image.mipmaps.length;\n else // texture without mipmaps (only base level)\n return 1;\n }\n // Fallback filters for non-power-of-2 textures\n function filterFallback(f) {\n if (f === $d5b33d7c30034067$export$727aa5ec3fe39bf0 || f === $d5b33d7c30034067$export$d129e38cf6feaa8c || f === $d5b33d7c30034067$export$d2327c1afe5bfdf2) return _gl.NEAREST;\n return _gl.LINEAR;\n }\n //\n function onTextureDispose(event) {\n const texture = event.target;\n texture.removeEventListener(\"dispose\", onTextureDispose);\n deallocateTexture(texture);\n if (texture.isVideoTexture) _videoTextures.delete(texture);\n }\n function onRenderTargetDispose(event) {\n const renderTarget = event.target;\n renderTarget.removeEventListener(\"dispose\", onRenderTargetDispose);\n deallocateRenderTarget(renderTarget);\n }\n //\n function deallocateTexture(texture) {\n const textureProperties = properties.get(texture);\n if (textureProperties.__webglInit === undefined) return;\n // check if it's necessary to remove the WebGLTexture object\n const source = texture.source;\n const webglTextures = _sources.get(source);\n if (webglTextures) {\n const webglTexture = webglTextures[textureProperties.__cacheKey];\n webglTexture.usedTimes--;\n // the WebGLTexture object is not used anymore, remove it\n if (webglTexture.usedTimes === 0) deleteTexture(texture);\n // remove the weak map entry if no WebGLTexture uses the source anymore\n if (Object.keys(webglTextures).length === 0) _sources.delete(source);\n }\n properties.remove(texture);\n }\n function deleteTexture(texture) {\n const textureProperties = properties.get(texture);\n _gl.deleteTexture(textureProperties.__webglTexture);\n const source = texture.source;\n const webglTextures = _sources.get(source);\n delete webglTextures[textureProperties.__cacheKey];\n info.memory.textures--;\n }\n function deallocateRenderTarget(renderTarget) {\n const texture = renderTarget.texture;\n const renderTargetProperties = properties.get(renderTarget);\n const textureProperties = properties.get(texture);\n if (textureProperties.__webglTexture !== undefined) {\n _gl.deleteTexture(textureProperties.__webglTexture);\n info.memory.textures--;\n }\n if (renderTarget.depthTexture) renderTarget.depthTexture.dispose();\n if (renderTarget.isWebGLCubeRenderTarget) for(let i = 0; i < 6; i++){\n if (Array.isArray(renderTargetProperties.__webglFramebuffer[i])) for(let level = 0; level < renderTargetProperties.__webglFramebuffer[i].length; level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i][level]);\n else _gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i]);\n if (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer[i]);\n }\n else {\n if (Array.isArray(renderTargetProperties.__webglFramebuffer)) for(let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[level]);\n else _gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer);\n if (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer);\n if (renderTargetProperties.__webglMultisampledFramebuffer) _gl.deleteFramebuffer(renderTargetProperties.__webglMultisampledFramebuffer);\n if (renderTargetProperties.__webglColorRenderbuffer) {\n for(let i = 0; i < renderTargetProperties.__webglColorRenderbuffer.length; i++)if (renderTargetProperties.__webglColorRenderbuffer[i]) _gl.deleteRenderbuffer(renderTargetProperties.__webglColorRenderbuffer[i]);\n }\n if (renderTargetProperties.__webglDepthRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthRenderbuffer);\n }\n if (renderTarget.isWebGLMultipleRenderTargets) for(let i = 0, il = texture.length; i < il; i++){\n const attachmentProperties = properties.get(texture[i]);\n if (attachmentProperties.__webglTexture) {\n _gl.deleteTexture(attachmentProperties.__webglTexture);\n info.memory.textures--;\n }\n properties.remove(texture[i]);\n }\n properties.remove(texture);\n properties.remove(renderTarget);\n }\n //\n let textureUnits = 0;\n function resetTextureUnits() {\n textureUnits = 0;\n }\n function allocateTextureUnit() {\n const textureUnit = textureUnits;\n if (textureUnit >= maxTextures) console.warn(\"THREE.WebGLTextures: Trying to use \" + textureUnit + \" texture units while this GPU supports only \" + maxTextures);\n textureUnits += 1;\n return textureUnit;\n }\n function getTextureCacheKey(texture) {\n const array = [];\n array.push(texture.wrapS);\n array.push(texture.wrapT);\n array.push(texture.wrapR || 0);\n array.push(texture.magFilter);\n array.push(texture.minFilter);\n array.push(texture.anisotropy);\n array.push(texture.internalFormat);\n array.push(texture.format);\n array.push(texture.type);\n array.push(texture.generateMipmaps);\n array.push(texture.premultiplyAlpha);\n array.push(texture.flipY);\n array.push(texture.unpackAlignment);\n array.push(texture.colorSpace);\n return array.join();\n }\n //\n function setTexture2D(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.isVideoTexture) updateVideoTexture(texture);\n if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {\n const image = texture.image;\n if (image === null) console.warn(\"THREE.WebGLRenderer: Texture marked for update but no image data found.\");\n else if (image.complete === false) console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is incomplete\");\n else {\n uploadTexture(textureProperties, texture, slot);\n return;\n }\n }\n state.bindTexture(_gl.TEXTURE_2D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n function setTexture2DArray(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.version > 0 && textureProperties.__version !== texture.version) {\n uploadTexture(textureProperties, texture, slot);\n return;\n }\n state.bindTexture(_gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n function setTexture3D(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.version > 0 && textureProperties.__version !== texture.version) {\n uploadTexture(textureProperties, texture, slot);\n return;\n }\n state.bindTexture(_gl.TEXTURE_3D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n function setTextureCube(texture, slot) {\n const textureProperties = properties.get(texture);\n if (texture.version > 0 && textureProperties.__version !== texture.version) {\n uploadCubeTexture(textureProperties, texture, slot);\n return;\n }\n state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n }\n const wrappingToGL = {\n [$d5b33d7c30034067$export$533346c8e8dac0f5]: _gl.REPEAT,\n [$d5b33d7c30034067$export$9d9334239a5a5e06]: _gl.CLAMP_TO_EDGE,\n [$d5b33d7c30034067$export$c7e7c00b14f51a4f]: _gl.MIRRORED_REPEAT\n };\n const filterToGL = {\n [$d5b33d7c30034067$export$727aa5ec3fe39bf0]: _gl.NEAREST,\n [$d5b33d7c30034067$export$d129e38cf6feaa8c]: _gl.NEAREST_MIPMAP_NEAREST,\n [$d5b33d7c30034067$export$d2327c1afe5bfdf2]: _gl.NEAREST_MIPMAP_LINEAR,\n [$d5b33d7c30034067$export$8a72f490b25c56c8]: _gl.LINEAR,\n [$d5b33d7c30034067$export$19a719f377145a13]: _gl.LINEAR_MIPMAP_NEAREST,\n [$d5b33d7c30034067$export$5d8599b6a933fb1b]: _gl.LINEAR_MIPMAP_LINEAR\n };\n const compareToGL = {\n [$d5b33d7c30034067$export$d9e2d19a747baaab]: _gl.NEVER,\n [$d5b33d7c30034067$export$187b73a3e352c145]: _gl.ALWAYS,\n [$d5b33d7c30034067$export$36bcf49c713b3eb7]: _gl.LESS,\n [$d5b33d7c30034067$export$64eea11eb407ddf1]: _gl.LEQUAL,\n [$d5b33d7c30034067$export$66f28d946fc6a0d5]: _gl.EQUAL,\n [$d5b33d7c30034067$export$1cdcb70d53d65f61]: _gl.GEQUAL,\n [$d5b33d7c30034067$export$155af022118f3a38]: _gl.GREATER,\n [$d5b33d7c30034067$export$67ab95dde6bed156]: _gl.NOTEQUAL\n };\n function setTextureParameters(textureType, texture, supportsMips) {\n if (supportsMips) {\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[texture.wrapS]);\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[texture.wrapT]);\n if (textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY) _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[texture.wrapR]);\n _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, filterToGL[texture.magFilter]);\n _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, filterToGL[texture.minFilter]);\n } else {\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE);\n _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE);\n if (textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY) _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_R, _gl.CLAMP_TO_EDGE);\n if (texture.wrapS !== $d5b33d7c30034067$export$9d9334239a5a5e06 || texture.wrapT !== $d5b33d7c30034067$export$9d9334239a5a5e06) console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.\");\n _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, filterFallback(texture.magFilter));\n _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, filterFallback(texture.minFilter));\n if (texture.minFilter !== $d5b33d7c30034067$export$727aa5ec3fe39bf0 && texture.minFilter !== $d5b33d7c30034067$export$8a72f490b25c56c8) console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.\");\n }\n if (texture.compareFunction) {\n _gl.texParameteri(textureType, _gl.TEXTURE_COMPARE_MODE, _gl.COMPARE_REF_TO_TEXTURE);\n _gl.texParameteri(textureType, _gl.TEXTURE_COMPARE_FUNC, compareToGL[texture.compareFunction]);\n }\n if (extensions.has(\"EXT_texture_filter_anisotropic\") === true) {\n const extension = extensions.get(\"EXT_texture_filter_anisotropic\");\n if (texture.magFilter === $d5b33d7c30034067$export$727aa5ec3fe39bf0) return;\n if (texture.minFilter !== $d5b33d7c30034067$export$d2327c1afe5bfdf2 && texture.minFilter !== $d5b33d7c30034067$export$5d8599b6a933fb1b) return;\n if (texture.type === $d5b33d7c30034067$export$f6d331659b644596 && extensions.has(\"OES_texture_float_linear\") === false) return; // verify extension for WebGL 1 and WebGL 2\n if (isWebGL2 === false && texture.type === $d5b33d7c30034067$export$2697304443f382bc && extensions.has(\"OES_texture_half_float_linear\") === false) return; // verify extension for WebGL 1 only\n if (texture.anisotropy > 1 || properties.get(texture).__currentAnisotropy) {\n _gl.texParameterf(textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(texture.anisotropy, capabilities.getMaxAnisotropy()));\n properties.get(texture).__currentAnisotropy = texture.anisotropy;\n }\n }\n }\n function initTexture(textureProperties, texture) {\n let forceUpload = false;\n if (textureProperties.__webglInit === undefined) {\n textureProperties.__webglInit = true;\n texture.addEventListener(\"dispose\", onTextureDispose);\n }\n // create Source <-> WebGLTextures mapping if necessary\n const source = texture.source;\n let webglTextures = _sources.get(source);\n if (webglTextures === undefined) {\n webglTextures = {};\n _sources.set(source, webglTextures);\n }\n // check if there is already a WebGLTexture object for the given texture parameters\n const textureCacheKey = getTextureCacheKey(texture);\n if (textureCacheKey !== textureProperties.__cacheKey) {\n // if not, create a new instance of WebGLTexture\n if (webglTextures[textureCacheKey] === undefined) {\n // create new entry\n webglTextures[textureCacheKey] = {\n texture: _gl.createTexture(),\n usedTimes: 0\n };\n info.memory.textures++;\n // when a new instance of WebGLTexture was created, a texture upload is required\n // even if the image contents are identical\n forceUpload = true;\n }\n webglTextures[textureCacheKey].usedTimes++;\n // every time the texture cache key changes, it's necessary to check if an instance of\n // WebGLTexture can be deleted in order to avoid a memory leak.\n const webglTexture = webglTextures[textureProperties.__cacheKey];\n if (webglTexture !== undefined) {\n webglTextures[textureProperties.__cacheKey].usedTimes--;\n if (webglTexture.usedTimes === 0) deleteTexture(texture);\n }\n // store references to cache key and WebGLTexture object\n textureProperties.__cacheKey = textureCacheKey;\n textureProperties.__webglTexture = webglTextures[textureCacheKey].texture;\n }\n return forceUpload;\n }\n function uploadTexture(textureProperties, texture, slot) {\n let textureType = _gl.TEXTURE_2D;\n if (texture.isDataArrayTexture || texture.isCompressedArrayTexture) textureType = _gl.TEXTURE_2D_ARRAY;\n if (texture.isData3DTexture) textureType = _gl.TEXTURE_3D;\n const forceUpload = initTexture(textureProperties, texture);\n const source = texture.source;\n state.bindTexture(textureType, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n const sourceProperties = properties.get(source);\n if (source.version !== sourceProperties.__version || forceUpload === true) {\n state.activeTexture(_gl.TEXTURE0 + slot);\n const workingPrimaries = $d5b33d7c30034067$export$5e6fd513f44698c.getPrimaries($d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace);\n const texturePrimaries = texture.colorSpace === $d5b33d7c30034067$export$bfcb490c2dd3db51 ? null : $d5b33d7c30034067$export$5e6fd513f44698c.getPrimaries(texture.colorSpace);\n const unpackConversion = texture.colorSpace === $d5b33d7c30034067$export$bfcb490c2dd3db51 || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment);\n _gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion);\n const needsPowerOfTwo = textureNeedsPowerOfTwo(texture) && isPowerOfTwo$1(texture.image) === false;\n let image = resizeImage(texture.image, needsPowerOfTwo, false, maxTextureSize);\n image = verifyColorSpace(texture, image);\n const supportsMips = isPowerOfTwo$1(image) || isWebGL2, glFormat = utils.convert(texture.format, texture.colorSpace);\n let glType = utils.convert(texture.type), glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace, texture.isVideoTexture);\n setTextureParameters(textureType, texture, supportsMips);\n let mipmap;\n const mipmaps = texture.mipmaps;\n const useTexStorage = isWebGL2 && texture.isVideoTexture !== true;\n const allocateMemory = sourceProperties.__version === undefined || forceUpload === true;\n const levels = getMipLevels(texture, image, supportsMips);\n if (texture.isDepthTexture) {\n // populate depth texture with dummy data\n glInternalFormat = _gl.DEPTH_COMPONENT;\n if (isWebGL2) {\n if (texture.type === $d5b33d7c30034067$export$f6d331659b644596) glInternalFormat = _gl.DEPTH_COMPONENT32F;\n else if (texture.type === $d5b33d7c30034067$export$c3c7fc4518ebba96) glInternalFormat = _gl.DEPTH_COMPONENT24;\n else if (texture.type === $d5b33d7c30034067$export$6c8ea339bfab1301) glInternalFormat = _gl.DEPTH24_STENCIL8;\n else glInternalFormat = _gl.DEPTH_COMPONENT16; // WebGL2 requires sized internalformat for glTexImage2D\n } else if (texture.type === $d5b33d7c30034067$export$f6d331659b644596) console.error(\"WebGLRenderer: Floating point depth texture requires WebGL2.\");\n // validation checks for WebGL 1\n if (texture.format === $d5b33d7c30034067$export$c1b6b5136be58045 && glInternalFormat === _gl.DEPTH_COMPONENT) // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n // DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n {\n if (texture.type !== $d5b33d7c30034067$export$c63dc51868b06a9d && texture.type !== $d5b33d7c30034067$export$c3c7fc4518ebba96) {\n console.warn(\"THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.\");\n texture.type = $d5b33d7c30034067$export$c3c7fc4518ebba96;\n glType = utils.convert(texture.type);\n }\n }\n if (texture.format === $d5b33d7c30034067$export$1e113ac2d0905829 && glInternalFormat === _gl.DEPTH_COMPONENT) {\n // Depth stencil textures need the DEPTH_STENCIL internal format\n // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n glInternalFormat = _gl.DEPTH_STENCIL;\n // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n // DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n if (texture.type !== $d5b33d7c30034067$export$6c8ea339bfab1301) {\n console.warn(\"THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.\");\n texture.type = $d5b33d7c30034067$export$6c8ea339bfab1301;\n glType = utils.convert(texture.type);\n }\n }\n //\n if (allocateMemory) {\n if (useTexStorage) state.texStorage2D(_gl.TEXTURE_2D, 1, glInternalFormat, image.width, image.height);\n else state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null);\n }\n } else if (texture.isDataTexture) {\n // use manually created mipmaps if available\n // if there are no manual mipmaps\n // set 0 level mipmap and then use GL to generate other mipmap levels\n if (mipmaps.length > 0 && supportsMips) {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);\n else state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n }\n texture.generateMipmaps = false;\n } else if (useTexStorage) {\n if (allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height);\n state.texSubImage2D(_gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, glFormat, glType, image.data);\n } else state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data);\n } else if (texture.isCompressedTexture) {\n if (texture.isCompressedArrayTexture) {\n if (useTexStorage && allocateMemory) state.texStorage3D(_gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height, image.depth);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (texture.format !== $d5b33d7c30034067$export$3f8bb04b555a363c) {\n if (glFormat !== null) {\n if (useTexStorage) state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data, 0, 0);\n else state.compressedTexImage3D(_gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, mipmap.data, 0, 0);\n } else console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\");\n } else if (useTexStorage) state.texSubImage3D(_gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, glType, mipmap.data);\n else state.texImage3D(_gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, glFormat, glType, mipmap.data);\n }\n } else {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (texture.format !== $d5b33d7c30034067$export$3f8bb04b555a363c) {\n if (glFormat !== null) {\n if (useTexStorage) state.compressedTexSubImage2D(_gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data);\n else state.compressedTexImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n } else console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\");\n } else if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);\n else state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n }\n }\n } else if (texture.isDataArrayTexture) {\n if (useTexStorage) {\n if (allocateMemory) state.texStorage3D(_gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, image.width, image.height, image.depth);\n state.texSubImage3D(_gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data);\n } else state.texImage3D(_gl.TEXTURE_2D_ARRAY, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n } else if (texture.isData3DTexture) {\n if (useTexStorage) {\n if (allocateMemory) state.texStorage3D(_gl.TEXTURE_3D, levels, glInternalFormat, image.width, image.height, image.depth);\n state.texSubImage3D(_gl.TEXTURE_3D, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data);\n } else state.texImage3D(_gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n } else if (texture.isFramebufferTexture) {\n if (allocateMemory) {\n if (useTexStorage) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height);\n else {\n let width = image.width, height = image.height;\n for(let i = 0; i < levels; i++){\n state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, width, height, 0, glFormat, glType, null);\n width >>= 1;\n height >>= 1;\n }\n }\n }\n } else {\n // regular Texture (image, video, canvas)\n // use manually created mipmaps if available\n // if there are no manual mipmaps\n // set 0 level mipmap and then use GL to generate other mipmap levels\n if (mipmaps.length > 0 && supportsMips) {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[0].width, mipmaps[0].height);\n for(let i = 0, il = mipmaps.length; i < il; i++){\n mipmap = mipmaps[i];\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_2D, i, 0, 0, glFormat, glType, mipmap);\n else state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, glFormat, glType, mipmap);\n }\n texture.generateMipmaps = false;\n } else if (useTexStorage) {\n if (allocateMemory) state.texStorage2D(_gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height);\n state.texSubImage2D(_gl.TEXTURE_2D, 0, 0, 0, glFormat, glType, image);\n } else state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, glFormat, glType, image);\n }\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) generateMipmap(textureType);\n sourceProperties.__version = source.version;\n if (texture.onUpdate) texture.onUpdate(texture);\n }\n textureProperties.__version = texture.version;\n }\n function uploadCubeTexture(textureProperties, texture, slot) {\n if (texture.image.length !== 6) return;\n const forceUpload = initTexture(textureProperties, texture);\n const source = texture.source;\n state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot);\n const sourceProperties = properties.get(source);\n if (source.version !== sourceProperties.__version || forceUpload === true) {\n state.activeTexture(_gl.TEXTURE0 + slot);\n const workingPrimaries = $d5b33d7c30034067$export$5e6fd513f44698c.getPrimaries($d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace);\n const texturePrimaries = texture.colorSpace === $d5b33d7c30034067$export$bfcb490c2dd3db51 ? null : $d5b33d7c30034067$export$5e6fd513f44698c.getPrimaries(texture.colorSpace);\n const unpackConversion = texture.colorSpace === $d5b33d7c30034067$export$bfcb490c2dd3db51 || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment);\n _gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion);\n const isCompressed = texture.isCompressedTexture || texture.image[0].isCompressedTexture;\n const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;\n const cubeImage = [];\n for(let i = 0; i < 6; i++){\n if (!isCompressed && !isDataTexture) cubeImage[i] = resizeImage(texture.image[i], false, true, maxCubemapSize);\n else cubeImage[i] = isDataTexture ? texture.image[i].image : texture.image[i];\n cubeImage[i] = verifyColorSpace(texture, cubeImage[i]);\n }\n const image = cubeImage[0], supportsMips = isPowerOfTwo$1(image) || isWebGL2, glFormat = utils.convert(texture.format, texture.colorSpace), glType = utils.convert(texture.type), glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);\n const useTexStorage = isWebGL2 && texture.isVideoTexture !== true;\n const allocateMemory = sourceProperties.__version === undefined || forceUpload === true;\n let levels = getMipLevels(texture, image, supportsMips);\n setTextureParameters(_gl.TEXTURE_CUBE_MAP, texture, supportsMips);\n let mipmaps;\n if (isCompressed) {\n if (useTexStorage && allocateMemory) state.texStorage2D(_gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, image.width, image.height);\n for(let i = 0; i < 6; i++){\n mipmaps = cubeImage[i].mipmaps;\n for(let j = 0; j < mipmaps.length; j++){\n const mipmap = mipmaps[j];\n if (texture.format !== $d5b33d7c30034067$export$3f8bb04b555a363c) {\n if (glFormat !== null) {\n if (useTexStorage) state.compressedTexSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data);\n else state.compressedTexImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n } else console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()\");\n } else if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n }\n }\n } else {\n mipmaps = texture.mipmaps;\n if (useTexStorage && allocateMemory) {\n // TODO: Uniformly handle mipmap definitions\n // Normal textures and compressed cube textures define base level + mips with their mipmap array\n // Uncompressed cube textures use their mipmap array only for mips (no base level)\n if (mipmaps.length > 0) levels++;\n state.texStorage2D(_gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, cubeImage[0].width, cubeImage[0].height);\n }\n for(let i = 0; i < 6; i++)if (isDataTexture) {\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, cubeImage[i].width, cubeImage[i].height, glFormat, glType, cubeImage[i].data);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, cubeImage[i].width, cubeImage[i].height, 0, glFormat, glType, cubeImage[i].data);\n for(let j = 0; j < mipmaps.length; j++){\n const mipmap = mipmaps[j];\n const mipmapImage = mipmap.image[i].image;\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, mipmapImage.width, mipmapImage.height, glFormat, glType, mipmapImage.data);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data);\n }\n } else {\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, glFormat, glType, cubeImage[i]);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, glFormat, glType, cubeImage[i]);\n for(let j = 0; j < mipmaps.length; j++){\n const mipmap = mipmaps[j];\n if (useTexStorage) state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, glFormat, glType, mipmap.image[i]);\n else state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[i]);\n }\n }\n }\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) // We assume images for cube map have the same size.\n generateMipmap(_gl.TEXTURE_CUBE_MAP);\n sourceProperties.__version = source.version;\n if (texture.onUpdate) texture.onUpdate(texture);\n }\n textureProperties.__version = texture.version;\n }\n // Render targets\n // Setup storage for target texture and bind it to correct framebuffer\n function setupFrameBufferTexture(framebuffer, renderTarget, texture, attachment, textureTarget, level) {\n const glFormat = utils.convert(texture.format, texture.colorSpace);\n const glType = utils.convert(texture.type);\n const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);\n const renderTargetProperties = properties.get(renderTarget);\n if (!renderTargetProperties.__hasExternalTextures) {\n const width = Math.max(1, renderTarget.width >> level);\n const height = Math.max(1, renderTarget.height >> level);\n if (textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY) state.texImage3D(textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null);\n else state.texImage2D(textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null);\n }\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, 0, getRenderTargetSamples(renderTarget));\n else if (textureTarget === _gl.TEXTURE_2D || textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z) _gl.framebufferTexture2D(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, level);\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n }\n // Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n function setupRenderBufferStorage(renderbuffer, renderTarget, isMultisample) {\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, renderbuffer);\n if (renderTarget.depthBuffer && !renderTarget.stencilBuffer) {\n let glInternalFormat = isWebGL2 === true ? _gl.DEPTH_COMPONENT24 : _gl.DEPTH_COMPONENT16;\n if (isMultisample || useMultisampledRTT(renderTarget)) {\n const depthTexture = renderTarget.depthTexture;\n if (depthTexture && depthTexture.isDepthTexture) {\n if (depthTexture.type === $d5b33d7c30034067$export$f6d331659b644596) glInternalFormat = _gl.DEPTH_COMPONENT32F;\n else if (depthTexture.type === $d5b33d7c30034067$export$c3c7fc4518ebba96) glInternalFormat = _gl.DEPTH_COMPONENT24;\n }\n const samples = getRenderTargetSamples(renderTarget);\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n else _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n } else _gl.renderbufferStorage(_gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer);\n } else if (renderTarget.depthBuffer && renderTarget.stencilBuffer) {\n const samples = getRenderTargetSamples(renderTarget);\n if (isMultisample && useMultisampledRTT(renderTarget) === false) _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height);\n else if (useMultisampledRTT(renderTarget)) multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height);\n else _gl.renderbufferStorage(_gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer);\n } else {\n const textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [\n renderTarget.texture\n ];\n for(let i = 0; i < textures.length; i++){\n const texture = textures[i];\n const glFormat = utils.convert(texture.format, texture.colorSpace);\n const glType = utils.convert(texture.type);\n const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace);\n const samples = getRenderTargetSamples(renderTarget);\n if (isMultisample && useMultisampledRTT(renderTarget) === false) _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n else if (useMultisampledRTT(renderTarget)) multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n else _gl.renderbufferStorage(_gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height);\n }\n }\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, null);\n }\n // Setup resources for a Depth Texture for a FBO (needs an extension)\n function setupDepthTexture(framebuffer, renderTarget) {\n const isCube = renderTarget && renderTarget.isWebGLCubeRenderTarget;\n if (isCube) throw new Error(\"Depth Texture with cube render targets is not supported\");\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n if (!(renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture)) throw new Error(\"renderTarget.depthTexture must be an instance of THREE.DepthTexture\");\n // upload an empty depth texture with framebuffer size\n if (!properties.get(renderTarget.depthTexture).__webglTexture || renderTarget.depthTexture.image.width !== renderTarget.width || renderTarget.depthTexture.image.height !== renderTarget.height) {\n renderTarget.depthTexture.image.width = renderTarget.width;\n renderTarget.depthTexture.image.height = renderTarget.height;\n renderTarget.depthTexture.needsUpdate = true;\n }\n setTexture2D(renderTarget.depthTexture, 0);\n const webglDepthTexture = properties.get(renderTarget.depthTexture).__webglTexture;\n const samples = getRenderTargetSamples(renderTarget);\n if (renderTarget.depthTexture.format === $d5b33d7c30034067$export$c1b6b5136be58045) {\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);\n else _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);\n } else if (renderTarget.depthTexture.format === $d5b33d7c30034067$export$1e113ac2d0905829) {\n if (useMultisampledRTT(renderTarget)) multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples);\n else _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0);\n } else throw new Error(\"Unknown depthTexture format\");\n }\n // Setup GL resources for a non-texture depth buffer\n function setupDepthRenderbuffer(renderTarget) {\n const renderTargetProperties = properties.get(renderTarget);\n const isCube = renderTarget.isWebGLCubeRenderTarget === true;\n if (renderTarget.depthTexture && !renderTargetProperties.__autoAllocateDepthBuffer) {\n if (isCube) throw new Error(\"target.depthTexture not supported in Cube render targets\");\n setupDepthTexture(renderTargetProperties.__webglFramebuffer, renderTarget);\n } else if (isCube) {\n renderTargetProperties.__webglDepthbuffer = [];\n for(let i = 0; i < 6; i++){\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[i]);\n renderTargetProperties.__webglDepthbuffer[i] = _gl.createRenderbuffer();\n setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i], renderTarget, false);\n }\n } else {\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n renderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer, renderTarget, false);\n }\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n }\n // rebind framebuffer with external textures\n function rebindTextures(renderTarget, colorTexture, depthTexture) {\n const renderTargetProperties = properties.get(renderTarget);\n if (colorTexture !== undefined) setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0);\n if (depthTexture !== undefined) setupDepthRenderbuffer(renderTarget);\n }\n // Set up GL resources for the render target\n function setupRenderTarget(renderTarget) {\n const texture = renderTarget.texture;\n const renderTargetProperties = properties.get(renderTarget);\n const textureProperties = properties.get(texture);\n renderTarget.addEventListener(\"dispose\", onRenderTargetDispose);\n if (renderTarget.isWebGLMultipleRenderTargets !== true) {\n if (textureProperties.__webglTexture === undefined) textureProperties.__webglTexture = _gl.createTexture();\n textureProperties.__version = texture.version;\n info.memory.textures++;\n }\n const isCube = renderTarget.isWebGLCubeRenderTarget === true;\n const isMultipleRenderTargets = renderTarget.isWebGLMultipleRenderTargets === true;\n const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2;\n // Setup framebuffer\n if (isCube) {\n renderTargetProperties.__webglFramebuffer = [];\n for(let i = 0; i < 6; i++)if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) {\n renderTargetProperties.__webglFramebuffer[i] = [];\n for(let level = 0; level < texture.mipmaps.length; level++)renderTargetProperties.__webglFramebuffer[i][level] = _gl.createFramebuffer();\n } else renderTargetProperties.__webglFramebuffer[i] = _gl.createFramebuffer();\n } else {\n if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) {\n renderTargetProperties.__webglFramebuffer = [];\n for(let level = 0; level < texture.mipmaps.length; level++)renderTargetProperties.__webglFramebuffer[level] = _gl.createFramebuffer();\n } else renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n if (isMultipleRenderTargets) {\n if (capabilities.drawBuffers) {\n const textures = renderTarget.texture;\n for(let i = 0, il = textures.length; i < il; i++){\n const attachmentProperties = properties.get(textures[i]);\n if (attachmentProperties.__webglTexture === undefined) {\n attachmentProperties.__webglTexture = _gl.createTexture();\n info.memory.textures++;\n }\n }\n } else console.warn(\"THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.\");\n }\n if (isWebGL2 && renderTarget.samples > 0 && useMultisampledRTT(renderTarget) === false) {\n const textures = isMultipleRenderTargets ? texture : [\n texture\n ];\n renderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n renderTargetProperties.__webglColorRenderbuffer = [];\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n for(let i = 0; i < textures.length; i++){\n const texture = textures[i];\n renderTargetProperties.__webglColorRenderbuffer[i] = _gl.createRenderbuffer();\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n const glFormat = utils.convert(texture.format, texture.colorSpace);\n const glType = utils.convert(texture.type);\n const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true);\n const samples = getRenderTargetSamples(renderTarget);\n _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n }\n _gl.bindRenderbuffer(_gl.RENDERBUFFER, null);\n if (renderTarget.depthBuffer) {\n renderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n setupRenderBufferStorage(renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true);\n }\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n }\n }\n // Setup color buffer\n if (isCube) {\n state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture);\n setTextureParameters(_gl.TEXTURE_CUBE_MAP, texture, supportsMips);\n for(let i = 0; i < 6; i++){\n if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) for(let level = 0; level < texture.mipmaps.length; level++)setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i][level], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level);\n else setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0);\n }\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) generateMipmap(_gl.TEXTURE_CUBE_MAP);\n state.unbindTexture();\n } else if (isMultipleRenderTargets) {\n const textures = renderTarget.texture;\n for(let i = 0, il = textures.length; i < il; i++){\n const attachment = textures[i];\n const attachmentProperties = properties.get(attachment);\n state.bindTexture(_gl.TEXTURE_2D, attachmentProperties.__webglTexture);\n setTextureParameters(_gl.TEXTURE_2D, attachment, supportsMips);\n setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0);\n if (textureNeedsGenerateMipmaps(attachment, supportsMips)) generateMipmap(_gl.TEXTURE_2D);\n }\n state.unbindTexture();\n } else {\n let glTextureType = _gl.TEXTURE_2D;\n if (renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget) {\n if (isWebGL2) glTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;\n else console.error(\"THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.\");\n }\n state.bindTexture(glTextureType, textureProperties.__webglTexture);\n setTextureParameters(glTextureType, texture, supportsMips);\n if (isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0) for(let level = 0; level < texture.mipmaps.length; level++)setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[level], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level);\n else setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0);\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) generateMipmap(glTextureType);\n state.unbindTexture();\n }\n // Setup depth and stencil buffers\n if (renderTarget.depthBuffer) setupDepthRenderbuffer(renderTarget);\n }\n function updateRenderTargetMipmap(renderTarget) {\n const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2;\n const textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [\n renderTarget.texture\n ];\n for(let i = 0, il = textures.length; i < il; i++){\n const texture = textures[i];\n if (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n const target = renderTarget.isWebGLCubeRenderTarget ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D;\n const webglTexture = properties.get(texture).__webglTexture;\n state.bindTexture(target, webglTexture);\n generateMipmap(target);\n state.unbindTexture();\n }\n }\n }\n function updateMultisampleRenderTarget(renderTarget) {\n if (isWebGL2 && renderTarget.samples > 0 && useMultisampledRTT(renderTarget) === false) {\n const textures = renderTarget.isWebGLMultipleRenderTargets ? renderTarget.texture : [\n renderTarget.texture\n ];\n const width = renderTarget.width;\n const height = renderTarget.height;\n let mask = _gl.COLOR_BUFFER_BIT;\n const invalidationArray = [];\n const depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT;\n const renderTargetProperties = properties.get(renderTarget);\n const isMultipleRenderTargets = renderTarget.isWebGLMultipleRenderTargets === true;\n // If MRT we need to remove FBO attachments\n if (isMultipleRenderTargets) for(let i = 0; i < textures.length; i++){\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, null);\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n _gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, null, 0);\n }\n state.bindFramebuffer(_gl.READ_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n for(let i = 0; i < textures.length; i++){\n invalidationArray.push(_gl.COLOR_ATTACHMENT0 + i);\n if (renderTarget.depthBuffer) invalidationArray.push(depthStyle);\n const ignoreDepthValues = renderTargetProperties.__ignoreDepthValues !== undefined ? renderTargetProperties.__ignoreDepthValues : false;\n if (ignoreDepthValues === false) {\n if (renderTarget.depthBuffer) mask |= _gl.DEPTH_BUFFER_BIT;\n if (renderTarget.stencilBuffer) mask |= _gl.STENCIL_BUFFER_BIT;\n }\n if (isMultipleRenderTargets) _gl.framebufferRenderbuffer(_gl.READ_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n if (ignoreDepthValues === true) {\n _gl.invalidateFramebuffer(_gl.READ_FRAMEBUFFER, [\n depthStyle\n ]);\n _gl.invalidateFramebuffer(_gl.DRAW_FRAMEBUFFER, [\n depthStyle\n ]);\n }\n if (isMultipleRenderTargets) {\n const webglTexture = properties.get(textures[i]).__webglTexture;\n _gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, webglTexture, 0);\n }\n _gl.blitFramebuffer(0, 0, width, height, 0, 0, width, height, mask, _gl.NEAREST);\n if (supportsInvalidateFramebuffer) _gl.invalidateFramebuffer(_gl.READ_FRAMEBUFFER, invalidationArray);\n }\n state.bindFramebuffer(_gl.READ_FRAMEBUFFER, null);\n state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, null);\n // If MRT since pre-blit we removed the FBO we need to reconstruct the attachments\n if (isMultipleRenderTargets) for(let i = 0; i < textures.length; i++){\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[i]);\n const webglTexture = properties.get(textures[i]).__webglTexture;\n state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer);\n _gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, webglTexture, 0);\n }\n state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer);\n }\n }\n function getRenderTargetSamples(renderTarget) {\n return Math.min(maxSamples, renderTarget.samples);\n }\n function useMultisampledRTT(renderTarget) {\n const renderTargetProperties = properties.get(renderTarget);\n return isWebGL2 && renderTarget.samples > 0 && extensions.has(\"WEBGL_multisampled_render_to_texture\") === true && renderTargetProperties.__useRenderToTexture !== false;\n }\n function updateVideoTexture(texture) {\n const frame = info.render.frame;\n // Check the last frame we updated the VideoTexture\n if (_videoTextures.get(texture) !== frame) {\n _videoTextures.set(texture, frame);\n texture.update();\n }\n }\n function verifyColorSpace(texture, image) {\n const colorSpace1 = texture.colorSpace;\n const format = texture.format;\n const type = texture.type;\n if (texture.isCompressedTexture === true || texture.isVideoTexture === true || texture.format === $d5b33d7c30034067$export$ca1dce8b5e1de74d) return image;\n if (colorSpace1 !== $d5b33d7c30034067$export$42429b3acfb233a4 && colorSpace1 !== $d5b33d7c30034067$export$bfcb490c2dd3db51) {\n // sRGB\n if ($d5b33d7c30034067$export$5e6fd513f44698c.getTransfer(colorSpace1) === $d5b33d7c30034067$export$8d0a61916cc26abb) {\n if (isWebGL2 === false) {\n // in WebGL 1, try to use EXT_sRGB extension and unsized formats\n if (extensions.has(\"EXT_sRGB\") === true && format === $d5b33d7c30034067$export$3f8bb04b555a363c) {\n texture.format = $d5b33d7c30034067$export$ca1dce8b5e1de74d;\n // it's not possible to generate mips in WebGL 1 with this extension\n texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.generateMipmaps = false;\n } else // slow fallback (CPU decode)\n image = $d5b33d7c30034067$export$698882cf06df44aa.sRGBToLinear(image);\n } else // in WebGL 2 uncompressed textures can only be sRGB encoded if they have the RGBA8 format\n if (format !== $d5b33d7c30034067$export$3f8bb04b555a363c || type !== $d5b33d7c30034067$export$2e8ce08d3f6f5e10) console.warn(\"THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.\");\n } else console.error(\"THREE.WebGLTextures: Unsupported texture color space:\", colorSpace1);\n }\n return image;\n }\n //\n this.allocateTextureUnit = allocateTextureUnit;\n this.resetTextureUnits = resetTextureUnits;\n this.setTexture2D = setTexture2D;\n this.setTexture2DArray = setTexture2DArray;\n this.setTexture3D = setTexture3D;\n this.setTextureCube = setTextureCube;\n this.rebindTextures = rebindTextures;\n this.setupRenderTarget = setupRenderTarget;\n this.updateRenderTargetMipmap = updateRenderTargetMipmap;\n this.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n this.setupDepthRenderbuffer = setupDepthRenderbuffer;\n this.setupFrameBufferTexture = setupFrameBufferTexture;\n this.useMultisampledRTT = useMultisampledRTT;\n}\nfunction $d5b33d7c30034067$export$ddaebcad857649a8(gl, extensions, capabilities) {\n const isWebGL2 = capabilities.isWebGL2;\n function convert(p, colorSpace1 = $d5b33d7c30034067$export$bfcb490c2dd3db51) {\n let extension;\n const transfer = $d5b33d7c30034067$export$5e6fd513f44698c.getTransfer(colorSpace1);\n if (p === $d5b33d7c30034067$export$2e8ce08d3f6f5e10) return gl.UNSIGNED_BYTE;\n if (p === $d5b33d7c30034067$export$b3969b01faf587f2) return gl.UNSIGNED_SHORT_4_4_4_4;\n if (p === $d5b33d7c30034067$export$18886f8ae33e90de) return gl.UNSIGNED_SHORT_5_5_5_1;\n if (p === $d5b33d7c30034067$export$545fce0311a9796a) return gl.BYTE;\n if (p === $d5b33d7c30034067$export$88572337f312435f) return gl.SHORT;\n if (p === $d5b33d7c30034067$export$c63dc51868b06a9d) return gl.UNSIGNED_SHORT;\n if (p === $d5b33d7c30034067$export$5c612977753abe2) return gl.INT;\n if (p === $d5b33d7c30034067$export$c3c7fc4518ebba96) return gl.UNSIGNED_INT;\n if (p === $d5b33d7c30034067$export$f6d331659b644596) return gl.FLOAT;\n if (p === $d5b33d7c30034067$export$2697304443f382bc) {\n if (isWebGL2) return gl.HALF_FLOAT;\n extension = extensions.get(\"OES_texture_half_float\");\n if (extension !== null) return extension.HALF_FLOAT_OES;\n else return null;\n }\n if (p === $d5b33d7c30034067$export$988473390501ed4b) return gl.ALPHA;\n if (p === $d5b33d7c30034067$export$3f8bb04b555a363c) return gl.RGBA;\n if (p === $d5b33d7c30034067$export$cc09ccbf6d1ed449) return gl.LUMINANCE;\n if (p === $d5b33d7c30034067$export$9053a81c4a69c289) return gl.LUMINANCE_ALPHA;\n if (p === $d5b33d7c30034067$export$c1b6b5136be58045) return gl.DEPTH_COMPONENT;\n if (p === $d5b33d7c30034067$export$1e113ac2d0905829) return gl.DEPTH_STENCIL;\n // WebGL 1 sRGB fallback\n if (p === $d5b33d7c30034067$export$ca1dce8b5e1de74d) {\n extension = extensions.get(\"EXT_sRGB\");\n if (extension !== null) return extension.SRGB_ALPHA_EXT;\n else return null;\n }\n // WebGL2 formats.\n if (p === $d5b33d7c30034067$export$4e041a7967d15c4b) return gl.RED;\n if (p === $d5b33d7c30034067$export$aa92e870a709d190) return gl.RED_INTEGER;\n if (p === $d5b33d7c30034067$export$6cdf0b461c7ce8a0) return gl.RG;\n if (p === $d5b33d7c30034067$export$1ba1c45f9f77d4d7) return gl.RG_INTEGER;\n if (p === $d5b33d7c30034067$export$c200e7d26f592f21) return gl.RGBA_INTEGER;\n // S3TC\n if (p === $d5b33d7c30034067$export$21d1799c6d552fc0 || p === $d5b33d7c30034067$export$afa304c3e981b668 || p === $d5b33d7c30034067$export$d2a1a68024a3e56c || p === $d5b33d7c30034067$export$9a79c424327dacf9) {\n if (transfer === $d5b33d7c30034067$export$8d0a61916cc26abb) {\n extension = extensions.get(\"WEBGL_compressed_texture_s3tc_srgb\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$21d1799c6d552fc0) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$afa304c3e981b668) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$d2a1a68024a3e56c) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;\n if (p === $d5b33d7c30034067$export$9a79c424327dacf9) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;\n } else return null;\n } else {\n extension = extensions.get(\"WEBGL_compressed_texture_s3tc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$21d1799c6d552fc0) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$afa304c3e981b668) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n if (p === $d5b33d7c30034067$export$d2a1a68024a3e56c) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n if (p === $d5b33d7c30034067$export$9a79c424327dacf9) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n } else return null;\n }\n }\n // PVRTC\n if (p === $d5b33d7c30034067$export$19ada9bbb1af3573 || p === $d5b33d7c30034067$export$d0f0355bb3d948e4 || p === $d5b33d7c30034067$export$b82296714358084c || p === $d5b33d7c30034067$export$b71692456c47b6c3) {\n extension = extensions.get(\"WEBGL_compressed_texture_pvrtc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$19ada9bbb1af3573) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n if (p === $d5b33d7c30034067$export$d0f0355bb3d948e4) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n if (p === $d5b33d7c30034067$export$b82296714358084c) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n if (p === $d5b33d7c30034067$export$b71692456c47b6c3) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n } else return null;\n }\n // ETC1\n if (p === $d5b33d7c30034067$export$6ab91af2d757aee7) {\n extension = extensions.get(\"WEBGL_compressed_texture_etc1\");\n if (extension !== null) return extension.COMPRESSED_RGB_ETC1_WEBGL;\n else return null;\n }\n // ETC2\n if (p === $d5b33d7c30034067$export$7800993ef8106a6a || p === $d5b33d7c30034067$export$23ed8300a860e7d8) {\n extension = extensions.get(\"WEBGL_compressed_texture_etc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$7800993ef8106a6a) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2;\n if (p === $d5b33d7c30034067$export$23ed8300a860e7d8) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC;\n } else return null;\n }\n // ASTC\n if (p === $d5b33d7c30034067$export$dc5570b4a2b92d48 || p === $d5b33d7c30034067$export$68880cd325f8b2fb || p === $d5b33d7c30034067$export$7d2c0be323373d95 || p === $d5b33d7c30034067$export$22b52da301fc3a3e || p === $d5b33d7c30034067$export$c009e2cb4a66485e || p === $d5b33d7c30034067$export$118fff5afa255b63 || p === $d5b33d7c30034067$export$120713c829ae0667 || p === $d5b33d7c30034067$export$c79eeabbf53313e9 || p === $d5b33d7c30034067$export$443cf6567cdd6424 || p === $d5b33d7c30034067$export$6573984fc9840780 || p === $d5b33d7c30034067$export$e7aee563f30091de || p === $d5b33d7c30034067$export$2eb8634622ddeab7 || p === $d5b33d7c30034067$export$202b1ce7b5d25742 || p === $d5b33d7c30034067$export$18ab77abd087e467) {\n extension = extensions.get(\"WEBGL_compressed_texture_astc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$dc5570b4a2b92d48) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR;\n if (p === $d5b33d7c30034067$export$68880cd325f8b2fb) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR;\n if (p === $d5b33d7c30034067$export$7d2c0be323373d95) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR;\n if (p === $d5b33d7c30034067$export$22b52da301fc3a3e) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR;\n if (p === $d5b33d7c30034067$export$c009e2cb4a66485e) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR;\n if (p === $d5b33d7c30034067$export$118fff5afa255b63) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR;\n if (p === $d5b33d7c30034067$export$120713c829ae0667) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR;\n if (p === $d5b33d7c30034067$export$c79eeabbf53313e9) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR;\n if (p === $d5b33d7c30034067$export$443cf6567cdd6424) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR;\n if (p === $d5b33d7c30034067$export$6573984fc9840780) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR;\n if (p === $d5b33d7c30034067$export$e7aee563f30091de) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR;\n if (p === $d5b33d7c30034067$export$2eb8634622ddeab7) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR;\n if (p === $d5b33d7c30034067$export$202b1ce7b5d25742) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR;\n if (p === $d5b33d7c30034067$export$18ab77abd087e467) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR;\n } else return null;\n }\n // BPTC\n if (p === $d5b33d7c30034067$export$ce40b115e188bc81 || p === $d5b33d7c30034067$export$d279c5c4bac5121e || p === $d5b33d7c30034067$export$cde52d17225fdbd3) {\n extension = extensions.get(\"EXT_texture_compression_bptc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$ce40b115e188bc81) return transfer === $d5b33d7c30034067$export$8d0a61916cc26abb ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;\n if (p === $d5b33d7c30034067$export$d279c5c4bac5121e) return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;\n if (p === $d5b33d7c30034067$export$cde52d17225fdbd3) return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;\n } else return null;\n }\n // RGTC\n if (p === $d5b33d7c30034067$export$b1688df4c4c21670 || p === $d5b33d7c30034067$export$fc15e5d8261eed58 || p === $d5b33d7c30034067$export$d220f6ade8463a0f || p === $d5b33d7c30034067$export$768646d09dc1b6ef) {\n extension = extensions.get(\"EXT_texture_compression_rgtc\");\n if (extension !== null) {\n if (p === $d5b33d7c30034067$export$ce40b115e188bc81) return extension.COMPRESSED_RED_RGTC1_EXT;\n if (p === $d5b33d7c30034067$export$fc15e5d8261eed58) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;\n if (p === $d5b33d7c30034067$export$d220f6ade8463a0f) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;\n if (p === $d5b33d7c30034067$export$768646d09dc1b6ef) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;\n } else return null;\n }\n //\n if (p === $d5b33d7c30034067$export$6c8ea339bfab1301) {\n if (isWebGL2) return gl.UNSIGNED_INT_24_8;\n extension = extensions.get(\"WEBGL_depth_texture\");\n if (extension !== null) return extension.UNSIGNED_INT_24_8_WEBGL;\n else return null;\n }\n // if \"p\" can't be resolved, assume the user defines a WebGL constant as a string (fallback/workaround for packed RGB formats)\n return gl[p] !== undefined ? gl[p] : null;\n }\n return {\n convert: convert\n };\n}\nclass $d5b33d7c30034067$export$56b937d9e5581166 extends $d5b33d7c30034067$export$74e4ae24825f68d7 {\n constructor(array = []){\n super();\n this.isArrayCamera = true;\n this.cameras = array;\n }\n}\nclass $d5b33d7c30034067$export$eb2fcfdbd7ba97d4 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isGroup = true;\n this.type = \"Group\";\n }\n}\nconst $d5b33d7c30034067$var$_moveEvent = {\n type: \"move\"\n};\nclass $d5b33d7c30034067$var$WebXRController {\n constructor(){\n this._targetRay = null;\n this._grip = null;\n this._hand = null;\n }\n getHandSpace() {\n if (this._hand === null) {\n this._hand = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n this._hand.matrixAutoUpdate = false;\n this._hand.visible = false;\n this._hand.joints = {};\n this._hand.inputState = {\n pinching: false\n };\n }\n return this._hand;\n }\n getTargetRaySpace() {\n if (this._targetRay === null) {\n this._targetRay = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n this._targetRay.matrixAutoUpdate = false;\n this._targetRay.visible = false;\n this._targetRay.hasLinearVelocity = false;\n this._targetRay.linearVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n this._targetRay.hasAngularVelocity = false;\n this._targetRay.angularVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n return this._targetRay;\n }\n getGripSpace() {\n if (this._grip === null) {\n this._grip = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n this._grip.matrixAutoUpdate = false;\n this._grip.visible = false;\n this._grip.hasLinearVelocity = false;\n this._grip.linearVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n this._grip.hasAngularVelocity = false;\n this._grip.angularVelocity = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n return this._grip;\n }\n dispatchEvent(event) {\n if (this._targetRay !== null) this._targetRay.dispatchEvent(event);\n if (this._grip !== null) this._grip.dispatchEvent(event);\n if (this._hand !== null) this._hand.dispatchEvent(event);\n return this;\n }\n connect(inputSource) {\n if (inputSource && inputSource.hand) {\n const hand = this._hand;\n if (hand) for (const inputjoint of inputSource.hand.values())// Initialize hand with joints when connected\n this._getHandJoint(hand, inputjoint);\n }\n this.dispatchEvent({\n type: \"connected\",\n data: inputSource\n });\n return this;\n }\n disconnect(inputSource) {\n this.dispatchEvent({\n type: \"disconnected\",\n data: inputSource\n });\n if (this._targetRay !== null) this._targetRay.visible = false;\n if (this._grip !== null) this._grip.visible = false;\n if (this._hand !== null) this._hand.visible = false;\n return this;\n }\n update(inputSource, frame, referenceSpace) {\n let inputPose = null;\n let gripPose = null;\n let handPose = null;\n const targetRay = this._targetRay;\n const grip = this._grip;\n const hand = this._hand;\n if (inputSource && frame.session.visibilityState !== \"visible-blurred\") {\n if (hand && inputSource.hand) {\n handPose = true;\n for (const inputjoint of inputSource.hand.values()){\n // Update the joints groups with the XRJoint poses\n const jointPose = frame.getJointPose(inputjoint, referenceSpace);\n // The transform of this joint will be updated with the joint pose on each frame\n const joint = this._getHandJoint(hand, inputjoint);\n if (jointPose !== null) {\n joint.matrix.fromArray(jointPose.transform.matrix);\n joint.matrix.decompose(joint.position, joint.rotation, joint.scale);\n joint.matrixWorldNeedsUpdate = true;\n joint.jointRadius = jointPose.radius;\n }\n joint.visible = jointPose !== null;\n }\n // Custom events\n // Check pinchz\n const indexTip = hand.joints[\"index-finger-tip\"];\n const thumbTip = hand.joints[\"thumb-tip\"];\n const distance = indexTip.position.distanceTo(thumbTip.position);\n const distanceToPinch = 0.02;\n const threshold = 0.005;\n if (hand.inputState.pinching && distance > distanceToPinch + threshold) {\n hand.inputState.pinching = false;\n this.dispatchEvent({\n type: \"pinchend\",\n handedness: inputSource.handedness,\n target: this\n });\n } else if (!hand.inputState.pinching && distance <= distanceToPinch - threshold) {\n hand.inputState.pinching = true;\n this.dispatchEvent({\n type: \"pinchstart\",\n handedness: inputSource.handedness,\n target: this\n });\n }\n } else if (grip !== null && inputSource.gripSpace) {\n gripPose = frame.getPose(inputSource.gripSpace, referenceSpace);\n if (gripPose !== null) {\n grip.matrix.fromArray(gripPose.transform.matrix);\n grip.matrix.decompose(grip.position, grip.rotation, grip.scale);\n grip.matrixWorldNeedsUpdate = true;\n if (gripPose.linearVelocity) {\n grip.hasLinearVelocity = true;\n grip.linearVelocity.copy(gripPose.linearVelocity);\n } else grip.hasLinearVelocity = false;\n if (gripPose.angularVelocity) {\n grip.hasAngularVelocity = true;\n grip.angularVelocity.copy(gripPose.angularVelocity);\n } else grip.hasAngularVelocity = false;\n }\n }\n if (targetRay !== null) {\n inputPose = frame.getPose(inputSource.targetRaySpace, referenceSpace);\n // Some runtimes (namely Vive Cosmos with Vive OpenXR Runtime) have only grip space and ray space is equal to it\n if (inputPose === null && gripPose !== null) inputPose = gripPose;\n if (inputPose !== null) {\n targetRay.matrix.fromArray(inputPose.transform.matrix);\n targetRay.matrix.decompose(targetRay.position, targetRay.rotation, targetRay.scale);\n targetRay.matrixWorldNeedsUpdate = true;\n if (inputPose.linearVelocity) {\n targetRay.hasLinearVelocity = true;\n targetRay.linearVelocity.copy(inputPose.linearVelocity);\n } else targetRay.hasLinearVelocity = false;\n if (inputPose.angularVelocity) {\n targetRay.hasAngularVelocity = true;\n targetRay.angularVelocity.copy(inputPose.angularVelocity);\n } else targetRay.hasAngularVelocity = false;\n this.dispatchEvent($d5b33d7c30034067$var$_moveEvent);\n }\n }\n }\n if (targetRay !== null) targetRay.visible = inputPose !== null;\n if (grip !== null) grip.visible = gripPose !== null;\n if (hand !== null) hand.visible = handPose !== null;\n return this;\n }\n // private method\n _getHandJoint(hand, inputjoint) {\n if (hand.joints[inputjoint.jointName] === undefined) {\n const joint = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n joint.matrixAutoUpdate = false;\n joint.visible = false;\n hand.joints[inputjoint.jointName] = joint;\n hand.add(joint);\n }\n return hand.joints[inputjoint.jointName];\n }\n}\nclass $d5b33d7c30034067$export$fc830aa069cc8c2f extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format){\n format = format !== undefined ? format : $d5b33d7c30034067$export$c1b6b5136be58045;\n if (format !== $d5b33d7c30034067$export$c1b6b5136be58045 && format !== $d5b33d7c30034067$export$1e113ac2d0905829) throw new Error(\"DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat\");\n if (type === undefined && format === $d5b33d7c30034067$export$c1b6b5136be58045) type = $d5b33d7c30034067$export$c3c7fc4518ebba96;\n if (type === undefined && format === $d5b33d7c30034067$export$1e113ac2d0905829) type = $d5b33d7c30034067$export$6c8ea339bfab1301;\n super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n this.isDepthTexture = true;\n this.image = {\n width: width,\n height: height\n };\n this.magFilter = magFilter !== undefined ? magFilter : $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = minFilter !== undefined ? minFilter : $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.flipY = false;\n this.generateMipmaps = false;\n this.compareFunction = null;\n }\n copy(source) {\n super.copy(source);\n this.compareFunction = source.compareFunction;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n if (this.compareFunction !== null) data.compareFunction = this.compareFunction;\n return data;\n }\n}\nclass $d5b33d7c30034067$var$WebXRManager extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(renderer, gl){\n super();\n const scope = this;\n let session = null;\n let framebufferScaleFactor = 1.0;\n let referenceSpace = null;\n let referenceSpaceType = \"local-floor\";\n // Set default foveation to maximum.\n let foveation = 1.0;\n let customReferenceSpace = null;\n let pose = null;\n let glBinding = null;\n let glProjLayer = null;\n let glBaseLayer = null;\n let xrFrame = null;\n const attributes = gl.getContextAttributes();\n let initialRenderTarget = null;\n let newRenderTarget = null;\n const controllers = [];\n const controllerInputSources = [];\n //\n const cameraL = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n cameraL.layers.enable(1);\n cameraL.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const cameraR = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n cameraR.layers.enable(2);\n cameraR.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const cameras = [\n cameraL,\n cameraR\n ];\n const cameraXR = new $d5b33d7c30034067$export$56b937d9e5581166();\n cameraXR.layers.enable(1);\n cameraXR.layers.enable(2);\n let _currentDepthNear = null;\n let _currentDepthFar = null;\n //\n this.cameraAutoUpdate = true;\n this.enabled = false;\n this.isPresenting = false;\n this.getController = function(index) {\n let controller = controllers[index];\n if (controller === undefined) {\n controller = new $d5b33d7c30034067$var$WebXRController();\n controllers[index] = controller;\n }\n return controller.getTargetRaySpace();\n };\n this.getControllerGrip = function(index) {\n let controller = controllers[index];\n if (controller === undefined) {\n controller = new $d5b33d7c30034067$var$WebXRController();\n controllers[index] = controller;\n }\n return controller.getGripSpace();\n };\n this.getHand = function(index) {\n let controller = controllers[index];\n if (controller === undefined) {\n controller = new $d5b33d7c30034067$var$WebXRController();\n controllers[index] = controller;\n }\n return controller.getHandSpace();\n };\n //\n function onSessionEvent(event) {\n const controllerIndex = controllerInputSources.indexOf(event.inputSource);\n if (controllerIndex === -1) return;\n const controller = controllers[controllerIndex];\n if (controller !== undefined) {\n controller.update(event.inputSource, event.frame, customReferenceSpace || referenceSpace);\n controller.dispatchEvent({\n type: event.type,\n data: event.inputSource\n });\n }\n }\n function onSessionEnd() {\n session.removeEventListener(\"select\", onSessionEvent);\n session.removeEventListener(\"selectstart\", onSessionEvent);\n session.removeEventListener(\"selectend\", onSessionEvent);\n session.removeEventListener(\"squeeze\", onSessionEvent);\n session.removeEventListener(\"squeezestart\", onSessionEvent);\n session.removeEventListener(\"squeezeend\", onSessionEvent);\n session.removeEventListener(\"end\", onSessionEnd);\n session.removeEventListener(\"inputsourceschange\", onInputSourcesChange);\n for(let i = 0; i < controllers.length; i++){\n const inputSource = controllerInputSources[i];\n if (inputSource === null) continue;\n controllerInputSources[i] = null;\n controllers[i].disconnect(inputSource);\n }\n _currentDepthNear = null;\n _currentDepthFar = null;\n // restore framebuffer/rendering state\n renderer.setRenderTarget(initialRenderTarget);\n glBaseLayer = null;\n glProjLayer = null;\n glBinding = null;\n session = null;\n newRenderTarget = null;\n //\n animation.stop();\n scope.isPresenting = false;\n scope.dispatchEvent({\n type: \"sessionend\"\n });\n }\n this.setFramebufferScaleFactor = function(value) {\n framebufferScaleFactor = value;\n if (scope.isPresenting === true) console.warn(\"THREE.WebXRManager: Cannot change framebuffer scale while presenting.\");\n };\n this.setReferenceSpaceType = function(value) {\n referenceSpaceType = value;\n if (scope.isPresenting === true) console.warn(\"THREE.WebXRManager: Cannot change reference space type while presenting.\");\n };\n this.getReferenceSpace = function() {\n return customReferenceSpace || referenceSpace;\n };\n this.setReferenceSpace = function(space) {\n customReferenceSpace = space;\n };\n this.getBaseLayer = function() {\n return glProjLayer !== null ? glProjLayer : glBaseLayer;\n };\n this.getBinding = function() {\n return glBinding;\n };\n this.getFrame = function() {\n return xrFrame;\n };\n this.getSession = function() {\n return session;\n };\n this.setSession = async function(value) {\n session = value;\n if (session !== null) {\n initialRenderTarget = renderer.getRenderTarget();\n session.addEventListener(\"select\", onSessionEvent);\n session.addEventListener(\"selectstart\", onSessionEvent);\n session.addEventListener(\"selectend\", onSessionEvent);\n session.addEventListener(\"squeeze\", onSessionEvent);\n session.addEventListener(\"squeezestart\", onSessionEvent);\n session.addEventListener(\"squeezeend\", onSessionEvent);\n session.addEventListener(\"end\", onSessionEnd);\n session.addEventListener(\"inputsourceschange\", onInputSourcesChange);\n if (attributes.xrCompatible !== true) await gl.makeXRCompatible();\n if (session.renderState.layers === undefined || renderer.capabilities.isWebGL2 === false) {\n const layerInit = {\n antialias: session.renderState.layers === undefined ? attributes.antialias : true,\n alpha: true,\n depth: attributes.depth,\n stencil: attributes.stencil,\n framebufferScaleFactor: framebufferScaleFactor\n };\n glBaseLayer = new XRWebGLLayer(session, gl, layerInit);\n session.updateRenderState({\n baseLayer: glBaseLayer\n });\n newRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(glBaseLayer.framebufferWidth, glBaseLayer.framebufferHeight, {\n format: $d5b33d7c30034067$export$3f8bb04b555a363c,\n type: $d5b33d7c30034067$export$2e8ce08d3f6f5e10,\n colorSpace: renderer.outputColorSpace,\n stencilBuffer: attributes.stencil\n });\n } else {\n let depthFormat = null;\n let depthType = null;\n let glDepthFormat = null;\n if (attributes.depth) {\n glDepthFormat = attributes.stencil ? gl.DEPTH24_STENCIL8 : gl.DEPTH_COMPONENT24;\n depthFormat = attributes.stencil ? $d5b33d7c30034067$export$1e113ac2d0905829 : $d5b33d7c30034067$export$c1b6b5136be58045;\n depthType = attributes.stencil ? $d5b33d7c30034067$export$6c8ea339bfab1301 : $d5b33d7c30034067$export$c3c7fc4518ebba96;\n }\n const projectionlayerInit = {\n colorFormat: gl.RGBA8,\n depthFormat: glDepthFormat,\n scaleFactor: framebufferScaleFactor\n };\n glBinding = new XRWebGLBinding(session, gl);\n glProjLayer = glBinding.createProjectionLayer(projectionlayerInit);\n session.updateRenderState({\n layers: [\n glProjLayer\n ]\n });\n newRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(glProjLayer.textureWidth, glProjLayer.textureHeight, {\n format: $d5b33d7c30034067$export$3f8bb04b555a363c,\n type: $d5b33d7c30034067$export$2e8ce08d3f6f5e10,\n depthTexture: new $d5b33d7c30034067$export$fc830aa069cc8c2f(glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat),\n stencilBuffer: attributes.stencil,\n colorSpace: renderer.outputColorSpace,\n samples: attributes.antialias ? 4 : 0\n });\n const renderTargetProperties = renderer.properties.get(newRenderTarget);\n renderTargetProperties.__ignoreDepthValues = glProjLayer.ignoreDepthValues;\n }\n newRenderTarget.isXRRenderTarget = true; // TODO Remove this when possible, see #23278\n this.setFoveation(foveation);\n customReferenceSpace = null;\n referenceSpace = await session.requestReferenceSpace(referenceSpaceType);\n animation.setContext(session);\n animation.start();\n scope.isPresenting = true;\n scope.dispatchEvent({\n type: \"sessionstart\"\n });\n }\n };\n this.getEnvironmentBlendMode = function() {\n if (session !== null) return session.environmentBlendMode;\n };\n function onInputSourcesChange(event) {\n // Notify disconnected\n for(let i = 0; i < event.removed.length; i++){\n const inputSource = event.removed[i];\n const index = controllerInputSources.indexOf(inputSource);\n if (index >= 0) {\n controllerInputSources[index] = null;\n controllers[index].disconnect(inputSource);\n }\n }\n // Notify connected\n for(let i = 0; i < event.added.length; i++){\n const inputSource = event.added[i];\n let controllerIndex = controllerInputSources.indexOf(inputSource);\n if (controllerIndex === -1) {\n // Assign input source a controller that currently has no input source\n for(let i = 0; i < controllers.length; i++){\n if (i >= controllerInputSources.length) {\n controllerInputSources.push(inputSource);\n controllerIndex = i;\n break;\n } else if (controllerInputSources[i] === null) {\n controllerInputSources[i] = inputSource;\n controllerIndex = i;\n break;\n }\n }\n // If all controllers do currently receive input we ignore new ones\n if (controllerIndex === -1) break;\n }\n const controller = controllers[controllerIndex];\n if (controller) controller.connect(inputSource);\n }\n }\n //\n const cameraLPos = new $d5b33d7c30034067$export$64b5c384219d3699();\n const cameraRPos = new $d5b33d7c30034067$export$64b5c384219d3699();\n /**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */ function setProjectionFromUnion(camera, cameraL, cameraR) {\n cameraLPos.setFromMatrixPosition(cameraL.matrixWorld);\n cameraRPos.setFromMatrixPosition(cameraR.matrixWorld);\n const ipd = cameraLPos.distanceTo(cameraRPos);\n const projL = cameraL.projectionMatrix.elements;\n const projR = cameraR.projectionMatrix.elements;\n // VR systems will have identical far and near planes, and\n // most likely identical top and bottom frustum extents.\n // Use the left camera for these values.\n const near = projL[14] / (projL[10] - 1);\n const far = projL[14] / (projL[10] + 1);\n const topFov = (projL[9] + 1) / projL[5];\n const bottomFov = (projL[9] - 1) / projL[5];\n const leftFov = (projL[8] - 1) / projL[0];\n const rightFov = (projR[8] + 1) / projR[0];\n const left = near * leftFov;\n const right = near * rightFov;\n // Calculate the new camera's position offset from the\n // left camera. xOffset should be roughly half `ipd`.\n const zOffset = ipd / (-leftFov + rightFov);\n const xOffset = zOffset * -leftFov;\n // TODO: Better way to apply this offset?\n cameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);\n camera.translateX(xOffset);\n camera.translateZ(zOffset);\n camera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);\n camera.matrixWorldInverse.copy(camera.matrixWorld).invert();\n // Find the union of the frustum values of the cameras and scale\n // the values so that the near plane's position does not change in world space,\n // although must now be relative to the new union camera.\n const near2 = near + zOffset;\n const far2 = far + zOffset;\n const left2 = left - xOffset;\n const right2 = right + (ipd - xOffset);\n const top2 = topFov * far / far2 * near2;\n const bottom2 = bottomFov * far / far2 * near2;\n camera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2);\n camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();\n }\n function updateCamera(camera, parent) {\n if (parent === null) camera.matrixWorld.copy(camera.matrix);\n else camera.matrixWorld.multiplyMatrices(parent.matrixWorld, camera.matrix);\n camera.matrixWorldInverse.copy(camera.matrixWorld).invert();\n }\n this.updateCamera = function(camera) {\n if (session === null) return;\n cameraXR.near = cameraR.near = cameraL.near = camera.near;\n cameraXR.far = cameraR.far = cameraL.far = camera.far;\n if (_currentDepthNear !== cameraXR.near || _currentDepthFar !== cameraXR.far) {\n // Note that the new renderState won't apply until the next frame. See #18320\n session.updateRenderState({\n depthNear: cameraXR.near,\n depthFar: cameraXR.far\n });\n _currentDepthNear = cameraXR.near;\n _currentDepthFar = cameraXR.far;\n }\n const parent = camera.parent;\n const cameras = cameraXR.cameras;\n updateCamera(cameraXR, parent);\n for(let i = 0; i < cameras.length; i++)updateCamera(cameras[i], parent);\n // update projection matrix for proper view frustum culling\n if (cameras.length === 2) setProjectionFromUnion(cameraXR, cameraL, cameraR);\n else // assume single camera setup (AR)\n cameraXR.projectionMatrix.copy(cameraL.projectionMatrix);\n // update user camera and its children\n updateUserCamera(camera, cameraXR, parent);\n };\n function updateUserCamera(camera, cameraXR, parent) {\n if (parent === null) camera.matrix.copy(cameraXR.matrixWorld);\n else {\n camera.matrix.copy(parent.matrixWorld);\n camera.matrix.invert();\n camera.matrix.multiply(cameraXR.matrixWorld);\n }\n camera.matrix.decompose(camera.position, camera.quaternion, camera.scale);\n camera.updateMatrixWorld(true);\n camera.projectionMatrix.copy(cameraXR.projectionMatrix);\n camera.projectionMatrixInverse.copy(cameraXR.projectionMatrixInverse);\n if (camera.isPerspectiveCamera) {\n camera.fov = $d5b33d7c30034067$var$RAD2DEG * 2 * Math.atan(1 / camera.projectionMatrix.elements[5]);\n camera.zoom = 1;\n }\n }\n this.getCamera = function() {\n return cameraXR;\n };\n this.getFoveation = function() {\n if (glProjLayer === null && glBaseLayer === null) return undefined;\n return foveation;\n };\n this.setFoveation = function(value) {\n // 0 = no foveation = full resolution\n // 1 = maximum foveation = the edges render at lower resolution\n foveation = value;\n if (glProjLayer !== null) glProjLayer.fixedFoveation = value;\n if (glBaseLayer !== null && glBaseLayer.fixedFoveation !== undefined) glBaseLayer.fixedFoveation = value;\n };\n // Animation Loop\n let onAnimationFrameCallback = null;\n function onAnimationFrame(time, frame) {\n pose = frame.getViewerPose(customReferenceSpace || referenceSpace);\n xrFrame = frame;\n if (pose !== null) {\n const views = pose.views;\n if (glBaseLayer !== null) {\n renderer.setRenderTargetFramebuffer(newRenderTarget, glBaseLayer.framebuffer);\n renderer.setRenderTarget(newRenderTarget);\n }\n let cameraXRNeedsUpdate = false;\n // check if it's necessary to rebuild cameraXR's camera list\n if (views.length !== cameraXR.cameras.length) {\n cameraXR.cameras.length = 0;\n cameraXRNeedsUpdate = true;\n }\n for(let i = 0; i < views.length; i++){\n const view = views[i];\n let viewport = null;\n if (glBaseLayer !== null) viewport = glBaseLayer.getViewport(view);\n else {\n const glSubImage = glBinding.getViewSubImage(glProjLayer, view);\n viewport = glSubImage.viewport;\n // For side-by-side projection, we only produce a single texture for both eyes.\n if (i === 0) {\n renderer.setRenderTargetTextures(newRenderTarget, glSubImage.colorTexture, glProjLayer.ignoreDepthValues ? undefined : glSubImage.depthStencilTexture);\n renderer.setRenderTarget(newRenderTarget);\n }\n }\n let camera = cameras[i];\n if (camera === undefined) {\n camera = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n camera.layers.enable(i);\n camera.viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n cameras[i] = camera;\n }\n camera.matrix.fromArray(view.transform.matrix);\n camera.matrix.decompose(camera.position, camera.quaternion, camera.scale);\n camera.projectionMatrix.fromArray(view.projectionMatrix);\n camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();\n camera.viewport.set(viewport.x, viewport.y, viewport.width, viewport.height);\n if (i === 0) {\n cameraXR.matrix.copy(camera.matrix);\n cameraXR.matrix.decompose(cameraXR.position, cameraXR.quaternion, cameraXR.scale);\n }\n if (cameraXRNeedsUpdate === true) cameraXR.cameras.push(camera);\n }\n }\n //\n for(let i = 0; i < controllers.length; i++){\n const inputSource = controllerInputSources[i];\n const controller = controllers[i];\n if (inputSource !== null && controller !== undefined) controller.update(inputSource, frame, customReferenceSpace || referenceSpace);\n }\n if (onAnimationFrameCallback) onAnimationFrameCallback(time, frame);\n if (frame.detectedPlanes) scope.dispatchEvent({\n type: \"planesdetected\",\n data: frame\n });\n xrFrame = null;\n }\n const animation = new $d5b33d7c30034067$var$WebGLAnimation();\n animation.setAnimationLoop(onAnimationFrame);\n this.setAnimationLoop = function(callback) {\n onAnimationFrameCallback = callback;\n };\n this.dispose = function() {};\n }\n}\nfunction $d5b33d7c30034067$var$WebGLMaterials(renderer, properties) {\n function refreshTransformUniform(map, uniform) {\n if (map.matrixAutoUpdate === true) map.updateMatrix();\n uniform.value.copy(map.matrix);\n }\n function refreshFogUniforms(uniforms, fog) {\n fog.color.getRGB(uniforms.fogColor.value, $d5b33d7c30034067$var$getUnlitUniformColorSpace(renderer));\n if (fog.isFog) {\n uniforms.fogNear.value = fog.near;\n uniforms.fogFar.value = fog.far;\n } else if (fog.isFogExp2) uniforms.fogDensity.value = fog.density;\n }\n function refreshMaterialUniforms(uniforms, material, pixelRatio, height, transmissionRenderTarget) {\n if (material.isMeshBasicMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isMeshLambertMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isMeshToonMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsToon(uniforms, material);\n } else if (material.isMeshPhongMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsPhong(uniforms, material);\n } else if (material.isMeshStandardMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsStandard(uniforms, material);\n if (material.isMeshPhysicalMaterial) refreshUniformsPhysical(uniforms, material, transmissionRenderTarget);\n } else if (material.isMeshMatcapMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsMatcap(uniforms, material);\n } else if (material.isMeshDepthMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isMeshDistanceMaterial) {\n refreshUniformsCommon(uniforms, material);\n refreshUniformsDistance(uniforms, material);\n } else if (material.isMeshNormalMaterial) refreshUniformsCommon(uniforms, material);\n else if (material.isLineBasicMaterial) {\n refreshUniformsLine(uniforms, material);\n if (material.isLineDashedMaterial) refreshUniformsDash(uniforms, material);\n } else if (material.isPointsMaterial) refreshUniformsPoints(uniforms, material, pixelRatio, height);\n else if (material.isSpriteMaterial) refreshUniformsSprites(uniforms, material);\n else if (material.isShadowMaterial) {\n uniforms.color.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n } else if (material.isShaderMaterial) material.uniformsNeedUpdate = false; // #15581\n }\n function refreshUniformsCommon(uniforms, material) {\n uniforms.opacity.value = material.opacity;\n if (material.color) uniforms.diffuse.value.copy(material.color);\n if (material.emissive) uniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity);\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.mapTransform);\n }\n if (material.alphaMap) {\n uniforms.alphaMap.value = material.alphaMap;\n refreshTransformUniform(material.alphaMap, uniforms.alphaMapTransform);\n }\n if (material.bumpMap) {\n uniforms.bumpMap.value = material.bumpMap;\n refreshTransformUniform(material.bumpMap, uniforms.bumpMapTransform);\n uniforms.bumpScale.value = material.bumpScale;\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) uniforms.bumpScale.value *= -1;\n }\n if (material.normalMap) {\n uniforms.normalMap.value = material.normalMap;\n refreshTransformUniform(material.normalMap, uniforms.normalMapTransform);\n uniforms.normalScale.value.copy(material.normalScale);\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) uniforms.normalScale.value.negate();\n }\n if (material.displacementMap) {\n uniforms.displacementMap.value = material.displacementMap;\n refreshTransformUniform(material.displacementMap, uniforms.displacementMapTransform);\n uniforms.displacementScale.value = material.displacementScale;\n uniforms.displacementBias.value = material.displacementBias;\n }\n if (material.emissiveMap) {\n uniforms.emissiveMap.value = material.emissiveMap;\n refreshTransformUniform(material.emissiveMap, uniforms.emissiveMapTransform);\n }\n if (material.specularMap) {\n uniforms.specularMap.value = material.specularMap;\n refreshTransformUniform(material.specularMap, uniforms.specularMapTransform);\n }\n if (material.alphaTest > 0) uniforms.alphaTest.value = material.alphaTest;\n const envMap = properties.get(material).envMap;\n if (envMap) {\n uniforms.envMap.value = envMap;\n uniforms.flipEnvMap.value = envMap.isCubeTexture && envMap.isRenderTargetTexture === false ? -1 : 1;\n uniforms.reflectivity.value = material.reflectivity;\n uniforms.ior.value = material.ior;\n uniforms.refractionRatio.value = material.refractionRatio;\n }\n if (material.lightMap) {\n uniforms.lightMap.value = material.lightMap;\n // artist-friendly light intensity scaling factor\n const scaleFactor = renderer._useLegacyLights === true ? Math.PI : 1;\n uniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor;\n refreshTransformUniform(material.lightMap, uniforms.lightMapTransform);\n }\n if (material.aoMap) {\n uniforms.aoMap.value = material.aoMap;\n uniforms.aoMapIntensity.value = material.aoMapIntensity;\n refreshTransformUniform(material.aoMap, uniforms.aoMapTransform);\n }\n }\n function refreshUniformsLine(uniforms, material) {\n uniforms.diffuse.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.mapTransform);\n }\n }\n function refreshUniformsDash(uniforms, material) {\n uniforms.dashSize.value = material.dashSize;\n uniforms.totalSize.value = material.dashSize + material.gapSize;\n uniforms.scale.value = material.scale;\n }\n function refreshUniformsPoints(uniforms, material, pixelRatio, height) {\n uniforms.diffuse.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n uniforms.size.value = material.size * pixelRatio;\n uniforms.scale.value = height * 0.5;\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.uvTransform);\n }\n if (material.alphaMap) {\n uniforms.alphaMap.value = material.alphaMap;\n refreshTransformUniform(material.alphaMap, uniforms.alphaMapTransform);\n }\n if (material.alphaTest > 0) uniforms.alphaTest.value = material.alphaTest;\n }\n function refreshUniformsSprites(uniforms, material) {\n uniforms.diffuse.value.copy(material.color);\n uniforms.opacity.value = material.opacity;\n uniforms.rotation.value = material.rotation;\n if (material.map) {\n uniforms.map.value = material.map;\n refreshTransformUniform(material.map, uniforms.mapTransform);\n }\n if (material.alphaMap) {\n uniforms.alphaMap.value = material.alphaMap;\n refreshTransformUniform(material.alphaMap, uniforms.alphaMapTransform);\n }\n if (material.alphaTest > 0) uniforms.alphaTest.value = material.alphaTest;\n }\n function refreshUniformsPhong(uniforms, material) {\n uniforms.specular.value.copy(material.specular);\n uniforms.shininess.value = Math.max(material.shininess, 1e-4); // to prevent pow( 0.0, 0.0 )\n }\n function refreshUniformsToon(uniforms, material) {\n if (material.gradientMap) uniforms.gradientMap.value = material.gradientMap;\n }\n function refreshUniformsStandard(uniforms, material) {\n uniforms.metalness.value = material.metalness;\n if (material.metalnessMap) {\n uniforms.metalnessMap.value = material.metalnessMap;\n refreshTransformUniform(material.metalnessMap, uniforms.metalnessMapTransform);\n }\n uniforms.roughness.value = material.roughness;\n if (material.roughnessMap) {\n uniforms.roughnessMap.value = material.roughnessMap;\n refreshTransformUniform(material.roughnessMap, uniforms.roughnessMapTransform);\n }\n const envMap = properties.get(material).envMap;\n if (envMap) //uniforms.envMap.value = material.envMap; // part of uniforms common\n uniforms.envMapIntensity.value = material.envMapIntensity;\n }\n function refreshUniformsPhysical(uniforms, material, transmissionRenderTarget) {\n uniforms.ior.value = material.ior; // also part of uniforms common\n if (material.sheen > 0) {\n uniforms.sheenColor.value.copy(material.sheenColor).multiplyScalar(material.sheen);\n uniforms.sheenRoughness.value = material.sheenRoughness;\n if (material.sheenColorMap) {\n uniforms.sheenColorMap.value = material.sheenColorMap;\n refreshTransformUniform(material.sheenColorMap, uniforms.sheenColorMapTransform);\n }\n if (material.sheenRoughnessMap) {\n uniforms.sheenRoughnessMap.value = material.sheenRoughnessMap;\n refreshTransformUniform(material.sheenRoughnessMap, uniforms.sheenRoughnessMapTransform);\n }\n }\n if (material.clearcoat > 0) {\n uniforms.clearcoat.value = material.clearcoat;\n uniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n if (material.clearcoatMap) {\n uniforms.clearcoatMap.value = material.clearcoatMap;\n refreshTransformUniform(material.clearcoatMap, uniforms.clearcoatMapTransform);\n }\n if (material.clearcoatRoughnessMap) {\n uniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n refreshTransformUniform(material.clearcoatRoughnessMap, uniforms.clearcoatRoughnessMapTransform);\n }\n if (material.clearcoatNormalMap) {\n uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n refreshTransformUniform(material.clearcoatNormalMap, uniforms.clearcoatNormalMapTransform);\n uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);\n if (material.side === $d5b33d7c30034067$export$d9f0486e75b5ace) uniforms.clearcoatNormalScale.value.negate();\n }\n }\n if (material.iridescence > 0) {\n uniforms.iridescence.value = material.iridescence;\n uniforms.iridescenceIOR.value = material.iridescenceIOR;\n uniforms.iridescenceThicknessMinimum.value = material.iridescenceThicknessRange[0];\n uniforms.iridescenceThicknessMaximum.value = material.iridescenceThicknessRange[1];\n if (material.iridescenceMap) {\n uniforms.iridescenceMap.value = material.iridescenceMap;\n refreshTransformUniform(material.iridescenceMap, uniforms.iridescenceMapTransform);\n }\n if (material.iridescenceThicknessMap) {\n uniforms.iridescenceThicknessMap.value = material.iridescenceThicknessMap;\n refreshTransformUniform(material.iridescenceThicknessMap, uniforms.iridescenceThicknessMapTransform);\n }\n }\n if (material.transmission > 0) {\n uniforms.transmission.value = material.transmission;\n uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;\n uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width, transmissionRenderTarget.height);\n if (material.transmissionMap) {\n uniforms.transmissionMap.value = material.transmissionMap;\n refreshTransformUniform(material.transmissionMap, uniforms.transmissionMapTransform);\n }\n uniforms.thickness.value = material.thickness;\n if (material.thicknessMap) {\n uniforms.thicknessMap.value = material.thicknessMap;\n refreshTransformUniform(material.thicknessMap, uniforms.thicknessMapTransform);\n }\n uniforms.attenuationDistance.value = material.attenuationDistance;\n uniforms.attenuationColor.value.copy(material.attenuationColor);\n }\n if (material.anisotropy > 0) {\n uniforms.anisotropyVector.value.set(material.anisotropy * Math.cos(material.anisotropyRotation), material.anisotropy * Math.sin(material.anisotropyRotation));\n if (material.anisotropyMap) {\n uniforms.anisotropyMap.value = material.anisotropyMap;\n refreshTransformUniform(material.anisotropyMap, uniforms.anisotropyMapTransform);\n }\n }\n uniforms.specularIntensity.value = material.specularIntensity;\n uniforms.specularColor.value.copy(material.specularColor);\n if (material.specularColorMap) {\n uniforms.specularColorMap.value = material.specularColorMap;\n refreshTransformUniform(material.specularColorMap, uniforms.specularColorMapTransform);\n }\n if (material.specularIntensityMap) {\n uniforms.specularIntensityMap.value = material.specularIntensityMap;\n refreshTransformUniform(material.specularIntensityMap, uniforms.specularIntensityMapTransform);\n }\n }\n function refreshUniformsMatcap(uniforms, material) {\n if (material.matcap) uniforms.matcap.value = material.matcap;\n }\n function refreshUniformsDistance(uniforms, material) {\n const light = properties.get(material).light;\n uniforms.referencePosition.value.setFromMatrixPosition(light.matrixWorld);\n uniforms.nearDistance.value = light.shadow.camera.near;\n uniforms.farDistance.value = light.shadow.camera.far;\n }\n return {\n refreshFogUniforms: refreshFogUniforms,\n refreshMaterialUniforms: refreshMaterialUniforms\n };\n}\nfunction $d5b33d7c30034067$var$WebGLUniformsGroups(gl, info, capabilities, state) {\n let buffers = {};\n let updateList = {};\n let allocatedBindingPoints = [];\n const maxBindingPoints = capabilities.isWebGL2 ? gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS) : 0; // binding points are global whereas block indices are per shader program\n function bind(uniformsGroup, program) {\n const webglProgram = program.program;\n state.uniformBlockBinding(uniformsGroup, webglProgram);\n }\n function update(uniformsGroup, program) {\n let buffer = buffers[uniformsGroup.id];\n if (buffer === undefined) {\n prepareUniformsGroup(uniformsGroup);\n buffer = createBuffer(uniformsGroup);\n buffers[uniformsGroup.id] = buffer;\n uniformsGroup.addEventListener(\"dispose\", onUniformsGroupsDispose);\n }\n // ensure to update the binding points/block indices mapping for this program\n const webglProgram = program.program;\n state.updateUBOMapping(uniformsGroup, webglProgram);\n // update UBO once per frame\n const frame = info.render.frame;\n if (updateList[uniformsGroup.id] !== frame) {\n updateBufferData(uniformsGroup);\n updateList[uniformsGroup.id] = frame;\n }\n }\n function createBuffer(uniformsGroup) {\n // the setup of an UBO is independent of a particular shader program but global\n const bindingPointIndex = allocateBindingPointIndex();\n uniformsGroup.__bindingPointIndex = bindingPointIndex;\n const buffer = gl.createBuffer();\n const size = uniformsGroup.__size;\n const usage = uniformsGroup.usage;\n gl.bindBuffer(gl.UNIFORM_BUFFER, buffer);\n gl.bufferData(gl.UNIFORM_BUFFER, size, usage);\n gl.bindBuffer(gl.UNIFORM_BUFFER, null);\n gl.bindBufferBase(gl.UNIFORM_BUFFER, bindingPointIndex, buffer);\n return buffer;\n }\n function allocateBindingPointIndex() {\n for(let i = 0; i < maxBindingPoints; i++)if (allocatedBindingPoints.indexOf(i) === -1) {\n allocatedBindingPoints.push(i);\n return i;\n }\n console.error(\"THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.\");\n return 0;\n }\n function updateBufferData(uniformsGroup) {\n const buffer = buffers[uniformsGroup.id];\n const uniforms = uniformsGroup.uniforms;\n const cache = uniformsGroup.__cache;\n gl.bindBuffer(gl.UNIFORM_BUFFER, buffer);\n for(let i = 0, il = uniforms.length; i < il; i++){\n const uniform = uniforms[i];\n // partly update the buffer if necessary\n if (hasUniformChanged(uniform, i, cache) === true) {\n const offset = uniform.__offset;\n const values = Array.isArray(uniform.value) ? uniform.value : [\n uniform.value\n ];\n let arrayOffset = 0;\n for(let i = 0; i < values.length; i++){\n const value = values[i];\n const info = getUniformSize(value);\n if (typeof value === \"number\") {\n uniform.__data[0] = value;\n gl.bufferSubData(gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data);\n } else if (value.isMatrix3) {\n // manually converting 3x3 to 3x4\n uniform.__data[0] = value.elements[0];\n uniform.__data[1] = value.elements[1];\n uniform.__data[2] = value.elements[2];\n uniform.__data[3] = value.elements[0];\n uniform.__data[4] = value.elements[3];\n uniform.__data[5] = value.elements[4];\n uniform.__data[6] = value.elements[5];\n uniform.__data[7] = value.elements[0];\n uniform.__data[8] = value.elements[6];\n uniform.__data[9] = value.elements[7];\n uniform.__data[10] = value.elements[8];\n uniform.__data[11] = value.elements[0];\n } else {\n value.toArray(uniform.__data, arrayOffset);\n arrayOffset += info.storage / Float32Array.BYTES_PER_ELEMENT;\n }\n }\n gl.bufferSubData(gl.UNIFORM_BUFFER, offset, uniform.__data);\n }\n }\n gl.bindBuffer(gl.UNIFORM_BUFFER, null);\n }\n function hasUniformChanged(uniform, index, cache) {\n const value = uniform.value;\n if (cache[index] === undefined) {\n // cache entry does not exist so far\n if (typeof value === \"number\") cache[index] = value;\n else {\n const values = Array.isArray(value) ? value : [\n value\n ];\n const tempValues = [];\n for(let i = 0; i < values.length; i++)tempValues.push(values[i].clone());\n cache[index] = tempValues;\n }\n return true;\n } else {\n // compare current value with cached entry\n if (typeof value === \"number\") {\n if (cache[index] !== value) {\n cache[index] = value;\n return true;\n }\n } else {\n const cachedObjects = Array.isArray(cache[index]) ? cache[index] : [\n cache[index]\n ];\n const values = Array.isArray(value) ? value : [\n value\n ];\n for(let i = 0; i < cachedObjects.length; i++){\n const cachedObject = cachedObjects[i];\n if (cachedObject.equals(values[i]) === false) {\n cachedObject.copy(values[i]);\n return true;\n }\n }\n }\n }\n return false;\n }\n function prepareUniformsGroup(uniformsGroup) {\n // determine total buffer size according to the STD140 layout\n // Hint: STD140 is the only supported layout in WebGL 2\n const uniforms = uniformsGroup.uniforms;\n let offset = 0; // global buffer offset in bytes\n const chunkSize = 16; // size of a chunk in bytes\n let chunkOffset = 0; // offset within a single chunk in bytes\n for(let i = 0, l = uniforms.length; i < l; i++){\n const uniform = uniforms[i];\n const infos = {\n boundary: 0,\n storage: 0 // bytes\n };\n const values = Array.isArray(uniform.value) ? uniform.value : [\n uniform.value\n ];\n for(let j = 0, jl = values.length; j < jl; j++){\n const value = values[j];\n const info = getUniformSize(value);\n infos.boundary += info.boundary;\n infos.storage += info.storage;\n }\n // the following two properties will be used for partial buffer updates\n uniform.__data = new Float32Array(infos.storage / Float32Array.BYTES_PER_ELEMENT);\n uniform.__offset = offset;\n //\n if (i > 0) {\n chunkOffset = offset % chunkSize;\n const remainingSizeInChunk = chunkSize - chunkOffset;\n // check for chunk overflow\n if (chunkOffset !== 0 && remainingSizeInChunk - infos.boundary < 0) {\n // add padding and adjust offset\n offset += chunkSize - chunkOffset;\n uniform.__offset = offset;\n }\n }\n offset += infos.storage;\n }\n // ensure correct final padding\n chunkOffset = offset % chunkSize;\n if (chunkOffset > 0) offset += chunkSize - chunkOffset;\n //\n uniformsGroup.__size = offset;\n uniformsGroup.__cache = {};\n return this;\n }\n function getUniformSize(value) {\n const info = {\n boundary: 0,\n storage: 0 // bytes\n };\n // determine sizes according to STD140\n if (typeof value === \"number\") {\n // float/int\n info.boundary = 4;\n info.storage = 4;\n } else if (value.isVector2) {\n // vec2\n info.boundary = 8;\n info.storage = 8;\n } else if (value.isVector3 || value.isColor) {\n // vec3\n info.boundary = 16;\n info.storage = 12; // evil: vec3 must start on a 16-byte boundary but it only consumes 12 bytes\n } else if (value.isVector4) {\n // vec4\n info.boundary = 16;\n info.storage = 16;\n } else if (value.isMatrix3) {\n // mat3 (in STD140 a 3x3 matrix is represented as 3x4)\n info.boundary = 48;\n info.storage = 48;\n } else if (value.isMatrix4) {\n // mat4\n info.boundary = 64;\n info.storage = 64;\n } else if (value.isTexture) console.warn(\"THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.\");\n else console.warn(\"THREE.WebGLRenderer: Unsupported uniform value type.\", value);\n return info;\n }\n function onUniformsGroupsDispose(event) {\n const uniformsGroup = event.target;\n uniformsGroup.removeEventListener(\"dispose\", onUniformsGroupsDispose);\n const index = allocatedBindingPoints.indexOf(uniformsGroup.__bindingPointIndex);\n allocatedBindingPoints.splice(index, 1);\n gl.deleteBuffer(buffers[uniformsGroup.id]);\n delete buffers[uniformsGroup.id];\n delete updateList[uniformsGroup.id];\n }\n function dispose() {\n for(const id in buffers)gl.deleteBuffer(buffers[id]);\n allocatedBindingPoints = [];\n buffers = {};\n updateList = {};\n }\n return {\n bind: bind,\n update: update,\n dispose: dispose\n };\n}\nclass $d5b33d7c30034067$export$f6cc00ef28d7cf97 {\n constructor(parameters = {}){\n const { canvas: canvas = $d5b33d7c30034067$export$1033a2df66368859(), context: context = null, depth: depth = true, stencil: stencil = true, alpha: alpha = false, antialias: antialias = false, premultipliedAlpha: premultipliedAlpha = true, preserveDrawingBuffer: preserveDrawingBuffer = false, powerPreference: powerPreference = \"default\", failIfMajorPerformanceCaveat: failIfMajorPerformanceCaveat = false } = parameters;\n this.isWebGLRenderer = true;\n let _alpha;\n if (context !== null) _alpha = context.getContextAttributes().alpha;\n else _alpha = alpha;\n const uintClearColor = new Uint32Array(4);\n const intClearColor = new Int32Array(4);\n let currentRenderList = null;\n let currentRenderState = null;\n // render() can be called from within a callback triggered by another render.\n // We track this so that the nested render call gets its list and state isolated from the parent render call.\n const renderListStack = [];\n const renderStateStack = [];\n // public properties\n this.domElement = canvas;\n // Debug configuration container\n this.debug = {\n /**\n\t\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t\t * @type {boolean}\n\t\t\t */ checkShaderErrors: true,\n /**\n\t\t\t * Callback for custom error reporting.\n\t\t\t * @type {?Function}\n\t\t\t */ onShaderError: null\n };\n // clearing\n this.autoClear = true;\n this.autoClearColor = true;\n this.autoClearDepth = true;\n this.autoClearStencil = true;\n // scene graph\n this.sortObjects = true;\n // user-defined clipping\n this.clippingPlanes = [];\n this.localClippingEnabled = false;\n // physically based shading\n this._outputColorSpace = $d5b33d7c30034067$export$561f394b24edfcaa;\n // physical lights\n this._useLegacyLights = false;\n // tone mapping\n this.toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n this.toneMappingExposure = 1.0;\n // internal properties\n const _this = this;\n let _isContextLost = false;\n // internal state cache\n let _currentActiveCubeFace = 0;\n let _currentActiveMipmapLevel = 0;\n let _currentRenderTarget = null;\n let _currentMaterialId = -1;\n let _currentCamera = null;\n const _currentViewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const _currentScissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n let _currentScissorTest = null;\n const _currentClearColor = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n let _currentClearAlpha = 0;\n //\n let _width = canvas.width;\n let _height = canvas.height;\n let _pixelRatio = 1;\n let _opaqueSort = null;\n let _transparentSort = null;\n const _viewport = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, _width, _height);\n const _scissor = new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, _width, _height);\n let _scissorTest = false;\n // frustum\n const _frustum = new $d5b33d7c30034067$export$35efe6f4c85463d2();\n // clipping\n let _clippingEnabled = false;\n let _localClippingEnabled = false;\n // transmission\n let _transmissionRenderTarget = null;\n // camera matrices cache\n const _projScreenMatrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n const _vector2 = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const _vector3 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const _emptyScene = {\n background: null,\n fog: null,\n environment: null,\n overrideMaterial: null,\n isScene: true\n };\n function getTargetPixelRatio() {\n return _currentRenderTarget === null ? _pixelRatio : 1;\n }\n // initialize\n let _gl = context;\n function getContext(contextNames, contextAttributes) {\n for(let i = 0; i < contextNames.length; i++){\n const contextName = contextNames[i];\n const context = canvas.getContext(contextName, contextAttributes);\n if (context !== null) return context;\n }\n return null;\n }\n try {\n const contextAttributes = {\n alpha: true,\n depth: depth,\n stencil: stencil,\n antialias: antialias,\n premultipliedAlpha: premultipliedAlpha,\n preserveDrawingBuffer: preserveDrawingBuffer,\n powerPreference: powerPreference,\n failIfMajorPerformanceCaveat: failIfMajorPerformanceCaveat\n };\n // OffscreenCanvas does not have setAttribute, see #22811\n if (\"setAttribute\" in canvas) canvas.setAttribute(\"data-engine\", `three.js r${$d5b33d7c30034067$export$3545e07a80636437}`);\n // event listeners must be registered before WebGL context is created, see #12753\n canvas.addEventListener(\"webglcontextlost\", onContextLost, false);\n canvas.addEventListener(\"webglcontextrestored\", onContextRestore, false);\n canvas.addEventListener(\"webglcontextcreationerror\", onContextCreationError, false);\n if (_gl === null) {\n const contextNames = [\n \"webgl2\",\n \"webgl\",\n \"experimental-webgl\"\n ];\n if (_this.isWebGL1Renderer === true) contextNames.shift();\n _gl = getContext(contextNames, contextAttributes);\n if (_gl === null) {\n if (getContext(contextNames)) throw new Error(\"Error creating WebGL context with your selected attributes.\");\n else throw new Error(\"Error creating WebGL context.\");\n }\n }\n if (typeof WebGLRenderingContext !== \"undefined\" && _gl instanceof WebGLRenderingContext) console.warn(\"THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163.\");\n // Some experimental-webgl implementations do not have getShaderPrecisionFormat\n if (_gl.getShaderPrecisionFormat === undefined) _gl.getShaderPrecisionFormat = function() {\n return {\n \"rangeMin\": 1,\n \"rangeMax\": 1,\n \"precision\": 1\n };\n };\n } catch (error) {\n console.error(\"THREE.WebGLRenderer: \" + error.message);\n throw error;\n }\n let extensions, capabilities, state, info;\n let properties, textures, cubemaps, cubeuvmaps, attributes, geometries, objects;\n let programCache, materials, renderLists, renderStates, clipping, shadowMap;\n let background, morphtargets, bufferRenderer, indexedBufferRenderer;\n let utils, bindingStates, uniformsGroups;\n function initGLContext() {\n extensions = new $d5b33d7c30034067$var$WebGLExtensions(_gl);\n capabilities = new $d5b33d7c30034067$var$WebGLCapabilities(_gl, extensions, parameters);\n extensions.init(capabilities);\n utils = new $d5b33d7c30034067$export$ddaebcad857649a8(_gl, extensions, capabilities);\n state = new $d5b33d7c30034067$var$WebGLState(_gl, extensions, capabilities);\n info = new $d5b33d7c30034067$var$WebGLInfo(_gl);\n properties = new $d5b33d7c30034067$var$WebGLProperties();\n textures = new $d5b33d7c30034067$var$WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info);\n cubemaps = new $d5b33d7c30034067$var$WebGLCubeMaps(_this);\n cubeuvmaps = new $d5b33d7c30034067$var$WebGLCubeUVMaps(_this);\n attributes = new $d5b33d7c30034067$var$WebGLAttributes(_gl, capabilities);\n bindingStates = new $d5b33d7c30034067$var$WebGLBindingStates(_gl, extensions, attributes, capabilities);\n geometries = new $d5b33d7c30034067$var$WebGLGeometries(_gl, attributes, info, bindingStates);\n objects = new $d5b33d7c30034067$var$WebGLObjects(_gl, geometries, attributes, info);\n morphtargets = new $d5b33d7c30034067$var$WebGLMorphtargets(_gl, capabilities, textures);\n clipping = new $d5b33d7c30034067$var$WebGLClipping(properties);\n programCache = new $d5b33d7c30034067$var$WebGLPrograms(_this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping);\n materials = new $d5b33d7c30034067$var$WebGLMaterials(_this, properties);\n renderLists = new $d5b33d7c30034067$var$WebGLRenderLists();\n renderStates = new $d5b33d7c30034067$var$WebGLRenderStates(extensions, capabilities);\n background = new $d5b33d7c30034067$var$WebGLBackground(_this, cubemaps, cubeuvmaps, state, objects, _alpha, premultipliedAlpha);\n shadowMap = new $d5b33d7c30034067$var$WebGLShadowMap(_this, objects, capabilities);\n uniformsGroups = new $d5b33d7c30034067$var$WebGLUniformsGroups(_gl, info, capabilities, state);\n bufferRenderer = new $d5b33d7c30034067$var$WebGLBufferRenderer(_gl, extensions, info, capabilities);\n indexedBufferRenderer = new $d5b33d7c30034067$var$WebGLIndexedBufferRenderer(_gl, extensions, info, capabilities);\n info.programs = programCache.programs;\n _this.capabilities = capabilities;\n _this.extensions = extensions;\n _this.properties = properties;\n _this.renderLists = renderLists;\n _this.shadowMap = shadowMap;\n _this.state = state;\n _this.info = info;\n }\n initGLContext();\n // xr\n const xr = new $d5b33d7c30034067$var$WebXRManager(_this, _gl);\n this.xr = xr;\n // API\n this.getContext = function() {\n return _gl;\n };\n this.getContextAttributes = function() {\n return _gl.getContextAttributes();\n };\n this.forceContextLoss = function() {\n const extension = extensions.get(\"WEBGL_lose_context\");\n if (extension) extension.loseContext();\n };\n this.forceContextRestore = function() {\n const extension = extensions.get(\"WEBGL_lose_context\");\n if (extension) extension.restoreContext();\n };\n this.getPixelRatio = function() {\n return _pixelRatio;\n };\n this.setPixelRatio = function(value) {\n if (value === undefined) return;\n _pixelRatio = value;\n this.setSize(_width, _height, false);\n };\n this.getSize = function(target) {\n return target.set(_width, _height);\n };\n this.setSize = function(width, height, updateStyle = true) {\n if (xr.isPresenting) {\n console.warn(\"THREE.WebGLRenderer: Can't change size while VR device is presenting.\");\n return;\n }\n _width = width;\n _height = height;\n canvas.width = Math.floor(width * _pixelRatio);\n canvas.height = Math.floor(height * _pixelRatio);\n if (updateStyle === true) {\n canvas.style.width = width + \"px\";\n canvas.style.height = height + \"px\";\n }\n this.setViewport(0, 0, width, height);\n };\n this.getDrawingBufferSize = function(target) {\n return target.set(_width * _pixelRatio, _height * _pixelRatio).floor();\n };\n this.setDrawingBufferSize = function(width, height, pixelRatio) {\n _width = width;\n _height = height;\n _pixelRatio = pixelRatio;\n canvas.width = Math.floor(width * pixelRatio);\n canvas.height = Math.floor(height * pixelRatio);\n this.setViewport(0, 0, width, height);\n };\n this.getCurrentViewport = function(target) {\n return target.copy(_currentViewport);\n };\n this.getViewport = function(target) {\n return target.copy(_viewport);\n };\n this.setViewport = function(x, y, width, height) {\n if (x.isVector4) _viewport.set(x.x, x.y, x.z, x.w);\n else _viewport.set(x, y, width, height);\n state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor());\n };\n this.getScissor = function(target) {\n return target.copy(_scissor);\n };\n this.setScissor = function(x, y, width, height) {\n if (x.isVector4) _scissor.set(x.x, x.y, x.z, x.w);\n else _scissor.set(x, y, width, height);\n state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());\n };\n this.getScissorTest = function() {\n return _scissorTest;\n };\n this.setScissorTest = function(boolean) {\n state.setScissorTest(_scissorTest = boolean);\n };\n this.setOpaqueSort = function(method) {\n _opaqueSort = method;\n };\n this.setTransparentSort = function(method) {\n _transparentSort = method;\n };\n // Clearing\n this.getClearColor = function(target) {\n return target.copy(background.getClearColor());\n };\n this.setClearColor = function() {\n background.setClearColor.apply(background, arguments);\n };\n this.getClearAlpha = function() {\n return background.getClearAlpha();\n };\n this.setClearAlpha = function() {\n background.setClearAlpha.apply(background, arguments);\n };\n this.clear = function(color = true, depth = true, stencil = true) {\n let bits = 0;\n if (color) {\n // check if we're trying to clear an integer target\n let isIntegerFormat = false;\n if (_currentRenderTarget !== null) {\n const targetFormat = _currentRenderTarget.texture.format;\n isIntegerFormat = targetFormat === $d5b33d7c30034067$export$c200e7d26f592f21 || targetFormat === $d5b33d7c30034067$export$1ba1c45f9f77d4d7 || targetFormat === $d5b33d7c30034067$export$aa92e870a709d190;\n }\n // use the appropriate clear functions to clear the target if it's a signed\n // or unsigned integer target\n if (isIntegerFormat) {\n const targetType = _currentRenderTarget.texture.type;\n const isUnsignedType = targetType === $d5b33d7c30034067$export$2e8ce08d3f6f5e10 || targetType === $d5b33d7c30034067$export$c3c7fc4518ebba96 || targetType === $d5b33d7c30034067$export$c63dc51868b06a9d || targetType === $d5b33d7c30034067$export$6c8ea339bfab1301 || targetType === $d5b33d7c30034067$export$b3969b01faf587f2 || targetType === $d5b33d7c30034067$export$18886f8ae33e90de;\n const clearColor = background.getClearColor();\n const a = background.getClearAlpha();\n const r = clearColor.r;\n const g = clearColor.g;\n const b = clearColor.b;\n if (isUnsignedType) {\n uintClearColor[0] = r;\n uintClearColor[1] = g;\n uintClearColor[2] = b;\n uintClearColor[3] = a;\n _gl.clearBufferuiv(_gl.COLOR, 0, uintClearColor);\n } else {\n intClearColor[0] = r;\n intClearColor[1] = g;\n intClearColor[2] = b;\n intClearColor[3] = a;\n _gl.clearBufferiv(_gl.COLOR, 0, intClearColor);\n }\n } else bits |= _gl.COLOR_BUFFER_BIT;\n }\n if (depth) bits |= _gl.DEPTH_BUFFER_BIT;\n if (stencil) {\n bits |= _gl.STENCIL_BUFFER_BIT;\n this.state.buffers.stencil.setMask(0xffffffff);\n }\n _gl.clear(bits);\n };\n this.clearColor = function() {\n this.clear(true, false, false);\n };\n this.clearDepth = function() {\n this.clear(false, true, false);\n };\n this.clearStencil = function() {\n this.clear(false, false, true);\n };\n //\n this.dispose = function() {\n canvas.removeEventListener(\"webglcontextlost\", onContextLost, false);\n canvas.removeEventListener(\"webglcontextrestored\", onContextRestore, false);\n canvas.removeEventListener(\"webglcontextcreationerror\", onContextCreationError, false);\n renderLists.dispose();\n renderStates.dispose();\n properties.dispose();\n cubemaps.dispose();\n cubeuvmaps.dispose();\n objects.dispose();\n bindingStates.dispose();\n uniformsGroups.dispose();\n programCache.dispose();\n xr.dispose();\n xr.removeEventListener(\"sessionstart\", onXRSessionStart);\n xr.removeEventListener(\"sessionend\", onXRSessionEnd);\n if (_transmissionRenderTarget) {\n _transmissionRenderTarget.dispose();\n _transmissionRenderTarget = null;\n }\n animation.stop();\n };\n // Events\n function onContextLost(event) {\n event.preventDefault();\n console.log(\"THREE.WebGLRenderer: Context Lost.\");\n _isContextLost = true;\n }\n function onContextRestore() {\n console.log(\"THREE.WebGLRenderer: Context Restored.\");\n _isContextLost = false;\n const infoAutoReset = info.autoReset;\n const shadowMapEnabled = shadowMap.enabled;\n const shadowMapAutoUpdate = shadowMap.autoUpdate;\n const shadowMapNeedsUpdate = shadowMap.needsUpdate;\n const shadowMapType = shadowMap.type;\n initGLContext();\n info.autoReset = infoAutoReset;\n shadowMap.enabled = shadowMapEnabled;\n shadowMap.autoUpdate = shadowMapAutoUpdate;\n shadowMap.needsUpdate = shadowMapNeedsUpdate;\n shadowMap.type = shadowMapType;\n }\n function onContextCreationError(event) {\n console.error(\"THREE.WebGLRenderer: A WebGL context could not be created. Reason: \", event.statusMessage);\n }\n function onMaterialDispose(event) {\n const material = event.target;\n material.removeEventListener(\"dispose\", onMaterialDispose);\n deallocateMaterial(material);\n }\n // Buffer deallocation\n function deallocateMaterial(material) {\n releaseMaterialProgramReferences(material);\n properties.remove(material);\n }\n function releaseMaterialProgramReferences(material) {\n const programs = properties.get(material).programs;\n if (programs !== undefined) {\n programs.forEach(function(program) {\n programCache.releaseProgram(program);\n });\n if (material.isShaderMaterial) programCache.releaseShaderCache(material);\n }\n }\n // Buffer rendering\n this.renderBufferDirect = function(camera, scene, geometry, material, object, group) {\n if (scene === null) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n const frontFaceCW = object.isMesh && object.matrixWorld.determinant() < 0;\n const program = setProgram(camera, scene, geometry, material, object);\n state.setMaterial(material, frontFaceCW);\n //\n let index = geometry.index;\n let rangeFactor = 1;\n if (material.wireframe === true) {\n index = geometries.getWireframeAttribute(geometry);\n if (index === undefined) return;\n rangeFactor = 2;\n }\n //\n const drawRange = geometry.drawRange;\n const position = geometry.attributes.position;\n let drawStart = drawRange.start * rangeFactor;\n let drawEnd = (drawRange.start + drawRange.count) * rangeFactor;\n if (group !== null) {\n drawStart = Math.max(drawStart, group.start * rangeFactor);\n drawEnd = Math.min(drawEnd, (group.start + group.count) * rangeFactor);\n }\n if (index !== null) {\n drawStart = Math.max(drawStart, 0);\n drawEnd = Math.min(drawEnd, index.count);\n } else if (position !== undefined && position !== null) {\n drawStart = Math.max(drawStart, 0);\n drawEnd = Math.min(drawEnd, position.count);\n }\n const drawCount = drawEnd - drawStart;\n if (drawCount < 0 || drawCount === Infinity) return;\n //\n bindingStates.setup(object, material, program, geometry, index);\n let attribute;\n let renderer = bufferRenderer;\n if (index !== null) {\n attribute = attributes.get(index);\n renderer = indexedBufferRenderer;\n renderer.setIndex(attribute);\n }\n //\n if (object.isMesh) {\n if (material.wireframe === true) {\n state.setLineWidth(material.wireframeLinewidth * getTargetPixelRatio());\n renderer.setMode(_gl.LINES);\n } else renderer.setMode(_gl.TRIANGLES);\n } else if (object.isLine) {\n let lineWidth = material.linewidth;\n if (lineWidth === undefined) lineWidth = 1; // Not using Line*Material\n state.setLineWidth(lineWidth * getTargetPixelRatio());\n if (object.isLineSegments) renderer.setMode(_gl.LINES);\n else if (object.isLineLoop) renderer.setMode(_gl.LINE_LOOP);\n else renderer.setMode(_gl.LINE_STRIP);\n } else if (object.isPoints) renderer.setMode(_gl.POINTS);\n else if (object.isSprite) renderer.setMode(_gl.TRIANGLES);\n if (object.isInstancedMesh) renderer.renderInstances(drawStart, drawCount, object.count);\n else if (geometry.isInstancedBufferGeometry) {\n const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;\n const instanceCount = Math.min(geometry.instanceCount, maxInstanceCount);\n renderer.renderInstances(drawStart, drawCount, instanceCount);\n } else renderer.render(drawStart, drawCount);\n };\n // Compile\n function prepareMaterial(material, scene, object) {\n if (material.transparent === true && material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 && material.forceSinglePass === false) {\n material.side = $d5b33d7c30034067$export$d9f0486e75b5ace;\n material.needsUpdate = true;\n getProgram(material, scene, object);\n material.side = $d5b33d7c30034067$export$2ede184fc2998901;\n material.needsUpdate = true;\n getProgram(material, scene, object);\n material.side = $d5b33d7c30034067$export$3b296b6f144d5b03;\n } else getProgram(material, scene, object);\n }\n this.compile = function(scene, camera, targetScene = null) {\n if (targetScene === null) targetScene = scene;\n currentRenderState = renderStates.get(targetScene);\n currentRenderState.init();\n renderStateStack.push(currentRenderState);\n // gather lights from both the target scene and the new object that will be added to the scene.\n targetScene.traverseVisible(function(object) {\n if (object.isLight && object.layers.test(camera.layers)) {\n currentRenderState.pushLight(object);\n if (object.castShadow) currentRenderState.pushShadow(object);\n }\n });\n if (scene !== targetScene) scene.traverseVisible(function(object) {\n if (object.isLight && object.layers.test(camera.layers)) {\n currentRenderState.pushLight(object);\n if (object.castShadow) currentRenderState.pushShadow(object);\n }\n });\n currentRenderState.setupLights(_this._useLegacyLights);\n // Only initialize materials in the new scene, not the targetScene.\n const materials = new Set();\n scene.traverse(function(object) {\n const material = object.material;\n if (material) {\n if (Array.isArray(material)) for(let i = 0; i < material.length; i++){\n const material2 = material[i];\n prepareMaterial(material2, targetScene, object);\n materials.add(material2);\n }\n else {\n prepareMaterial(material, targetScene, object);\n materials.add(material);\n }\n }\n });\n renderStateStack.pop();\n currentRenderState = null;\n return materials;\n };\n // compileAsync\n this.compileAsync = function(scene, camera, targetScene = null) {\n const materials = this.compile(scene, camera, targetScene);\n // Wait for all the materials in the new object to indicate that they're\n // ready to be used before resolving the promise.\n return new Promise((resolve)=>{\n function checkMaterialsReady() {\n materials.forEach(function(material) {\n const materialProperties = properties.get(material);\n const program = materialProperties.currentProgram;\n if (program.isReady()) // remove any programs that report they're ready to use from the list\n materials.delete(material);\n });\n // once the list of compiling materials is empty, call the callback\n if (materials.size === 0) {\n resolve(scene);\n return;\n }\n // if some materials are still not ready, wait a bit and check again\n setTimeout(checkMaterialsReady, 10);\n }\n if (extensions.get(\"KHR_parallel_shader_compile\") !== null) // If we can check the compilation status of the materials without\n // blocking then do so right away.\n checkMaterialsReady();\n else // Otherwise start by waiting a bit to give the materials we just\n // initialized a chance to finish.\n setTimeout(checkMaterialsReady, 10);\n });\n };\n // Animation Loop\n let onAnimationFrameCallback = null;\n function onAnimationFrame(time) {\n if (onAnimationFrameCallback) onAnimationFrameCallback(time);\n }\n function onXRSessionStart() {\n animation.stop();\n }\n function onXRSessionEnd() {\n animation.start();\n }\n const animation = new $d5b33d7c30034067$var$WebGLAnimation();\n animation.setAnimationLoop(onAnimationFrame);\n if (typeof self !== \"undefined\") animation.setContext(self);\n this.setAnimationLoop = function(callback) {\n onAnimationFrameCallback = callback;\n xr.setAnimationLoop(callback);\n callback === null ? animation.stop() : animation.start();\n };\n xr.addEventListener(\"sessionstart\", onXRSessionStart);\n xr.addEventListener(\"sessionend\", onXRSessionEnd);\n // Rendering\n this.render = function(scene, camera) {\n if (camera !== undefined && camera.isCamera !== true) {\n console.error(\"THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.\");\n return;\n }\n if (_isContextLost === true) return;\n // update scene graph\n if (scene.matrixWorldAutoUpdate === true) scene.updateMatrixWorld();\n // update camera matrices and frustum\n if (camera.parent === null && camera.matrixWorldAutoUpdate === true) camera.updateMatrixWorld();\n if (xr.enabled === true && xr.isPresenting === true) {\n if (xr.cameraAutoUpdate === true) xr.updateCamera(camera);\n camera = xr.getCamera(); // use XR camera for rendering\n }\n //\n if (scene.isScene === true) scene.onBeforeRender(_this, scene, camera, _currentRenderTarget);\n currentRenderState = renderStates.get(scene, renderStateStack.length);\n currentRenderState.init();\n renderStateStack.push(currentRenderState);\n _projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n _frustum.setFromProjectionMatrix(_projScreenMatrix);\n _localClippingEnabled = this.localClippingEnabled;\n _clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled);\n currentRenderList = renderLists.get(scene, renderListStack.length);\n currentRenderList.init();\n renderListStack.push(currentRenderList);\n projectObject(scene, camera, 0, _this.sortObjects);\n currentRenderList.finish();\n if (_this.sortObjects === true) currentRenderList.sort(_opaqueSort, _transparentSort);\n //\n this.info.render.frame++;\n if (_clippingEnabled === true) clipping.beginShadows();\n const shadowsArray = currentRenderState.state.shadowsArray;\n shadowMap.render(shadowsArray, scene, camera);\n if (_clippingEnabled === true) clipping.endShadows();\n //\n if (this.info.autoReset === true) this.info.reset();\n //\n background.render(currentRenderList, scene);\n // render scene\n currentRenderState.setupLights(_this._useLegacyLights);\n if (camera.isArrayCamera) {\n const cameras = camera.cameras;\n for(let i = 0, l = cameras.length; i < l; i++){\n const camera2 = cameras[i];\n renderScene(currentRenderList, scene, camera2, camera2.viewport);\n }\n } else renderScene(currentRenderList, scene, camera);\n //\n if (_currentRenderTarget !== null) {\n // resolve multisample renderbuffers to a single-sample texture if necessary\n textures.updateMultisampleRenderTarget(_currentRenderTarget);\n // Generate mipmap if we're using any kind of mipmap filtering\n textures.updateRenderTargetMipmap(_currentRenderTarget);\n }\n //\n if (scene.isScene === true) scene.onAfterRender(_this, scene, camera);\n // _gl.finish();\n bindingStates.resetDefaultState();\n _currentMaterialId = -1;\n _currentCamera = null;\n renderStateStack.pop();\n if (renderStateStack.length > 0) currentRenderState = renderStateStack[renderStateStack.length - 1];\n else currentRenderState = null;\n renderListStack.pop();\n if (renderListStack.length > 0) currentRenderList = renderListStack[renderListStack.length - 1];\n else currentRenderList = null;\n };\n function projectObject(object, camera, groupOrder, sortObjects) {\n if (object.visible === false) return;\n const visible = object.layers.test(camera.layers);\n if (visible) {\n if (object.isGroup) groupOrder = object.renderOrder;\n else if (object.isLOD) {\n if (object.autoUpdate === true) object.update(camera);\n } else if (object.isLight) {\n currentRenderState.pushLight(object);\n if (object.castShadow) currentRenderState.pushShadow(object);\n } else if (object.isSprite) {\n if (!object.frustumCulled || _frustum.intersectsSprite(object)) {\n if (sortObjects) _vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n const geometry = objects.update(object);\n const material = object.material;\n if (material.visible) currentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null);\n }\n } else if (object.isMesh || object.isLine || object.isPoints) {\n if (!object.frustumCulled || _frustum.intersectsObject(object)) {\n const geometry = objects.update(object);\n const material = object.material;\n if (sortObjects) {\n if (object.boundingSphere !== undefined) {\n if (object.boundingSphere === null) object.computeBoundingSphere();\n _vector3.copy(object.boundingSphere.center);\n } else {\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n _vector3.copy(geometry.boundingSphere.center);\n }\n _vector3.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n }\n if (Array.isArray(material)) {\n const groups = geometry.groups;\n for(let i = 0, l = groups.length; i < l; i++){\n const group = groups[i];\n const groupMaterial = material[group.materialIndex];\n if (groupMaterial && groupMaterial.visible) currentRenderList.push(object, geometry, groupMaterial, groupOrder, _vector3.z, group);\n }\n } else if (material.visible) currentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null);\n }\n }\n }\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)projectObject(children[i], camera, groupOrder, sortObjects);\n }\n function renderScene(currentRenderList, scene, camera, viewport) {\n const opaqueObjects = currentRenderList.opaque;\n const transmissiveObjects = currentRenderList.transmissive;\n const transparentObjects = currentRenderList.transparent;\n currentRenderState.setupLightsView(camera);\n if (_clippingEnabled === true) clipping.setGlobalState(_this.clippingPlanes, camera);\n if (transmissiveObjects.length > 0) renderTransmissionPass(opaqueObjects, transmissiveObjects, scene, camera);\n if (viewport) state.viewport(_currentViewport.copy(viewport));\n if (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera);\n if (transmissiveObjects.length > 0) renderObjects(transmissiveObjects, scene, camera);\n if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera);\n // Ensure depth buffer writing is enabled so it can be cleared on next render\n state.buffers.depth.setTest(true);\n state.buffers.depth.setMask(true);\n state.buffers.color.setMask(true);\n state.setPolygonOffset(false);\n }\n function renderTransmissionPass(opaqueObjects, transmissiveObjects, scene, camera) {\n const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n if (overrideMaterial !== null) return;\n const isWebGL2 = capabilities.isWebGL2;\n if (_transmissionRenderTarget === null) _transmissionRenderTarget = new $d5b33d7c30034067$export$3c052beb2e51e23f(1, 1, {\n generateMipmaps: true,\n type: extensions.has(\"EXT_color_buffer_half_float\") ? $d5b33d7c30034067$export$2697304443f382bc : $d5b33d7c30034067$export$2e8ce08d3f6f5e10,\n minFilter: $d5b33d7c30034067$export$5d8599b6a933fb1b,\n samples: isWebGL2 ? 4 : 0\n });\n _this.getDrawingBufferSize(_vector2);\n if (isWebGL2) _transmissionRenderTarget.setSize(_vector2.x, _vector2.y);\n else _transmissionRenderTarget.setSize($d5b33d7c30034067$var$floorPowerOfTwo(_vector2.x), $d5b33d7c30034067$var$floorPowerOfTwo(_vector2.y));\n //\n const currentRenderTarget = _this.getRenderTarget();\n _this.setRenderTarget(_transmissionRenderTarget);\n _this.getClearColor(_currentClearColor);\n _currentClearAlpha = _this.getClearAlpha();\n if (_currentClearAlpha < 1) _this.setClearColor(0xffffff, 0.5);\n _this.clear();\n // Turn off the features which can affect the frag color for opaque objects pass.\n // Otherwise they are applied twice in opaque objects pass and transmission objects pass.\n const currentToneMapping = _this.toneMapping;\n _this.toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n renderObjects(opaqueObjects, scene, camera);\n textures.updateMultisampleRenderTarget(_transmissionRenderTarget);\n textures.updateRenderTargetMipmap(_transmissionRenderTarget);\n let renderTargetNeedsUpdate = false;\n for(let i = 0, l = transmissiveObjects.length; i < l; i++){\n const renderItem = transmissiveObjects[i];\n const object = renderItem.object;\n const geometry = renderItem.geometry;\n const material = renderItem.material;\n const group = renderItem.group;\n if (material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 && object.layers.test(camera.layers)) {\n const currentSide = material.side;\n material.side = $d5b33d7c30034067$export$d9f0486e75b5ace;\n material.needsUpdate = true;\n renderObject(object, scene, camera, geometry, material, group);\n material.side = currentSide;\n material.needsUpdate = true;\n renderTargetNeedsUpdate = true;\n }\n }\n if (renderTargetNeedsUpdate === true) {\n textures.updateMultisampleRenderTarget(_transmissionRenderTarget);\n textures.updateRenderTargetMipmap(_transmissionRenderTarget);\n }\n _this.setRenderTarget(currentRenderTarget);\n _this.setClearColor(_currentClearColor, _currentClearAlpha);\n _this.toneMapping = currentToneMapping;\n }\n function renderObjects(renderList, scene, camera) {\n const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n for(let i = 0, l = renderList.length; i < l; i++){\n const renderItem = renderList[i];\n const object = renderItem.object;\n const geometry = renderItem.geometry;\n const material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n const group = renderItem.group;\n if (object.layers.test(camera.layers)) renderObject(object, scene, camera, geometry, material, group);\n }\n }\n function renderObject(object, scene, camera, geometry, material, group) {\n object.onBeforeRender(_this, scene, camera, geometry, material, group);\n object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld);\n object.normalMatrix.getNormalMatrix(object.modelViewMatrix);\n material.onBeforeRender(_this, scene, camera, geometry, object, group);\n if (material.transparent === true && material.side === $d5b33d7c30034067$export$3b296b6f144d5b03 && material.forceSinglePass === false) {\n material.side = $d5b33d7c30034067$export$d9f0486e75b5ace;\n material.needsUpdate = true;\n _this.renderBufferDirect(camera, scene, geometry, material, object, group);\n material.side = $d5b33d7c30034067$export$2ede184fc2998901;\n material.needsUpdate = true;\n _this.renderBufferDirect(camera, scene, geometry, material, object, group);\n material.side = $d5b33d7c30034067$export$3b296b6f144d5b03;\n } else _this.renderBufferDirect(camera, scene, geometry, material, object, group);\n object.onAfterRender(_this, scene, camera, geometry, material, group);\n }\n function getProgram(material, scene, object) {\n if (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n const materialProperties = properties.get(material);\n const lights = currentRenderState.state.lights;\n const shadowsArray = currentRenderState.state.shadowsArray;\n const lightsStateVersion = lights.state.version;\n const parameters = programCache.getParameters(material, lights.state, shadowsArray, scene, object);\n const programCacheKey = programCache.getProgramCacheKey(parameters);\n let programs = materialProperties.programs;\n // always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change\n materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n materialProperties.fog = scene.fog;\n materialProperties.envMap = (material.isMeshStandardMaterial ? cubeuvmaps : cubemaps).get(material.envMap || materialProperties.environment);\n if (programs === undefined) {\n // new material\n material.addEventListener(\"dispose\", onMaterialDispose);\n programs = new Map();\n materialProperties.programs = programs;\n }\n let program = programs.get(programCacheKey);\n if (program !== undefined) // early out if program and light state is identical\n {\n if (materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion) {\n updateCommonMaterialProperties(material, parameters);\n return program;\n }\n } else {\n parameters.uniforms = programCache.getUniforms(material);\n material.onBuild(object, parameters, _this);\n material.onBeforeCompile(parameters, _this);\n program = programCache.acquireProgram(parameters, programCacheKey);\n programs.set(programCacheKey, program);\n materialProperties.uniforms = parameters.uniforms;\n }\n const uniforms = materialProperties.uniforms;\n if (!material.isShaderMaterial && !material.isRawShaderMaterial || material.clipping === true) uniforms.clippingPlanes = clipping.uniform;\n updateCommonMaterialProperties(material, parameters);\n // store the light setup it was created for\n materialProperties.needsLights = materialNeedsLights(material);\n materialProperties.lightsStateVersion = lightsStateVersion;\n if (materialProperties.needsLights) {\n // wire up the material to this renderer's lighting state\n uniforms.ambientLightColor.value = lights.state.ambient;\n uniforms.lightProbe.value = lights.state.probe;\n uniforms.directionalLights.value = lights.state.directional;\n uniforms.directionalLightShadows.value = lights.state.directionalShadow;\n uniforms.spotLights.value = lights.state.spot;\n uniforms.spotLightShadows.value = lights.state.spotShadow;\n uniforms.rectAreaLights.value = lights.state.rectArea;\n uniforms.ltc_1.value = lights.state.rectAreaLTC1;\n uniforms.ltc_2.value = lights.state.rectAreaLTC2;\n uniforms.pointLights.value = lights.state.point;\n uniforms.pointLightShadows.value = lights.state.pointShadow;\n uniforms.hemisphereLights.value = lights.state.hemi;\n uniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n uniforms.spotShadowMap.value = lights.state.spotShadowMap;\n uniforms.spotLightMatrix.value = lights.state.spotLightMatrix;\n uniforms.spotLightMap.value = lights.state.spotLightMap;\n uniforms.pointShadowMap.value = lights.state.pointShadowMap;\n uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;\n // TODO (abelnation): add area lights shadow info to uniforms\n }\n materialProperties.currentProgram = program;\n materialProperties.uniformsList = null;\n return program;\n }\n function getUniformList(materialProperties) {\n if (materialProperties.uniformsList === null) {\n const progUniforms = materialProperties.currentProgram.getUniforms();\n materialProperties.uniformsList = $d5b33d7c30034067$var$WebGLUniforms.seqWithValue(progUniforms.seq, materialProperties.uniforms);\n }\n return materialProperties.uniformsList;\n }\n function updateCommonMaterialProperties(material, parameters) {\n const materialProperties = properties.get(material);\n materialProperties.outputColorSpace = parameters.outputColorSpace;\n materialProperties.instancing = parameters.instancing;\n materialProperties.instancingColor = parameters.instancingColor;\n materialProperties.skinning = parameters.skinning;\n materialProperties.morphTargets = parameters.morphTargets;\n materialProperties.morphNormals = parameters.morphNormals;\n materialProperties.morphColors = parameters.morphColors;\n materialProperties.morphTargetsCount = parameters.morphTargetsCount;\n materialProperties.numClippingPlanes = parameters.numClippingPlanes;\n materialProperties.numIntersection = parameters.numClipIntersection;\n materialProperties.vertexAlphas = parameters.vertexAlphas;\n materialProperties.vertexTangents = parameters.vertexTangents;\n materialProperties.toneMapping = parameters.toneMapping;\n }\n function setProgram(camera, scene, geometry, material, object) {\n if (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n textures.resetTextureUnits();\n const fog = scene.fog;\n const environment = material.isMeshStandardMaterial ? scene.environment : null;\n const colorSpace1 = _currentRenderTarget === null ? _this.outputColorSpace : _currentRenderTarget.isXRRenderTarget === true ? _currentRenderTarget.texture.colorSpace : $d5b33d7c30034067$export$42429b3acfb233a4;\n const envMap = (material.isMeshStandardMaterial ? cubeuvmaps : cubemaps).get(material.envMap || environment);\n const vertexAlphas = material.vertexColors === true && !!geometry.attributes.color && geometry.attributes.color.itemSize === 4;\n const vertexTangents = !!geometry.attributes.tangent && (!!material.normalMap || material.anisotropy > 0);\n const morphTargets = !!geometry.morphAttributes.position;\n const morphNormals = !!geometry.morphAttributes.normal;\n const morphColors = !!geometry.morphAttributes.color;\n let toneMapping = $d5b33d7c30034067$export$9fcb6b4294603b2;\n if (material.toneMapped) {\n if (_currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true) toneMapping = _this.toneMapping;\n }\n const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n const morphTargetsCount = morphAttribute !== undefined ? morphAttribute.length : 0;\n const materialProperties = properties.get(material);\n const lights = currentRenderState.state.lights;\n if (_clippingEnabled === true) {\n if (_localClippingEnabled === true || camera !== _currentCamera) {\n const useCache = camera === _currentCamera && material.id === _currentMaterialId;\n // we might want to call this function with some ClippingGroup\n // object instead of the material, once it becomes feasible\n // (#8465, #8379)\n clipping.setState(material, camera, useCache);\n }\n }\n //\n let needsProgramChange = false;\n if (material.version === materialProperties.__version) {\n if (materialProperties.needsLights && materialProperties.lightsStateVersion !== lights.state.version) needsProgramChange = true;\n else if (materialProperties.outputColorSpace !== colorSpace1) needsProgramChange = true;\n else if (object.isInstancedMesh && materialProperties.instancing === false) needsProgramChange = true;\n else if (!object.isInstancedMesh && materialProperties.instancing === true) needsProgramChange = true;\n else if (object.isSkinnedMesh && materialProperties.skinning === false) needsProgramChange = true;\n else if (!object.isSkinnedMesh && materialProperties.skinning === true) needsProgramChange = true;\n else if (object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null) needsProgramChange = true;\n else if (object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null) needsProgramChange = true;\n else if (materialProperties.envMap !== envMap) needsProgramChange = true;\n else if (material.fog === true && materialProperties.fog !== fog) needsProgramChange = true;\n else if (materialProperties.numClippingPlanes !== undefined && (materialProperties.numClippingPlanes !== clipping.numPlanes || materialProperties.numIntersection !== clipping.numIntersection)) needsProgramChange = true;\n else if (materialProperties.vertexAlphas !== vertexAlphas) needsProgramChange = true;\n else if (materialProperties.vertexTangents !== vertexTangents) needsProgramChange = true;\n else if (materialProperties.morphTargets !== morphTargets) needsProgramChange = true;\n else if (materialProperties.morphNormals !== morphNormals) needsProgramChange = true;\n else if (materialProperties.morphColors !== morphColors) needsProgramChange = true;\n else if (materialProperties.toneMapping !== toneMapping) needsProgramChange = true;\n else if (capabilities.isWebGL2 === true && materialProperties.morphTargetsCount !== morphTargetsCount) needsProgramChange = true;\n } else {\n needsProgramChange = true;\n materialProperties.__version = material.version;\n }\n //\n let program = materialProperties.currentProgram;\n if (needsProgramChange === true) program = getProgram(material, scene, object);\n let refreshProgram = false;\n let refreshMaterial = false;\n let refreshLights = false;\n const p_uniforms = program.getUniforms(), m_uniforms = materialProperties.uniforms;\n if (state.useProgram(program.program)) {\n refreshProgram = true;\n refreshMaterial = true;\n refreshLights = true;\n }\n if (material.id !== _currentMaterialId) {\n _currentMaterialId = material.id;\n refreshMaterial = true;\n }\n if (refreshProgram || _currentCamera !== camera) {\n // common camera uniforms\n p_uniforms.setValue(_gl, \"projectionMatrix\", camera.projectionMatrix);\n p_uniforms.setValue(_gl, \"viewMatrix\", camera.matrixWorldInverse);\n const uCamPos = p_uniforms.map.cameraPosition;\n if (uCamPos !== undefined) uCamPos.setValue(_gl, _vector3.setFromMatrixPosition(camera.matrixWorld));\n if (capabilities.logarithmicDepthBuffer) p_uniforms.setValue(_gl, \"logDepthBufFC\", 2.0 / (Math.log(camera.far + 1.0) / Math.LN2));\n // consider moving isOrthographic to UniformLib and WebGLMaterials, see https://github.com/mrdoob/three.js/pull/26467#issuecomment-1645185067\n if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial) p_uniforms.setValue(_gl, \"isOrthographic\", camera.isOrthographicCamera === true);\n if (_currentCamera !== camera) {\n _currentCamera = camera;\n // lighting uniforms depend on the camera so enforce an update\n // now, in case this material supports lights - or later, when\n // the next material that does gets activated:\n refreshMaterial = true; // set to true on material change\n refreshLights = true; // remains set until update done\n }\n }\n // skinning and morph target uniforms must be set even if material didn't change\n // auto-setting of texture unit for bone and morph texture must go before other textures\n // otherwise textures used for skinning and morphing can take over texture units reserved for other material textures\n if (object.isSkinnedMesh) {\n p_uniforms.setOptional(_gl, object, \"bindMatrix\");\n p_uniforms.setOptional(_gl, object, \"bindMatrixInverse\");\n const skeleton = object.skeleton;\n if (skeleton) {\n if (capabilities.floatVertexTextures) {\n if (skeleton.boneTexture === null) skeleton.computeBoneTexture();\n p_uniforms.setValue(_gl, \"boneTexture\", skeleton.boneTexture, textures);\n p_uniforms.setValue(_gl, \"boneTextureSize\", skeleton.boneTextureSize);\n } else console.warn(\"THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.\");\n }\n }\n const morphAttributes = geometry.morphAttributes;\n if (morphAttributes.position !== undefined || morphAttributes.normal !== undefined || morphAttributes.color !== undefined && capabilities.isWebGL2 === true) morphtargets.update(object, geometry, program);\n if (refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow) {\n materialProperties.receiveShadow = object.receiveShadow;\n p_uniforms.setValue(_gl, \"receiveShadow\", object.receiveShadow);\n }\n // https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512\n if (material.isMeshGouraudMaterial && material.envMap !== null) {\n m_uniforms.envMap.value = envMap;\n m_uniforms.flipEnvMap.value = envMap.isCubeTexture && envMap.isRenderTargetTexture === false ? -1 : 1;\n }\n if (refreshMaterial) {\n p_uniforms.setValue(_gl, \"toneMappingExposure\", _this.toneMappingExposure);\n if (materialProperties.needsLights) // the current material requires lighting info\n // note: all lighting uniforms are always set correctly\n // they simply reference the renderer's state for their\n // values\n //\n // use the current material's .needsUpdate flags to set\n // the GL state when required\n markUniformsLightsNeedsUpdate(m_uniforms, refreshLights);\n // refresh uniforms common to several materials\n if (fog && material.fog === true) materials.refreshFogUniforms(m_uniforms, fog);\n materials.refreshMaterialUniforms(m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget);\n $d5b33d7c30034067$var$WebGLUniforms.upload(_gl, getUniformList(materialProperties), m_uniforms, textures);\n }\n if (material.isShaderMaterial && material.uniformsNeedUpdate === true) {\n $d5b33d7c30034067$var$WebGLUniforms.upload(_gl, getUniformList(materialProperties), m_uniforms, textures);\n material.uniformsNeedUpdate = false;\n }\n if (material.isSpriteMaterial) p_uniforms.setValue(_gl, \"center\", object.center);\n // common matrices\n p_uniforms.setValue(_gl, \"modelViewMatrix\", object.modelViewMatrix);\n p_uniforms.setValue(_gl, \"normalMatrix\", object.normalMatrix);\n p_uniforms.setValue(_gl, \"modelMatrix\", object.matrixWorld);\n // UBOs\n if (material.isShaderMaterial || material.isRawShaderMaterial) {\n const groups = material.uniformsGroups;\n for(let i = 0, l = groups.length; i < l; i++)if (capabilities.isWebGL2) {\n const group = groups[i];\n uniformsGroups.update(group, program);\n uniformsGroups.bind(group, program);\n } else console.warn(\"THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.\");\n }\n return program;\n }\n // If uniforms are marked as clean, they don't need to be loaded to the GPU.\n function markUniformsLightsNeedsUpdate(uniforms, value) {\n uniforms.ambientLightColor.needsUpdate = value;\n uniforms.lightProbe.needsUpdate = value;\n uniforms.directionalLights.needsUpdate = value;\n uniforms.directionalLightShadows.needsUpdate = value;\n uniforms.pointLights.needsUpdate = value;\n uniforms.pointLightShadows.needsUpdate = value;\n uniforms.spotLights.needsUpdate = value;\n uniforms.spotLightShadows.needsUpdate = value;\n uniforms.rectAreaLights.needsUpdate = value;\n uniforms.hemisphereLights.needsUpdate = value;\n }\n function materialNeedsLights(material) {\n return material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || material.isMeshStandardMaterial || material.isShadowMaterial || material.isShaderMaterial && material.lights === true;\n }\n this.getActiveCubeFace = function() {\n return _currentActiveCubeFace;\n };\n this.getActiveMipmapLevel = function() {\n return _currentActiveMipmapLevel;\n };\n this.getRenderTarget = function() {\n return _currentRenderTarget;\n };\n this.setRenderTargetTextures = function(renderTarget, colorTexture, depthTexture) {\n properties.get(renderTarget.texture).__webglTexture = colorTexture;\n properties.get(renderTarget.depthTexture).__webglTexture = depthTexture;\n const renderTargetProperties = properties.get(renderTarget);\n renderTargetProperties.__hasExternalTextures = true;\n if (renderTargetProperties.__hasExternalTextures) {\n renderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined;\n if (!renderTargetProperties.__autoAllocateDepthBuffer) // The multisample_render_to_texture extension doesn't work properly if there\n // are midframe flushes and an external depth buffer. Disable use of the extension.\n {\n if (extensions.has(\"WEBGL_multisampled_render_to_texture\") === true) {\n console.warn(\"THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided\");\n renderTargetProperties.__useRenderToTexture = false;\n }\n }\n }\n };\n this.setRenderTargetFramebuffer = function(renderTarget, defaultFramebuffer) {\n const renderTargetProperties = properties.get(renderTarget);\n renderTargetProperties.__webglFramebuffer = defaultFramebuffer;\n renderTargetProperties.__useDefaultFramebuffer = defaultFramebuffer === undefined;\n };\n this.setRenderTarget = function(renderTarget, activeCubeFace = 0, activeMipmapLevel = 0) {\n _currentRenderTarget = renderTarget;\n _currentActiveCubeFace = activeCubeFace;\n _currentActiveMipmapLevel = activeMipmapLevel;\n let useDefaultFramebuffer = true;\n let framebuffer = null;\n let isCube = false;\n let isRenderTarget3D = false;\n if (renderTarget) {\n const renderTargetProperties = properties.get(renderTarget);\n if (renderTargetProperties.__useDefaultFramebuffer !== undefined) {\n // We need to make sure to rebind the framebuffer.\n state.bindFramebuffer(_gl.FRAMEBUFFER, null);\n useDefaultFramebuffer = false;\n } else if (renderTargetProperties.__webglFramebuffer === undefined) textures.setupRenderTarget(renderTarget);\n else if (renderTargetProperties.__hasExternalTextures) // Color and depth texture must be rebound in order for the swapchain to update.\n textures.rebindTextures(renderTarget, properties.get(renderTarget.texture).__webglTexture, properties.get(renderTarget.depthTexture).__webglTexture);\n const texture = renderTarget.texture;\n if (texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture) isRenderTarget3D = true;\n const __webglFramebuffer = properties.get(renderTarget).__webglFramebuffer;\n if (renderTarget.isWebGLCubeRenderTarget) {\n if (Array.isArray(__webglFramebuffer[activeCubeFace])) framebuffer = __webglFramebuffer[activeCubeFace][activeMipmapLevel];\n else framebuffer = __webglFramebuffer[activeCubeFace];\n isCube = true;\n } else if (capabilities.isWebGL2 && renderTarget.samples > 0 && textures.useMultisampledRTT(renderTarget) === false) framebuffer = properties.get(renderTarget).__webglMultisampledFramebuffer;\n else if (Array.isArray(__webglFramebuffer)) framebuffer = __webglFramebuffer[activeMipmapLevel];\n else framebuffer = __webglFramebuffer;\n _currentViewport.copy(renderTarget.viewport);\n _currentScissor.copy(renderTarget.scissor);\n _currentScissorTest = renderTarget.scissorTest;\n } else {\n _currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor();\n _currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor();\n _currentScissorTest = _scissorTest;\n }\n const framebufferBound = state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n if (framebufferBound && capabilities.drawBuffers && useDefaultFramebuffer) state.drawBuffers(renderTarget, framebuffer);\n state.viewport(_currentViewport);\n state.scissor(_currentScissor);\n state.setScissorTest(_currentScissorTest);\n if (isCube) {\n const textureProperties = properties.get(renderTarget.texture);\n _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel);\n } else if (isRenderTarget3D) {\n const textureProperties = properties.get(renderTarget.texture);\n const layer = activeCubeFace || 0;\n _gl.framebufferTextureLayer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer);\n }\n _currentMaterialId = -1; // reset current material to ensure correct uniform bindings\n };\n this.readRenderTargetPixels = function(renderTarget, x, y, width, height, buffer, activeCubeFaceIndex) {\n if (!(renderTarget && renderTarget.isWebGLRenderTarget)) {\n console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.\");\n return;\n }\n let framebuffer = properties.get(renderTarget).__webglFramebuffer;\n if (renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined) framebuffer = framebuffer[activeCubeFaceIndex];\n if (framebuffer) {\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n try {\n const texture = renderTarget.texture;\n const textureFormat = texture.format;\n const textureType = texture.type;\n if (textureFormat !== $d5b33d7c30034067$export$3f8bb04b555a363c && utils.convert(textureFormat) !== _gl.getParameter(_gl.IMPLEMENTATION_COLOR_READ_FORMAT)) {\n console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.\");\n return;\n }\n const halfFloatSupportedByExt = textureType === $d5b33d7c30034067$export$2697304443f382bc && (extensions.has(\"EXT_color_buffer_half_float\") || capabilities.isWebGL2 && extensions.has(\"EXT_color_buffer_float\"));\n if (textureType !== $d5b33d7c30034067$export$2e8ce08d3f6f5e10 && utils.convert(textureType) !== _gl.getParameter(_gl.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)\n !(textureType === $d5b33d7c30034067$export$f6d331659b644596 && (capabilities.isWebGL2 || extensions.has(\"OES_texture_float\") || extensions.has(\"WEBGL_color_buffer_float\"))) && // Chrome Mac >= 52 and Firefox\n !halfFloatSupportedByExt) {\n console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.\");\n return;\n }\n // the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n if (x >= 0 && x <= renderTarget.width - width && y >= 0 && y <= renderTarget.height - height) _gl.readPixels(x, y, width, height, utils.convert(textureFormat), utils.convert(textureType), buffer);\n } finally{\n // restore framebuffer of current render target if necessary\n const framebuffer = _currentRenderTarget !== null ? properties.get(_currentRenderTarget).__webglFramebuffer : null;\n state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);\n }\n }\n };\n this.copyFramebufferToTexture = function(position, texture, level = 0) {\n const levelScale = Math.pow(2, -level);\n const width = Math.floor(texture.image.width * levelScale);\n const height = Math.floor(texture.image.height * levelScale);\n textures.setTexture2D(texture, 0);\n _gl.copyTexSubImage2D(_gl.TEXTURE_2D, level, 0, 0, position.x, position.y, width, height);\n state.unbindTexture();\n };\n this.copyTextureToTexture = function(position, srcTexture, dstTexture, level = 0) {\n const width = srcTexture.image.width;\n const height = srcTexture.image.height;\n const glFormat = utils.convert(dstTexture.format);\n const glType = utils.convert(dstTexture.type);\n textures.setTexture2D(dstTexture, 0);\n // As another texture upload may have changed pixelStorei\n // parameters, make sure they are correct for the dstTexture\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment);\n if (srcTexture.isDataTexture) _gl.texSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data);\n else if (srcTexture.isCompressedTexture) _gl.compressedTexSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[0].width, srcTexture.mipmaps[0].height, glFormat, srcTexture.mipmaps[0].data);\n else _gl.texSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image);\n // Generate mipmaps only when copying level 0\n if (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(_gl.TEXTURE_2D);\n state.unbindTexture();\n };\n this.copyTextureToTexture3D = function(sourceBox, position, srcTexture, dstTexture, level = 0) {\n if (_this.isWebGL1Renderer) {\n console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.\");\n return;\n }\n const width = sourceBox.max.x - sourceBox.min.x + 1;\n const height = sourceBox.max.y - sourceBox.min.y + 1;\n const depth = sourceBox.max.z - sourceBox.min.z + 1;\n const glFormat = utils.convert(dstTexture.format);\n const glType = utils.convert(dstTexture.type);\n let glTarget;\n if (dstTexture.isData3DTexture) {\n textures.setTexture3D(dstTexture, 0);\n glTarget = _gl.TEXTURE_3D;\n } else if (dstTexture.isDataArrayTexture) {\n textures.setTexture2DArray(dstTexture, 0);\n glTarget = _gl.TEXTURE_2D_ARRAY;\n } else {\n console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.\");\n return;\n }\n _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY);\n _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha);\n _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment);\n const unpackRowLen = _gl.getParameter(_gl.UNPACK_ROW_LENGTH);\n const unpackImageHeight = _gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT);\n const unpackSkipPixels = _gl.getParameter(_gl.UNPACK_SKIP_PIXELS);\n const unpackSkipRows = _gl.getParameter(_gl.UNPACK_SKIP_ROWS);\n const unpackSkipImages = _gl.getParameter(_gl.UNPACK_SKIP_IMAGES);\n const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[0] : srcTexture.image;\n _gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, image.width);\n _gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT, image.height);\n _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, sourceBox.min.x);\n _gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, sourceBox.min.y);\n _gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, sourceBox.min.z);\n if (srcTexture.isDataTexture || srcTexture.isData3DTexture) _gl.texSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data);\n else if (srcTexture.isCompressedArrayTexture) {\n console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.\");\n _gl.compressedTexSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data);\n } else _gl.texSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image);\n _gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, unpackRowLen);\n _gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT, unpackImageHeight);\n _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, unpackSkipPixels);\n _gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, unpackSkipRows);\n _gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, unpackSkipImages);\n // Generate mipmaps only when copying level 0\n if (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(glTarget);\n state.unbindTexture();\n };\n this.initTexture = function(texture) {\n if (texture.isCubeTexture) textures.setTextureCube(texture, 0);\n else if (texture.isData3DTexture) textures.setTexture3D(texture, 0);\n else if (texture.isDataArrayTexture || texture.isCompressedArrayTexture) textures.setTexture2DArray(texture, 0);\n else textures.setTexture2D(texture, 0);\n state.unbindTexture();\n };\n this.resetState = function() {\n _currentActiveCubeFace = 0;\n _currentActiveMipmapLevel = 0;\n _currentRenderTarget = null;\n state.reset();\n bindingStates.reset();\n };\n if (typeof __THREE_DEVTOOLS__ !== \"undefined\") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\", {\n detail: this\n }));\n }\n get coordinateSystem() {\n return $d5b33d7c30034067$export$5a0e9190d10875d3;\n }\n get outputColorSpace() {\n return this._outputColorSpace;\n }\n set outputColorSpace(colorSpace1) {\n this._outputColorSpace = colorSpace1;\n const gl = this.getContext();\n gl.drawingBufferColorSpace = colorSpace1 === $d5b33d7c30034067$export$626af19ae879bdf6 ? \"display-p3\" : \"srgb\";\n gl.unpackColorSpace = $d5b33d7c30034067$export$5e6fd513f44698c.workingColorSpace === $d5b33d7c30034067$export$c0dc1bc7e964761 ? \"display-p3\" : \"srgb\";\n }\n get physicallyCorrectLights() {\n console.warn(\"THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.\");\n return !this.useLegacyLights;\n }\n set physicallyCorrectLights(value) {\n console.warn(\"THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.\");\n this.useLegacyLights = !value;\n }\n get outputEncoding() {\n console.warn(\"THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.\");\n return this.outputColorSpace === $d5b33d7c30034067$export$561f394b24edfcaa ? $d5b33d7c30034067$export$f32388edbb32674 : $d5b33d7c30034067$export$7207336e4151a112;\n }\n set outputEncoding(encoding) {\n console.warn(\"THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.\");\n this.outputColorSpace = encoding === $d5b33d7c30034067$export$f32388edbb32674 ? $d5b33d7c30034067$export$561f394b24edfcaa : $d5b33d7c30034067$export$42429b3acfb233a4;\n }\n get useLegacyLights() {\n console.warn(\"THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.\");\n return this._useLegacyLights;\n }\n set useLegacyLights(value) {\n console.warn(\"THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.\");\n this._useLegacyLights = value;\n }\n}\nclass $d5b33d7c30034067$export$a2f65229194348f9 extends $d5b33d7c30034067$export$f6cc00ef28d7cf97 {\n}\n$d5b33d7c30034067$export$a2f65229194348f9.prototype.isWebGL1Renderer = true;\nclass $d5b33d7c30034067$export$6f1519f023b8d0f6 {\n constructor(color, density = 0.00025){\n this.isFogExp2 = true;\n this.name = \"\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(color);\n this.density = density;\n }\n clone() {\n return new $d5b33d7c30034067$export$6f1519f023b8d0f6(this.color, this.density);\n }\n toJSON() {\n return {\n type: \"FogExp2\",\n name: this.name,\n color: this.color.getHex(),\n density: this.density\n };\n }\n}\nclass $d5b33d7c30034067$export$3c890837b09508d4 {\n constructor(color, near = 1, far = 1000){\n this.isFog = true;\n this.name = \"\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(color);\n this.near = near;\n this.far = far;\n }\n clone() {\n return new $d5b33d7c30034067$export$3c890837b09508d4(this.color, this.near, this.far);\n }\n toJSON() {\n return {\n type: \"Fog\",\n name: this.name,\n color: this.color.getHex(),\n near: this.near,\n far: this.far\n };\n }\n}\nclass $d5b33d7c30034067$export$38af1803e3442a7f extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isScene = true;\n this.type = \"Scene\";\n this.background = null;\n this.environment = null;\n this.fog = null;\n this.backgroundBlurriness = 0;\n this.backgroundIntensity = 1;\n this.overrideMaterial = null;\n if (typeof __THREE_DEVTOOLS__ !== \"undefined\") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\", {\n detail: this\n }));\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n if (source.background !== null) this.background = source.background.clone();\n if (source.environment !== null) this.environment = source.environment.clone();\n if (source.fog !== null) this.fog = source.fog.clone();\n this.backgroundBlurriness = source.backgroundBlurriness;\n this.backgroundIntensity = source.backgroundIntensity;\n if (source.overrideMaterial !== null) this.overrideMaterial = source.overrideMaterial.clone();\n this.matrixAutoUpdate = source.matrixAutoUpdate;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n if (this.fog !== null) data.object.fog = this.fog.toJSON();\n if (this.backgroundBlurriness > 0) data.object.backgroundBlurriness = this.backgroundBlurriness;\n if (this.backgroundIntensity !== 1) data.object.backgroundIntensity = this.backgroundIntensity;\n return data;\n }\n}\nclass $d5b33d7c30034067$export$3d5cd879f108f53f {\n constructor(array, stride){\n this.isInterleavedBuffer = true;\n this.array = array;\n this.stride = stride;\n this.count = array !== undefined ? array.length / stride : 0;\n this.usage = $d5b33d7c30034067$export$763e8360f4d7f77d;\n this.updateRange = {\n offset: 0,\n count: -1\n };\n this.version = 0;\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n }\n onUploadCallback() {}\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n setUsage(value) {\n this.usage = value;\n return this;\n }\n copy(source) {\n this.array = new source.array.constructor(source.array);\n this.count = source.count;\n this.stride = source.stride;\n this.usage = source.usage;\n return this;\n }\n copyAt(index1, attribute, index2) {\n index1 *= this.stride;\n index2 *= attribute.stride;\n for(let i = 0, l = this.stride; i < l; i++)this.array[index1 + i] = attribute.array[index2 + i];\n return this;\n }\n set(value, offset = 0) {\n this.array.set(value, offset);\n return this;\n }\n clone(data) {\n if (data.arrayBuffers === undefined) data.arrayBuffers = {};\n if (this.array.buffer._uuid === undefined) this.array.buffer._uuid = $d5b33d7c30034067$var$generateUUID();\n if (data.arrayBuffers[this.array.buffer._uuid] === undefined) data.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer;\n const array = new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);\n const ib = new this.constructor(array, this.stride);\n ib.setUsage(this.usage);\n return ib;\n }\n onUpload(callback) {\n this.onUploadCallback = callback;\n return this;\n }\n toJSON(data) {\n if (data.arrayBuffers === undefined) data.arrayBuffers = {};\n // generate UUID for array buffer if necessary\n if (this.array.buffer._uuid === undefined) this.array.buffer._uuid = $d5b33d7c30034067$var$generateUUID();\n if (data.arrayBuffers[this.array.buffer._uuid] === undefined) data.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer));\n //\n return {\n uuid: this.uuid,\n buffer: this.array.buffer._uuid,\n type: this.array.constructor.name,\n stride: this.stride\n };\n }\n}\nconst $d5b33d7c30034067$var$_vector$5 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$920b6d07334599c7 {\n constructor(interleavedBuffer, itemSize, offset, normalized = false){\n this.isInterleavedBufferAttribute = true;\n this.name = \"\";\n this.data = interleavedBuffer;\n this.itemSize = itemSize;\n this.offset = offset;\n this.normalized = normalized;\n }\n get count() {\n return this.data.count;\n }\n get array() {\n return this.data.array;\n }\n set needsUpdate(value) {\n this.data.needsUpdate = value;\n }\n applyMatrix4(m) {\n for(let i = 0, l = this.data.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$5.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$5.applyMatrix4(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$5.x, $d5b33d7c30034067$var$_vector$5.y, $d5b33d7c30034067$var$_vector$5.z);\n }\n return this;\n }\n applyNormalMatrix(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$5.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$5.applyNormalMatrix(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$5.x, $d5b33d7c30034067$var$_vector$5.y, $d5b33d7c30034067$var$_vector$5.z);\n }\n return this;\n }\n transformDirection(m) {\n for(let i = 0, l = this.count; i < l; i++){\n $d5b33d7c30034067$var$_vector$5.fromBufferAttribute(this, i);\n $d5b33d7c30034067$var$_vector$5.transformDirection(m);\n this.setXYZ(i, $d5b33d7c30034067$var$_vector$5.x, $d5b33d7c30034067$var$_vector$5.y, $d5b33d7c30034067$var$_vector$5.z);\n }\n return this;\n }\n setX(index, x) {\n if (this.normalized) x = $d5b33d7c30034067$var$normalize(x, this.array);\n this.data.array[index * this.data.stride + this.offset] = x;\n return this;\n }\n setY(index, y) {\n if (this.normalized) y = $d5b33d7c30034067$var$normalize(y, this.array);\n this.data.array[index * this.data.stride + this.offset + 1] = y;\n return this;\n }\n setZ(index, z) {\n if (this.normalized) z = $d5b33d7c30034067$var$normalize(z, this.array);\n this.data.array[index * this.data.stride + this.offset + 2] = z;\n return this;\n }\n setW(index, w) {\n if (this.normalized) w = $d5b33d7c30034067$var$normalize(w, this.array);\n this.data.array[index * this.data.stride + this.offset + 3] = w;\n return this;\n }\n getX(index) {\n let x = this.data.array[index * this.data.stride + this.offset];\n if (this.normalized) x = $d5b33d7c30034067$var$denormalize(x, this.array);\n return x;\n }\n getY(index) {\n let y = this.data.array[index * this.data.stride + this.offset + 1];\n if (this.normalized) y = $d5b33d7c30034067$var$denormalize(y, this.array);\n return y;\n }\n getZ(index) {\n let z = this.data.array[index * this.data.stride + this.offset + 2];\n if (this.normalized) z = $d5b33d7c30034067$var$denormalize(z, this.array);\n return z;\n }\n getW(index) {\n let w = this.data.array[index * this.data.stride + this.offset + 3];\n if (this.normalized) w = $d5b33d7c30034067$var$denormalize(w, this.array);\n return w;\n }\n setXY(index, x, y) {\n index = index * this.data.stride + this.offset;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n }\n this.data.array[index + 0] = x;\n this.data.array[index + 1] = y;\n return this;\n }\n setXYZ(index, x, y, z) {\n index = index * this.data.stride + this.offset;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n }\n this.data.array[index + 0] = x;\n this.data.array[index + 1] = y;\n this.data.array[index + 2] = z;\n return this;\n }\n setXYZW(index, x, y, z, w) {\n index = index * this.data.stride + this.offset;\n if (this.normalized) {\n x = $d5b33d7c30034067$var$normalize(x, this.array);\n y = $d5b33d7c30034067$var$normalize(y, this.array);\n z = $d5b33d7c30034067$var$normalize(z, this.array);\n w = $d5b33d7c30034067$var$normalize(w, this.array);\n }\n this.data.array[index + 0] = x;\n this.data.array[index + 1] = y;\n this.data.array[index + 2] = z;\n this.data.array[index + 3] = w;\n return this;\n }\n clone(data) {\n if (data === undefined) {\n console.log(\"THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.\");\n const array = [];\n for(let i = 0; i < this.count; i++){\n const index = i * this.data.stride + this.offset;\n for(let j = 0; j < this.itemSize; j++)array.push(this.data.array[index + j]);\n }\n return new $d5b33d7c30034067$export$8dea267bd6bde117(new this.array.constructor(array), this.itemSize, this.normalized);\n } else {\n if (data.interleavedBuffers === undefined) data.interleavedBuffers = {};\n if (data.interleavedBuffers[this.data.uuid] === undefined) data.interleavedBuffers[this.data.uuid] = this.data.clone(data);\n return new $d5b33d7c30034067$export$920b6d07334599c7(data.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized);\n }\n }\n toJSON(data) {\n if (data === undefined) {\n console.log(\"THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.\");\n const array = [];\n for(let i = 0; i < this.count; i++){\n const index = i * this.data.stride + this.offset;\n for(let j = 0; j < this.itemSize; j++)array.push(this.data.array[index + j]);\n }\n // de-interleave data and save it as an ordinary buffer attribute for now\n return {\n itemSize: this.itemSize,\n type: this.array.constructor.name,\n array: array,\n normalized: this.normalized\n };\n } else {\n // save as true interleaved attribute\n if (data.interleavedBuffers === undefined) data.interleavedBuffers = {};\n if (data.interleavedBuffers[this.data.uuid] === undefined) data.interleavedBuffers[this.data.uuid] = this.data.toJSON(data);\n return {\n isInterleavedBufferAttribute: true,\n itemSize: this.itemSize,\n data: this.data.uuid,\n offset: this.offset,\n normalized: this.normalized\n };\n }\n }\n}\nclass $d5b33d7c30034067$export$5ec7dd1c6994bf8e extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isSpriteMaterial = true;\n this.type = \"SpriteMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.alphaMap = null;\n this.rotation = 0;\n this.sizeAttenuation = true;\n this.transparent = true;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.rotation = source.rotation;\n this.sizeAttenuation = source.sizeAttenuation;\n this.fog = source.fog;\n return this;\n }\n}\nlet $d5b33d7c30034067$var$_geometry;\nconst $d5b33d7c30034067$var$_intersectPoint = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_worldScale = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_mvPosition = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_alignedPosition = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_rotatedPosition = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_viewWorldMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_vA = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vB = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_vC = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_uvA = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvB = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nconst $d5b33d7c30034067$var$_uvC = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nclass $d5b33d7c30034067$export$3075603db8e6204c extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(material = new $d5b33d7c30034067$export$5ec7dd1c6994bf8e()){\n super();\n this.isSprite = true;\n this.type = \"Sprite\";\n if ($d5b33d7c30034067$var$_geometry === undefined) {\n $d5b33d7c30034067$var$_geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const float32Array = new Float32Array([\n -0.5,\n -0.5,\n 0,\n 0,\n 0,\n 0.5,\n -0.5,\n 0,\n 1,\n 0,\n 0.5,\n 0.5,\n 0,\n 1,\n 1,\n -0.5,\n 0.5,\n 0,\n 0,\n 1\n ]);\n const interleavedBuffer = new $d5b33d7c30034067$export$3d5cd879f108f53f(float32Array, 5);\n $d5b33d7c30034067$var$_geometry.setIndex([\n 0,\n 1,\n 2,\n 0,\n 2,\n 3\n ]);\n $d5b33d7c30034067$var$_geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, 3, 0, false));\n $d5b33d7c30034067$var$_geometry.setAttribute(\"uv\", new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, 2, 3, false));\n }\n this.geometry = $d5b33d7c30034067$var$_geometry;\n this.material = material;\n this.center = new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0.5);\n }\n raycast(raycaster, intersects) {\n if (raycaster.camera === null) console.error('THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.');\n $d5b33d7c30034067$var$_worldScale.setFromMatrixScale(this.matrixWorld);\n $d5b33d7c30034067$var$_viewWorldMatrix.copy(raycaster.camera.matrixWorld);\n this.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse, this.matrixWorld);\n $d5b33d7c30034067$var$_mvPosition.setFromMatrixPosition(this.modelViewMatrix);\n if (raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false) $d5b33d7c30034067$var$_worldScale.multiplyScalar(-$d5b33d7c30034067$var$_mvPosition.z);\n const rotation = this.material.rotation;\n let sin, cos;\n if (rotation !== 0) {\n cos = Math.cos(rotation);\n sin = Math.sin(rotation);\n }\n const center = this.center;\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vA.set(-0.5, -0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vB.set(0.5, -0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vC.set(0.5, 0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$_uvA.set(0, 0);\n $d5b33d7c30034067$var$_uvB.set(1, 0);\n $d5b33d7c30034067$var$_uvC.set(1, 1);\n // check first triangle\n let intersect = raycaster.ray.intersectTriangle($d5b33d7c30034067$var$_vA, $d5b33d7c30034067$var$_vB, $d5b33d7c30034067$var$_vC, false, $d5b33d7c30034067$var$_intersectPoint);\n if (intersect === null) {\n // check second triangle\n $d5b33d7c30034067$var$transformVertex($d5b33d7c30034067$var$_vB.set(-0.5, 0.5, 0), $d5b33d7c30034067$var$_mvPosition, center, $d5b33d7c30034067$var$_worldScale, sin, cos);\n $d5b33d7c30034067$var$_uvB.set(0, 1);\n intersect = raycaster.ray.intersectTriangle($d5b33d7c30034067$var$_vA, $d5b33d7c30034067$var$_vC, $d5b33d7c30034067$var$_vB, false, $d5b33d7c30034067$var$_intersectPoint);\n if (intersect === null) return;\n }\n const distance = raycaster.ray.origin.distanceTo($d5b33d7c30034067$var$_intersectPoint);\n if (distance < raycaster.near || distance > raycaster.far) return;\n intersects.push({\n distance: distance,\n point: $d5b33d7c30034067$var$_intersectPoint.clone(),\n uv: $d5b33d7c30034067$export$5a465592bfe74b48.getInterpolation($d5b33d7c30034067$var$_intersectPoint, $d5b33d7c30034067$var$_vA, $d5b33d7c30034067$var$_vB, $d5b33d7c30034067$var$_vC, $d5b33d7c30034067$var$_uvA, $d5b33d7c30034067$var$_uvB, $d5b33d7c30034067$var$_uvC, new $d5b33d7c30034067$export$c977b3e384af9ae1()),\n face: null,\n object: this\n });\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n if (source.center !== undefined) this.center.copy(source.center);\n this.material = source.material;\n return this;\n }\n}\nfunction $d5b33d7c30034067$var$transformVertex(vertexPosition, mvPosition, center, scale, sin, cos) {\n // compute position in camera space\n $d5b33d7c30034067$var$_alignedPosition.subVectors(vertexPosition, center).addScalar(0.5).multiply(scale);\n // to check if rotation is not zero\n if (sin !== undefined) {\n $d5b33d7c30034067$var$_rotatedPosition.x = cos * $d5b33d7c30034067$var$_alignedPosition.x - sin * $d5b33d7c30034067$var$_alignedPosition.y;\n $d5b33d7c30034067$var$_rotatedPosition.y = sin * $d5b33d7c30034067$var$_alignedPosition.x + cos * $d5b33d7c30034067$var$_alignedPosition.y;\n } else $d5b33d7c30034067$var$_rotatedPosition.copy($d5b33d7c30034067$var$_alignedPosition);\n vertexPosition.copy(mvPosition);\n vertexPosition.x += $d5b33d7c30034067$var$_rotatedPosition.x;\n vertexPosition.y += $d5b33d7c30034067$var$_rotatedPosition.y;\n // transform to world space\n vertexPosition.applyMatrix4($d5b33d7c30034067$var$_viewWorldMatrix);\n}\nconst $d5b33d7c30034067$var$_v1$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$112e7237be0c5f30 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this._currentLevel = 0;\n this.type = \"LOD\";\n Object.defineProperties(this, {\n levels: {\n enumerable: true,\n value: []\n },\n isLOD: {\n value: true\n }\n });\n this.autoUpdate = true;\n }\n copy(source) {\n super.copy(source, false);\n const levels = source.levels;\n for(let i = 0, l = levels.length; i < l; i++){\n const level = levels[i];\n this.addLevel(level.object.clone(), level.distance, level.hysteresis);\n }\n this.autoUpdate = source.autoUpdate;\n return this;\n }\n addLevel(object, distance = 0, hysteresis = 0) {\n distance = Math.abs(distance);\n const levels = this.levels;\n let l;\n for(l = 0; l < levels.length; l++){\n if (distance < levels[l].distance) break;\n }\n levels.splice(l, 0, {\n distance: distance,\n hysteresis: hysteresis,\n object: object\n });\n this.add(object);\n return this;\n }\n getCurrentLevel() {\n return this._currentLevel;\n }\n getObjectForDistance(distance) {\n const levels = this.levels;\n if (levels.length > 0) {\n let i, l;\n for(i = 1, l = levels.length; i < l; i++){\n let levelDistance = levels[i].distance;\n if (levels[i].object.visible) levelDistance -= levelDistance * levels[i].hysteresis;\n if (distance < levelDistance) break;\n }\n return levels[i - 1].object;\n }\n return null;\n }\n raycast(raycaster, intersects) {\n const levels = this.levels;\n if (levels.length > 0) {\n $d5b33d7c30034067$var$_v1$2.setFromMatrixPosition(this.matrixWorld);\n const distance = raycaster.ray.origin.distanceTo($d5b33d7c30034067$var$_v1$2);\n this.getObjectForDistance(distance).raycast(raycaster, intersects);\n }\n }\n update(camera) {\n const levels = this.levels;\n if (levels.length > 1) {\n $d5b33d7c30034067$var$_v1$2.setFromMatrixPosition(camera.matrixWorld);\n $d5b33d7c30034067$var$_v2$1.setFromMatrixPosition(this.matrixWorld);\n const distance = $d5b33d7c30034067$var$_v1$2.distanceTo($d5b33d7c30034067$var$_v2$1) / camera.zoom;\n levels[0].object.visible = true;\n let i, l;\n for(i = 1, l = levels.length; i < l; i++){\n let levelDistance = levels[i].distance;\n if (levels[i].object.visible) levelDistance -= levelDistance * levels[i].hysteresis;\n if (distance >= levelDistance) {\n levels[i - 1].object.visible = false;\n levels[i].object.visible = true;\n } else break;\n }\n this._currentLevel = i - 1;\n for(; i < l; i++)levels[i].object.visible = false;\n }\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n if (this.autoUpdate === false) data.object.autoUpdate = false;\n data.object.levels = [];\n const levels = this.levels;\n for(let i = 0, l = levels.length; i < l; i++){\n const level = levels[i];\n data.object.levels.push({\n object: level.object.uuid,\n distance: level.distance,\n hysteresis: level.hysteresis\n });\n }\n return data;\n }\n}\nconst $d5b33d7c30034067$var$_basePosition = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_skinIndex = /*@__PURE__*/ new $d5b33d7c30034067$export$fa7daccca11cdbe3();\nconst $d5b33d7c30034067$var$_skinWeight = /*@__PURE__*/ new $d5b33d7c30034067$export$fa7daccca11cdbe3();\nconst $d5b33d7c30034067$var$_vector3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_matrix4 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_vertex = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_sphere$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_inverseMatrix$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nclass $d5b33d7c30034067$export$b303577035157ecf extends $d5b33d7c30034067$export$e176487c05830cc5 {\n constructor(geometry, material){\n super(geometry, material);\n this.isSkinnedMesh = true;\n this.type = \"SkinnedMesh\";\n this.bindMode = $d5b33d7c30034067$export$2595a3798997538;\n this.bindMatrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.bindMatrixInverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.boundingBox = null;\n this.boundingSphere = null;\n }\n computeBoundingBox() {\n const geometry = this.geometry;\n if (this.boundingBox === null) this.boundingBox = new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n this.boundingBox.makeEmpty();\n const positionAttribute = geometry.getAttribute(\"position\");\n for(let i = 0; i < positionAttribute.count; i++){\n this.getVertexPosition(i, $d5b33d7c30034067$var$_vertex);\n this.boundingBox.expandByPoint($d5b33d7c30034067$var$_vertex);\n }\n }\n computeBoundingSphere() {\n const geometry = this.geometry;\n if (this.boundingSphere === null) this.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba();\n this.boundingSphere.makeEmpty();\n const positionAttribute = geometry.getAttribute(\"position\");\n for(let i = 0; i < positionAttribute.count; i++){\n this.getVertexPosition(i, $d5b33d7c30034067$var$_vertex);\n this.boundingSphere.expandByPoint($d5b33d7c30034067$var$_vertex);\n }\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.bindMode = source.bindMode;\n this.bindMatrix.copy(source.bindMatrix);\n this.bindMatrixInverse.copy(source.bindMatrixInverse);\n this.skeleton = source.skeleton;\n if (source.boundingBox !== null) this.boundingBox = source.boundingBox.clone();\n if (source.boundingSphere !== null) this.boundingSphere = source.boundingSphere.clone();\n return this;\n }\n raycast(raycaster, intersects) {\n const material = this.material;\n const matrixWorld = this.matrixWorld;\n if (material === undefined) return;\n // test with bounding sphere in world space\n if (this.boundingSphere === null) this.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$3.copy(this.boundingSphere);\n $d5b33d7c30034067$var$_sphere$3.applyMatrix4(matrixWorld);\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere$3) === false) return;\n // convert ray to local space of skinned mesh\n $d5b33d7c30034067$var$_inverseMatrix$2.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray$2.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix$2);\n // test with bounding box in local space\n if (this.boundingBox !== null) {\n if ($d5b33d7c30034067$var$_ray$2.intersectsBox(this.boundingBox) === false) return;\n }\n // test for intersections with geometry\n this._computeIntersections(raycaster, intersects, $d5b33d7c30034067$var$_ray$2);\n }\n getVertexPosition(index, target) {\n super.getVertexPosition(index, target);\n this.applyBoneTransform(index, target);\n return target;\n }\n bind(skeleton, bindMatrix) {\n this.skeleton = skeleton;\n if (bindMatrix === undefined) {\n this.updateMatrixWorld(true);\n this.skeleton.calculateInverses();\n bindMatrix = this.matrixWorld;\n }\n this.bindMatrix.copy(bindMatrix);\n this.bindMatrixInverse.copy(bindMatrix).invert();\n }\n pose() {\n this.skeleton.pose();\n }\n normalizeSkinWeights() {\n const vector = new $d5b33d7c30034067$export$fa7daccca11cdbe3();\n const skinWeight = this.geometry.attributes.skinWeight;\n for(let i = 0, l = skinWeight.count; i < l; i++){\n vector.fromBufferAttribute(skinWeight, i);\n const scale = 1.0 / vector.manhattanLength();\n if (scale !== Infinity) vector.multiplyScalar(scale);\n else vector.set(1, 0, 0, 0); // do something reasonable\n skinWeight.setXYZW(i, vector.x, vector.y, vector.z, vector.w);\n }\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n if (this.bindMode === $d5b33d7c30034067$export$2595a3798997538) this.bindMatrixInverse.copy(this.matrixWorld).invert();\n else if (this.bindMode === $d5b33d7c30034067$export$d7e7dc2e114517a0) this.bindMatrixInverse.copy(this.bindMatrix).invert();\n else console.warn(\"THREE.SkinnedMesh: Unrecognized bindMode: \" + this.bindMode);\n }\n applyBoneTransform(index, vector) {\n const skeleton = this.skeleton;\n const geometry = this.geometry;\n $d5b33d7c30034067$var$_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex, index);\n $d5b33d7c30034067$var$_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight, index);\n $d5b33d7c30034067$var$_basePosition.copy(vector).applyMatrix4(this.bindMatrix);\n vector.set(0, 0, 0);\n for(let i = 0; i < 4; i++){\n const weight = $d5b33d7c30034067$var$_skinWeight.getComponent(i);\n if (weight !== 0) {\n const boneIndex = $d5b33d7c30034067$var$_skinIndex.getComponent(i);\n $d5b33d7c30034067$var$_matrix4.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld, skeleton.boneInverses[boneIndex]);\n vector.addScaledVector($d5b33d7c30034067$var$_vector3.copy($d5b33d7c30034067$var$_basePosition).applyMatrix4($d5b33d7c30034067$var$_matrix4), weight);\n }\n }\n return vector.applyMatrix4(this.bindMatrixInverse);\n }\n boneTransform(index, vector) {\n console.warn(\"THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151.\");\n return this.applyBoneTransform(index, vector);\n }\n}\nclass $d5b33d7c30034067$export$b127726e56765aa4 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.isBone = true;\n this.type = \"Bone\";\n }\n}\nclass $d5b33d7c30034067$export$b691f601014eabe1 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0, minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0, anisotropy, colorSpace1){\n super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1);\n this.isDataTexture = true;\n this.image = {\n data: data,\n width: width,\n height: height\n };\n this.generateMipmaps = false;\n this.flipY = false;\n this.unpackAlignment = 1;\n }\n}\nconst $d5b33d7c30034067$var$_offsetMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_identityMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nclass $d5b33d7c30034067$export$8f31e4c4a37b8e9c {\n constructor(bones = [], boneInverses = []){\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.bones = bones.slice(0);\n this.boneInverses = boneInverses;\n this.boneMatrices = null;\n this.boneTexture = null;\n this.boneTextureSize = 0;\n this.init();\n }\n init() {\n const bones = this.bones;\n const boneInverses = this.boneInverses;\n this.boneMatrices = new Float32Array(bones.length * 16);\n // calculate inverse bone matrices if necessary\n if (boneInverses.length === 0) this.calculateInverses();\n else // handle special case\n if (bones.length !== boneInverses.length) {\n console.warn(\"THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.\");\n this.boneInverses = [];\n for(let i = 0, il = this.bones.length; i < il; i++)this.boneInverses.push(new $d5b33d7c30034067$export$2ae72fc923e5eb5());\n }\n }\n calculateInverses() {\n this.boneInverses.length = 0;\n for(let i = 0, il = this.bones.length; i < il; i++){\n const inverse = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n if (this.bones[i]) inverse.copy(this.bones[i].matrixWorld).invert();\n this.boneInverses.push(inverse);\n }\n }\n pose() {\n // recover the bind-time world matrices\n for(let i = 0, il = this.bones.length; i < il; i++){\n const bone = this.bones[i];\n if (bone) bone.matrixWorld.copy(this.boneInverses[i]).invert();\n }\n // compute the local matrices, positions, rotations and scales\n for(let i = 0, il = this.bones.length; i < il; i++){\n const bone = this.bones[i];\n if (bone) {\n if (bone.parent && bone.parent.isBone) {\n bone.matrix.copy(bone.parent.matrixWorld).invert();\n bone.matrix.multiply(bone.matrixWorld);\n } else bone.matrix.copy(bone.matrixWorld);\n bone.matrix.decompose(bone.position, bone.quaternion, bone.scale);\n }\n }\n }\n update() {\n const bones = this.bones;\n const boneInverses = this.boneInverses;\n const boneMatrices = this.boneMatrices;\n const boneTexture = this.boneTexture;\n // flatten bone matrices to array\n for(let i = 0, il = bones.length; i < il; i++){\n // compute the offset between the current and the original transform\n const matrix = bones[i] ? bones[i].matrixWorld : $d5b33d7c30034067$var$_identityMatrix;\n $d5b33d7c30034067$var$_offsetMatrix.multiplyMatrices(matrix, boneInverses[i]);\n $d5b33d7c30034067$var$_offsetMatrix.toArray(boneMatrices, i * 16);\n }\n if (boneTexture !== null) boneTexture.needsUpdate = true;\n }\n clone() {\n return new $d5b33d7c30034067$export$8f31e4c4a37b8e9c(this.bones, this.boneInverses);\n }\n computeBoneTexture() {\n // layout (1 matrix = 4 pixels)\n // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n // with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8)\n // 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16)\n // 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32)\n // 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n let size = Math.sqrt(this.bones.length * 4); // 4 pixels needed for 1 matrix\n size = $d5b33d7c30034067$var$ceilPowerOfTwo(size);\n size = Math.max(size, 4);\n const boneMatrices = new Float32Array(size * size * 4); // 4 floats per RGBA pixel\n boneMatrices.set(this.boneMatrices); // copy current values\n const boneTexture = new $d5b33d7c30034067$export$b691f601014eabe1(boneMatrices, size, size, $d5b33d7c30034067$export$3f8bb04b555a363c, $d5b33d7c30034067$export$f6d331659b644596);\n boneTexture.needsUpdate = true;\n this.boneMatrices = boneMatrices;\n this.boneTexture = boneTexture;\n this.boneTextureSize = size;\n return this;\n }\n getBoneByName(name) {\n for(let i = 0, il = this.bones.length; i < il; i++){\n const bone = this.bones[i];\n if (bone.name === name) return bone;\n }\n return undefined;\n }\n dispose() {\n if (this.boneTexture !== null) {\n this.boneTexture.dispose();\n this.boneTexture = null;\n }\n }\n fromJSON(json, bones) {\n this.uuid = json.uuid;\n for(let i = 0, l = json.bones.length; i < l; i++){\n const uuid = json.bones[i];\n let bone = bones[uuid];\n if (bone === undefined) {\n console.warn(\"THREE.Skeleton: No bone found with UUID:\", uuid);\n bone = new $d5b33d7c30034067$export$b127726e56765aa4();\n }\n this.bones.push(bone);\n this.boneInverses.push(new $d5b33d7c30034067$export$2ae72fc923e5eb5().fromArray(json.boneInverses[i]));\n }\n this.init();\n return this;\n }\n toJSON() {\n const data = {\n metadata: {\n version: 4.6,\n type: \"Skeleton\",\n generator: \"Skeleton.toJSON\"\n },\n bones: [],\n boneInverses: []\n };\n data.uuid = this.uuid;\n const bones = this.bones;\n const boneInverses = this.boneInverses;\n for(let i = 0, l = bones.length; i < l; i++){\n const bone = bones[i];\n data.bones.push(bone.uuid);\n const boneInverse = boneInverses[i];\n data.boneInverses.push(boneInverse.toArray());\n }\n return data;\n }\n}\nclass $d5b33d7c30034067$export$32ea87a8b54d744a extends $d5b33d7c30034067$export$8dea267bd6bde117 {\n constructor(array, itemSize, normalized, meshPerAttribute = 1){\n super(array, itemSize, normalized);\n this.isInstancedBufferAttribute = true;\n this.meshPerAttribute = meshPerAttribute;\n }\n copy(source) {\n super.copy(source);\n this.meshPerAttribute = source.meshPerAttribute;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.meshPerAttribute = this.meshPerAttribute;\n data.isInstancedBufferAttribute = true;\n return data;\n }\n}\nconst $d5b33d7c30034067$var$_instanceLocalMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_instanceWorldMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_instanceIntersects = [];\nconst $d5b33d7c30034067$var$_box3 = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nconst $d5b33d7c30034067$var$_identity = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_mesh = /*@__PURE__*/ new $d5b33d7c30034067$export$e176487c05830cc5();\nconst $d5b33d7c30034067$var$_sphere$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nclass $d5b33d7c30034067$export$f3c979c331175ad7 extends $d5b33d7c30034067$export$e176487c05830cc5 {\n constructor(geometry, material, count){\n super(geometry, material);\n this.isInstancedMesh = true;\n this.instanceMatrix = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(count * 16), 16);\n this.instanceColor = null;\n this.count = count;\n this.boundingBox = null;\n this.boundingSphere = null;\n for(let i = 0; i < count; i++)this.setMatrixAt(i, $d5b33d7c30034067$var$_identity);\n }\n computeBoundingBox() {\n const geometry = this.geometry;\n const count = this.count;\n if (this.boundingBox === null) this.boundingBox = new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\n if (geometry.boundingBox === null) geometry.computeBoundingBox();\n this.boundingBox.makeEmpty();\n for(let i = 0; i < count; i++){\n this.getMatrixAt(i, $d5b33d7c30034067$var$_instanceLocalMatrix);\n $d5b33d7c30034067$var$_box3.copy(geometry.boundingBox).applyMatrix4($d5b33d7c30034067$var$_instanceLocalMatrix);\n this.boundingBox.union($d5b33d7c30034067$var$_box3);\n }\n }\n computeBoundingSphere() {\n const geometry = this.geometry;\n const count = this.count;\n if (this.boundingSphere === null) this.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba();\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n this.boundingSphere.makeEmpty();\n for(let i = 0; i < count; i++){\n this.getMatrixAt(i, $d5b33d7c30034067$var$_instanceLocalMatrix);\n $d5b33d7c30034067$var$_sphere$2.copy(geometry.boundingSphere).applyMatrix4($d5b33d7c30034067$var$_instanceLocalMatrix);\n this.boundingSphere.union($d5b33d7c30034067$var$_sphere$2);\n }\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.instanceMatrix.copy(source.instanceMatrix);\n if (source.instanceColor !== null) this.instanceColor = source.instanceColor.clone();\n this.count = source.count;\n if (source.boundingBox !== null) this.boundingBox = source.boundingBox.clone();\n if (source.boundingSphere !== null) this.boundingSphere = source.boundingSphere.clone();\n return this;\n }\n getColorAt(index, color) {\n color.fromArray(this.instanceColor.array, index * 3);\n }\n getMatrixAt(index, matrix) {\n matrix.fromArray(this.instanceMatrix.array, index * 16);\n }\n raycast(raycaster, intersects) {\n const matrixWorld = this.matrixWorld;\n const raycastTimes = this.count;\n $d5b33d7c30034067$var$_mesh.geometry = this.geometry;\n $d5b33d7c30034067$var$_mesh.material = this.material;\n if ($d5b33d7c30034067$var$_mesh.material === undefined) return;\n // test with bounding sphere first\n if (this.boundingSphere === null) this.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$2.copy(this.boundingSphere);\n $d5b33d7c30034067$var$_sphere$2.applyMatrix4(matrixWorld);\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere$2) === false) return;\n // now test each instance\n for(let instanceId = 0; instanceId < raycastTimes; instanceId++){\n // calculate the world matrix for each instance\n this.getMatrixAt(instanceId, $d5b33d7c30034067$var$_instanceLocalMatrix);\n $d5b33d7c30034067$var$_instanceWorldMatrix.multiplyMatrices(matrixWorld, $d5b33d7c30034067$var$_instanceLocalMatrix);\n // the mesh represents this single instance\n $d5b33d7c30034067$var$_mesh.matrixWorld = $d5b33d7c30034067$var$_instanceWorldMatrix;\n $d5b33d7c30034067$var$_mesh.raycast(raycaster, $d5b33d7c30034067$var$_instanceIntersects);\n // process the result of raycast\n for(let i = 0, l = $d5b33d7c30034067$var$_instanceIntersects.length; i < l; i++){\n const intersect = $d5b33d7c30034067$var$_instanceIntersects[i];\n intersect.instanceId = instanceId;\n intersect.object = this;\n intersects.push(intersect);\n }\n $d5b33d7c30034067$var$_instanceIntersects.length = 0;\n }\n }\n setColorAt(index, color) {\n if (this.instanceColor === null) this.instanceColor = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(this.instanceMatrix.count * 3), 3);\n color.toArray(this.instanceColor.array, index * 3);\n }\n setMatrixAt(index, matrix) {\n matrix.toArray(this.instanceMatrix.array, index * 16);\n }\n updateMorphTargets() {}\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n }\n}\nclass $d5b33d7c30034067$export$fbaaa33907730a0c extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isLineBasicMaterial = true;\n this.type = \"LineBasicMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.linewidth = 1;\n this.linecap = \"round\";\n this.linejoin = \"round\";\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.linewidth = source.linewidth;\n this.linecap = source.linecap;\n this.linejoin = source.linejoin;\n this.fog = source.fog;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_start$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_end$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_inverseMatrix$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nconst $d5b33d7c30034067$var$_sphere$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nclass $d5b33d7c30034067$export$17d680238e50603e extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(geometry = new $d5b33d7c30034067$export$b7be63a67df8959(), material = new $d5b33d7c30034067$export$fbaaa33907730a0c()){\n super();\n this.isLine = true;\n this.type = \"Line\";\n this.geometry = geometry;\n this.material = material;\n this.updateMorphTargets();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.material = Array.isArray(source.material) ? source.material.slice() : source.material;\n this.geometry = source.geometry;\n return this;\n }\n computeLineDistances() {\n const geometry = this.geometry;\n // we assume non-indexed geometry\n if (geometry.index === null) {\n const positionAttribute = geometry.attributes.position;\n const lineDistances = [\n 0\n ];\n for(let i = 1, l = positionAttribute.count; i < l; i++){\n $d5b33d7c30034067$var$_start$1.fromBufferAttribute(positionAttribute, i - 1);\n $d5b33d7c30034067$var$_end$1.fromBufferAttribute(positionAttribute, i);\n lineDistances[i] = lineDistances[i - 1];\n lineDistances[i] += $d5b33d7c30034067$var$_start$1.distanceTo($d5b33d7c30034067$var$_end$1);\n }\n geometry.setAttribute(\"lineDistance\", new $d5b33d7c30034067$export$cbe7a62641830ebd(lineDistances, 1));\n } else console.warn(\"THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");\n return this;\n }\n raycast(raycaster, intersects) {\n const geometry = this.geometry;\n const matrixWorld = this.matrixWorld;\n const threshold = raycaster.params.Line.threshold;\n const drawRange = geometry.drawRange;\n // Checking boundingSphere distance to ray\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere$1.copy(geometry.boundingSphere);\n $d5b33d7c30034067$var$_sphere$1.applyMatrix4(matrixWorld);\n $d5b33d7c30034067$var$_sphere$1.radius += threshold;\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere$1) === false) return;\n //\n $d5b33d7c30034067$var$_inverseMatrix$1.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray$1.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix$1);\n const localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n const localThresholdSq = localThreshold * localThreshold;\n const vStart = new $d5b33d7c30034067$export$64b5c384219d3699();\n const vEnd = new $d5b33d7c30034067$export$64b5c384219d3699();\n const interSegment = new $d5b33d7c30034067$export$64b5c384219d3699();\n const interRay = new $d5b33d7c30034067$export$64b5c384219d3699();\n const step = this.isLineSegments ? 2 : 1;\n const index = geometry.index;\n const attributes = geometry.attributes;\n const positionAttribute = attributes.position;\n if (index !== null) {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(index.count, drawRange.start + drawRange.count);\n for(let i = start, l = end - 1; i < l; i += step){\n const a = index.getX(i);\n const b = index.getX(i + 1);\n vStart.fromBufferAttribute(positionAttribute, a);\n vEnd.fromBufferAttribute(positionAttribute, b);\n const distSq = $d5b33d7c30034067$var$_ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n if (distSq > localThresholdSq) continue;\n interRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n const distance = raycaster.ray.origin.distanceTo(interRay);\n if (distance < raycaster.near || distance > raycaster.far) continue;\n intersects.push({\n distance: distance,\n // What do we want? intersection point on the ray or on the segment??\n // point: raycaster.ray.at( distance ),\n point: interSegment.clone().applyMatrix4(this.matrixWorld),\n index: i,\n face: null,\n faceIndex: null,\n object: this\n });\n }\n } else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(positionAttribute.count, drawRange.start + drawRange.count);\n for(let i = start, l = end - 1; i < l; i += step){\n vStart.fromBufferAttribute(positionAttribute, i);\n vEnd.fromBufferAttribute(positionAttribute, i + 1);\n const distSq = $d5b33d7c30034067$var$_ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n if (distSq > localThresholdSq) continue;\n interRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n const distance = raycaster.ray.origin.distanceTo(interRay);\n if (distance < raycaster.near || distance > raycaster.far) continue;\n intersects.push({\n distance: distance,\n // What do we want? intersection point on the ray or on the segment??\n // point: raycaster.ray.at( distance ),\n point: interSegment.clone().applyMatrix4(this.matrixWorld),\n index: i,\n face: null,\n faceIndex: null,\n object: this\n });\n }\n }\n }\n updateMorphTargets() {\n const geometry = this.geometry;\n const morphAttributes = geometry.morphAttributes;\n const keys = Object.keys(morphAttributes);\n if (keys.length > 0) {\n const morphAttribute = morphAttributes[keys[0]];\n if (morphAttribute !== undefined) {\n this.morphTargetInfluences = [];\n this.morphTargetDictionary = {};\n for(let m = 0, ml = morphAttribute.length; m < ml; m++){\n const name = morphAttribute[m].name || String(m);\n this.morphTargetInfluences.push(0);\n this.morphTargetDictionary[name] = m;\n }\n }\n }\n }\n}\nconst $d5b33d7c30034067$var$_start = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_end = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$ff1ed10fedfdd604 extends $d5b33d7c30034067$export$17d680238e50603e {\n constructor(geometry, material){\n super(geometry, material);\n this.isLineSegments = true;\n this.type = \"LineSegments\";\n }\n computeLineDistances() {\n const geometry = this.geometry;\n // we assume non-indexed geometry\n if (geometry.index === null) {\n const positionAttribute = geometry.attributes.position;\n const lineDistances = [];\n for(let i = 0, l = positionAttribute.count; i < l; i += 2){\n $d5b33d7c30034067$var$_start.fromBufferAttribute(positionAttribute, i);\n $d5b33d7c30034067$var$_end.fromBufferAttribute(positionAttribute, i + 1);\n lineDistances[i] = i === 0 ? 0 : lineDistances[i - 1];\n lineDistances[i + 1] = lineDistances[i] + $d5b33d7c30034067$var$_start.distanceTo($d5b33d7c30034067$var$_end);\n }\n geometry.setAttribute(\"lineDistance\", new $d5b33d7c30034067$export$cbe7a62641830ebd(lineDistances, 1));\n } else console.warn(\"THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");\n return this;\n }\n}\nclass $d5b33d7c30034067$export$f85a24d745e4f17d extends $d5b33d7c30034067$export$17d680238e50603e {\n constructor(geometry, material){\n super(geometry, material);\n this.isLineLoop = true;\n this.type = \"LineLoop\";\n }\n}\nclass $d5b33d7c30034067$export$a178c45366ce5d6b extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isPointsMaterial = true;\n this.type = \"PointsMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.alphaMap = null;\n this.size = 1;\n this.sizeAttenuation = true;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.alphaMap = source.alphaMap;\n this.size = source.size;\n this.sizeAttenuation = source.sizeAttenuation;\n this.fog = source.fog;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_inverseMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_ray = /*@__PURE__*/ new $d5b33d7c30034067$export$a186db52eed6d40e();\nconst $d5b33d7c30034067$var$_sphere = /*@__PURE__*/ new $d5b33d7c30034067$export$805e8b72413ccaba();\nconst $d5b33d7c30034067$var$_position$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$1c787534cb11aa3e extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(geometry = new $d5b33d7c30034067$export$b7be63a67df8959(), material = new $d5b33d7c30034067$export$a178c45366ce5d6b()){\n super();\n this.isPoints = true;\n this.type = \"Points\";\n this.geometry = geometry;\n this.material = material;\n this.updateMorphTargets();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.material = Array.isArray(source.material) ? source.material.slice() : source.material;\n this.geometry = source.geometry;\n return this;\n }\n raycast(raycaster, intersects) {\n const geometry = this.geometry;\n const matrixWorld = this.matrixWorld;\n const threshold = raycaster.params.Points.threshold;\n const drawRange = geometry.drawRange;\n // Checking boundingSphere distance to ray\n if (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n $d5b33d7c30034067$var$_sphere.copy(geometry.boundingSphere);\n $d5b33d7c30034067$var$_sphere.applyMatrix4(matrixWorld);\n $d5b33d7c30034067$var$_sphere.radius += threshold;\n if (raycaster.ray.intersectsSphere($d5b33d7c30034067$var$_sphere) === false) return;\n //\n $d5b33d7c30034067$var$_inverseMatrix.copy(matrixWorld).invert();\n $d5b33d7c30034067$var$_ray.copy(raycaster.ray).applyMatrix4($d5b33d7c30034067$var$_inverseMatrix);\n const localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n const localThresholdSq = localThreshold * localThreshold;\n const index = geometry.index;\n const attributes = geometry.attributes;\n const positionAttribute = attributes.position;\n if (index !== null) {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(index.count, drawRange.start + drawRange.count);\n for(let i = start, il = end; i < il; i++){\n const a = index.getX(i);\n $d5b33d7c30034067$var$_position$2.fromBufferAttribute(positionAttribute, a);\n $d5b33d7c30034067$var$testPoint($d5b33d7c30034067$var$_position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this);\n }\n } else {\n const start = Math.max(0, drawRange.start);\n const end = Math.min(positionAttribute.count, drawRange.start + drawRange.count);\n for(let i = start, l = end; i < l; i++){\n $d5b33d7c30034067$var$_position$2.fromBufferAttribute(positionAttribute, i);\n $d5b33d7c30034067$var$testPoint($d5b33d7c30034067$var$_position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this);\n }\n }\n }\n updateMorphTargets() {\n const geometry = this.geometry;\n const morphAttributes = geometry.morphAttributes;\n const keys = Object.keys(morphAttributes);\n if (keys.length > 0) {\n const morphAttribute = morphAttributes[keys[0]];\n if (morphAttribute !== undefined) {\n this.morphTargetInfluences = [];\n this.morphTargetDictionary = {};\n for(let m = 0, ml = morphAttribute.length; m < ml; m++){\n const name = morphAttribute[m].name || String(m);\n this.morphTargetInfluences.push(0);\n this.morphTargetDictionary[name] = m;\n }\n }\n }\n }\n}\nfunction $d5b33d7c30034067$var$testPoint(point, index, localThresholdSq, matrixWorld, raycaster, intersects, object) {\n const rayPointDistanceSq = $d5b33d7c30034067$var$_ray.distanceSqToPoint(point);\n if (rayPointDistanceSq < localThresholdSq) {\n const intersectPoint = new $d5b33d7c30034067$export$64b5c384219d3699();\n $d5b33d7c30034067$var$_ray.closestPointToPoint(point, intersectPoint);\n intersectPoint.applyMatrix4(matrixWorld);\n const distance = raycaster.ray.origin.distanceTo(intersectPoint);\n if (distance < raycaster.near || distance > raycaster.far) return;\n intersects.push({\n distance: distance,\n distanceToRay: Math.sqrt(rayPointDistanceSq),\n point: intersectPoint,\n index: index,\n face: null,\n object: object\n });\n }\n}\nclass $d5b33d7c30034067$export$6e09d1edf8d5a25c extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy){\n super(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n this.isVideoTexture = true;\n this.minFilter = minFilter !== undefined ? minFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n this.magFilter = magFilter !== undefined ? magFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n this.generateMipmaps = false;\n const scope = this;\n function updateVideo() {\n scope.needsUpdate = true;\n video.requestVideoFrameCallback(updateVideo);\n }\n if (\"requestVideoFrameCallback\" in video) video.requestVideoFrameCallback(updateVideo);\n }\n clone() {\n return new this.constructor(this.image).copy(this);\n }\n update() {\n const video = this.image;\n const hasVideoFrameCallback = \"requestVideoFrameCallback\" in video;\n if (hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA) this.needsUpdate = true;\n }\n}\nclass $d5b33d7c30034067$export$9270d786f73ce6fe extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(width, height){\n super({\n width: width,\n height: height\n });\n this.isFramebufferTexture = true;\n this.magFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.minFilter = $d5b33d7c30034067$export$727aa5ec3fe39bf0;\n this.generateMipmaps = false;\n this.needsUpdate = true;\n }\n}\nclass $d5b33d7c30034067$export$3466bac9141a5cc4 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace1){\n super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace1);\n this.isCompressedTexture = true;\n this.image = {\n width: width,\n height: height\n };\n this.mipmaps = mipmaps;\n // no flipping for cube textures\n // (also flipping doesn't work for compressed textures )\n this.flipY = false;\n // can't generate mipmaps for compressed textures\n // mips must be embedded in DDS files\n this.generateMipmaps = false;\n }\n}\nclass $d5b33d7c30034067$export$5fe6b8e34b274fcb extends $d5b33d7c30034067$export$3466bac9141a5cc4 {\n constructor(mipmaps, width, height, depth, format, type){\n super(mipmaps, width, height, format, type);\n this.isCompressedArrayTexture = true;\n this.image.depth = depth;\n this.wrapR = $d5b33d7c30034067$export$9d9334239a5a5e06;\n }\n}\nclass $d5b33d7c30034067$export$d80173634de65bff extends $d5b33d7c30034067$export$3466bac9141a5cc4 {\n constructor(images, format, type){\n super(undefined, images[0].width, images[0].height, format, type, $d5b33d7c30034067$export$8759762a6477f2c4);\n this.isCompressedCubeTexture = true;\n this.isCubeTexture = true;\n this.image = images;\n }\n}\nclass $d5b33d7c30034067$export$f7189e49152d1c13 extends $d5b33d7c30034067$export$5431306cf43de24a {\n constructor(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy){\n super(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n this.isCanvasTexture = true;\n this.needsUpdate = true;\n }\n}\n/**\n * Extensible curve object.\n *\n * Some common of curve methods:\n * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n * .getPoints(), .getSpacedPoints()\n * .getLength()\n * .updateArcLengths()\n *\n * This following curves inherit from THREE.Curve:\n *\n * -- 2D curves --\n * THREE.ArcCurve\n * THREE.CubicBezierCurve\n * THREE.EllipseCurve\n * THREE.LineCurve\n * THREE.QuadraticBezierCurve\n * THREE.SplineCurve\n *\n * -- 3D curves --\n * THREE.CatmullRomCurve3\n * THREE.CubicBezierCurve3\n * THREE.LineCurve3\n * THREE.QuadraticBezierCurve3\n *\n * A series of curves can be represented as a THREE.CurvePath.\n *\n **/ class $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(){\n this.type = \"Curve\";\n this.arcLengthDivisions = 200;\n }\n // Virtual base class method to overwrite and implement in subclasses\n //\t- t [0 .. 1]\n getPoint() {\n console.warn(\"THREE.Curve: .getPoint() not implemented.\");\n return null;\n }\n // Get point at relative position in curve according to arc length\n // - u [0 .. 1]\n getPointAt(u, optionalTarget) {\n const t = this.getUtoTmapping(u);\n return this.getPoint(t, optionalTarget);\n }\n // Get sequence of points using getPoint( t )\n getPoints(divisions = 5) {\n const points = [];\n for(let d = 0; d <= divisions; d++)points.push(this.getPoint(d / divisions));\n return points;\n }\n // Get sequence of points using getPointAt( u )\n getSpacedPoints(divisions = 5) {\n const points = [];\n for(let d = 0; d <= divisions; d++)points.push(this.getPointAt(d / divisions));\n return points;\n }\n // Get total curve arc length\n getLength() {\n const lengths = this.getLengths();\n return lengths[lengths.length - 1];\n }\n // Get list of cumulative segment lengths\n getLengths(divisions = this.arcLengthDivisions) {\n if (this.cacheArcLengths && this.cacheArcLengths.length === divisions + 1 && !this.needsUpdate) return this.cacheArcLengths;\n this.needsUpdate = false;\n const cache = [];\n let current, last = this.getPoint(0);\n let sum = 0;\n cache.push(0);\n for(let p = 1; p <= divisions; p++){\n current = this.getPoint(p / divisions);\n sum += current.distanceTo(last);\n cache.push(sum);\n last = current;\n }\n this.cacheArcLengths = cache;\n return cache; // { sums: cache, sum: sum }; Sum is in the last element.\n }\n updateArcLengths() {\n this.needsUpdate = true;\n this.getLengths();\n }\n // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n getUtoTmapping(u, distance) {\n const arcLengths = this.getLengths();\n let i = 0;\n const il = arcLengths.length;\n let targetArcLength; // The targeted u distance value to get\n if (distance) targetArcLength = distance;\n else targetArcLength = u * arcLengths[il - 1];\n // binary search for the index with largest value smaller than target u distance\n let low = 0, high = il - 1, comparison;\n while(low <= high){\n i = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n comparison = arcLengths[i] - targetArcLength;\n if (comparison < 0) low = i + 1;\n else if (comparison > 0) high = i - 1;\n else {\n high = i;\n break;\n // DONE\n }\n }\n i = high;\n if (arcLengths[i] === targetArcLength) return i / (il - 1);\n // we could get finer grain at lengths, or use simple interpolation between two points\n const lengthBefore = arcLengths[i];\n const lengthAfter = arcLengths[i + 1];\n const segmentLength = lengthAfter - lengthBefore;\n // determine where we are between the 'before' and 'after' points\n const segmentFraction = (targetArcLength - lengthBefore) / segmentLength;\n // add that fractional amount to t\n const t = (i + segmentFraction) / (il - 1);\n return t;\n }\n // Returns a unit vector tangent at t\n // In case any sub curve does not implement its tangent derivation,\n // 2 points a small delta apart will be used to find its gradient\n // which seems to give a reasonable approximation\n getTangent(t, optionalTarget) {\n const delta = 0.0001;\n let t1 = t - delta;\n let t2 = t + delta;\n // Capping in case of danger\n if (t1 < 0) t1 = 0;\n if (t2 > 1) t2 = 1;\n const pt1 = this.getPoint(t1);\n const pt2 = this.getPoint(t2);\n const tangent = optionalTarget || (pt1.isVector2 ? new $d5b33d7c30034067$export$c977b3e384af9ae1() : new $d5b33d7c30034067$export$64b5c384219d3699());\n tangent.copy(pt2).sub(pt1).normalize();\n return tangent;\n }\n getTangentAt(u, optionalTarget) {\n const t = this.getUtoTmapping(u);\n return this.getTangent(t, optionalTarget);\n }\n computeFrenetFrames(segments, closed) {\n // see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const tangents = [];\n const normals = [];\n const binormals = [];\n const vec = new $d5b33d7c30034067$export$64b5c384219d3699();\n const mat = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n // compute the tangent vectors for each segment on the curve\n for(let i = 0; i <= segments; i++){\n const u = i / segments;\n tangents[i] = this.getTangentAt(u, new $d5b33d7c30034067$export$64b5c384219d3699());\n }\n // select an initial normal vector perpendicular to the first tangent vector,\n // and in the direction of the minimum tangent xyz component\n normals[0] = new $d5b33d7c30034067$export$64b5c384219d3699();\n binormals[0] = new $d5b33d7c30034067$export$64b5c384219d3699();\n let min = Number.MAX_VALUE;\n const tx = Math.abs(tangents[0].x);\n const ty = Math.abs(tangents[0].y);\n const tz = Math.abs(tangents[0].z);\n if (tx <= min) {\n min = tx;\n normal.set(1, 0, 0);\n }\n if (ty <= min) {\n min = ty;\n normal.set(0, 1, 0);\n }\n if (tz <= min) normal.set(0, 0, 1);\n vec.crossVectors(tangents[0], normal).normalize();\n normals[0].crossVectors(tangents[0], vec);\n binormals[0].crossVectors(tangents[0], normals[0]);\n // compute the slowly-varying normal and binormal vectors for each segment on the curve\n for(let i = 1; i <= segments; i++){\n normals[i] = normals[i - 1].clone();\n binormals[i] = binormals[i - 1].clone();\n vec.crossVectors(tangents[i - 1], tangents[i]);\n if (vec.length() > Number.EPSILON) {\n vec.normalize();\n const theta = Math.acos($d5b33d7c30034067$var$clamp(tangents[i - 1].dot(tangents[i]), -1, 1)); // clamp for floating pt errors\n normals[i].applyMatrix4(mat.makeRotationAxis(vec, theta));\n }\n binormals[i].crossVectors(tangents[i], normals[i]);\n }\n // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n if (closed === true) {\n let theta = Math.acos($d5b33d7c30034067$var$clamp(normals[0].dot(normals[segments]), -1, 1));\n theta /= segments;\n if (tangents[0].dot(vec.crossVectors(normals[0], normals[segments])) > 0) theta = -theta;\n for(let i = 1; i <= segments; i++){\n // twist a little...\n normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i], theta * i));\n binormals[i].crossVectors(tangents[i], normals[i]);\n }\n }\n return {\n tangents: tangents,\n normals: normals,\n binormals: binormals\n };\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(source) {\n this.arcLengthDivisions = source.arcLengthDivisions;\n return this;\n }\n toJSON() {\n const data = {\n metadata: {\n version: 4.6,\n type: \"Curve\",\n generator: \"Curve.toJSON\"\n }\n };\n data.arcLengthDivisions = this.arcLengthDivisions;\n data.type = this.type;\n return data;\n }\n fromJSON(json) {\n this.arcLengthDivisions = json.arcLengthDivisions;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$3f87a931616cde04 extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0){\n super();\n this.isEllipseCurve = true;\n this.type = \"EllipseCurve\";\n this.aX = aX;\n this.aY = aY;\n this.xRadius = xRadius;\n this.yRadius = yRadius;\n this.aStartAngle = aStartAngle;\n this.aEndAngle = aEndAngle;\n this.aClockwise = aClockwise;\n this.aRotation = aRotation;\n }\n getPoint(t, optionalTarget) {\n const point = optionalTarget || new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const twoPi = Math.PI * 2;\n let deltaAngle = this.aEndAngle - this.aStartAngle;\n const samePoints = Math.abs(deltaAngle) < Number.EPSILON;\n // ensures that deltaAngle is 0 .. 2 PI\n while(deltaAngle < 0)deltaAngle += twoPi;\n while(deltaAngle > twoPi)deltaAngle -= twoPi;\n if (deltaAngle < Number.EPSILON) {\n if (samePoints) deltaAngle = 0;\n else deltaAngle = twoPi;\n }\n if (this.aClockwise === true && !samePoints) {\n if (deltaAngle === twoPi) deltaAngle = -twoPi;\n else deltaAngle = deltaAngle - twoPi;\n }\n const angle = this.aStartAngle + t * deltaAngle;\n let x = this.aX + this.xRadius * Math.cos(angle);\n let y = this.aY + this.yRadius * Math.sin(angle);\n if (this.aRotation !== 0) {\n const cos = Math.cos(this.aRotation);\n const sin = Math.sin(this.aRotation);\n const tx = x - this.aX;\n const ty = y - this.aY;\n // Rotate the point about the center of the ellipse.\n x = tx * cos - ty * sin + this.aX;\n y = tx * sin + ty * cos + this.aY;\n }\n return point.set(x, y);\n }\n copy(source) {\n super.copy(source);\n this.aX = source.aX;\n this.aY = source.aY;\n this.xRadius = source.xRadius;\n this.yRadius = source.yRadius;\n this.aStartAngle = source.aStartAngle;\n this.aEndAngle = source.aEndAngle;\n this.aClockwise = source.aClockwise;\n this.aRotation = source.aRotation;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.aX = this.aX;\n data.aY = this.aY;\n data.xRadius = this.xRadius;\n data.yRadius = this.yRadius;\n data.aStartAngle = this.aStartAngle;\n data.aEndAngle = this.aEndAngle;\n data.aClockwise = this.aClockwise;\n data.aRotation = this.aRotation;\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.aX = json.aX;\n this.aY = json.aY;\n this.xRadius = json.xRadius;\n this.yRadius = json.yRadius;\n this.aStartAngle = json.aStartAngle;\n this.aEndAngle = json.aEndAngle;\n this.aClockwise = json.aClockwise;\n this.aRotation = json.aRotation;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$b1eedc9aab6300e8 extends $d5b33d7c30034067$export$3f87a931616cde04 {\n constructor(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise){\n super(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n this.isArcCurve = true;\n this.type = \"ArcCurve\";\n }\n}\n/**\n * Centripetal CatmullRom Curve - which is useful for avoiding\n * cusps and self-intersections in non-uniform catmull rom curves.\n * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n *\n * curve.type accepts centripetal(default), chordal and catmullrom\n * curve.tension is used for catmullrom which defaults to 0.5\n */ /*\nBased on an optimized c++ solution in\n - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n - http://ideone.com/NoEbVM\n\nThis CubicPoly class could be used for reusing some variables and calculations,\nbut for three.js curve use, it could be possible inlined and flatten into a single function call\nwhich can be placed in CurveUtils.\n*/ function $d5b33d7c30034067$var$CubicPoly() {\n let c0 = 0, c1 = 0, c2 = 0, c3 = 0;\n /*\n\t * Compute coefficients for a cubic polynomial\n\t * p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t * such that\n\t * p(0) = x0, p(1) = x1\n\t * and\n\t * p'(0) = t0, p'(1) = t1.\n\t */ function init(x0, x1, t0, t1) {\n c0 = x0;\n c1 = t0;\n c2 = -3 * x0 + 3 * x1 - 2 * t0 - t1;\n c3 = 2 * x0 - 2 * x1 + t0 + t1;\n }\n return {\n initCatmullRom: function(x0, x1, x2, x3, tension) {\n init(x1, x2, tension * (x2 - x0), tension * (x3 - x1));\n },\n initNonuniformCatmullRom: function(x0, x1, x2, x3, dt0, dt1, dt2) {\n // compute tangents when parameterized in [t1,t2]\n let t1 = (x1 - x0) / dt0 - (x2 - x0) / (dt0 + dt1) + (x2 - x1) / dt1;\n let t2 = (x2 - x1) / dt1 - (x3 - x1) / (dt1 + dt2) + (x3 - x2) / dt2;\n // rescale tangents for parametrization in [0,1]\n t1 *= dt1;\n t2 *= dt1;\n init(x1, x2, t1, t2);\n },\n calc: function(t) {\n const t2 = t * t;\n const t3 = t2 * t;\n return c0 + c1 * t + c2 * t2 + c3 * t3;\n }\n };\n}\n//\nconst $d5b33d7c30034067$var$tmp = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$px = /*@__PURE__*/ new $d5b33d7c30034067$var$CubicPoly();\nconst $d5b33d7c30034067$var$py = /*@__PURE__*/ new $d5b33d7c30034067$var$CubicPoly();\nconst $d5b33d7c30034067$var$pz = /*@__PURE__*/ new $d5b33d7c30034067$var$CubicPoly();\nclass $d5b33d7c30034067$export$b9146b27c24b744c extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(points = [], closed = false, curveType = \"centripetal\", tension = 0.5){\n super();\n this.isCatmullRomCurve3 = true;\n this.type = \"CatmullRomCurve3\";\n this.points = points;\n this.closed = closed;\n this.curveType = curveType;\n this.tension = tension;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n const points = this.points;\n const l = points.length;\n const p = (l - (this.closed ? 0 : 1)) * t;\n let intPoint = Math.floor(p);\n let weight = p - intPoint;\n if (this.closed) intPoint += intPoint > 0 ? 0 : (Math.floor(Math.abs(intPoint) / l) + 1) * l;\n else if (weight === 0 && intPoint === l - 1) {\n intPoint = l - 2;\n weight = 1;\n }\n let p0, p3; // 4 points (p1 & p2 defined below)\n if (this.closed || intPoint > 0) p0 = points[(intPoint - 1) % l];\n else {\n // extrapolate first point\n $d5b33d7c30034067$var$tmp.subVectors(points[0], points[1]).add(points[0]);\n p0 = $d5b33d7c30034067$var$tmp;\n }\n const p1 = points[intPoint % l];\n const p2 = points[(intPoint + 1) % l];\n if (this.closed || intPoint + 2 < l) p3 = points[(intPoint + 2) % l];\n else {\n // extrapolate last point\n $d5b33d7c30034067$var$tmp.subVectors(points[l - 1], points[l - 2]).add(points[l - 1]);\n p3 = $d5b33d7c30034067$var$tmp;\n }\n if (this.curveType === \"centripetal\" || this.curveType === \"chordal\") {\n // init Centripetal / Chordal Catmull-Rom\n const pow = this.curveType === \"chordal\" ? 0.5 : 0.25;\n let dt0 = Math.pow(p0.distanceToSquared(p1), pow);\n let dt1 = Math.pow(p1.distanceToSquared(p2), pow);\n let dt2 = Math.pow(p2.distanceToSquared(p3), pow);\n // safety check for repeated points\n if (dt1 < 1e-4) dt1 = 1.0;\n if (dt0 < 1e-4) dt0 = dt1;\n if (dt2 < 1e-4) dt2 = dt1;\n $d5b33d7c30034067$var$px.initNonuniformCatmullRom(p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2);\n $d5b33d7c30034067$var$py.initNonuniformCatmullRom(p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2);\n $d5b33d7c30034067$var$pz.initNonuniformCatmullRom(p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2);\n } else if (this.curveType === \"catmullrom\") {\n $d5b33d7c30034067$var$px.initCatmullRom(p0.x, p1.x, p2.x, p3.x, this.tension);\n $d5b33d7c30034067$var$py.initCatmullRom(p0.y, p1.y, p2.y, p3.y, this.tension);\n $d5b33d7c30034067$var$pz.initCatmullRom(p0.z, p1.z, p2.z, p3.z, this.tension);\n }\n point.set($d5b33d7c30034067$var$px.calc(weight), $d5b33d7c30034067$var$py.calc(weight), $d5b33d7c30034067$var$pz.calc(weight));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.points = [];\n for(let i = 0, l = source.points.length; i < l; i++){\n const point = source.points[i];\n this.points.push(point.clone());\n }\n this.closed = source.closed;\n this.curveType = source.curveType;\n this.tension = source.tension;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.points = [];\n for(let i = 0, l = this.points.length; i < l; i++){\n const point = this.points[i];\n data.points.push(point.toArray());\n }\n data.closed = this.closed;\n data.curveType = this.curveType;\n data.tension = this.tension;\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.points = [];\n for(let i = 0, l = json.points.length; i < l; i++){\n const point = json.points[i];\n this.points.push(new $d5b33d7c30034067$export$64b5c384219d3699().fromArray(point));\n }\n this.closed = json.closed;\n this.curveType = json.curveType;\n this.tension = json.tension;\n return this;\n }\n}\n/**\n * Bezier Curves formulas obtained from\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n */ function $d5b33d7c30034067$var$CatmullRom(t, p0, p1, p2, p3) {\n const v0 = (p2 - p0) * 0.5;\n const v1 = (p3 - p1) * 0.5;\n const t2 = t * t;\n const t3 = t * t2;\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n}\n//\nfunction $d5b33d7c30034067$var$QuadraticBezierP0(t, p) {\n const k = 1 - t;\n return k * k * p;\n}\nfunction $d5b33d7c30034067$var$QuadraticBezierP1(t, p) {\n return 2 * (1 - t) * t * p;\n}\nfunction $d5b33d7c30034067$var$QuadraticBezierP2(t, p) {\n return t * t * p;\n}\nfunction $d5b33d7c30034067$var$QuadraticBezier(t, p0, p1, p2) {\n return $d5b33d7c30034067$var$QuadraticBezierP0(t, p0) + $d5b33d7c30034067$var$QuadraticBezierP1(t, p1) + $d5b33d7c30034067$var$QuadraticBezierP2(t, p2);\n}\n//\nfunction $d5b33d7c30034067$var$CubicBezierP0(t, p) {\n const k = 1 - t;\n return k * k * k * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezierP1(t, p) {\n const k = 1 - t;\n return 3 * k * k * t * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezierP2(t, p) {\n return 3 * (1 - t) * t * t * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezierP3(t, p) {\n return t * t * t * p;\n}\nfunction $d5b33d7c30034067$var$CubicBezier(t, p0, p1, p2, p3) {\n return $d5b33d7c30034067$var$CubicBezierP0(t, p0) + $d5b33d7c30034067$var$CubicBezierP1(t, p1) + $d5b33d7c30034067$var$CubicBezierP2(t, p2) + $d5b33d7c30034067$var$CubicBezierP3(t, p3);\n}\nclass $d5b33d7c30034067$export$e36650d36468bb39 extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v1 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v2 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v3 = new $d5b33d7c30034067$export$c977b3e384af9ae1()){\n super();\n this.isCubicBezierCurve = true;\n this.type = \"CubicBezierCurve\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n this.v3 = v3;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n point.set($d5b33d7c30034067$var$CubicBezier(t, v0.x, v1.x, v2.x, v3.x), $d5b33d7c30034067$var$CubicBezier(t, v0.y, v1.y, v2.y, v3.y));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n this.v3.copy(source.v3);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n data.v3 = this.v3.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n this.v3.fromArray(json.v3);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$13d5f1c9525f246c extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$64b5c384219d3699(), v1 = new $d5b33d7c30034067$export$64b5c384219d3699(), v2 = new $d5b33d7c30034067$export$64b5c384219d3699(), v3 = new $d5b33d7c30034067$export$64b5c384219d3699()){\n super();\n this.isCubicBezierCurve3 = true;\n this.type = \"CubicBezierCurve3\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n this.v3 = v3;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n point.set($d5b33d7c30034067$var$CubicBezier(t, v0.x, v1.x, v2.x, v3.x), $d5b33d7c30034067$var$CubicBezier(t, v0.y, v1.y, v2.y, v3.y), $d5b33d7c30034067$var$CubicBezier(t, v0.z, v1.z, v2.z, v3.z));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n this.v3.copy(source.v3);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n data.v3 = this.v3.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n this.v3.fromArray(json.v3);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$ab2e07e76531a47e extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v1 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v2 = new $d5b33d7c30034067$export$c977b3e384af9ae1()){\n super();\n this.isLineCurve = true;\n this.type = \"LineCurve\";\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n if (t === 1) point.copy(this.v2);\n else {\n point.copy(this.v2).sub(this.v1);\n point.multiplyScalar(t).add(this.v1);\n }\n return point;\n }\n // Line curve is linear, so we can overwrite default getPointAt\n getPointAt(u, optionalTarget) {\n return this.getPoint(u, optionalTarget);\n }\n getTangent(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n return optionalTarget.subVectors(this.v2, this.v1).normalize();\n }\n getTangentAt(u, optionalTarget) {\n return this.getTangent(u, optionalTarget);\n }\n copy(source) {\n super.copy(source);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$1fdfd9d9cf487600 extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v1 = new $d5b33d7c30034067$export$64b5c384219d3699(), v2 = new $d5b33d7c30034067$export$64b5c384219d3699()){\n super();\n this.isLineCurve3 = true;\n this.type = \"LineCurve3\";\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n if (t === 1) point.copy(this.v2);\n else {\n point.copy(this.v2).sub(this.v1);\n point.multiplyScalar(t).add(this.v1);\n }\n return point;\n }\n // Line curve is linear, so we can overwrite default getPointAt\n getPointAt(u, optionalTarget) {\n return this.getPoint(u, optionalTarget);\n }\n getTangent(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n return optionalTarget.subVectors(this.v2, this.v1).normalize();\n }\n getTangentAt(u, optionalTarget) {\n return this.getTangent(u, optionalTarget);\n }\n copy(source) {\n super.copy(source);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$5938c4ee491a43ad extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v1 = new $d5b33d7c30034067$export$c977b3e384af9ae1(), v2 = new $d5b33d7c30034067$export$c977b3e384af9ae1()){\n super();\n this.isQuadraticBezierCurve = true;\n this.type = \"QuadraticBezierCurve\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2;\n point.set($d5b33d7c30034067$var$QuadraticBezier(t, v0.x, v1.x, v2.x), $d5b33d7c30034067$var$QuadraticBezier(t, v0.y, v1.y, v2.y));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$bf3f4c7e459f90fc extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(v0 = new $d5b33d7c30034067$export$64b5c384219d3699(), v1 = new $d5b33d7c30034067$export$64b5c384219d3699(), v2 = new $d5b33d7c30034067$export$64b5c384219d3699()){\n super();\n this.isQuadraticBezierCurve3 = true;\n this.type = \"QuadraticBezierCurve3\";\n this.v0 = v0;\n this.v1 = v1;\n this.v2 = v2;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$64b5c384219d3699()) {\n const point = optionalTarget;\n const v0 = this.v0, v1 = this.v1, v2 = this.v2;\n point.set($d5b33d7c30034067$var$QuadraticBezier(t, v0.x, v1.x, v2.x), $d5b33d7c30034067$var$QuadraticBezier(t, v0.y, v1.y, v2.y), $d5b33d7c30034067$var$QuadraticBezier(t, v0.z, v1.z, v2.z));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.v0.copy(source.v0);\n this.v1.copy(source.v1);\n this.v2.copy(source.v2);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.v0 = this.v0.toArray();\n data.v1 = this.v1.toArray();\n data.v2 = this.v2.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.v0.fromArray(json.v0);\n this.v1.fromArray(json.v1);\n this.v2.fromArray(json.v2);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$d3bdd77da77afc1b extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(points = []){\n super();\n this.isSplineCurve = true;\n this.type = \"SplineCurve\";\n this.points = points;\n }\n getPoint(t, optionalTarget = new $d5b33d7c30034067$export$c977b3e384af9ae1()) {\n const point = optionalTarget;\n const points = this.points;\n const p = (points.length - 1) * t;\n const intPoint = Math.floor(p);\n const weight = p - intPoint;\n const p0 = points[intPoint === 0 ? intPoint : intPoint - 1];\n const p1 = points[intPoint];\n const p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1];\n const p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2];\n point.set($d5b33d7c30034067$var$CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), $d5b33d7c30034067$var$CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));\n return point;\n }\n copy(source) {\n super.copy(source);\n this.points = [];\n for(let i = 0, l = source.points.length; i < l; i++){\n const point = source.points[i];\n this.points.push(point.clone());\n }\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.points = [];\n for(let i = 0, l = this.points.length; i < l; i++){\n const point = this.points[i];\n data.points.push(point.toArray());\n }\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.points = [];\n for(let i = 0, l = json.points.length; i < l; i++){\n const point = json.points[i];\n this.points.push(new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(point));\n }\n return this;\n }\n}\nvar $d5b33d7c30034067$var$Curves = /*#__PURE__*/ Object.freeze({\n __proto__: null,\n ArcCurve: $d5b33d7c30034067$export$b1eedc9aab6300e8,\n CatmullRomCurve3: $d5b33d7c30034067$export$b9146b27c24b744c,\n CubicBezierCurve: $d5b33d7c30034067$export$e36650d36468bb39,\n CubicBezierCurve3: $d5b33d7c30034067$export$13d5f1c9525f246c,\n EllipseCurve: $d5b33d7c30034067$export$3f87a931616cde04,\n LineCurve: $d5b33d7c30034067$export$ab2e07e76531a47e,\n LineCurve3: $d5b33d7c30034067$export$1fdfd9d9cf487600,\n QuadraticBezierCurve: $d5b33d7c30034067$export$5938c4ee491a43ad,\n QuadraticBezierCurve3: $d5b33d7c30034067$export$bf3f4c7e459f90fc,\n SplineCurve: $d5b33d7c30034067$export$d3bdd77da77afc1b\n});\n/**************************************************************\n *\tCurved Path - a curve path is simply a array of connected\n * curves, but retains the api of a curve\n **************************************************************/ class $d5b33d7c30034067$export$4aaf9b66af1bbf2c extends $d5b33d7c30034067$export$b0e83c3ef8d2db1 {\n constructor(){\n super();\n this.type = \"CurvePath\";\n this.curves = [];\n this.autoClose = false; // Automatically closes the path\n }\n add(curve) {\n this.curves.push(curve);\n }\n closePath() {\n // Add a line curve if start and end of lines are not connected\n const startPoint = this.curves[0].getPoint(0);\n const endPoint = this.curves[this.curves.length - 1].getPoint(1);\n if (!startPoint.equals(endPoint)) {\n const lineType = startPoint.isVector2 === true ? \"LineCurve\" : \"LineCurve3\";\n this.curves.push(new $d5b33d7c30034067$var$Curves[lineType](endPoint, startPoint));\n }\n return this;\n }\n // To get accurate point with reference to\n // entire path distance at time t,\n // following has to be done:\n // 1. Length of each sub path have to be known\n // 2. Locate and identify type of curve\n // 3. Get t for the curve\n // 4. Return curve.getPointAt(t')\n getPoint(t, optionalTarget) {\n const d = t * this.getLength();\n const curveLengths = this.getCurveLengths();\n let i = 0;\n // To think about boundaries points.\n while(i < curveLengths.length){\n if (curveLengths[i] >= d) {\n const diff = curveLengths[i] - d;\n const curve = this.curves[i];\n const segmentLength = curve.getLength();\n const u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n return curve.getPointAt(u, optionalTarget);\n }\n i++;\n }\n return null;\n // loop where sum != 0, sum > d , sum+1 1 && !points[points.length - 1].equals(points[0])) points.push(points[0]);\n return points;\n }\n copy(source) {\n super.copy(source);\n this.curves = [];\n for(let i = 0, l = source.curves.length; i < l; i++){\n const curve = source.curves[i];\n this.curves.push(curve.clone());\n }\n this.autoClose = source.autoClose;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.autoClose = this.autoClose;\n data.curves = [];\n for(let i = 0, l = this.curves.length; i < l; i++){\n const curve = this.curves[i];\n data.curves.push(curve.toJSON());\n }\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.autoClose = json.autoClose;\n this.curves = [];\n for(let i = 0, l = json.curves.length; i < l; i++){\n const curve = json.curves[i];\n this.curves.push(new $d5b33d7c30034067$var$Curves[curve.type]().fromJSON(curve));\n }\n return this;\n }\n}\nclass $d5b33d7c30034067$export$4b2950bdac9b6ee9 extends $d5b33d7c30034067$export$4aaf9b66af1bbf2c {\n constructor(points){\n super();\n this.type = \"Path\";\n this.currentPoint = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n if (points) this.setFromPoints(points);\n }\n setFromPoints(points) {\n this.moveTo(points[0].x, points[0].y);\n for(let i = 1, l = points.length; i < l; i++)this.lineTo(points[i].x, points[i].y);\n return this;\n }\n moveTo(x, y) {\n this.currentPoint.set(x, y); // TODO consider referencing vectors instead of copying?\n return this;\n }\n lineTo(x, y) {\n const curve = new $d5b33d7c30034067$export$ab2e07e76531a47e(this.currentPoint.clone(), new $d5b33d7c30034067$export$c977b3e384af9ae1(x, y));\n this.curves.push(curve);\n this.currentPoint.set(x, y);\n return this;\n }\n quadraticCurveTo(aCPx, aCPy, aX, aY) {\n const curve = new $d5b33d7c30034067$export$5938c4ee491a43ad(this.currentPoint.clone(), new $d5b33d7c30034067$export$c977b3e384af9ae1(aCPx, aCPy), new $d5b33d7c30034067$export$c977b3e384af9ae1(aX, aY));\n this.curves.push(curve);\n this.currentPoint.set(aX, aY);\n return this;\n }\n bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n const curve = new $d5b33d7c30034067$export$e36650d36468bb39(this.currentPoint.clone(), new $d5b33d7c30034067$export$c977b3e384af9ae1(aCP1x, aCP1y), new $d5b33d7c30034067$export$c977b3e384af9ae1(aCP2x, aCP2y), new $d5b33d7c30034067$export$c977b3e384af9ae1(aX, aY));\n this.curves.push(curve);\n this.currentPoint.set(aX, aY);\n return this;\n }\n splineThru(pts /*Array of Vector*/ ) {\n const npts = [\n this.currentPoint.clone()\n ].concat(pts);\n const curve = new $d5b33d7c30034067$export$d3bdd77da77afc1b(npts);\n this.curves.push(curve);\n this.currentPoint.copy(pts[pts.length - 1]);\n return this;\n }\n arc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n const x0 = this.currentPoint.x;\n const y0 = this.currentPoint.y;\n this.absarc(aX + x0, aY + y0, aRadius, aStartAngle, aEndAngle, aClockwise);\n return this;\n }\n absarc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n this.absellipse(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n return this;\n }\n ellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n const x0 = this.currentPoint.x;\n const y0 = this.currentPoint.y;\n this.absellipse(aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n return this;\n }\n absellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n const curve = new $d5b33d7c30034067$export$3f87a931616cde04(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n if (this.curves.length > 0) {\n // if a previous curve is present, attempt to join\n const firstPoint = curve.getPoint(0);\n if (!firstPoint.equals(this.currentPoint)) this.lineTo(firstPoint.x, firstPoint.y);\n }\n this.curves.push(curve);\n const lastPoint = curve.getPoint(1);\n this.currentPoint.copy(lastPoint);\n return this;\n }\n copy(source) {\n super.copy(source);\n this.currentPoint.copy(source.currentPoint);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.currentPoint = this.currentPoint.toArray();\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.currentPoint.fromArray(json.currentPoint);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$6d839803fcd1882c extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(points = [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0, -0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0.5)\n ], segments = 12, phiStart = 0, phiLength = Math.PI * 2){\n super();\n this.type = \"LatheGeometry\";\n this.parameters = {\n points: points,\n segments: segments,\n phiStart: phiStart,\n phiLength: phiLength\n };\n segments = Math.floor(segments);\n // clamp phiLength so it's in range of [ 0, 2PI ]\n phiLength = $d5b33d7c30034067$var$clamp(phiLength, 0, Math.PI * 2);\n // buffers\n const indices = [];\n const vertices = [];\n const uvs = [];\n const initNormals = [];\n const normals = [];\n // helper variables\n const inverseSegments = 1.0 / segments;\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const curNormal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const prevNormal = new $d5b33d7c30034067$export$64b5c384219d3699();\n let dx = 0;\n let dy = 0;\n // pre-compute normals for initial \"meridian\"\n for(let j = 0; j <= points.length - 1; j++)switch(j){\n case 0:\n dx = points[j + 1].x - points[j].x;\n dy = points[j + 1].y - points[j].y;\n normal.x = dy * 1.0;\n normal.y = -dx;\n normal.z = dy * 0.0;\n prevNormal.copy(normal);\n normal.normalize();\n initNormals.push(normal.x, normal.y, normal.z);\n break;\n case points.length - 1:\n initNormals.push(prevNormal.x, prevNormal.y, prevNormal.z);\n break;\n default:\n dx = points[j + 1].x - points[j].x;\n dy = points[j + 1].y - points[j].y;\n normal.x = dy * 1.0;\n normal.y = -dx;\n normal.z = dy * 0.0;\n curNormal.copy(normal);\n normal.x += prevNormal.x;\n normal.y += prevNormal.y;\n normal.z += prevNormal.z;\n normal.normalize();\n initNormals.push(normal.x, normal.y, normal.z);\n prevNormal.copy(curNormal);\n }\n // generate vertices, uvs and normals\n for(let i = 0; i <= segments; i++){\n const phi = phiStart + i * inverseSegments * phiLength;\n const sin = Math.sin(phi);\n const cos = Math.cos(phi);\n for(let j = 0; j <= points.length - 1; j++){\n // vertex\n vertex.x = points[j].x * sin;\n vertex.y = points[j].y;\n vertex.z = points[j].x * cos;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // uv\n uv.x = i / segments;\n uv.y = j / (points.length - 1);\n uvs.push(uv.x, uv.y);\n // normal\n const x = initNormals[3 * j + 0] * sin;\n const y = initNormals[3 * j + 1];\n const z = initNormals[3 * j + 0] * cos;\n normals.push(x, y, z);\n }\n }\n // indices\n for(let i = 0; i < segments; i++)for(let j = 0; j < points.length - 1; j++){\n const base = j + i * points.length;\n const a = base;\n const b = base + points.length;\n const c = base + points.length + 1;\n const d = base + 1;\n // faces\n indices.push(a, b, d);\n indices.push(c, d, b);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$6d839803fcd1882c(data.points, data.segments, data.phiStart, data.phiLength);\n }\n}\nclass $d5b33d7c30034067$export$41680e8551036033 extends $d5b33d7c30034067$export$6d839803fcd1882c {\n constructor(radius = 1, length = 1, capSegments = 4, radialSegments = 8){\n const path = new $d5b33d7c30034067$export$4b2950bdac9b6ee9();\n path.absarc(0, -length / 2, radius, Math.PI * 1.5, 0);\n path.absarc(0, length / 2, radius, 0, Math.PI * 0.5);\n super(path.getPoints(capSegments), radialSegments);\n this.type = \"CapsuleGeometry\";\n this.parameters = {\n radius: radius,\n length: length,\n capSegments: capSegments,\n radialSegments: radialSegments\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$41680e8551036033(data.radius, data.length, data.capSegments, data.radialSegments);\n }\n}\nclass $d5b33d7c30034067$export$d5c0e8d607467193 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, segments = 32, thetaStart = 0, thetaLength = Math.PI * 2){\n super();\n this.type = \"CircleGeometry\";\n this.parameters = {\n radius: radius,\n segments: segments,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n segments = Math.max(3, segments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n // center point\n vertices.push(0, 0, 0);\n normals.push(0, 0, 1);\n uvs.push(0.5, 0.5);\n for(let s = 0, i = 3; s <= segments; s++, i += 3){\n const segment = thetaStart + s / segments * thetaLength;\n // vertex\n vertex.x = radius * Math.cos(segment);\n vertex.y = radius * Math.sin(segment);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normals.push(0, 0, 1);\n // uvs\n uv.x = (vertices[i] / radius + 1) / 2;\n uv.y = (vertices[i + 1] / radius + 1) / 2;\n uvs.push(uv.x, uv.y);\n }\n // indices\n for(let i = 1; i <= segments; i++)indices.push(i, i + 1, 0);\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$d5c0e8d607467193(data.radius, data.segments, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$68f745719dbe5198 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2){\n super();\n this.type = \"CylinderGeometry\";\n this.parameters = {\n radiusTop: radiusTop,\n radiusBottom: radiusBottom,\n height: height,\n radialSegments: radialSegments,\n heightSegments: heightSegments,\n openEnded: openEnded,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n const scope = this;\n radialSegments = Math.floor(radialSegments);\n heightSegments = Math.floor(heightSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n let index = 0;\n const indexArray = [];\n const halfHeight = height / 2;\n let groupStart = 0;\n // generate geometry\n generateTorso();\n if (openEnded === false) {\n if (radiusTop > 0) generateCap(true);\n if (radiusBottom > 0) generateCap(false);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n function generateTorso() {\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n let groupCount = 0;\n // this will be used to calculate the normal\n const slope = (radiusBottom - radiusTop) / height;\n // generate vertices, normals and uvs\n for(let y = 0; y <= heightSegments; y++){\n const indexRow = [];\n const v = y / heightSegments;\n // calculate the radius of the current row\n const radius = v * (radiusBottom - radiusTop) + radiusTop;\n for(let x = 0; x <= radialSegments; x++){\n const u = x / radialSegments;\n const theta = u * thetaLength + thetaStart;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n // vertex\n vertex.x = radius * sinTheta;\n vertex.y = -v * height + halfHeight;\n vertex.z = radius * cosTheta;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normal.set(sinTheta, slope, cosTheta).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(u, 1 - v);\n // save index of vertex in respective row\n indexRow.push(index++);\n }\n // now save vertices of the row in our index array\n indexArray.push(indexRow);\n }\n // generate indices\n for(let x = 0; x < radialSegments; x++)for(let y = 0; y < heightSegments; y++){\n // we use the index array to access the correct indices\n const a = indexArray[y][x];\n const b = indexArray[y + 1][x];\n const c = indexArray[y + 1][x + 1];\n const d = indexArray[y][x + 1];\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n // update group counter\n groupCount += 6;\n }\n // add a group to the geometry. this will ensure multi material support\n scope.addGroup(groupStart, groupCount, 0);\n // calculate new start value for groups\n groupStart += groupCount;\n }\n function generateCap(top) {\n // save the index of the first center vertex\n const centerIndexStart = index;\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n let groupCount = 0;\n const radius = top === true ? radiusTop : radiusBottom;\n const sign = top === true ? 1 : -1;\n // first we generate the center vertex data of the cap.\n // because the geometry needs one set of uvs per face,\n // we must generate a center vertex per face/segment\n for(let x = 1; x <= radialSegments; x++){\n // vertex\n vertices.push(0, halfHeight * sign, 0);\n // normal\n normals.push(0, sign, 0);\n // uv\n uvs.push(0.5, 0.5);\n // increase index\n index++;\n }\n // save the index of the last center vertex\n const centerIndexEnd = index;\n // now we generate the surrounding vertices, normals and uvs\n for(let x = 0; x <= radialSegments; x++){\n const u = x / radialSegments;\n const theta = u * thetaLength + thetaStart;\n const cosTheta = Math.cos(theta);\n const sinTheta = Math.sin(theta);\n // vertex\n vertex.x = radius * sinTheta;\n vertex.y = halfHeight * sign;\n vertex.z = radius * cosTheta;\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normals.push(0, sign, 0);\n // uv\n uv.x = cosTheta * 0.5 + 0.5;\n uv.y = sinTheta * 0.5 * sign + 0.5;\n uvs.push(uv.x, uv.y);\n // increase index\n index++;\n }\n // generate indices\n for(let x = 0; x < radialSegments; x++){\n const c = centerIndexStart + x;\n const i = centerIndexEnd + x;\n if (top === true) // face top\n indices.push(i, i + 1, c);\n else // face bottom\n indices.push(i + 1, i, c);\n groupCount += 3;\n }\n // add a group to the geometry. this will ensure multi material support\n scope.addGroup(groupStart, groupCount, top === true ? 1 : 2);\n // calculate new start value for groups\n groupStart += groupCount;\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$68f745719dbe5198(data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$a7a48974f285c9b3 extends $d5b33d7c30034067$export$68f745719dbe5198 {\n constructor(radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2){\n super(0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength);\n this.type = \"ConeGeometry\";\n this.parameters = {\n radius: radius,\n height: height,\n radialSegments: radialSegments,\n heightSegments: heightSegments,\n openEnded: openEnded,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$a7a48974f285c9b3(data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$60e57a7d3f20ff65 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(vertices = [], indices = [], radius = 1, detail = 0){\n super();\n this.type = \"PolyhedronGeometry\";\n this.parameters = {\n vertices: vertices,\n indices: indices,\n radius: radius,\n detail: detail\n };\n // default buffer data\n const vertexBuffer = [];\n const uvBuffer = [];\n // the subdivision creates the vertex buffer data\n subdivide(detail);\n // all vertices should lie on a conceptual sphere with a given radius\n applyRadius(radius);\n // finally, create the uv data\n generateUVs();\n // build non-indexed geometry\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertexBuffer, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertexBuffer.slice(), 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvBuffer, 2));\n if (detail === 0) this.computeVertexNormals(); // flat normals\n else this.normalizeNormals(); // smooth normals\n // helper functions\n function subdivide(detail) {\n const a = new $d5b33d7c30034067$export$64b5c384219d3699();\n const b = new $d5b33d7c30034067$export$64b5c384219d3699();\n const c = new $d5b33d7c30034067$export$64b5c384219d3699();\n // iterate over all faces and apply a subdivision with the given detail value\n for(let i = 0; i < indices.length; i += 3){\n // get the vertices of the face\n getVertexByIndex(indices[i + 0], a);\n getVertexByIndex(indices[i + 1], b);\n getVertexByIndex(indices[i + 2], c);\n // perform subdivision\n subdivideFace(a, b, c, detail);\n }\n }\n function subdivideFace(a, b, c, detail) {\n const cols = detail + 1;\n // we use this multidimensional array as a data structure for creating the subdivision\n const v = [];\n // construct all of the vertices for this subdivision\n for(let i = 0; i <= cols; i++){\n v[i] = [];\n const aj = a.clone().lerp(c, i / cols);\n const bj = b.clone().lerp(c, i / cols);\n const rows = cols - i;\n for(let j = 0; j <= rows; j++)if (j === 0 && i === cols) v[i][j] = aj;\n else v[i][j] = aj.clone().lerp(bj, j / rows);\n }\n // construct all of the faces\n for(let i = 0; i < cols; i++)for(let j = 0; j < 2 * (cols - i) - 1; j++){\n const k = Math.floor(j / 2);\n if (j % 2 === 0) {\n pushVertex(v[i][k + 1]);\n pushVertex(v[i + 1][k]);\n pushVertex(v[i][k]);\n } else {\n pushVertex(v[i][k + 1]);\n pushVertex(v[i + 1][k + 1]);\n pushVertex(v[i + 1][k]);\n }\n }\n }\n function applyRadius(radius) {\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n // iterate over the entire buffer and apply the radius to each vertex\n for(let i = 0; i < vertexBuffer.length; i += 3){\n vertex.x = vertexBuffer[i + 0];\n vertex.y = vertexBuffer[i + 1];\n vertex.z = vertexBuffer[i + 2];\n vertex.normalize().multiplyScalar(radius);\n vertexBuffer[i + 0] = vertex.x;\n vertexBuffer[i + 1] = vertex.y;\n vertexBuffer[i + 2] = vertex.z;\n }\n }\n function generateUVs() {\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n for(let i = 0; i < vertexBuffer.length; i += 3){\n vertex.x = vertexBuffer[i + 0];\n vertex.y = vertexBuffer[i + 1];\n vertex.z = vertexBuffer[i + 2];\n const u = azimuth(vertex) / 2 / Math.PI + 0.5;\n const v = inclination(vertex) / Math.PI + 0.5;\n uvBuffer.push(u, 1 - v);\n }\n correctUVs();\n correctSeam();\n }\n function correctSeam() {\n // handle case when face straddles the seam, see #3269\n for(let i = 0; i < uvBuffer.length; i += 6){\n // uv data of a single face\n const x0 = uvBuffer[i + 0];\n const x1 = uvBuffer[i + 2];\n const x2 = uvBuffer[i + 4];\n const max = Math.max(x0, x1, x2);\n const min = Math.min(x0, x1, x2);\n // 0.9 is somewhat arbitrary\n if (max > 0.9 && min < 0.1) {\n if (x0 < 0.2) uvBuffer[i + 0] += 1;\n if (x1 < 0.2) uvBuffer[i + 2] += 1;\n if (x2 < 0.2) uvBuffer[i + 4] += 1;\n }\n }\n }\n function pushVertex(vertex) {\n vertexBuffer.push(vertex.x, vertex.y, vertex.z);\n }\n function getVertexByIndex(index, vertex) {\n const stride = index * 3;\n vertex.x = vertices[stride + 0];\n vertex.y = vertices[stride + 1];\n vertex.z = vertices[stride + 2];\n }\n function correctUVs() {\n const a = new $d5b33d7c30034067$export$64b5c384219d3699();\n const b = new $d5b33d7c30034067$export$64b5c384219d3699();\n const c = new $d5b33d7c30034067$export$64b5c384219d3699();\n const centroid = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uvA = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const uvB = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n const uvC = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n for(let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6){\n a.set(vertexBuffer[i + 0], vertexBuffer[i + 1], vertexBuffer[i + 2]);\n b.set(vertexBuffer[i + 3], vertexBuffer[i + 4], vertexBuffer[i + 5]);\n c.set(vertexBuffer[i + 6], vertexBuffer[i + 7], vertexBuffer[i + 8]);\n uvA.set(uvBuffer[j + 0], uvBuffer[j + 1]);\n uvB.set(uvBuffer[j + 2], uvBuffer[j + 3]);\n uvC.set(uvBuffer[j + 4], uvBuffer[j + 5]);\n centroid.copy(a).add(b).add(c).divideScalar(3);\n const azi = azimuth(centroid);\n correctUV(uvA, j + 0, a, azi);\n correctUV(uvB, j + 2, b, azi);\n correctUV(uvC, j + 4, c, azi);\n }\n }\n function correctUV(uv, stride, vector, azimuth) {\n if (azimuth < 0 && uv.x === 1) uvBuffer[stride] = uv.x - 1;\n if (vector.x === 0 && vector.z === 0) uvBuffer[stride] = azimuth / 2 / Math.PI + 0.5;\n }\n // Angle around the Y axis, counter-clockwise when looking from above.\n function azimuth(vector) {\n return Math.atan2(vector.z, -vector.x);\n }\n // Angle above the XZ plane.\n function inclination(vector) {\n return Math.atan2(-vector.y, Math.sqrt(vector.x * vector.x + vector.z * vector.z));\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$60e57a7d3f20ff65(data.vertices, data.indices, data.radius, data.details);\n }\n}\nclass $d5b33d7c30034067$export$c0babfeb8708fc9c extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const t = (1 + Math.sqrt(5)) / 2;\n const r = 1 / t;\n const vertices = [\n // (±1, ±1, ±1)\n -1,\n -1,\n -1,\n -1,\n -1,\n 1,\n -1,\n 1,\n -1,\n -1,\n 1,\n 1,\n 1,\n -1,\n -1,\n 1,\n -1,\n 1,\n 1,\n 1,\n -1,\n 1,\n 1,\n 1,\n // (0, ±1/φ, ±φ)\n 0,\n -r,\n -t,\n 0,\n -r,\n t,\n 0,\n r,\n -t,\n 0,\n r,\n t,\n // (±1/φ, ±φ, 0)\n -r,\n -t,\n 0,\n -r,\n t,\n 0,\n r,\n -t,\n 0,\n r,\n t,\n 0,\n // (±φ, 0, ±1/φ)\n -t,\n 0,\n -r,\n t,\n 0,\n -r,\n -t,\n 0,\n r,\n t,\n 0,\n r\n ];\n const indices = [\n 3,\n 11,\n 7,\n 3,\n 7,\n 15,\n 3,\n 15,\n 13,\n 7,\n 19,\n 17,\n 7,\n 17,\n 6,\n 7,\n 6,\n 15,\n 17,\n 4,\n 8,\n 17,\n 8,\n 10,\n 17,\n 10,\n 6,\n 8,\n 0,\n 16,\n 8,\n 16,\n 2,\n 8,\n 2,\n 10,\n 0,\n 12,\n 1,\n 0,\n 1,\n 18,\n 0,\n 18,\n 16,\n 6,\n 10,\n 2,\n 6,\n 2,\n 13,\n 6,\n 13,\n 15,\n 2,\n 16,\n 18,\n 2,\n 18,\n 3,\n 2,\n 3,\n 13,\n 18,\n 1,\n 9,\n 18,\n 9,\n 11,\n 18,\n 11,\n 3,\n 4,\n 14,\n 12,\n 4,\n 12,\n 0,\n 4,\n 0,\n 8,\n 11,\n 9,\n 5,\n 11,\n 5,\n 19,\n 11,\n 19,\n 7,\n 19,\n 5,\n 14,\n 19,\n 14,\n 4,\n 19,\n 4,\n 17,\n 1,\n 12,\n 14,\n 1,\n 14,\n 5,\n 1,\n 5,\n 9\n ];\n super(vertices, indices, radius, detail);\n this.type = \"DodecahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$c0babfeb8708fc9c(data.radius, data.detail);\n }\n}\nconst $d5b33d7c30034067$var$_v0 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v1$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_normal = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_triangle = /*@__PURE__*/ new $d5b33d7c30034067$export$5a465592bfe74b48();\nclass $d5b33d7c30034067$export$4730b1542707547f extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(geometry = null, thresholdAngle = 1){\n super();\n this.type = \"EdgesGeometry\";\n this.parameters = {\n geometry: geometry,\n thresholdAngle: thresholdAngle\n };\n if (geometry !== null) {\n const precisionPoints = 4;\n const precision = Math.pow(10, precisionPoints);\n const thresholdDot = Math.cos($d5b33d7c30034067$var$DEG2RAD * thresholdAngle);\n const indexAttr = geometry.getIndex();\n const positionAttr = geometry.getAttribute(\"position\");\n const indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n const indexArr = [\n 0,\n 0,\n 0\n ];\n const vertKeys = [\n \"a\",\n \"b\",\n \"c\"\n ];\n const hashes = new Array(3);\n const edgeData = {};\n const vertices = [];\n for(let i = 0; i < indexCount; i += 3){\n if (indexAttr) {\n indexArr[0] = indexAttr.getX(i);\n indexArr[1] = indexAttr.getX(i + 1);\n indexArr[2] = indexAttr.getX(i + 2);\n } else {\n indexArr[0] = i;\n indexArr[1] = i + 1;\n indexArr[2] = i + 2;\n }\n const { a: a, b: b, c: c } = $d5b33d7c30034067$var$_triangle;\n a.fromBufferAttribute(positionAttr, indexArr[0]);\n b.fromBufferAttribute(positionAttr, indexArr[1]);\n c.fromBufferAttribute(positionAttr, indexArr[2]);\n $d5b33d7c30034067$var$_triangle.getNormal($d5b33d7c30034067$var$_normal);\n // create hashes for the edge from the vertices\n hashes[0] = `${Math.round(a.x * precision)},${Math.round(a.y * precision)},${Math.round(a.z * precision)}`;\n hashes[1] = `${Math.round(b.x * precision)},${Math.round(b.y * precision)},${Math.round(b.z * precision)}`;\n hashes[2] = `${Math.round(c.x * precision)},${Math.round(c.y * precision)},${Math.round(c.z * precision)}`;\n // skip degenerate triangles\n if (hashes[0] === hashes[1] || hashes[1] === hashes[2] || hashes[2] === hashes[0]) continue;\n // iterate over every edge\n for(let j = 0; j < 3; j++){\n // get the first and next vertex making up the edge\n const jNext = (j + 1) % 3;\n const vecHash0 = hashes[j];\n const vecHash1 = hashes[jNext];\n const v0 = $d5b33d7c30034067$var$_triangle[vertKeys[j]];\n const v1 = $d5b33d7c30034067$var$_triangle[vertKeys[jNext]];\n const hash = `${vecHash0}_${vecHash1}`;\n const reverseHash = `${vecHash1}_${vecHash0}`;\n if (reverseHash in edgeData && edgeData[reverseHash]) {\n // if we found a sibling edge add it into the vertex array if\n // it meets the angle threshold and delete the edge from the map.\n if ($d5b33d7c30034067$var$_normal.dot(edgeData[reverseHash].normal) <= thresholdDot) {\n vertices.push(v0.x, v0.y, v0.z);\n vertices.push(v1.x, v1.y, v1.z);\n }\n edgeData[reverseHash] = null;\n } else if (!(hash in edgeData)) // if we've already got an edge here then skip adding a new one\n edgeData[hash] = {\n index0: indexArr[j],\n index1: indexArr[jNext],\n normal: $d5b33d7c30034067$var$_normal.clone()\n };\n }\n }\n // iterate over all remaining, unmatched edges and add them to the vertex array\n for(const key in edgeData)if (edgeData[key]) {\n const { index0: index0, index1: index1 } = edgeData[key];\n $d5b33d7c30034067$var$_v0.fromBufferAttribute(positionAttr, index0);\n $d5b33d7c30034067$var$_v1$1.fromBufferAttribute(positionAttr, index1);\n vertices.push($d5b33d7c30034067$var$_v0.x, $d5b33d7c30034067$var$_v0.y, $d5b33d7c30034067$var$_v0.z);\n vertices.push($d5b33d7c30034067$var$_v1$1.x, $d5b33d7c30034067$var$_v1$1.y, $d5b33d7c30034067$var$_v1$1.z);\n }\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n}\nclass $d5b33d7c30034067$export$6428a7f2611ef1fa extends $d5b33d7c30034067$export$4b2950bdac9b6ee9 {\n constructor(points){\n super(points);\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n this.type = \"Shape\";\n this.holes = [];\n }\n getPointsHoles(divisions) {\n const holesPts = [];\n for(let i = 0, l = this.holes.length; i < l; i++)holesPts[i] = this.holes[i].getPoints(divisions);\n return holesPts;\n }\n // get points of shape and holes (keypoints based on segments parameter)\n extractPoints(divisions) {\n return {\n shape: this.getPoints(divisions),\n holes: this.getPointsHoles(divisions)\n };\n }\n copy(source) {\n super.copy(source);\n this.holes = [];\n for(let i = 0, l = source.holes.length; i < l; i++){\n const hole = source.holes[i];\n this.holes.push(hole.clone());\n }\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.uuid = this.uuid;\n data.holes = [];\n for(let i = 0, l = this.holes.length; i < l; i++){\n const hole = this.holes[i];\n data.holes.push(hole.toJSON());\n }\n return data;\n }\n fromJSON(json) {\n super.fromJSON(json);\n this.uuid = json.uuid;\n this.holes = [];\n for(let i = 0, l = json.holes.length; i < l; i++){\n const hole = json.holes[i];\n this.holes.push(new $d5b33d7c30034067$export$4b2950bdac9b6ee9().fromJSON(hole));\n }\n return this;\n }\n}\n/**\n * Port from https://github.com/mapbox/earcut (v2.2.4)\n */ const $d5b33d7c30034067$var$Earcut = {\n triangulate: function(data, holeIndices, dim = 2) {\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n let outerNode = $d5b33d7c30034067$var$linkedList(data, 0, outerLen, dim, true);\n const triangles = [];\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n let minX, minY, maxX, maxY, x, y, invSize;\n if (hasHoles) outerNode = $d5b33d7c30034067$var$eliminateHoles(data, holeIndices, outerNode, dim);\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n for(let i = dim; i < outerLen; i += dim){\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 32767 / invSize : 0;\n }\n $d5b33d7c30034067$var$earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);\n return triangles;\n }\n};\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction $d5b33d7c30034067$var$linkedList(data, start, end, dim, clockwise) {\n let i, last;\n if (clockwise === $d5b33d7c30034067$var$signedArea(data, start, end, dim) > 0) for(i = start; i < end; i += dim)last = $d5b33d7c30034067$var$insertNode(i, data[i], data[i + 1], last);\n else for(i = end - dim; i >= start; i -= dim)last = $d5b33d7c30034067$var$insertNode(i, data[i], data[i + 1], last);\n if (last && $d5b33d7c30034067$var$equals(last, last.next)) {\n $d5b33d7c30034067$var$removeNode(last);\n last = last.next;\n }\n return last;\n}\n// eliminate colinear or duplicate points\nfunction $d5b33d7c30034067$var$filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n let p = start, again;\n do {\n again = false;\n if (!p.steiner && ($d5b33d7c30034067$var$equals(p, p.next) || $d5b33d7c30034067$var$area(p.prev, p, p.next) === 0)) {\n $d5b33d7c30034067$var$removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n } else p = p.next;\n }while (again || p !== end);\n return end;\n}\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction $d5b33d7c30034067$var$earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n // interlink polygon nodes in z-order\n if (!pass && invSize) $d5b33d7c30034067$var$indexCurve(ear, minX, minY, invSize);\n let stop = ear, prev, next;\n // iterate through ears, slicing them one by one\n while(ear.prev !== ear.next){\n prev = ear.prev;\n next = ear.next;\n if (invSize ? $d5b33d7c30034067$var$isEarHashed(ear, minX, minY, invSize) : $d5b33d7c30034067$var$isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim | 0);\n triangles.push(ear.i / dim | 0);\n triangles.push(next.i / dim | 0);\n $d5b33d7c30034067$var$removeNode(ear);\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n continue;\n }\n ear = next;\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) $d5b33d7c30034067$var$earcutLinked($d5b33d7c30034067$var$filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n else if (pass === 1) {\n ear = $d5b33d7c30034067$var$cureLocalIntersections($d5b33d7c30034067$var$filterPoints(ear), triangles, dim);\n $d5b33d7c30034067$var$earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) $d5b33d7c30034067$var$splitEarcut(ear, triangles, dim, minX, minY, invSize);\n break;\n }\n }\n}\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction $d5b33d7c30034067$var$isEar(ear) {\n const a = ear.prev, b = ear, c = ear.next;\n if ($d5b33d7c30034067$var$area(a, b, c) >= 0) return false; // reflex, can't be an ear\n // now make sure we don't have other points inside the potential ear\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n // triangle bbox; min & max are calculated like this for speed\n const x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;\n let p = c.next;\n while(p !== a){\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && $d5b33d7c30034067$var$area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n return true;\n}\nfunction $d5b33d7c30034067$var$isEarHashed(ear, minX, minY, invSize) {\n const a = ear.prev, b = ear, c = ear.next;\n if ($d5b33d7c30034067$var$area(a, b, c) >= 0) return false; // reflex, can't be an ear\n const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n // triangle bbox; min & max are calculated like this for speed\n const x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;\n // z-order range for the current triangle bbox;\n const minZ = $d5b33d7c30034067$var$zOrder(x0, y0, minX, minY, invSize), maxZ = $d5b33d7c30034067$var$zOrder(x1, y1, minX, minY, invSize);\n let p = ear.prevZ, n = ear.nextZ;\n // look for points inside the triangle in both directions\n while(p && p.z >= minZ && n && n.z <= maxZ){\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && $d5b33d7c30034067$var$area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && $d5b33d7c30034067$var$area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n // look for remaining points in decreasing z-order\n while(p && p.z >= minZ){\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && $d5b33d7c30034067$var$area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n // look for remaining points in increasing z-order\n while(n && n.z <= maxZ){\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && $d5b33d7c30034067$var$area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n return true;\n}\n// go through all polygon nodes and cure small local self-intersections\nfunction $d5b33d7c30034067$var$cureLocalIntersections(start, triangles, dim) {\n let p = start;\n do {\n const a = p.prev, b = p.next.next;\n if (!$d5b33d7c30034067$var$equals(a, b) && $d5b33d7c30034067$var$intersects(a, p, p.next, b) && $d5b33d7c30034067$var$locallyInside(a, b) && $d5b33d7c30034067$var$locallyInside(b, a)) {\n triangles.push(a.i / dim | 0);\n triangles.push(p.i / dim | 0);\n triangles.push(b.i / dim | 0);\n // remove two nodes involved\n $d5b33d7c30034067$var$removeNode(p);\n $d5b33d7c30034067$var$removeNode(p.next);\n p = start = b;\n }\n p = p.next;\n }while (p !== start);\n return $d5b33d7c30034067$var$filterPoints(p);\n}\n// try splitting polygon into two and triangulate them independently\nfunction $d5b33d7c30034067$var$splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n let a = start;\n do {\n let b = a.next.next;\n while(b !== a.prev){\n if (a.i !== b.i && $d5b33d7c30034067$var$isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n let c = $d5b33d7c30034067$var$splitPolygon(a, b);\n // filter colinear points around the cuts\n a = $d5b33d7c30034067$var$filterPoints(a, a.next);\n c = $d5b33d7c30034067$var$filterPoints(c, c.next);\n // run earcut on each half\n $d5b33d7c30034067$var$earcutLinked(a, triangles, dim, minX, minY, invSize, 0);\n $d5b33d7c30034067$var$earcutLinked(c, triangles, dim, minX, minY, invSize, 0);\n return;\n }\n b = b.next;\n }\n a = a.next;\n }while (a !== start);\n}\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction $d5b33d7c30034067$var$eliminateHoles(data, holeIndices, outerNode, dim) {\n const queue = [];\n let i, len, start, end, list;\n for(i = 0, len = holeIndices.length; i < len; i++){\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = $d5b33d7c30034067$var$linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push($d5b33d7c30034067$var$getLeftmost(list));\n }\n queue.sort($d5b33d7c30034067$var$compareX);\n // process holes from left to right\n for(i = 0; i < queue.length; i++)outerNode = $d5b33d7c30034067$var$eliminateHole(queue[i], outerNode);\n return outerNode;\n}\nfunction $d5b33d7c30034067$var$compareX(a, b) {\n return a.x - b.x;\n}\n// find a bridge between vertices that connects hole with an outer ring and link it\nfunction $d5b33d7c30034067$var$eliminateHole(hole, outerNode) {\n const bridge = $d5b33d7c30034067$var$findHoleBridge(hole, outerNode);\n if (!bridge) return outerNode;\n const bridgeReverse = $d5b33d7c30034067$var$splitPolygon(bridge, hole);\n // filter collinear points around the cuts\n $d5b33d7c30034067$var$filterPoints(bridgeReverse, bridgeReverse.next);\n return $d5b33d7c30034067$var$filterPoints(bridge, bridge.next);\n}\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction $d5b33d7c30034067$var$findHoleBridge(hole, outerNode) {\n let p = outerNode, qx = -Infinity, m;\n const hx = hole.x, hy = hole.y;\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n p = p.next;\n }while (p !== outerNode);\n if (!m) return null;\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n const stop = m, mx = m.x, my = m.y;\n let tanMin = Infinity, tan;\n p = m;\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x && $d5b33d7c30034067$var$pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n if ($d5b33d7c30034067$var$locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && $d5b33d7c30034067$var$sectorContainsSector(m, p)))) {\n m = p;\n tanMin = tan;\n }\n }\n p = p.next;\n }while (p !== stop);\n return m;\n}\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction $d5b33d7c30034067$var$sectorContainsSector(m, p) {\n return $d5b33d7c30034067$var$area(m.prev, m, p.prev) < 0 && $d5b33d7c30034067$var$area(p.next, m, m.next) < 0;\n}\n// interlink polygon nodes in z-order\nfunction $d5b33d7c30034067$var$indexCurve(start, minX, minY, invSize) {\n let p = start;\n do {\n if (p.z === 0) p.z = $d5b33d7c30034067$var$zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n }while (p !== start);\n p.prevZ.nextZ = null;\n p.prevZ = null;\n $d5b33d7c30034067$var$sortLinked(p);\n}\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction $d5b33d7c30034067$var$sortLinked(list) {\n let i, p, q, e, tail, numMerges, pSize, qSize, inSize = 1;\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n while(p){\n numMerges++;\n q = p;\n pSize = 0;\n for(i = 0; i < inSize; i++){\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n while(pSize > 0 || qSize > 0 && q){\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n if (tail) tail.nextZ = e;\n else list = e;\n e.prevZ = tail;\n tail = e;\n }\n p = q;\n }\n tail.nextZ = null;\n inSize *= 2;\n }while (numMerges > 1);\n return list;\n}\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction $d5b33d7c30034067$var$zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\n x = (x | x << 8) & 0x00FF00FF;\n x = (x | x << 4) & 0x0F0F0F0F;\n x = (x | x << 2) & 0x33333333;\n x = (x | x << 1) & 0x55555555;\n y = (y | y << 8) & 0x00FF00FF;\n y = (y | y << 4) & 0x0F0F0F0F;\n y = (y | y << 2) & 0x33333333;\n y = (y | y << 1) & 0x55555555;\n return x | y << 1;\n}\n// find the leftmost node of a polygon ring\nfunction $d5b33d7c30034067$var$getLeftmost(start) {\n let p = start, leftmost = start;\n do {\n if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;\n p = p.next;\n }while (p !== start);\n return leftmost;\n}\n// check if a point lies within a convex triangle\nfunction $d5b33d7c30034067$var$pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && (ax - px) * (by - py) >= (bx - px) * (ay - py) && (bx - px) * (cy - py) >= (cx - px) * (by - py);\n}\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction $d5b33d7c30034067$var$isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !$d5b33d7c30034067$var$intersectsPolygon(a, b) && // dones't intersect other edges\n ($d5b33d7c30034067$var$locallyInside(a, b) && $d5b33d7c30034067$var$locallyInside(b, a) && $d5b33d7c30034067$var$middleInside(a, b) && // locally visible\n ($d5b33d7c30034067$var$area(a.prev, a, b.prev) || $d5b33d7c30034067$var$area(a, b.prev, b)) || // does not create opposite-facing sectors\n $d5b33d7c30034067$var$equals(a, b) && $d5b33d7c30034067$var$area(a.prev, a, a.next) > 0 && $d5b33d7c30034067$var$area(b.prev, b, b.next) > 0); // special zero-length case\n}\n// signed area of a triangle\nfunction $d5b33d7c30034067$var$area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n// check if two points are equal\nfunction $d5b33d7c30034067$var$equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n// check if two segments intersect\nfunction $d5b33d7c30034067$var$intersects(p1, q1, p2, q2) {\n const o1 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p1, q1, p2));\n const o2 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p1, q1, q2));\n const o3 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p2, q2, p1));\n const o4 = $d5b33d7c30034067$var$sign($d5b33d7c30034067$var$area(p2, q2, q1));\n if (o1 !== o2 && o3 !== o4) return true; // general case\n if (o1 === 0 && $d5b33d7c30034067$var$onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && $d5b33d7c30034067$var$onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && $d5b33d7c30034067$var$onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && $d5b33d7c30034067$var$onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n return false;\n}\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction $d5b33d7c30034067$var$onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\nfunction $d5b33d7c30034067$var$sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n// check if a polygon diagonal intersects any polygon segments\nfunction $d5b33d7c30034067$var$intersectsPolygon(a, b) {\n let p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && $d5b33d7c30034067$var$intersects(p, p.next, a, b)) return true;\n p = p.next;\n }while (p !== a);\n return false;\n}\n// check if a polygon diagonal is locally inside the polygon\nfunction $d5b33d7c30034067$var$locallyInside(a, b) {\n return $d5b33d7c30034067$var$area(a.prev, a, a.next) < 0 ? $d5b33d7c30034067$var$area(a, b, a.next) >= 0 && $d5b33d7c30034067$var$area(a, a.prev, b) >= 0 : $d5b33d7c30034067$var$area(a, b, a.prev) < 0 || $d5b33d7c30034067$var$area(a, a.next, b) < 0;\n}\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction $d5b33d7c30034067$var$middleInside(a, b) {\n let p = a, inside = false;\n const px = (a.x + b.x) / 2, py = (a.y + b.y) / 2;\n do {\n if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x) inside = !inside;\n p = p.next;\n }while (p !== a);\n return inside;\n}\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction $d5b33d7c30034067$var$splitPolygon(a, b) {\n const a2 = new $d5b33d7c30034067$var$Node(a.i, a.x, a.y), b2 = new $d5b33d7c30034067$var$Node(b.i, b.x, b.y), an = a.next, bp = b.prev;\n a.next = b;\n b.prev = a;\n a2.next = an;\n an.prev = a2;\n b2.next = a2;\n a2.prev = b2;\n bp.next = b2;\n b2.prev = bp;\n return b2;\n}\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction $d5b33d7c30034067$var$insertNode(i, x, y, last) {\n const p = new $d5b33d7c30034067$var$Node(i, x, y);\n if (!last) {\n p.prev = p;\n p.next = p;\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\nfunction $d5b33d7c30034067$var$removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\nfunction $d5b33d7c30034067$var$Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n // vertex coordinates\n this.x = x;\n this.y = y;\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n // z-order curve value\n this.z = 0;\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n // indicates whether this is a steiner point\n this.steiner = false;\n}\nfunction $d5b33d7c30034067$var$signedArea(data, start, end, dim) {\n let sum = 0;\n for(let i = start, j = end - dim; i < end; i += dim){\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\nclass $d5b33d7c30034067$export$96bdf6d9c66d7ba8 {\n // calculate area of the contour polygon\n static area(contour) {\n const n = contour.length;\n let a = 0.0;\n for(let p = n - 1, q = 0; q < n; p = q++)a += contour[p].x * contour[q].y - contour[q].x * contour[p].y;\n return a * 0.5;\n }\n static isClockWise(pts) {\n return $d5b33d7c30034067$export$96bdf6d9c66d7ba8.area(pts) < 0;\n }\n static triangulateShape(contour, holes) {\n const vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n const holeIndices = []; // array of hole indices\n const faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n $d5b33d7c30034067$var$removeDupEndPts(contour);\n $d5b33d7c30034067$var$addContour(vertices, contour);\n //\n let holeIndex = contour.length;\n holes.forEach($d5b33d7c30034067$var$removeDupEndPts);\n for(let i = 0; i < holes.length; i++){\n holeIndices.push(holeIndex);\n holeIndex += holes[i].length;\n $d5b33d7c30034067$var$addContour(vertices, holes[i]);\n }\n //\n const triangles = $d5b33d7c30034067$var$Earcut.triangulate(vertices, holeIndices);\n //\n for(let i = 0; i < triangles.length; i += 3)faces.push(triangles.slice(i, i + 3));\n return faces;\n }\n}\nfunction $d5b33d7c30034067$var$removeDupEndPts(points) {\n const l = points.length;\n if (l > 2 && points[l - 1].equals(points[0])) points.pop();\n}\nfunction $d5b33d7c30034067$var$addContour(vertices, contour) {\n for(let i = 0; i < contour.length; i++){\n vertices.push(contour[i].x);\n vertices.push(contour[i].y);\n }\n}\n/**\n * Creates extruded geometry from a path shape.\n *\n * parameters = {\n *\n * curveSegments: , // number of points on the curves\n * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too\n * depth: , // Depth to extrude the shape\n *\n * bevelEnabled: , // turn on bevel\n * bevelThickness: , // how deep into the original shape bevel goes\n * bevelSize: , // how far from shape outline (including bevelOffset) is bevel\n * bevelOffset: , // how far from shape outline does bevel start\n * bevelSegments: , // number of bevel layers\n *\n * extrudePath: // curve to extrude shape along\n *\n * UVGenerator: // object that provides UV generator functions\n *\n * }\n */ class $d5b33d7c30034067$export$598697a1efa63ca7 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(shapes = new $d5b33d7c30034067$export$6428a7f2611ef1fa([\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, 0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(-0.5, 0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(-0.5, -0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, -0.5)\n ]), options = {}){\n super();\n this.type = \"ExtrudeGeometry\";\n this.parameters = {\n shapes: shapes,\n options: options\n };\n shapes = Array.isArray(shapes) ? shapes : [\n shapes\n ];\n const scope = this;\n const verticesArray = [];\n const uvArray = [];\n for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n addShape(shape);\n }\n // build geometry\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(verticesArray, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvArray, 2));\n this.computeVertexNormals();\n // functions\n function addShape(shape) {\n const placeholder = [];\n // options\n const curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n const steps = options.steps !== undefined ? options.steps : 1;\n const depth = options.depth !== undefined ? options.depth : 1;\n let bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n let bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 0.2;\n let bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 0.1;\n let bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n let bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n const extrudePath = options.extrudePath;\n const uvgen = options.UVGenerator !== undefined ? options.UVGenerator : $d5b33d7c30034067$var$WorldUVGenerator;\n //\n let extrudePts, extrudeByPath = false;\n let splineTube, binormal, normal, position2;\n if (extrudePath) {\n extrudePts = extrudePath.getSpacedPoints(steps);\n extrudeByPath = true;\n bevelEnabled = false; // bevels not supported for path extrusion\n // SETUP TNB variables\n // TODO1 - have a .isClosed in spline?\n splineTube = extrudePath.computeFrenetFrames(steps, false);\n // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n binormal = new $d5b33d7c30034067$export$64b5c384219d3699();\n normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n position2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n }\n // Safeguards if bevels are not enabled\n if (!bevelEnabled) {\n bevelSegments = 0;\n bevelThickness = 0;\n bevelSize = 0;\n bevelOffset = 0;\n }\n // Variables initialization\n const shapePoints = shape.extractPoints(curveSegments);\n let vertices = shapePoints.shape;\n const holes = shapePoints.holes;\n const reverse = !$d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(vertices);\n if (reverse) {\n vertices = vertices.reverse();\n // Maybe we should also check if holes are in the opposite direction, just to be safe ...\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n if ($d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(ahole)) holes[h] = ahole.reverse();\n }\n }\n const faces = $d5b33d7c30034067$export$96bdf6d9c66d7ba8.triangulateShape(vertices, holes);\n /* Vertices */ const contour = vertices; // vertices has all points but contour has only points of circumference\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n vertices = vertices.concat(ahole);\n }\n function scalePt2(pt, vec, size) {\n if (!vec) console.error(\"THREE.ExtrudeGeometry: vec does not exist\");\n return pt.clone().addScaledVector(vec, size);\n }\n const vlen = vertices.length, flen = faces.length;\n // Find directions for point movement\n function getBevelVec(inPt, inPrev, inNext) {\n // computes for inPt the corresponding point inPt' on a new contour\n // shifted by 1 unit (length of normalized vector) to the left\n // if we walk along contour clockwise, this new contour is outside the old one\n //\n // inPt' is the intersection of the two lines parallel to the two\n // adjacent edges of inPt at a distance of 1 unit on the left side.\n let v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n // good reading for geometry algorithms (here: line-line intersection)\n // http://geomalgorithms.com/a05-_intersect-1.html\n const v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n const v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n const v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y;\n // check for collinear edges\n const collinear0 = v_prev_x * v_next_y - v_prev_y * v_next_x;\n if (Math.abs(collinear0) > Number.EPSILON) {\n // not collinear\n // length of vectors for normalizing\n const v_prev_len = Math.sqrt(v_prev_lensq);\n const v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y);\n // shift adjacent points by unit vectors to the left\n const ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len;\n const ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len;\n const ptNextShift_x = inNext.x - v_next_y / v_next_len;\n const ptNextShift_y = inNext.y + v_next_x / v_next_len;\n // scaling factor for v_prev to intersection point\n const sf = ((ptNextShift_x - ptPrevShift_x) * v_next_y - (ptNextShift_y - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x);\n // vector from inPt to intersection point\n v_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x;\n v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y;\n // Don't normalize!, otherwise sharp corners become ugly\n // but prevent crazy spikes\n const v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;\n if (v_trans_lensq <= 2) return new $d5b33d7c30034067$export$c977b3e384af9ae1(v_trans_x, v_trans_y);\n else shrink_by = Math.sqrt(v_trans_lensq / 2);\n } else {\n // handle special case of collinear edges\n let direction_eq = false; // assumes: opposite\n if (v_prev_x > Number.EPSILON) {\n if (v_next_x > Number.EPSILON) direction_eq = true;\n } else {\n if (v_prev_x < -Number.EPSILON) {\n if (v_next_x < -Number.EPSILON) direction_eq = true;\n } else if (Math.sign(v_prev_y) === Math.sign(v_next_y)) direction_eq = true;\n }\n if (direction_eq) {\n // console.log(\"Warning: lines are a straight sequence\");\n v_trans_x = -v_prev_y;\n v_trans_y = v_prev_x;\n shrink_by = Math.sqrt(v_prev_lensq);\n } else {\n // console.log(\"Warning: lines are a straight spike\");\n v_trans_x = v_prev_x;\n v_trans_y = v_prev_y;\n shrink_by = Math.sqrt(v_prev_lensq / 2);\n }\n }\n return new $d5b33d7c30034067$export$c977b3e384af9ae1(v_trans_x / shrink_by, v_trans_y / shrink_by);\n }\n const contourMovements = [];\n for(let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i++, j++, k++){\n if (j === il) j = 0;\n if (k === il) k = 0;\n // (j)---(i)---(k)\n // console.log('i,j,k', i, j , k)\n contourMovements[i] = getBevelVec(contour[i], contour[j], contour[k]);\n }\n const holesMovements = [];\n let oneHoleMovements, verticesMovements = contourMovements.concat();\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n oneHoleMovements = [];\n for(let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i++, j++, k++){\n if (j === il) j = 0;\n if (k === il) k = 0;\n // (j)---(i)---(k)\n oneHoleMovements[i] = getBevelVec(ahole[i], ahole[j], ahole[k]);\n }\n holesMovements.push(oneHoleMovements);\n verticesMovements = verticesMovements.concat(oneHoleMovements);\n }\n // Loop bevelSegments, 1 for the front, 1 for the back\n for(let b = 0; b < bevelSegments; b++){\n //for ( b = bevelSegments; b > 0; b -- ) {\n const t = b / bevelSegments;\n const z = bevelThickness * Math.cos(t * Math.PI / 2);\n const bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset;\n // contract shape\n for(let i = 0, il = contour.length; i < il; i++){\n const vert = scalePt2(contour[i], contourMovements[i], bs);\n v(vert.x, vert.y, -z);\n }\n // expand holes\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n oneHoleMovements = holesMovements[h];\n for(let i = 0, il = ahole.length; i < il; i++){\n const vert = scalePt2(ahole[i], oneHoleMovements[i], bs);\n v(vert.x, vert.y, -z);\n }\n }\n }\n const bs = bevelSize + bevelOffset;\n // Back facing vertices\n for(let i = 0; i < vlen; i++){\n const vert = bevelEnabled ? scalePt2(vertices[i], verticesMovements[i], bs) : vertices[i];\n if (!extrudeByPath) v(vert.x, vert.y, 0);\n else {\n // v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n normal.copy(splineTube.normals[0]).multiplyScalar(vert.x);\n binormal.copy(splineTube.binormals[0]).multiplyScalar(vert.y);\n position2.copy(extrudePts[0]).add(normal).add(binormal);\n v(position2.x, position2.y, position2.z);\n }\n }\n // Add stepped vertices...\n // Including front facing vertices\n for(let s = 1; s <= steps; s++)for(let i = 0; i < vlen; i++){\n const vert = bevelEnabled ? scalePt2(vertices[i], verticesMovements[i], bs) : vertices[i];\n if (!extrudeByPath) v(vert.x, vert.y, depth / steps * s);\n else {\n // v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n normal.copy(splineTube.normals[s]).multiplyScalar(vert.x);\n binormal.copy(splineTube.binormals[s]).multiplyScalar(vert.y);\n position2.copy(extrudePts[s]).add(normal).add(binormal);\n v(position2.x, position2.y, position2.z);\n }\n }\n // Add bevel segments planes\n //for ( b = 1; b <= bevelSegments; b ++ ) {\n for(let b = bevelSegments - 1; b >= 0; b--){\n const t = b / bevelSegments;\n const z = bevelThickness * Math.cos(t * Math.PI / 2);\n const bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset;\n // contract shape\n for(let i = 0, il = contour.length; i < il; i++){\n const vert = scalePt2(contour[i], contourMovements[i], bs);\n v(vert.x, vert.y, depth + z);\n }\n // expand holes\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n oneHoleMovements = holesMovements[h];\n for(let i = 0, il = ahole.length; i < il; i++){\n const vert = scalePt2(ahole[i], oneHoleMovements[i], bs);\n if (!extrudeByPath) v(vert.x, vert.y, depth + z);\n else v(vert.x, vert.y + extrudePts[steps - 1].y, extrudePts[steps - 1].x + z);\n }\n }\n }\n /* Faces */ // Top and bottom faces\n buildLidFaces();\n // Sides faces\n buildSideFaces();\n ///// Internal functions\n function buildLidFaces() {\n const start = verticesArray.length / 3;\n if (bevelEnabled) {\n let layer = 0; // steps + 1\n let offset = vlen * layer;\n // Bottom faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[2] + offset, face[1] + offset, face[0] + offset);\n }\n layer = steps + bevelSegments * 2;\n offset = vlen * layer;\n // Top faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[0] + offset, face[1] + offset, face[2] + offset);\n }\n } else {\n // Bottom faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[2], face[1], face[0]);\n }\n // Top faces\n for(let i = 0; i < flen; i++){\n const face = faces[i];\n f3(face[0] + vlen * steps, face[1] + vlen * steps, face[2] + vlen * steps);\n }\n }\n scope.addGroup(start, verticesArray.length / 3 - start, 0);\n }\n // Create faces for the z-sides of the shape\n function buildSideFaces() {\n const start = verticesArray.length / 3;\n let layeroffset = 0;\n sidewalls(contour, layeroffset);\n layeroffset += contour.length;\n for(let h = 0, hl = holes.length; h < hl; h++){\n const ahole = holes[h];\n sidewalls(ahole, layeroffset);\n //, true\n layeroffset += ahole.length;\n }\n scope.addGroup(start, verticesArray.length / 3 - start, 1);\n }\n function sidewalls(contour, layeroffset) {\n let i = contour.length;\n while(--i >= 0){\n const j = i;\n let k = i - 1;\n if (k < 0) k = contour.length - 1;\n //console.log('b', i,j, i-1, k,vertices.length);\n for(let s = 0, sl = steps + bevelSegments * 2; s < sl; s++){\n const slen1 = vlen * s;\n const slen2 = vlen * (s + 1);\n const a = layeroffset + j + slen1, b = layeroffset + k + slen1, c = layeroffset + k + slen2, d = layeroffset + j + slen2;\n f4(a, b, c, d);\n }\n }\n }\n function v(x, y, z) {\n placeholder.push(x);\n placeholder.push(y);\n placeholder.push(z);\n }\n function f3(a, b, c) {\n addVertex(a);\n addVertex(b);\n addVertex(c);\n const nextIndex = verticesArray.length / 3;\n const uvs = uvgen.generateTopUV(scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n addUV(uvs[0]);\n addUV(uvs[1]);\n addUV(uvs[2]);\n }\n function f4(a, b, c, d) {\n addVertex(a);\n addVertex(b);\n addVertex(d);\n addVertex(b);\n addVertex(c);\n addVertex(d);\n const nextIndex = verticesArray.length / 3;\n const uvs = uvgen.generateSideWallUV(scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n addUV(uvs[0]);\n addUV(uvs[1]);\n addUV(uvs[3]);\n addUV(uvs[1]);\n addUV(uvs[2]);\n addUV(uvs[3]);\n }\n function addVertex(index) {\n verticesArray.push(placeholder[index * 3 + 0]);\n verticesArray.push(placeholder[index * 3 + 1]);\n verticesArray.push(placeholder[index * 3 + 2]);\n }\n function addUV(vector2) {\n uvArray.push(vector2.x);\n uvArray.push(vector2.y);\n }\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n const shapes = this.parameters.shapes;\n const options = this.parameters.options;\n return $d5b33d7c30034067$var$toJSON$1(shapes, options, data);\n }\n static fromJSON(data, shapes) {\n const geometryShapes = [];\n for(let j = 0, jl = data.shapes.length; j < jl; j++){\n const shape = shapes[data.shapes[j]];\n geometryShapes.push(shape);\n }\n const extrudePath = data.options.extrudePath;\n if (extrudePath !== undefined) data.options.extrudePath = new $d5b33d7c30034067$var$Curves[extrudePath.type]().fromJSON(extrudePath);\n return new $d5b33d7c30034067$export$598697a1efa63ca7(geometryShapes, data.options);\n }\n}\nconst $d5b33d7c30034067$var$WorldUVGenerator = {\n generateTopUV: function(geometry, vertices, indexA, indexB, indexC) {\n const a_x = vertices[indexA * 3];\n const a_y = vertices[indexA * 3 + 1];\n const b_x = vertices[indexB * 3];\n const b_y = vertices[indexB * 3 + 1];\n const c_x = vertices[indexC * 3];\n const c_y = vertices[indexC * 3 + 1];\n return [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(a_x, a_y),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(b_x, b_y),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(c_x, c_y)\n ];\n },\n generateSideWallUV: function(geometry, vertices, indexA, indexB, indexC, indexD) {\n const a_x = vertices[indexA * 3];\n const a_y = vertices[indexA * 3 + 1];\n const a_z = vertices[indexA * 3 + 2];\n const b_x = vertices[indexB * 3];\n const b_y = vertices[indexB * 3 + 1];\n const b_z = vertices[indexB * 3 + 2];\n const c_x = vertices[indexC * 3];\n const c_y = vertices[indexC * 3 + 1];\n const c_z = vertices[indexC * 3 + 2];\n const d_x = vertices[indexD * 3];\n const d_y = vertices[indexD * 3 + 1];\n const d_z = vertices[indexD * 3 + 2];\n if (Math.abs(a_y - b_y) < Math.abs(a_x - b_x)) return [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(a_x, 1 - a_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(b_x, 1 - b_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(c_x, 1 - c_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(d_x, 1 - d_z)\n ];\n else return [\n new $d5b33d7c30034067$export$c977b3e384af9ae1(a_y, 1 - a_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(b_y, 1 - b_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(c_y, 1 - c_z),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(d_y, 1 - d_z)\n ];\n }\n};\nfunction $d5b33d7c30034067$var$toJSON$1(shapes, options, data) {\n data.shapes = [];\n if (Array.isArray(shapes)) for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n data.shapes.push(shape.uuid);\n }\n else data.shapes.push(shapes.uuid);\n data.options = Object.assign({}, options);\n if (options.extrudePath !== undefined) data.options.extrudePath = options.extrudePath.toJSON();\n return data;\n}\nclass $d5b33d7c30034067$export$9567cc828c9535da extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const t = (1 + Math.sqrt(5)) / 2;\n const vertices = [\n -1,\n t,\n 0,\n 1,\n t,\n 0,\n -1,\n -t,\n 0,\n 1,\n -t,\n 0,\n 0,\n -1,\n t,\n 0,\n 1,\n t,\n 0,\n -1,\n -t,\n 0,\n 1,\n -t,\n t,\n 0,\n -1,\n t,\n 0,\n 1,\n -t,\n 0,\n -1,\n -t,\n 0,\n 1\n ];\n const indices = [\n 0,\n 11,\n 5,\n 0,\n 5,\n 1,\n 0,\n 1,\n 7,\n 0,\n 7,\n 10,\n 0,\n 10,\n 11,\n 1,\n 5,\n 9,\n 5,\n 11,\n 4,\n 11,\n 10,\n 2,\n 10,\n 7,\n 6,\n 7,\n 1,\n 8,\n 3,\n 9,\n 4,\n 3,\n 4,\n 2,\n 3,\n 2,\n 6,\n 3,\n 6,\n 8,\n 3,\n 8,\n 9,\n 4,\n 9,\n 5,\n 2,\n 4,\n 11,\n 6,\n 2,\n 10,\n 8,\n 6,\n 7,\n 9,\n 8,\n 1\n ];\n super(vertices, indices, radius, detail);\n this.type = \"IcosahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$9567cc828c9535da(data.radius, data.detail);\n }\n}\nclass $d5b33d7c30034067$export$1954e2b809fe361e extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const vertices = [\n 1,\n 0,\n 0,\n -1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n -1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n -1\n ];\n const indices = [\n 0,\n 2,\n 4,\n 0,\n 4,\n 3,\n 0,\n 3,\n 5,\n 0,\n 5,\n 2,\n 1,\n 2,\n 5,\n 1,\n 5,\n 3,\n 1,\n 3,\n 4,\n 1,\n 4,\n 2\n ];\n super(vertices, indices, radius, detail);\n this.type = \"OctahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$1954e2b809fe361e(data.radius, data.detail);\n }\n}\nclass $d5b33d7c30034067$export$68cb731f50f614af extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2){\n super();\n this.type = \"RingGeometry\";\n this.parameters = {\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n thetaSegments: thetaSegments,\n phiSegments: phiSegments,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n thetaSegments = Math.max(3, thetaSegments);\n phiSegments = Math.max(1, phiSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // some helper variables\n let radius = innerRadius;\n const radiusStep = (outerRadius - innerRadius) / phiSegments;\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n // generate vertices, normals and uvs\n for(let j = 0; j <= phiSegments; j++){\n for(let i = 0; i <= thetaSegments; i++){\n // values are generate from the inside of the ring to the outside\n const segment = thetaStart + i / thetaSegments * thetaLength;\n // vertex\n vertex.x = radius * Math.cos(segment);\n vertex.y = radius * Math.sin(segment);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normals.push(0, 0, 1);\n // uv\n uv.x = (vertex.x / outerRadius + 1) / 2;\n uv.y = (vertex.y / outerRadius + 1) / 2;\n uvs.push(uv.x, uv.y);\n }\n // increase the radius for next row of vertices\n radius += radiusStep;\n }\n // indices\n for(let j = 0; j < phiSegments; j++){\n const thetaSegmentLevel = j * (thetaSegments + 1);\n for(let i = 0; i < thetaSegments; i++){\n const segment = i + thetaSegmentLevel;\n const a = segment;\n const b = segment + thetaSegments + 1;\n const c = segment + thetaSegments + 2;\n const d = segment + 1;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$68cb731f50f614af(data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$57a29a1c803e9065 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(shapes = new $d5b33d7c30034067$export$6428a7f2611ef1fa([\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0, 0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(-0.5, -0.5),\n new $d5b33d7c30034067$export$c977b3e384af9ae1(0.5, -0.5)\n ]), curveSegments = 12){\n super();\n this.type = \"ShapeGeometry\";\n this.parameters = {\n shapes: shapes,\n curveSegments: curveSegments\n };\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n let groupStart = 0;\n let groupCount = 0;\n // allow single and array values for \"shapes\" parameter\n if (Array.isArray(shapes) === false) addShape(shapes);\n else for(let i = 0; i < shapes.length; i++){\n addShape(shapes[i]);\n this.addGroup(groupStart, groupCount, i); // enables MultiMaterial support\n groupStart += groupCount;\n groupCount = 0;\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n // helper functions\n function addShape(shape) {\n const indexOffset = vertices.length / 3;\n const points = shape.extractPoints(curveSegments);\n let shapeVertices = points.shape;\n const shapeHoles = points.holes;\n // check direction of vertices\n if ($d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(shapeVertices) === false) shapeVertices = shapeVertices.reverse();\n for(let i = 0, l = shapeHoles.length; i < l; i++){\n const shapeHole = shapeHoles[i];\n if ($d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise(shapeHole) === true) shapeHoles[i] = shapeHole.reverse();\n }\n const faces = $d5b33d7c30034067$export$96bdf6d9c66d7ba8.triangulateShape(shapeVertices, shapeHoles);\n // join vertices of inner and outer paths to a single array\n for(let i = 0, l = shapeHoles.length; i < l; i++){\n const shapeHole = shapeHoles[i];\n shapeVertices = shapeVertices.concat(shapeHole);\n }\n // vertices, normals, uvs\n for(let i = 0, l = shapeVertices.length; i < l; i++){\n const vertex = shapeVertices[i];\n vertices.push(vertex.x, vertex.y, 0);\n normals.push(0, 0, 1);\n uvs.push(vertex.x, vertex.y); // world uvs\n }\n // indices\n for(let i = 0, l = faces.length; i < l; i++){\n const face = faces[i];\n const a = face[0] + indexOffset;\n const b = face[1] + indexOffset;\n const c = face[2] + indexOffset;\n indices.push(a, b, c);\n groupCount += 3;\n }\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n const shapes = this.parameters.shapes;\n return $d5b33d7c30034067$var$toJSON(shapes, data);\n }\n static fromJSON(data, shapes) {\n const geometryShapes = [];\n for(let j = 0, jl = data.shapes.length; j < jl; j++){\n const shape = shapes[data.shapes[j]];\n geometryShapes.push(shape);\n }\n return new $d5b33d7c30034067$export$57a29a1c803e9065(geometryShapes, data.curveSegments);\n }\n}\nfunction $d5b33d7c30034067$var$toJSON(shapes, data) {\n data.shapes = [];\n if (Array.isArray(shapes)) for(let i = 0, l = shapes.length; i < l; i++){\n const shape = shapes[i];\n data.shapes.push(shape.uuid);\n }\n else data.shapes.push(shapes.uuid);\n return data;\n}\nclass $d5b33d7c30034067$export$1b417fc3b307a251 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI){\n super();\n this.type = \"SphereGeometry\";\n this.parameters = {\n radius: radius,\n widthSegments: widthSegments,\n heightSegments: heightSegments,\n phiStart: phiStart,\n phiLength: phiLength,\n thetaStart: thetaStart,\n thetaLength: thetaLength\n };\n widthSegments = Math.max(3, Math.floor(widthSegments));\n heightSegments = Math.max(2, Math.floor(heightSegments));\n const thetaEnd = Math.min(thetaStart + thetaLength, Math.PI);\n let index = 0;\n const grid = [];\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // generate vertices, normals and uvs\n for(let iy = 0; iy <= heightSegments; iy++){\n const verticesRow = [];\n const v = iy / heightSegments;\n // special case for the poles\n let uOffset = 0;\n if (iy === 0 && thetaStart === 0) uOffset = 0.5 / widthSegments;\n else if (iy === heightSegments && thetaEnd === Math.PI) uOffset = -0.5 / widthSegments;\n for(let ix = 0; ix <= widthSegments; ix++){\n const u = ix / widthSegments;\n // vertex\n vertex.x = -radius * Math.cos(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n vertex.y = radius * Math.cos(thetaStart + v * thetaLength);\n vertex.z = radius * Math.sin(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n normal.copy(vertex).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(u + uOffset, 1 - v);\n verticesRow.push(index++);\n }\n grid.push(verticesRow);\n }\n // indices\n for(let iy = 0; iy < heightSegments; iy++)for(let ix = 0; ix < widthSegments; ix++){\n const a = grid[iy][ix + 1];\n const b = grid[iy][ix];\n const c = grid[iy + 1][ix];\n const d = grid[iy + 1][ix + 1];\n if (iy !== 0 || thetaStart > 0) indices.push(a, b, d);\n if (iy !== heightSegments - 1 || thetaEnd < Math.PI) indices.push(b, c, d);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$1b417fc3b307a251(data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength);\n }\n}\nclass $d5b33d7c30034067$export$fb3f7adc68bd6e02 extends $d5b33d7c30034067$export$60e57a7d3f20ff65 {\n constructor(radius = 1, detail = 0){\n const vertices = [\n 1,\n 1,\n 1,\n -1,\n -1,\n 1,\n -1,\n 1,\n -1,\n 1,\n -1,\n -1\n ];\n const indices = [\n 2,\n 1,\n 0,\n 0,\n 3,\n 2,\n 1,\n 3,\n 0,\n 2,\n 3,\n 1\n ];\n super(vertices, indices, radius, detail);\n this.type = \"TetrahedronGeometry\";\n this.parameters = {\n radius: radius,\n detail: detail\n };\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$fb3f7adc68bd6e02(data.radius, data.detail);\n }\n}\nclass $d5b33d7c30034067$export$a2312a2a1fa56495 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2){\n super();\n this.type = \"TorusGeometry\";\n this.parameters = {\n radius: radius,\n tube: tube,\n radialSegments: radialSegments,\n tubularSegments: tubularSegments,\n arc: arc\n };\n radialSegments = Math.floor(radialSegments);\n tubularSegments = Math.floor(tubularSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n const center = new $d5b33d7c30034067$export$64b5c384219d3699();\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n // generate vertices, normals and uvs\n for(let j = 0; j <= radialSegments; j++)for(let i = 0; i <= tubularSegments; i++){\n const u = i / tubularSegments * arc;\n const v = j / radialSegments * Math.PI * 2;\n // vertex\n vertex.x = (radius + tube * Math.cos(v)) * Math.cos(u);\n vertex.y = (radius + tube * Math.cos(v)) * Math.sin(u);\n vertex.z = tube * Math.sin(v);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal\n center.x = radius * Math.cos(u);\n center.y = radius * Math.sin(u);\n normal.subVectors(vertex, center).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(i / tubularSegments);\n uvs.push(j / radialSegments);\n }\n // generate indices\n for(let j = 1; j <= radialSegments; j++)for(let i = 1; i <= tubularSegments; i++){\n // indices\n const a = (tubularSegments + 1) * j + i - 1;\n const b = (tubularSegments + 1) * (j - 1) + i - 1;\n const c = (tubularSegments + 1) * (j - 1) + i;\n const d = (tubularSegments + 1) * j + i;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$a2312a2a1fa56495(data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc);\n }\n}\nclass $d5b33d7c30034067$export$77e9bfadfb9ab8c8 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3){\n super();\n this.type = \"TorusKnotGeometry\";\n this.parameters = {\n radius: radius,\n tube: tube,\n tubularSegments: tubularSegments,\n radialSegments: radialSegments,\n p: p,\n q: q\n };\n tubularSegments = Math.floor(tubularSegments);\n radialSegments = Math.floor(radialSegments);\n // buffers\n const indices = [];\n const vertices = [];\n const normals = [];\n const uvs = [];\n // helper variables\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const P1 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const P2 = new $d5b33d7c30034067$export$64b5c384219d3699();\n const B = new $d5b33d7c30034067$export$64b5c384219d3699();\n const T = new $d5b33d7c30034067$export$64b5c384219d3699();\n const N = new $d5b33d7c30034067$export$64b5c384219d3699();\n // generate vertices, normals and uvs\n for(let i = 0; i <= tubularSegments; ++i){\n // the radian \"u\" is used to calculate the position on the torus curve of the current tubular segment\n const u = i / tubularSegments * p * Math.PI * 2;\n // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n // these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n calculatePositionOnCurve(u, p, q, radius, P1);\n calculatePositionOnCurve(u + 0.01, p, q, radius, P2);\n // calculate orthonormal basis\n T.subVectors(P2, P1);\n N.addVectors(P2, P1);\n B.crossVectors(T, N);\n N.crossVectors(B, T);\n // normalize B, N. T can be ignored, we don't use it\n B.normalize();\n N.normalize();\n for(let j = 0; j <= radialSegments; ++j){\n // now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n // because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n const v = j / radialSegments * Math.PI * 2;\n const cx = -tube * Math.cos(v);\n const cy = tube * Math.sin(v);\n // now calculate the final vertex position.\n // first we orient the extrusion with our basis vectors, then we add it to the current position on the curve\n vertex.x = P1.x + (cx * N.x + cy * B.x);\n vertex.y = P1.y + (cx * N.y + cy * B.y);\n vertex.z = P1.z + (cx * N.z + cy * B.z);\n vertices.push(vertex.x, vertex.y, vertex.z);\n // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n normal.subVectors(vertex, P1).normalize();\n normals.push(normal.x, normal.y, normal.z);\n // uv\n uvs.push(i / tubularSegments);\n uvs.push(j / radialSegments);\n }\n }\n // generate indices\n for(let j = 1; j <= tubularSegments; j++)for(let i = 1; i <= radialSegments; i++){\n // indices\n const a = (radialSegments + 1) * (j - 1) + (i - 1);\n const b = (radialSegments + 1) * j + (i - 1);\n const c = (radialSegments + 1) * j + i;\n const d = (radialSegments + 1) * (j - 1) + i;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n // this function calculates the current position on the torus curve\n function calculatePositionOnCurve(u, p, q, radius, position) {\n const cu = Math.cos(u);\n const su = Math.sin(u);\n const quOverP = q / p * u;\n const cs = Math.cos(quOverP);\n position.x = radius * (2 + cs) * 0.5 * cu;\n position.y = radius * (2 + cs) * su * 0.5;\n position.z = radius * Math.sin(quOverP) * 0.5;\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n static fromJSON(data) {\n return new $d5b33d7c30034067$export$77e9bfadfb9ab8c8(data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q);\n }\n}\nclass $d5b33d7c30034067$export$7897d9d48904490c extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(path = new $d5b33d7c30034067$export$bf3f4c7e459f90fc(new $d5b33d7c30034067$export$64b5c384219d3699(-1, -1, 0), new $d5b33d7c30034067$export$64b5c384219d3699(-1, 1, 0), new $d5b33d7c30034067$export$64b5c384219d3699(1, 1, 0)), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false){\n super();\n this.type = \"TubeGeometry\";\n this.parameters = {\n path: path,\n tubularSegments: tubularSegments,\n radius: radius,\n radialSegments: radialSegments,\n closed: closed\n };\n const frames = path.computeFrenetFrames(tubularSegments, closed);\n // expose internals\n this.tangents = frames.tangents;\n this.normals = frames.normals;\n this.binormals = frames.binormals;\n // helper variables\n const vertex = new $d5b33d7c30034067$export$64b5c384219d3699();\n const normal = new $d5b33d7c30034067$export$64b5c384219d3699();\n const uv = new $d5b33d7c30034067$export$c977b3e384af9ae1();\n let P = new $d5b33d7c30034067$export$64b5c384219d3699();\n // buffer\n const vertices = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n // create buffer data\n generateBufferData();\n // build geometry\n this.setIndex(indices);\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n this.setAttribute(\"normal\", new $d5b33d7c30034067$export$cbe7a62641830ebd(normals, 3));\n this.setAttribute(\"uv\", new $d5b33d7c30034067$export$cbe7a62641830ebd(uvs, 2));\n // functions\n function generateBufferData() {\n for(let i = 0; i < tubularSegments; i++)generateSegment(i);\n // if the geometry is not closed, generate the last row of vertices and normals\n // at the regular position on the given path\n //\n // if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n generateSegment(closed === false ? tubularSegments : 0);\n // uvs are generated in a separate function.\n // this makes it easy compute correct values for closed geometries\n generateUVs();\n // finally create faces\n generateIndices();\n }\n function generateSegment(i) {\n // we use getPointAt to sample evenly distributed points from the given path\n P = path.getPointAt(i / tubularSegments, P);\n // retrieve corresponding normal and binormal\n const N = frames.normals[i];\n const B = frames.binormals[i];\n // generate normals and vertices for the current segment\n for(let j = 0; j <= radialSegments; j++){\n const v = j / radialSegments * Math.PI * 2;\n const sin = Math.sin(v);\n const cos = -Math.cos(v);\n // normal\n normal.x = cos * N.x + sin * B.x;\n normal.y = cos * N.y + sin * B.y;\n normal.z = cos * N.z + sin * B.z;\n normal.normalize();\n normals.push(normal.x, normal.y, normal.z);\n // vertex\n vertex.x = P.x + radius * normal.x;\n vertex.y = P.y + radius * normal.y;\n vertex.z = P.z + radius * normal.z;\n vertices.push(vertex.x, vertex.y, vertex.z);\n }\n }\n function generateIndices() {\n for(let j = 1; j <= tubularSegments; j++)for(let i = 1; i <= radialSegments; i++){\n const a = (radialSegments + 1) * (j - 1) + (i - 1);\n const b = (radialSegments + 1) * j + (i - 1);\n const c = (radialSegments + 1) * j + i;\n const d = (radialSegments + 1) * (j - 1) + i;\n // faces\n indices.push(a, b, d);\n indices.push(b, c, d);\n }\n }\n function generateUVs() {\n for(let i = 0; i <= tubularSegments; i++)for(let j = 0; j <= radialSegments; j++){\n uv.x = i / tubularSegments;\n uv.y = j / radialSegments;\n uvs.push(uv.x, uv.y);\n }\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.path = this.parameters.path.toJSON();\n return data;\n }\n static fromJSON(data) {\n // This only works for built-in curves (e.g. CatmullRomCurve3).\n // User defined curves or instances of CurvePath will not be deserialized.\n return new $d5b33d7c30034067$export$7897d9d48904490c(new $d5b33d7c30034067$var$Curves[data.path.type]().fromJSON(data.path), data.tubularSegments, data.radius, data.radialSegments, data.closed);\n }\n}\nclass $d5b33d7c30034067$export$4b739da06d24892b extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(geometry = null){\n super();\n this.type = \"WireframeGeometry\";\n this.parameters = {\n geometry: geometry\n };\n if (geometry !== null) {\n // buffer\n const vertices = [];\n const edges = new Set();\n // helper variables\n const start = new $d5b33d7c30034067$export$64b5c384219d3699();\n const end = new $d5b33d7c30034067$export$64b5c384219d3699();\n if (geometry.index !== null) {\n // indexed BufferGeometry\n const position = geometry.attributes.position;\n const indices = geometry.index;\n let groups = geometry.groups;\n if (groups.length === 0) groups = [\n {\n start: 0,\n count: indices.count,\n materialIndex: 0\n }\n ];\n // create a data structure that contains all edges without duplicates\n for(let o = 0, ol = groups.length; o < ol; ++o){\n const group = groups[o];\n const groupStart = group.start;\n const groupCount = group.count;\n for(let i = groupStart, l = groupStart + groupCount; i < l; i += 3)for(let j = 0; j < 3; j++){\n const index1 = indices.getX(i + j);\n const index2 = indices.getX(i + (j + 1) % 3);\n start.fromBufferAttribute(position, index1);\n end.fromBufferAttribute(position, index2);\n if ($d5b33d7c30034067$var$isUniqueEdge(start, end, edges) === true) {\n vertices.push(start.x, start.y, start.z);\n vertices.push(end.x, end.y, end.z);\n }\n }\n }\n } else {\n // non-indexed BufferGeometry\n const position = geometry.attributes.position;\n for(let i = 0, l = position.count / 3; i < l; i++)for(let j = 0; j < 3; j++){\n // three edges per triangle, an edge is represented as (index1, index2)\n // e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n const index1 = 3 * i + j;\n const index2 = 3 * i + (j + 1) % 3;\n start.fromBufferAttribute(position, index1);\n end.fromBufferAttribute(position, index2);\n if ($d5b33d7c30034067$var$isUniqueEdge(start, end, edges) === true) {\n vertices.push(start.x, start.y, start.z);\n vertices.push(end.x, end.y, end.z);\n }\n }\n }\n // build geometry\n this.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n }\n }\n copy(source) {\n super.copy(source);\n this.parameters = Object.assign({}, source.parameters);\n return this;\n }\n}\nfunction $d5b33d7c30034067$var$isUniqueEdge(start, end, edges) {\n const hash1 = `${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;\n const hash2 = `${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`; // coincident edge\n if (edges.has(hash1) === true || edges.has(hash2) === true) return false;\n else {\n edges.add(hash1);\n edges.add(hash2);\n return true;\n }\n}\nvar $d5b33d7c30034067$var$Geometries = /*#__PURE__*/ Object.freeze({\n __proto__: null,\n BoxGeometry: $d5b33d7c30034067$export$33e43285f7406bd5,\n CapsuleGeometry: $d5b33d7c30034067$export$41680e8551036033,\n CircleGeometry: $d5b33d7c30034067$export$d5c0e8d607467193,\n ConeGeometry: $d5b33d7c30034067$export$a7a48974f285c9b3,\n CylinderGeometry: $d5b33d7c30034067$export$68f745719dbe5198,\n DodecahedronGeometry: $d5b33d7c30034067$export$c0babfeb8708fc9c,\n EdgesGeometry: $d5b33d7c30034067$export$4730b1542707547f,\n ExtrudeGeometry: $d5b33d7c30034067$export$598697a1efa63ca7,\n IcosahedronGeometry: $d5b33d7c30034067$export$9567cc828c9535da,\n LatheGeometry: $d5b33d7c30034067$export$6d839803fcd1882c,\n OctahedronGeometry: $d5b33d7c30034067$export$1954e2b809fe361e,\n PlaneGeometry: $d5b33d7c30034067$export$967d831af31f69ce,\n PolyhedronGeometry: $d5b33d7c30034067$export$60e57a7d3f20ff65,\n RingGeometry: $d5b33d7c30034067$export$68cb731f50f614af,\n ShapeGeometry: $d5b33d7c30034067$export$57a29a1c803e9065,\n SphereGeometry: $d5b33d7c30034067$export$1b417fc3b307a251,\n TetrahedronGeometry: $d5b33d7c30034067$export$fb3f7adc68bd6e02,\n TorusGeometry: $d5b33d7c30034067$export$a2312a2a1fa56495,\n TorusKnotGeometry: $d5b33d7c30034067$export$77e9bfadfb9ab8c8,\n TubeGeometry: $d5b33d7c30034067$export$7897d9d48904490c,\n WireframeGeometry: $d5b33d7c30034067$export$4b739da06d24892b\n});\nclass $d5b33d7c30034067$export$e8564da406055a3 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isShadowMaterial = true;\n this.type = \"ShadowMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.transparent = true;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$21c421a2e1df9d22 extends $d5b33d7c30034067$export$83c7d75d550a8b0d {\n constructor(parameters){\n super(parameters);\n this.isRawShaderMaterial = true;\n this.type = \"RawShaderMaterial\";\n }\n}\nclass $d5b33d7c30034067$export$f2980790215acccd extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshStandardMaterial = true;\n this.defines = {\n \"STANDARD\": \"\"\n };\n this.type = \"MeshStandardMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.roughness = 1.0;\n this.metalness = 0.0;\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.roughnessMap = null;\n this.metalnessMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.envMapIntensity = 1.0;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.defines = {\n \"STANDARD\": \"\"\n };\n this.color.copy(source.color);\n this.roughness = source.roughness;\n this.metalness = source.metalness;\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.roughnessMap = source.roughnessMap;\n this.metalnessMap = source.metalnessMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.envMapIntensity = source.envMapIntensity;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$28d04986c4269c9f extends $d5b33d7c30034067$export$f2980790215acccd {\n constructor(parameters){\n super();\n this.isMeshPhysicalMaterial = true;\n this.defines = {\n \"STANDARD\": \"\",\n \"PHYSICAL\": \"\"\n };\n this.type = \"MeshPhysicalMaterial\";\n this.anisotropyRotation = 0;\n this.anisotropyMap = null;\n this.clearcoatMap = null;\n this.clearcoatRoughness = 0.0;\n this.clearcoatRoughnessMap = null;\n this.clearcoatNormalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.clearcoatNormalMap = null;\n this.ior = 1.5;\n Object.defineProperty(this, \"reflectivity\", {\n get: function() {\n return $d5b33d7c30034067$var$clamp(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);\n },\n set: function(reflectivity) {\n this.ior = (1 + 0.4 * reflectivity) / (1 - 0.4 * reflectivity);\n }\n });\n this.iridescenceMap = null;\n this.iridescenceIOR = 1.3;\n this.iridescenceThicknessRange = [\n 100,\n 400\n ];\n this.iridescenceThicknessMap = null;\n this.sheenColor = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.sheenColorMap = null;\n this.sheenRoughness = 1.0;\n this.sheenRoughnessMap = null;\n this.transmissionMap = null;\n this.thickness = 0;\n this.thicknessMap = null;\n this.attenuationDistance = Infinity;\n this.attenuationColor = new $d5b33d7c30034067$export$892596cec99bc70e(1, 1, 1);\n this.specularIntensity = 1.0;\n this.specularIntensityMap = null;\n this.specularColor = new $d5b33d7c30034067$export$892596cec99bc70e(1, 1, 1);\n this.specularColorMap = null;\n this._anisotropy = 0;\n this._clearcoat = 0;\n this._iridescence = 0;\n this._sheen = 0.0;\n this._transmission = 0;\n this.setValues(parameters);\n }\n get anisotropy() {\n return this._anisotropy;\n }\n set anisotropy(value) {\n if (this._anisotropy > 0 !== value > 0) this.version++;\n this._anisotropy = value;\n }\n get clearcoat() {\n return this._clearcoat;\n }\n set clearcoat(value) {\n if (this._clearcoat > 0 !== value > 0) this.version++;\n this._clearcoat = value;\n }\n get iridescence() {\n return this._iridescence;\n }\n set iridescence(value) {\n if (this._iridescence > 0 !== value > 0) this.version++;\n this._iridescence = value;\n }\n get sheen() {\n return this._sheen;\n }\n set sheen(value) {\n if (this._sheen > 0 !== value > 0) this.version++;\n this._sheen = value;\n }\n get transmission() {\n return this._transmission;\n }\n set transmission(value) {\n if (this._transmission > 0 !== value > 0) this.version++;\n this._transmission = value;\n }\n copy(source) {\n super.copy(source);\n this.defines = {\n \"STANDARD\": \"\",\n \"PHYSICAL\": \"\"\n };\n this.anisotropy = source.anisotropy;\n this.anisotropyRotation = source.anisotropyRotation;\n this.anisotropyMap = source.anisotropyMap;\n this.clearcoat = source.clearcoat;\n this.clearcoatMap = source.clearcoatMap;\n this.clearcoatRoughness = source.clearcoatRoughness;\n this.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n this.clearcoatNormalMap = source.clearcoatNormalMap;\n this.clearcoatNormalScale.copy(source.clearcoatNormalScale);\n this.ior = source.ior;\n this.iridescence = source.iridescence;\n this.iridescenceMap = source.iridescenceMap;\n this.iridescenceIOR = source.iridescenceIOR;\n this.iridescenceThicknessRange = [\n ...source.iridescenceThicknessRange\n ];\n this.iridescenceThicknessMap = source.iridescenceThicknessMap;\n this.sheen = source.sheen;\n this.sheenColor.copy(source.sheenColor);\n this.sheenColorMap = source.sheenColorMap;\n this.sheenRoughness = source.sheenRoughness;\n this.sheenRoughnessMap = source.sheenRoughnessMap;\n this.transmission = source.transmission;\n this.transmissionMap = source.transmissionMap;\n this.thickness = source.thickness;\n this.thicknessMap = source.thicknessMap;\n this.attenuationDistance = source.attenuationDistance;\n this.attenuationColor.copy(source.attenuationColor);\n this.specularIntensity = source.specularIntensity;\n this.specularIntensityMap = source.specularIntensityMap;\n this.specularColor.copy(source.specularColor);\n this.specularColorMap = source.specularColorMap;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$24c72f71cbaf0678 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshPhongMaterial = true;\n this.type = \"MeshPhongMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.specular = new $d5b33d7c30034067$export$892596cec99bc70e(0x111111);\n this.shininess = 30;\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.specularMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.combine = $d5b33d7c30034067$export$e50ac29801f1774d;\n this.reflectivity = 1;\n this.refractionRatio = 0.98;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.specular.copy(source.specular);\n this.shininess = source.shininess;\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.specularMap = source.specularMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.combine = source.combine;\n this.reflectivity = source.reflectivity;\n this.refractionRatio = source.refractionRatio;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$df893cf97e765622 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshToonMaterial = true;\n this.defines = {\n \"TOON\": \"\"\n };\n this.type = \"MeshToonMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n this.map = null;\n this.gradientMap = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.alphaMap = null;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.gradientMap = source.gradientMap;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.alphaMap = source.alphaMap;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$bfe8c0a091f41ae7 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshNormalMaterial = true;\n this.type = \"MeshNormalMaterial\";\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.flatShading = false;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.flatShading = source.flatShading;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$5023a9a8114806b8 extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshLambertMaterial = true;\n this.type = \"MeshLambertMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.map = null;\n this.lightMap = null;\n this.lightMapIntensity = 1.0;\n this.aoMap = null;\n this.aoMapIntensity = 1.0;\n this.emissive = new $d5b33d7c30034067$export$892596cec99bc70e(0x000000);\n this.emissiveIntensity = 1.0;\n this.emissiveMap = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.specularMap = null;\n this.alphaMap = null;\n this.envMap = null;\n this.combine = $d5b33d7c30034067$export$e50ac29801f1774d;\n this.reflectivity = 1;\n this.refractionRatio = 0.98;\n this.wireframe = false;\n this.wireframeLinewidth = 1;\n this.wireframeLinecap = \"round\";\n this.wireframeLinejoin = \"round\";\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.color.copy(source.color);\n this.map = source.map;\n this.lightMap = source.lightMap;\n this.lightMapIntensity = source.lightMapIntensity;\n this.aoMap = source.aoMap;\n this.aoMapIntensity = source.aoMapIntensity;\n this.emissive.copy(source.emissive);\n this.emissiveMap = source.emissiveMap;\n this.emissiveIntensity = source.emissiveIntensity;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.specularMap = source.specularMap;\n this.alphaMap = source.alphaMap;\n this.envMap = source.envMap;\n this.combine = source.combine;\n this.reflectivity = source.reflectivity;\n this.refractionRatio = source.refractionRatio;\n this.wireframe = source.wireframe;\n this.wireframeLinewidth = source.wireframeLinewidth;\n this.wireframeLinecap = source.wireframeLinecap;\n this.wireframeLinejoin = source.wireframeLinejoin;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$6f5fef6235ec12ee extends $d5b33d7c30034067$export$a2d8b23205c25948 {\n constructor(parameters){\n super();\n this.isMeshMatcapMaterial = true;\n this.defines = {\n \"MATCAP\": \"\"\n };\n this.type = \"MeshMatcapMaterial\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff); // diffuse\n this.matcap = null;\n this.map = null;\n this.bumpMap = null;\n this.bumpScale = 1;\n this.normalMap = null;\n this.normalMapType = $d5b33d7c30034067$export$2852a58ebdac27b8;\n this.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this.displacementMap = null;\n this.displacementScale = 1;\n this.displacementBias = 0;\n this.alphaMap = null;\n this.flatShading = false;\n this.fog = true;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.defines = {\n \"MATCAP\": \"\"\n };\n this.color.copy(source.color);\n this.matcap = source.matcap;\n this.map = source.map;\n this.bumpMap = source.bumpMap;\n this.bumpScale = source.bumpScale;\n this.normalMap = source.normalMap;\n this.normalMapType = source.normalMapType;\n this.normalScale.copy(source.normalScale);\n this.displacementMap = source.displacementMap;\n this.displacementScale = source.displacementScale;\n this.displacementBias = source.displacementBias;\n this.alphaMap = source.alphaMap;\n this.flatShading = source.flatShading;\n this.fog = source.fog;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$327886a3efaeaebe extends $d5b33d7c30034067$export$fbaaa33907730a0c {\n constructor(parameters){\n super();\n this.isLineDashedMaterial = true;\n this.type = \"LineDashedMaterial\";\n this.scale = 1;\n this.dashSize = 3;\n this.gapSize = 1;\n this.setValues(parameters);\n }\n copy(source) {\n super.copy(source);\n this.scale = source.scale;\n this.dashSize = source.dashSize;\n this.gapSize = source.gapSize;\n return this;\n }\n}\n// converts an array to a specific type\nfunction $d5b33d7c30034067$var$convertArray(array, type, forceClone) {\n if (!array || // let 'undefined' and 'null' pass\n !forceClone && array.constructor === type) return array;\n if (typeof type.BYTES_PER_ELEMENT === \"number\") return new type(array); // create typed array\n return Array.prototype.slice.call(array); // create Array\n}\nfunction $d5b33d7c30034067$var$isTypedArray(object) {\n return ArrayBuffer.isView(object) && !(object instanceof DataView);\n}\n// returns an array by which times and values can be sorted\nfunction $d5b33d7c30034067$var$getKeyframeOrder(times) {\n function compareTime(i, j) {\n return times[i] - times[j];\n }\n const n = times.length;\n const result = new Array(n);\n for(let i = 0; i !== n; ++i)result[i] = i;\n result.sort(compareTime);\n return result;\n}\n// uses the array previously returned by 'getKeyframeOrder' to sort data\nfunction $d5b33d7c30034067$var$sortedArray(values, stride, order) {\n const nValues = values.length;\n const result = new values.constructor(nValues);\n for(let i = 0, dstOffset = 0; dstOffset !== nValues; ++i){\n const srcOffset = order[i] * stride;\n for(let j = 0; j !== stride; ++j)result[dstOffset++] = values[srcOffset + j];\n }\n return result;\n}\n// function for parsing AOS keyframe formats\nfunction $d5b33d7c30034067$var$flattenJSON(jsonKeys, times, values, valuePropertyName) {\n let i = 1, key = jsonKeys[0];\n while(key !== undefined && key[valuePropertyName] === undefined)key = jsonKeys[i++];\n if (key === undefined) return; // no data\n let value = key[valuePropertyName];\n if (value === undefined) return; // no data\n if (Array.isArray(value)) do {\n value = key[valuePropertyName];\n if (value !== undefined) {\n times.push(key.time);\n values.push.apply(values, value); // push all elements\n }\n key = jsonKeys[i++];\n }while (key !== undefined);\n else if (value.toArray !== undefined) // ...assume THREE.Math-ish\n do {\n value = key[valuePropertyName];\n if (value !== undefined) {\n times.push(key.time);\n value.toArray(values, values.length);\n }\n key = jsonKeys[i++];\n }while (key !== undefined);\n else // otherwise push as-is\n do {\n value = key[valuePropertyName];\n if (value !== undefined) {\n times.push(key.time);\n values.push(value);\n }\n key = jsonKeys[i++];\n }while (key !== undefined);\n}\nfunction $d5b33d7c30034067$var$subclip(sourceClip, name, startFrame, endFrame, fps = 30) {\n const clip = sourceClip.clone();\n clip.name = name;\n const tracks = [];\n for(let i = 0; i < clip.tracks.length; ++i){\n const track = clip.tracks[i];\n const valueSize = track.getValueSize();\n const times = [];\n const values = [];\n for(let j = 0; j < track.times.length; ++j){\n const frame = track.times[j] * fps;\n if (frame < startFrame || frame >= endFrame) continue;\n times.push(track.times[j]);\n for(let k = 0; k < valueSize; ++k)values.push(track.values[j * valueSize + k]);\n }\n if (times.length === 0) continue;\n track.times = $d5b33d7c30034067$var$convertArray(times, track.times.constructor);\n track.values = $d5b33d7c30034067$var$convertArray(values, track.values.constructor);\n tracks.push(track);\n }\n clip.tracks = tracks;\n // find minimum .times value across all tracks in the trimmed clip\n let minStartTime = Infinity;\n for(let i = 0; i < clip.tracks.length; ++i)if (minStartTime > clip.tracks[i].times[0]) minStartTime = clip.tracks[i].times[0];\n // shift all tracks such that clip begins at t=0\n for(let i = 0; i < clip.tracks.length; ++i)clip.tracks[i].shift(-1 * minStartTime);\n clip.resetDuration();\n return clip;\n}\nfunction $d5b33d7c30034067$var$makeClipAdditive(targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30) {\n if (fps <= 0) fps = 30;\n const numTracks = referenceClip.tracks.length;\n const referenceTime = referenceFrame / fps;\n // Make each track's values relative to the values at the reference frame\n for(let i = 0; i < numTracks; ++i){\n const referenceTrack = referenceClip.tracks[i];\n const referenceTrackType = referenceTrack.ValueTypeName;\n // Skip this track if it's non-numeric\n if (referenceTrackType === \"bool\" || referenceTrackType === \"string\") continue;\n // Find the track in the target clip whose name and type matches the reference track\n const targetTrack = targetClip.tracks.find(function(track) {\n return track.name === referenceTrack.name && track.ValueTypeName === referenceTrackType;\n });\n if (targetTrack === undefined) continue;\n let referenceOffset = 0;\n const referenceValueSize = referenceTrack.getValueSize();\n if (referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) referenceOffset = referenceValueSize / 3;\n let targetOffset = 0;\n const targetValueSize = targetTrack.getValueSize();\n if (targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) targetOffset = targetValueSize / 3;\n const lastIndex = referenceTrack.times.length - 1;\n let referenceValue;\n // Find the value to subtract out of the track\n if (referenceTime <= referenceTrack.times[0]) {\n // Reference frame is earlier than the first keyframe, so just use the first keyframe\n const startIndex = referenceOffset;\n const endIndex = referenceValueSize - referenceOffset;\n referenceValue = referenceTrack.values.slice(startIndex, endIndex);\n } else if (referenceTime >= referenceTrack.times[lastIndex]) {\n // Reference frame is after the last keyframe, so just use the last keyframe\n const startIndex = lastIndex * referenceValueSize + referenceOffset;\n const endIndex = startIndex + referenceValueSize - referenceOffset;\n referenceValue = referenceTrack.values.slice(startIndex, endIndex);\n } else {\n // Interpolate to the reference value\n const interpolant = referenceTrack.createInterpolant();\n const startIndex = referenceOffset;\n const endIndex = referenceValueSize - referenceOffset;\n interpolant.evaluate(referenceTime);\n referenceValue = interpolant.resultBuffer.slice(startIndex, endIndex);\n }\n // Conjugate the quaternion\n if (referenceTrackType === \"quaternion\") {\n const referenceQuat = new $d5b33d7c30034067$export$23d6a54f0bbc85a3().fromArray(referenceValue).normalize().conjugate();\n referenceQuat.toArray(referenceValue);\n }\n // Subtract the reference value from all of the track values\n const numTimes = targetTrack.times.length;\n for(let j = 0; j < numTimes; ++j){\n const valueStart = j * targetValueSize + targetOffset;\n if (referenceTrackType === \"quaternion\") // Multiply the conjugate for quaternion track types\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.multiplyQuaternionsFlat(targetTrack.values, valueStart, referenceValue, 0, targetTrack.values, valueStart);\n else {\n const valueEnd = targetValueSize - targetOffset * 2;\n // Subtract each value for all other numeric track types\n for(let k = 0; k < valueEnd; ++k)targetTrack.values[valueStart + k] -= referenceValue[k];\n }\n }\n }\n targetClip.blendMode = $d5b33d7c30034067$export$d875e029ef558d3;\n return targetClip;\n}\nconst $d5b33d7c30034067$export$7ee8caa573e71ad1 = {\n convertArray: $d5b33d7c30034067$var$convertArray,\n isTypedArray: $d5b33d7c30034067$var$isTypedArray,\n getKeyframeOrder: $d5b33d7c30034067$var$getKeyframeOrder,\n sortedArray: $d5b33d7c30034067$var$sortedArray,\n flattenJSON: $d5b33d7c30034067$var$flattenJSON,\n subclip: $d5b33d7c30034067$var$subclip,\n makeClipAdditive: $d5b33d7c30034067$var$makeClipAdditive\n};\n/**\n * Abstract base class of interpolants over parametric samples.\n *\n * The parameter domain is one dimensional, typically the time or a path\n * along a curve defined by the data.\n *\n * The sample values can have any dimensionality and derived classes may\n * apply special interpretations to the data.\n *\n * This class provides the interval seek in a Template Method, deferring\n * the actual interpolation to derived classes.\n *\n * Time complexity is O(1) for linear access crossing at most two points\n * and O(log N) for random access, where N is the number of positions.\n *\n * References:\n *\n * \t\thttp://www.oodesign.com/template-method-pattern.html\n *\n */ class $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n this.parameterPositions = parameterPositions;\n this._cachedIndex = 0;\n this.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize);\n this.sampleValues = sampleValues;\n this.valueSize = sampleSize;\n this.settings = null;\n this.DefaultSettings_ = {};\n }\n evaluate(t) {\n const pp = this.parameterPositions;\n let i1 = this._cachedIndex, t1 = pp[i1], t0 = pp[i1 - 1];\n validate_interval: {\n seek: {\n let right;\n linear_scan: {\n //- See http://jsperf.com/comparison-to-undefined/3\n //- slower code:\n //-\n //- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n forward_scan: if (!(t < t1)) {\n for(let giveUpAt = i1 + 2;;){\n if (t1 === undefined) {\n if (t < t0) break forward_scan;\n // after end\n i1 = pp.length;\n this._cachedIndex = i1;\n return this.copySampleValue_(i1 - 1);\n }\n if (i1 === giveUpAt) break; // this loop\n t0 = t1;\n t1 = pp[++i1];\n if (t < t1) break seek;\n }\n // prepare binary search on the right side of the index\n right = pp.length;\n break linear_scan;\n }\n //- slower code:\n //-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n if (!(t >= t0)) {\n // looping?\n const t1global = pp[1];\n if (t < t1global) {\n i1 = 2; // + 1, using the scan for the details\n t0 = t1global;\n }\n // linear reverse scan\n for(let giveUpAt = i1 - 2;;){\n if (t0 === undefined) {\n // before start\n this._cachedIndex = 0;\n return this.copySampleValue_(0);\n }\n if (i1 === giveUpAt) break; // this loop\n t1 = t0;\n t0 = pp[--i1 - 1];\n if (t >= t0) break seek;\n }\n // prepare binary search on the left side of the index\n right = i1;\n i1 = 0;\n break linear_scan;\n }\n break validate_interval;\n } // linear scan\n // binary search\n while(i1 < right){\n const mid = i1 + right >>> 1;\n if (t < pp[mid]) right = mid;\n else i1 = mid + 1;\n }\n t1 = pp[i1];\n t0 = pp[i1 - 1];\n // check boundary cases, again\n if (t0 === undefined) {\n this._cachedIndex = 0;\n return this.copySampleValue_(0);\n }\n if (t1 === undefined) {\n i1 = pp.length;\n this._cachedIndex = i1;\n return this.copySampleValue_(i1 - 1);\n }\n } // seek\n this._cachedIndex = i1;\n this.intervalChanged_(i1, t0, t1);\n } // validate_interval\n return this.interpolate_(i1, t0, t, t1);\n }\n getSettings_() {\n return this.settings || this.DefaultSettings_;\n }\n copySampleValue_(index) {\n // copies a sample value to the result buffer\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, offset = index * stride;\n for(let i = 0; i !== stride; ++i)result[i] = values[offset + i];\n return result;\n }\n // Template methods for derived classes:\n interpolate_() {\n throw new Error(\"call to abstract method\");\n // implementations shall return this.resultBuffer\n }\n intervalChanged_() {\n // empty\n }\n}\n/**\n * Fast and simple cubic spline interpolant.\n *\n * It was derived from a Hermitian construction setting the first derivative\n * at each sample position to the linear slope between neighboring positions\n * over their parameter interval.\n */ class $d5b33d7c30034067$export$3646682e7a3959 extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n this._weightPrev = -0;\n this._offsetPrev = -0;\n this._weightNext = -0;\n this._offsetNext = -0;\n this.DefaultSettings_ = {\n endingStart: $d5b33d7c30034067$export$7f795934b84ab523,\n endingEnd: $d5b33d7c30034067$export$7f795934b84ab523\n };\n }\n intervalChanged_(i1, t0, t1) {\n const pp = this.parameterPositions;\n let iPrev = i1 - 2, iNext = i1 + 1, tPrev = pp[iPrev], tNext = pp[iNext];\n if (tPrev === undefined) switch(this.getSettings_().endingStart){\n case $d5b33d7c30034067$export$24a4ccb5099273b5:\n // f'(t0) = 0\n iPrev = i1;\n tPrev = 2 * t0 - t1;\n break;\n case $d5b33d7c30034067$export$8e8c3ecdcd8e1fee:\n // use the other end of the curve\n iPrev = pp.length - 2;\n tPrev = t0 + pp[iPrev] - pp[iPrev + 1];\n break;\n default:\n // f''(t0) = 0 a.k.a. Natural Spline\n iPrev = i1;\n tPrev = t1;\n }\n if (tNext === undefined) switch(this.getSettings_().endingEnd){\n case $d5b33d7c30034067$export$24a4ccb5099273b5:\n // f'(tN) = 0\n iNext = i1;\n tNext = 2 * t1 - t0;\n break;\n case $d5b33d7c30034067$export$8e8c3ecdcd8e1fee:\n // use the other end of the curve\n iNext = 1;\n tNext = t1 + pp[1] - pp[0];\n break;\n default:\n // f''(tN) = 0, a.k.a. Natural Spline\n iNext = i1 - 1;\n tNext = t0;\n }\n const halfDt = (t1 - t0) * 0.5, stride = this.valueSize;\n this._weightPrev = halfDt / (t0 - tPrev);\n this._weightNext = halfDt / (tNext - t1);\n this._offsetPrev = iPrev * stride;\n this._offsetNext = iNext * stride;\n }\n interpolate_(i1, t0, t, t1) {\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, o1 = i1 * stride, o0 = o1 - stride, oP = this._offsetPrev, oN = this._offsetNext, wP = this._weightPrev, wN = this._weightNext, p = (t - t0) / (t1 - t0), pp = p * p, ppp = pp * p;\n // evaluate polynomials\n const sP = -wP * ppp + 2 * wP * pp - wP * p;\n const s0 = (1 + wP) * ppp + (-1.5 - 2 * wP) * pp + (-0.5 + wP) * p + 1;\n const s1 = (-1 - wN) * ppp + (1.5 + wN) * pp + 0.5 * p;\n const sN = wN * ppp - wN * pp;\n // combine data linearly\n for(let i = 0; i !== stride; ++i)result[i] = sP * values[oP + i] + s0 * values[o0 + i] + s1 * values[o1 + i] + sN * values[oN + i];\n return result;\n }\n}\nclass $d5b33d7c30034067$export$a8e6009059f51e1a extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n }\n interpolate_(i1, t0, t, t1) {\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, offset1 = i1 * stride, offset0 = offset1 - stride, weight1 = (t - t0) / (t1 - t0), weight0 = 1 - weight1;\n for(let i = 0; i !== stride; ++i)result[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1;\n return result;\n }\n}\n/**\n *\n * Interpolant that evaluates to the sample value at the position preceding\n * the parameter.\n */ class $d5b33d7c30034067$export$fb9758ef7ef8d5cc extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n }\n interpolate_(i1 /*, t0, t, t1 */ ) {\n return this.copySampleValue_(i1 - 1);\n }\n}\nclass $d5b33d7c30034067$export$b0e479f45b7006d6 {\n constructor(name, times, values, interpolation){\n if (name === undefined) throw new Error(\"THREE.KeyframeTrack: track name is undefined\");\n if (times === undefined || times.length === 0) throw new Error(\"THREE.KeyframeTrack: no keyframes in track named \" + name);\n this.name = name;\n this.times = $d5b33d7c30034067$var$convertArray(times, this.TimeBufferType);\n this.values = $d5b33d7c30034067$var$convertArray(values, this.ValueBufferType);\n this.setInterpolation(interpolation || this.DefaultInterpolation);\n }\n // Serialization (in static context, because of constructor invocation\n // and automatic invocation of .toJSON):\n static toJSON(track) {\n const trackType = track.constructor;\n let json;\n // derived classes can define a static toJSON method\n if (trackType.toJSON !== this.toJSON) json = trackType.toJSON(track);\n else {\n // by default, we assume the data can be serialized as-is\n json = {\n \"name\": track.name,\n \"times\": $d5b33d7c30034067$var$convertArray(track.times, Array),\n \"values\": $d5b33d7c30034067$var$convertArray(track.values, Array)\n };\n const interpolation = track.getInterpolation();\n if (interpolation !== track.DefaultInterpolation) json.interpolation = interpolation;\n }\n json.type = track.ValueTypeName; // mandatory\n return json;\n }\n InterpolantFactoryMethodDiscrete(result) {\n return new $d5b33d7c30034067$export$fb9758ef7ef8d5cc(this.times, this.values, this.getValueSize(), result);\n }\n InterpolantFactoryMethodLinear(result) {\n return new $d5b33d7c30034067$export$a8e6009059f51e1a(this.times, this.values, this.getValueSize(), result);\n }\n InterpolantFactoryMethodSmooth(result) {\n return new $d5b33d7c30034067$export$3646682e7a3959(this.times, this.values, this.getValueSize(), result);\n }\n setInterpolation(interpolation) {\n let factoryMethod;\n switch(interpolation){\n case $d5b33d7c30034067$export$995b32462a65e855:\n factoryMethod = this.InterpolantFactoryMethodDiscrete;\n break;\n case $d5b33d7c30034067$export$30fac1aace31cf4d:\n factoryMethod = this.InterpolantFactoryMethodLinear;\n break;\n case $d5b33d7c30034067$export$198b11ff4c72bb30:\n factoryMethod = this.InterpolantFactoryMethodSmooth;\n break;\n }\n if (factoryMethod === undefined) {\n const message = \"unsupported interpolation for \" + this.ValueTypeName + \" keyframe track named \" + this.name;\n if (this.createInterpolant === undefined) {\n // fall back to default, unless the default itself is messed up\n if (interpolation !== this.DefaultInterpolation) this.setInterpolation(this.DefaultInterpolation);\n else throw new Error(message); // fatal, in this case\n }\n console.warn(\"THREE.KeyframeTrack:\", message);\n return this;\n }\n this.createInterpolant = factoryMethod;\n return this;\n }\n getInterpolation() {\n switch(this.createInterpolant){\n case this.InterpolantFactoryMethodDiscrete:\n return $d5b33d7c30034067$export$995b32462a65e855;\n case this.InterpolantFactoryMethodLinear:\n return $d5b33d7c30034067$export$30fac1aace31cf4d;\n case this.InterpolantFactoryMethodSmooth:\n return $d5b33d7c30034067$export$198b11ff4c72bb30;\n }\n }\n getValueSize() {\n return this.values.length / this.times.length;\n }\n // move all keyframes either forwards or backwards in time\n shift(timeOffset) {\n if (timeOffset !== 0.0) {\n const times = this.times;\n for(let i = 0, n = times.length; i !== n; ++i)times[i] += timeOffset;\n }\n return this;\n }\n // scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n scale(timeScale) {\n if (timeScale !== 1.0) {\n const times = this.times;\n for(let i = 0, n = times.length; i !== n; ++i)times[i] *= timeScale;\n }\n return this;\n }\n // removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n // IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n trim(startTime, endTime) {\n const times = this.times, nKeys = times.length;\n let from = 0, to = nKeys - 1;\n while(from !== nKeys && times[from] < startTime)++from;\n while(to !== -1 && times[to] > endTime)--to;\n ++to; // inclusive -> exclusive bound\n if (from !== 0 || to !== nKeys) {\n // empty tracks are forbidden, so keep at least one keyframe\n if (from >= to) {\n to = Math.max(to, 1);\n from = to - 1;\n }\n const stride = this.getValueSize();\n this.times = times.slice(from, to);\n this.values = this.values.slice(from * stride, to * stride);\n }\n return this;\n }\n // ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n validate() {\n let valid = true;\n const valueSize = this.getValueSize();\n if (valueSize - Math.floor(valueSize) !== 0) {\n console.error(\"THREE.KeyframeTrack: Invalid value size in track.\", this);\n valid = false;\n }\n const times = this.times, values = this.values, nKeys = times.length;\n if (nKeys === 0) {\n console.error(\"THREE.KeyframeTrack: Track is empty.\", this);\n valid = false;\n }\n let prevTime = null;\n for(let i = 0; i !== nKeys; i++){\n const currTime = times[i];\n if (typeof currTime === \"number\" && isNaN(currTime)) {\n console.error(\"THREE.KeyframeTrack: Time is not a valid number.\", this, i, currTime);\n valid = false;\n break;\n }\n if (prevTime !== null && prevTime > currTime) {\n console.error(\"THREE.KeyframeTrack: Out of order keys.\", this, i, currTime, prevTime);\n valid = false;\n break;\n }\n prevTime = currTime;\n }\n if (values !== undefined) {\n if ($d5b33d7c30034067$var$isTypedArray(values)) for(let i = 0, n = values.length; i !== n; ++i){\n const value = values[i];\n if (isNaN(value)) {\n console.error(\"THREE.KeyframeTrack: Value is not a valid number.\", this, i, value);\n valid = false;\n break;\n }\n }\n }\n return valid;\n }\n // removes equivalent sequential keys as common in morph target sequences\n // (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n optimize() {\n // times or values may be shared with other tracks, so overwriting is unsafe\n const times = this.times.slice(), values = this.values.slice(), stride = this.getValueSize(), smoothInterpolation = this.getInterpolation() === $d5b33d7c30034067$export$198b11ff4c72bb30, lastIndex = times.length - 1;\n let writeIndex = 1;\n for(let i = 1; i < lastIndex; ++i){\n let keep = false;\n const time = times[i];\n const timeNext = times[i + 1];\n // remove adjacent keyframes scheduled at the same time\n if (time !== timeNext && (i !== 1 || time !== times[0])) {\n if (!smoothInterpolation) {\n // remove unnecessary keyframes same as their neighbors\n const offset = i * stride, offsetP = offset - stride, offsetN = offset + stride;\n for(let j = 0; j !== stride; ++j){\n const value = values[offset + j];\n if (value !== values[offsetP + j] || value !== values[offsetN + j]) {\n keep = true;\n break;\n }\n }\n } else keep = true;\n }\n // in-place compaction\n if (keep) {\n if (i !== writeIndex) {\n times[writeIndex] = times[i];\n const readOffset = i * stride, writeOffset = writeIndex * stride;\n for(let j = 0; j !== stride; ++j)values[writeOffset + j] = values[readOffset + j];\n }\n ++writeIndex;\n }\n }\n // flush last keyframe (compaction looks ahead)\n if (lastIndex > 0) {\n times[writeIndex] = times[lastIndex];\n for(let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++j)values[writeOffset + j] = values[readOffset + j];\n ++writeIndex;\n }\n if (writeIndex !== times.length) {\n this.times = times.slice(0, writeIndex);\n this.values = values.slice(0, writeIndex * stride);\n } else {\n this.times = times;\n this.values = values;\n }\n return this;\n }\n clone() {\n const times = this.times.slice();\n const values = this.values.slice();\n const TypedKeyframeTrack = this.constructor;\n const track = new TypedKeyframeTrack(this.name, times, values);\n // Interpolant argument to constructor is not saved, so copy the factory method directly.\n track.createInterpolant = this.createInterpolant;\n return track;\n }\n}\n$d5b33d7c30034067$export$b0e479f45b7006d6.prototype.TimeBufferType = Float32Array;\n$d5b33d7c30034067$export$b0e479f45b7006d6.prototype.ValueBufferType = Float32Array;\n$d5b33d7c30034067$export$b0e479f45b7006d6.prototype.DefaultInterpolation = $d5b33d7c30034067$export$30fac1aace31cf4d;\n/**\n * A Track of Boolean keyframe values.\n */ class $d5b33d7c30034067$export$d3a344b98cf0b775 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.ValueTypeName = \"bool\";\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.ValueBufferType = Array;\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.DefaultInterpolation = $d5b33d7c30034067$export$995b32462a65e855;\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.InterpolantFactoryMethodLinear = undefined;\n$d5b33d7c30034067$export$d3a344b98cf0b775.prototype.InterpolantFactoryMethodSmooth = undefined;\n/**\n * A Track of keyframe values that represent color.\n */ class $d5b33d7c30034067$export$83444c5d885347d8 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$83444c5d885347d8.prototype.ValueTypeName = \"color\";\n/**\n * A Track of numeric keyframe values.\n */ class $d5b33d7c30034067$export$d45f0d1a4d9a9314 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$d45f0d1a4d9a9314.prototype.ValueTypeName = \"number\";\n/**\n * Spherical linear unit quaternion interpolant.\n */ class $d5b33d7c30034067$export$2db1cfb7923d931e extends $d5b33d7c30034067$export$b558baee9c0f72d3 {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer){\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n }\n interpolate_(i1, t0, t, t1) {\n const result = this.resultBuffer, values = this.sampleValues, stride = this.valueSize, alpha = (t - t0) / (t1 - t0);\n let offset = i1 * stride;\n for(let end = offset + stride; offset !== end; offset += 4)$d5b33d7c30034067$export$23d6a54f0bbc85a3.slerpFlat(result, 0, values, offset - stride, values, offset, alpha);\n return result;\n }\n}\n/**\n * A Track of quaternion keyframe values.\n */ class $d5b33d7c30034067$export$b8043f12b5aafbd7 extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n InterpolantFactoryMethodLinear(result) {\n return new $d5b33d7c30034067$export$2db1cfb7923d931e(this.times, this.values, this.getValueSize(), result);\n }\n}\n$d5b33d7c30034067$export$b8043f12b5aafbd7.prototype.ValueTypeName = \"quaternion\";\n// ValueBufferType is inherited\n$d5b33d7c30034067$export$b8043f12b5aafbd7.prototype.DefaultInterpolation = $d5b33d7c30034067$export$30fac1aace31cf4d;\n$d5b33d7c30034067$export$b8043f12b5aafbd7.prototype.InterpolantFactoryMethodSmooth = undefined;\n/**\n * A Track that interpolates Strings\n */ class $d5b33d7c30034067$export$6ce41d4f3a8df9cd extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.ValueTypeName = \"string\";\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.ValueBufferType = Array;\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.DefaultInterpolation = $d5b33d7c30034067$export$995b32462a65e855;\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.InterpolantFactoryMethodLinear = undefined;\n$d5b33d7c30034067$export$6ce41d4f3a8df9cd.prototype.InterpolantFactoryMethodSmooth = undefined;\n/**\n * A Track of vectored keyframe values.\n */ class $d5b33d7c30034067$export$5ce2dcb4cc9f2bff extends $d5b33d7c30034067$export$b0e479f45b7006d6 {\n}\n$d5b33d7c30034067$export$5ce2dcb4cc9f2bff.prototype.ValueTypeName = \"vector\";\nclass $d5b33d7c30034067$export$d942c706bf23829c {\n constructor(name, duration = -1, tracks, blendMode = $d5b33d7c30034067$export$bcfbbdcf8de7f8cd){\n this.name = name;\n this.tracks = tracks;\n this.duration = duration;\n this.blendMode = blendMode;\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n // this means it should figure out its duration by scanning the tracks\n if (this.duration < 0) this.resetDuration();\n }\n static parse(json) {\n const tracks = [], jsonTracks = json.tracks, frameTime = 1.0 / (json.fps || 1.0);\n for(let i = 0, n = jsonTracks.length; i !== n; ++i)tracks.push($d5b33d7c30034067$var$parseKeyframeTrack(jsonTracks[i]).scale(frameTime));\n const clip = new this(json.name, json.duration, tracks, json.blendMode);\n clip.uuid = json.uuid;\n return clip;\n }\n static toJSON(clip) {\n const tracks = [], clipTracks = clip.tracks;\n const json = {\n \"name\": clip.name,\n \"duration\": clip.duration,\n \"tracks\": tracks,\n \"uuid\": clip.uuid,\n \"blendMode\": clip.blendMode\n };\n for(let i = 0, n = clipTracks.length; i !== n; ++i)tracks.push($d5b33d7c30034067$export$b0e479f45b7006d6.toJSON(clipTracks[i]));\n return json;\n }\n static CreateFromMorphTargetSequence(name, morphTargetSequence, fps, noLoop) {\n const numMorphTargets = morphTargetSequence.length;\n const tracks = [];\n for(let i = 0; i < numMorphTargets; i++){\n let times = [];\n let values = [];\n times.push((i + numMorphTargets - 1) % numMorphTargets, i, (i + 1) % numMorphTargets);\n values.push(0, 1, 0);\n const order = $d5b33d7c30034067$var$getKeyframeOrder(times);\n times = $d5b33d7c30034067$var$sortedArray(times, 1, order);\n values = $d5b33d7c30034067$var$sortedArray(values, 1, order);\n // if there is a key at the first frame, duplicate it as the\n // last frame as well for perfect loop.\n if (!noLoop && times[0] === 0) {\n times.push(numMorphTargets);\n values.push(values[0]);\n }\n tracks.push(new $d5b33d7c30034067$export$d45f0d1a4d9a9314(\".morphTargetInfluences[\" + morphTargetSequence[i].name + \"]\", times, values).scale(1.0 / fps));\n }\n return new this(name, -1, tracks);\n }\n static findByName(objectOrClipArray, name) {\n let clipArray = objectOrClipArray;\n if (!Array.isArray(objectOrClipArray)) {\n const o = objectOrClipArray;\n clipArray = o.geometry && o.geometry.animations || o.animations;\n }\n for(let i = 0; i < clipArray.length; i++){\n if (clipArray[i].name === name) return clipArray[i];\n }\n return null;\n }\n static CreateClipsFromMorphTargetSequences(morphTargets, fps, noLoop) {\n const animationToMorphTargets = {};\n // tested with https://regex101.com/ on trick sequences\n // such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n const pattern = /^([\\w-]*?)([\\d]+)$/;\n // sort morph target names into animation groups based\n // patterns like Walk_001, Walk_002, Run_001, Run_002\n for(let i = 0, il = morphTargets.length; i < il; i++){\n const morphTarget = morphTargets[i];\n const parts = morphTarget.name.match(pattern);\n if (parts && parts.length > 1) {\n const name = parts[1];\n let animationMorphTargets = animationToMorphTargets[name];\n if (!animationMorphTargets) animationToMorphTargets[name] = animationMorphTargets = [];\n animationMorphTargets.push(morphTarget);\n }\n }\n const clips = [];\n for(const name in animationToMorphTargets)clips.push(this.CreateFromMorphTargetSequence(name, animationToMorphTargets[name], fps, noLoop));\n return clips;\n }\n // parse the animation.hierarchy format\n static parseAnimation(animation, bones) {\n if (!animation) {\n console.error(\"THREE.AnimationClip: No animation in JSONLoader data.\");\n return null;\n }\n const addNonemptyTrack = function(trackType, trackName, animationKeys, propertyName, destTracks) {\n // only return track if there are actually keys.\n if (animationKeys.length !== 0) {\n const times = [];\n const values = [];\n $d5b33d7c30034067$var$flattenJSON(animationKeys, times, values, propertyName);\n // empty keys are filtered out, so check again\n if (times.length !== 0) destTracks.push(new trackType(trackName, times, values));\n }\n };\n const tracks = [];\n const clipName = animation.name || \"default\";\n const fps = animation.fps || 30;\n const blendMode = animation.blendMode;\n // automatic length determination in AnimationClip.\n let duration = animation.length || -1;\n const hierarchyTracks = animation.hierarchy || [];\n for(let h = 0; h < hierarchyTracks.length; h++){\n const animationKeys = hierarchyTracks[h].keys;\n // skip empty tracks\n if (!animationKeys || animationKeys.length === 0) continue;\n // process morph targets\n if (animationKeys[0].morphTargets) {\n // figure out all morph targets used in this track\n const morphTargetNames = {};\n let k;\n for(k = 0; k < animationKeys.length; k++){\n if (animationKeys[k].morphTargets) for(let m = 0; m < animationKeys[k].morphTargets.length; m++)morphTargetNames[animationKeys[k].morphTargets[m]] = -1;\n }\n // create a track for each morph target with all zero\n // morphTargetInfluences except for the keys in which\n // the morphTarget is named.\n for(const morphTargetName in morphTargetNames){\n const times = [];\n const values = [];\n for(let m = 0; m !== animationKeys[k].morphTargets.length; ++m){\n const animationKey = animationKeys[k];\n times.push(animationKey.time);\n values.push(animationKey.morphTarget === morphTargetName ? 1 : 0);\n }\n tracks.push(new $d5b33d7c30034067$export$d45f0d1a4d9a9314(\".morphTargetInfluence[\" + morphTargetName + \"]\", times, values));\n }\n duration = morphTargetNames.length * fps;\n } else {\n // ...assume skeletal animation\n const boneName = \".bones[\" + bones[h].name + \"]\";\n addNonemptyTrack($d5b33d7c30034067$export$5ce2dcb4cc9f2bff, boneName + \".position\", animationKeys, \"pos\", tracks);\n addNonemptyTrack($d5b33d7c30034067$export$b8043f12b5aafbd7, boneName + \".quaternion\", animationKeys, \"rot\", tracks);\n addNonemptyTrack($d5b33d7c30034067$export$5ce2dcb4cc9f2bff, boneName + \".scale\", animationKeys, \"scl\", tracks);\n }\n }\n if (tracks.length === 0) return null;\n const clip = new this(clipName, duration, tracks, blendMode);\n return clip;\n }\n resetDuration() {\n const tracks = this.tracks;\n let duration = 0;\n for(let i = 0, n = tracks.length; i !== n; ++i){\n const track = this.tracks[i];\n duration = Math.max(duration, track.times[track.times.length - 1]);\n }\n this.duration = duration;\n return this;\n }\n trim() {\n for(let i = 0; i < this.tracks.length; i++)this.tracks[i].trim(0, this.duration);\n return this;\n }\n validate() {\n let valid = true;\n for(let i = 0; i < this.tracks.length; i++)valid = valid && this.tracks[i].validate();\n return valid;\n }\n optimize() {\n for(let i = 0; i < this.tracks.length; i++)this.tracks[i].optimize();\n return this;\n }\n clone() {\n const tracks = [];\n for(let i = 0; i < this.tracks.length; i++)tracks.push(this.tracks[i].clone());\n return new this.constructor(this.name, this.duration, tracks, this.blendMode);\n }\n toJSON() {\n return this.constructor.toJSON(this);\n }\n}\nfunction $d5b33d7c30034067$var$getTrackTypeForValueTypeName(typeName) {\n switch(typeName.toLowerCase()){\n case \"scalar\":\n case \"double\":\n case \"float\":\n case \"number\":\n case \"integer\":\n return $d5b33d7c30034067$export$d45f0d1a4d9a9314;\n case \"vector\":\n case \"vector2\":\n case \"vector3\":\n case \"vector4\":\n return $d5b33d7c30034067$export$5ce2dcb4cc9f2bff;\n case \"color\":\n return $d5b33d7c30034067$export$83444c5d885347d8;\n case \"quaternion\":\n return $d5b33d7c30034067$export$b8043f12b5aafbd7;\n case \"bool\":\n case \"boolean\":\n return $d5b33d7c30034067$export$d3a344b98cf0b775;\n case \"string\":\n return $d5b33d7c30034067$export$6ce41d4f3a8df9cd;\n }\n throw new Error(\"THREE.KeyframeTrack: Unsupported typeName: \" + typeName);\n}\nfunction $d5b33d7c30034067$var$parseKeyframeTrack(json) {\n if (json.type === undefined) throw new Error(\"THREE.KeyframeTrack: track type undefined, can not parse\");\n const trackType = $d5b33d7c30034067$var$getTrackTypeForValueTypeName(json.type);\n if (json.times === undefined) {\n const times = [], values = [];\n $d5b33d7c30034067$var$flattenJSON(json.keys, times, values, \"value\");\n json.times = times;\n json.values = values;\n }\n // derived classes can define a static parse method\n if (trackType.parse !== undefined) return trackType.parse(json);\n else // by default, we assume a constructor compatible with the base\n return new trackType(json.name, json.times, json.values, json.interpolation);\n}\nconst $d5b33d7c30034067$export$94affb487e701bf2 = {\n enabled: false,\n files: {},\n add: function(key, file) {\n if (this.enabled === false) return;\n // console.log( 'THREE.Cache', 'Adding key:', key );\n this.files[key] = file;\n },\n get: function(key) {\n if (this.enabled === false) return;\n // console.log( 'THREE.Cache', 'Checking key:', key );\n return this.files[key];\n },\n remove: function(key) {\n delete this.files[key];\n },\n clear: function() {\n this.files = {};\n }\n};\nclass $d5b33d7c30034067$export$99cc795e99919eed {\n constructor(onLoad, onProgress, onError){\n const scope = this;\n let isLoading = false;\n let itemsLoaded = 0;\n let itemsTotal = 0;\n let urlModifier = undefined;\n const handlers = [];\n // Refer to #5689 for the reason why we don't set .onStart\n // in the constructor\n this.onStart = undefined;\n this.onLoad = onLoad;\n this.onProgress = onProgress;\n this.onError = onError;\n this.itemStart = function(url) {\n itemsTotal++;\n if (isLoading === false) {\n if (scope.onStart !== undefined) scope.onStart(url, itemsLoaded, itemsTotal);\n }\n isLoading = true;\n };\n this.itemEnd = function(url) {\n itemsLoaded++;\n if (scope.onProgress !== undefined) scope.onProgress(url, itemsLoaded, itemsTotal);\n if (itemsLoaded === itemsTotal) {\n isLoading = false;\n if (scope.onLoad !== undefined) scope.onLoad();\n }\n };\n this.itemError = function(url) {\n if (scope.onError !== undefined) scope.onError(url);\n };\n this.resolveURL = function(url) {\n if (urlModifier) return urlModifier(url);\n return url;\n };\n this.setURLModifier = function(transform) {\n urlModifier = transform;\n return this;\n };\n this.addHandler = function(regex, loader) {\n handlers.push(regex, loader);\n return this;\n };\n this.removeHandler = function(regex) {\n const index = handlers.indexOf(regex);\n if (index !== -1) handlers.splice(index, 2);\n return this;\n };\n this.getHandler = function(file) {\n for(let i = 0, l = handlers.length; i < l; i += 2){\n const regex = handlers[i];\n const loader = handlers[i + 1];\n if (regex.global) regex.lastIndex = 0; // see #17920\n if (regex.test(file)) return loader;\n }\n return null;\n };\n }\n}\nconst $d5b33d7c30034067$export$b033c3f9a95c6a16 = /*@__PURE__*/ new $d5b33d7c30034067$export$99cc795e99919eed();\nclass $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n this.manager = manager !== undefined ? manager : $d5b33d7c30034067$export$b033c3f9a95c6a16;\n this.crossOrigin = \"anonymous\";\n this.withCredentials = false;\n this.path = \"\";\n this.resourcePath = \"\";\n this.requestHeader = {};\n }\n load() {}\n loadAsync(url, onProgress) {\n const scope = this;\n return new Promise(function(resolve, reject) {\n scope.load(url, resolve, onProgress, reject);\n });\n }\n parse() {}\n setCrossOrigin(crossOrigin) {\n this.crossOrigin = crossOrigin;\n return this;\n }\n setWithCredentials(value) {\n this.withCredentials = value;\n return this;\n }\n setPath(path) {\n this.path = path;\n return this;\n }\n setResourcePath(resourcePath) {\n this.resourcePath = resourcePath;\n return this;\n }\n setRequestHeader(requestHeader) {\n this.requestHeader = requestHeader;\n return this;\n }\n}\n$d5b33d7c30034067$export$3b0d6d7590275603.DEFAULT_MATERIAL_NAME = \"__DEFAULT\";\nconst $d5b33d7c30034067$var$loading = {};\nclass $d5b33d7c30034067$var$HttpError extends Error {\n constructor(message, response){\n super(message);\n this.response = response;\n }\n}\nclass $d5b33d7c30034067$export$98435a25b5cf7b2b extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n if (url === undefined) url = \"\";\n if (this.path !== undefined) url = this.path + url;\n url = this.manager.resolveURL(url);\n const cached = $d5b33d7c30034067$export$94affb487e701bf2.get(url);\n if (cached !== undefined) {\n this.manager.itemStart(url);\n setTimeout(()=>{\n if (onLoad) onLoad(cached);\n this.manager.itemEnd(url);\n }, 0);\n return cached;\n }\n // Check if request is duplicate\n if ($d5b33d7c30034067$var$loading[url] !== undefined) {\n $d5b33d7c30034067$var$loading[url].push({\n onLoad: onLoad,\n onProgress: onProgress,\n onError: onError\n });\n return;\n }\n // Initialise array for duplicate requests\n $d5b33d7c30034067$var$loading[url] = [];\n $d5b33d7c30034067$var$loading[url].push({\n onLoad: onLoad,\n onProgress: onProgress,\n onError: onError\n });\n // create request\n const req = new Request(url, {\n headers: new Headers(this.requestHeader),\n credentials: this.withCredentials ? \"include\" : \"same-origin\"\n });\n // record states ( avoid data race )\n const mimeType = this.mimeType;\n const responseType = this.responseType;\n // start the fetch\n fetch(req).then((response)=>{\n if (response.status === 200 || response.status === 0) {\n // Some browsers return HTTP Status 0 when using non-http protocol\n // e.g. 'file://' or 'data://'. Handle as success.\n if (response.status === 0) console.warn(\"THREE.FileLoader: HTTP Status 0 received.\");\n // Workaround: Checking if response.body === undefined for Alipay browser #23548\n if (typeof ReadableStream === \"undefined\" || response.body === undefined || response.body.getReader === undefined) return response;\n const callbacks = $d5b33d7c30034067$var$loading[url];\n const reader = response.body.getReader();\n // Nginx needs X-File-Size check\n // https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content\n const contentLength = response.headers.get(\"Content-Length\") || response.headers.get(\"X-File-Size\");\n const total = contentLength ? parseInt(contentLength) : 0;\n const lengthComputable = total !== 0;\n let loaded = 0;\n // periodically read data into the new stream tracking while download progress\n const stream = new ReadableStream({\n start (controller) {\n readData();\n function readData() {\n reader.read().then(({ done: done, value: value })=>{\n if (done) controller.close();\n else {\n loaded += value.byteLength;\n const event = new ProgressEvent(\"progress\", {\n lengthComputable: lengthComputable,\n loaded: loaded,\n total: total\n });\n for(let i = 0, il = callbacks.length; i < il; i++){\n const callback = callbacks[i];\n if (callback.onProgress) callback.onProgress(event);\n }\n controller.enqueue(value);\n readData();\n }\n });\n }\n }\n });\n return new Response(stream);\n } else throw new $d5b33d7c30034067$var$HttpError(`fetch for \"${response.url}\" responded with ${response.status}: ${response.statusText}`, response);\n }).then((response)=>{\n switch(responseType){\n case \"arraybuffer\":\n return response.arrayBuffer();\n case \"blob\":\n return response.blob();\n case \"document\":\n return response.text().then((text)=>{\n const parser = new DOMParser();\n return parser.parseFromString(text, mimeType);\n });\n case \"json\":\n return response.json();\n default:\n if (mimeType === undefined) return response.text();\n else {\n // sniff encoding\n const re = /charset=\"?([^;\"\\s]*)\"?/i;\n const exec = re.exec(mimeType);\n const label = exec && exec[1] ? exec[1].toLowerCase() : undefined;\n const decoder = new TextDecoder(label);\n return response.arrayBuffer().then((ab)=>decoder.decode(ab));\n }\n }\n }).then((data)=>{\n // Add to cache only on HTTP success, so that we do not cache\n // error response bodies as proper responses to requests.\n $d5b33d7c30034067$export$94affb487e701bf2.add(url, data);\n const callbacks = $d5b33d7c30034067$var$loading[url];\n delete $d5b33d7c30034067$var$loading[url];\n for(let i = 0, il = callbacks.length; i < il; i++){\n const callback = callbacks[i];\n if (callback.onLoad) callback.onLoad(data);\n }\n }).catch((err)=>{\n // Abort errors and other errors are handled the same\n const callbacks = $d5b33d7c30034067$var$loading[url];\n if (callbacks === undefined) {\n // When onLoad was called and url was deleted in `loading`\n this.manager.itemError(url);\n throw err;\n }\n delete $d5b33d7c30034067$var$loading[url];\n for(let i = 0, il = callbacks.length; i < il; i++){\n const callback = callbacks[i];\n if (callback.onError) callback.onError(err);\n }\n this.manager.itemError(url);\n }).finally(()=>{\n this.manager.itemEnd(url);\n });\n this.manager.itemStart(url);\n }\n setResponseType(value) {\n this.responseType = value;\n return this;\n }\n setMimeType(value) {\n this.mimeType = value;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$29711c7e14f61db extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function(text) {\n try {\n onLoad(scope.parse(JSON.parse(text)));\n } catch (e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }, onProgress, onError);\n }\n parse(json) {\n const animations = [];\n for(let i = 0; i < json.length; i++){\n const clip = $d5b33d7c30034067$export$d942c706bf23829c.parse(json[i]);\n animations.push(clip);\n }\n return animations;\n }\n}\n/**\n * Abstract Base class to block based textures loader (dds, pvr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */ class $d5b33d7c30034067$export$bd73ce947a280350 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const images = [];\n const texture = new $d5b33d7c30034067$export$3466bac9141a5cc4();\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setResponseType(\"arraybuffer\");\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(scope.withCredentials);\n let loaded = 0;\n function loadTexture(i) {\n loader.load(url[i], function(buffer) {\n const texDatas = scope.parse(buffer, true);\n images[i] = {\n width: texDatas.width,\n height: texDatas.height,\n format: texDatas.format,\n mipmaps: texDatas.mipmaps\n };\n loaded += 1;\n if (loaded === 6) {\n if (texDatas.mipmapCount === 1) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.image = images;\n texture.format = texDatas.format;\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture);\n }\n }, onProgress, onError);\n }\n if (Array.isArray(url)) for(let i = 0, il = url.length; i < il; ++i)loadTexture(i);\n else // compressed cubemap texture stored in a single DDS file\n loader.load(url, function(buffer) {\n const texDatas = scope.parse(buffer, true);\n if (texDatas.isCubemap) {\n const faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n for(let f = 0; f < faces; f++){\n images[f] = {\n mipmaps: []\n };\n for(let i = 0; i < texDatas.mipmapCount; i++){\n images[f].mipmaps.push(texDatas.mipmaps[f * texDatas.mipmapCount + i]);\n images[f].format = texDatas.format;\n images[f].width = texDatas.width;\n images[f].height = texDatas.height;\n }\n }\n texture.image = images;\n } else {\n texture.image.width = texDatas.width;\n texture.image.height = texDatas.height;\n texture.mipmaps = texDatas.mipmaps;\n }\n if (texDatas.mipmapCount === 1) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.format = texDatas.format;\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture);\n }, onProgress, onError);\n return texture;\n }\n}\nclass $d5b33d7c30034067$export$8905ce1c7a2464a1 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n if (this.path !== undefined) url = this.path + url;\n url = this.manager.resolveURL(url);\n const scope = this;\n const cached = $d5b33d7c30034067$export$94affb487e701bf2.get(url);\n if (cached !== undefined) {\n scope.manager.itemStart(url);\n setTimeout(function() {\n if (onLoad) onLoad(cached);\n scope.manager.itemEnd(url);\n }, 0);\n return cached;\n }\n const image = $d5b33d7c30034067$var$createElementNS(\"img\");\n function onImageLoad() {\n removeEventListeners();\n $d5b33d7c30034067$export$94affb487e701bf2.add(url, this);\n if (onLoad) onLoad(this);\n scope.manager.itemEnd(url);\n }\n function onImageError(event) {\n removeEventListeners();\n if (onError) onError(event);\n scope.manager.itemError(url);\n scope.manager.itemEnd(url);\n }\n function removeEventListeners() {\n image.removeEventListener(\"load\", onImageLoad, false);\n image.removeEventListener(\"error\", onImageError, false);\n }\n image.addEventListener(\"load\", onImageLoad, false);\n image.addEventListener(\"error\", onImageError, false);\n if (url.slice(0, 5) !== \"data:\") {\n if (this.crossOrigin !== undefined) image.crossOrigin = this.crossOrigin;\n }\n scope.manager.itemStart(url);\n image.src = url;\n return image;\n }\n}\nclass $d5b33d7c30034067$export$2ec114afc2cf6308 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(urls, onLoad, onProgress, onError) {\n const texture = new $d5b33d7c30034067$export$ee2e5a18258a4049();\n texture.colorSpace = $d5b33d7c30034067$export$561f394b24edfcaa;\n const loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(this.manager);\n loader.setCrossOrigin(this.crossOrigin);\n loader.setPath(this.path);\n let loaded = 0;\n function loadTexture(i) {\n loader.load(urls[i], function(image) {\n texture.images[i] = image;\n loaded++;\n if (loaded === 6) {\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture);\n }\n }, undefined, onError);\n }\n for(let i = 0; i < urls.length; ++i)loadTexture(i);\n return texture;\n }\n}\n/**\n * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */ class $d5b33d7c30034067$export$792d8a18f2c55855 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const texture = new $d5b33d7c30034067$export$b691f601014eabe1();\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setResponseType(\"arraybuffer\");\n loader.setRequestHeader(this.requestHeader);\n loader.setPath(this.path);\n loader.setWithCredentials(scope.withCredentials);\n loader.load(url, function(buffer) {\n let texData;\n try {\n texData = scope.parse(buffer);\n } catch (error) {\n if (onError !== undefined) onError(error);\n else {\n console.error(error);\n return;\n }\n }\n if (texData.image !== undefined) texture.image = texData.image;\n else if (texData.data !== undefined) {\n texture.image.width = texData.width;\n texture.image.height = texData.height;\n texture.image.data = texData.data;\n }\n texture.wrapS = texData.wrapS !== undefined ? texData.wrapS : $d5b33d7c30034067$export$9d9334239a5a5e06;\n texture.wrapT = texData.wrapT !== undefined ? texData.wrapT : $d5b33d7c30034067$export$9d9334239a5a5e06;\n texture.magFilter = texData.magFilter !== undefined ? texData.magFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.minFilter = texData.minFilter !== undefined ? texData.minFilter : $d5b33d7c30034067$export$8a72f490b25c56c8;\n texture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n if (texData.colorSpace !== undefined) texture.colorSpace = texData.colorSpace;\n else if (texData.encoding !== undefined) texture.encoding = texData.encoding;\n if (texData.flipY !== undefined) texture.flipY = texData.flipY;\n if (texData.format !== undefined) texture.format = texData.format;\n if (texData.type !== undefined) texture.type = texData.type;\n if (texData.mipmaps !== undefined) {\n texture.mipmaps = texData.mipmaps;\n texture.minFilter = $d5b33d7c30034067$export$5d8599b6a933fb1b; // presumably...\n }\n if (texData.mipmapCount === 1) texture.minFilter = $d5b33d7c30034067$export$8a72f490b25c56c8;\n if (texData.generateMipmaps !== undefined) texture.generateMipmaps = texData.generateMipmaps;\n texture.needsUpdate = true;\n if (onLoad) onLoad(texture, texData);\n }, onProgress, onError);\n return texture;\n }\n}\nclass $d5b33d7c30034067$export$fd1bfc71f64c538c extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const texture = new $d5b33d7c30034067$export$5431306cf43de24a();\n const loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(this.manager);\n loader.setCrossOrigin(this.crossOrigin);\n loader.setPath(this.path);\n loader.load(url, function(image) {\n texture.image = image;\n texture.needsUpdate = true;\n if (onLoad !== undefined) onLoad(texture);\n }, onProgress, onError);\n return texture;\n }\n}\nclass $d5b33d7c30034067$export$6ecadb6ed240d696 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(color, intensity = 1){\n super();\n this.isLight = true;\n this.type = \"Light\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e(color);\n this.intensity = intensity;\n }\n dispose() {\n // Empty here in base class; some subclasses override.\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.color.copy(source.color);\n this.intensity = source.intensity;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.color = this.color.getHex();\n data.object.intensity = this.intensity;\n if (this.groundColor !== undefined) data.object.groundColor = this.groundColor.getHex();\n if (this.distance !== undefined) data.object.distance = this.distance;\n if (this.angle !== undefined) data.object.angle = this.angle;\n if (this.decay !== undefined) data.object.decay = this.decay;\n if (this.penumbra !== undefined) data.object.penumbra = this.penumbra;\n if (this.shadow !== undefined) data.object.shadow = this.shadow.toJSON();\n return data;\n }\n}\nclass $d5b33d7c30034067$export$8d474f55edbb9624 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(skyColor, groundColor, intensity){\n super(skyColor, intensity);\n this.isHemisphereLight = true;\n this.type = \"HemisphereLight\";\n this.position.copy($d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP);\n this.updateMatrix();\n this.groundColor = new $d5b33d7c30034067$export$892596cec99bc70e(groundColor);\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.groundColor.copy(source.groundColor);\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_projScreenMatrix$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_lightPositionWorld$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_lookTarget$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$var$LightShadow {\n constructor(camera){\n this.camera = camera;\n this.bias = 0;\n this.normalBias = 0;\n this.radius = 1;\n this.blurSamples = 8;\n this.mapSize = new $d5b33d7c30034067$export$c977b3e384af9ae1(512, 512);\n this.map = null;\n this.mapPass = null;\n this.matrix = new $d5b33d7c30034067$export$2ae72fc923e5eb5();\n this.autoUpdate = true;\n this.needsUpdate = false;\n this._frustum = new $d5b33d7c30034067$export$35efe6f4c85463d2();\n this._frameExtents = new $d5b33d7c30034067$export$c977b3e384af9ae1(1, 1);\n this._viewportCount = 1;\n this._viewports = [\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 0, 1, 1)\n ];\n }\n getViewportCount() {\n return this._viewportCount;\n }\n getFrustum() {\n return this._frustum;\n }\n updateMatrices(light) {\n const shadowCamera = this.camera;\n const shadowMatrix = this.matrix;\n $d5b33d7c30034067$var$_lightPositionWorld$1.setFromMatrixPosition(light.matrixWorld);\n shadowCamera.position.copy($d5b33d7c30034067$var$_lightPositionWorld$1);\n $d5b33d7c30034067$var$_lookTarget$1.setFromMatrixPosition(light.target.matrixWorld);\n shadowCamera.lookAt($d5b33d7c30034067$var$_lookTarget$1);\n shadowCamera.updateMatrixWorld();\n $d5b33d7c30034067$var$_projScreenMatrix$1.multiplyMatrices(shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse);\n this._frustum.setFromProjectionMatrix($d5b33d7c30034067$var$_projScreenMatrix$1);\n shadowMatrix.set(0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0);\n shadowMatrix.multiply($d5b33d7c30034067$var$_projScreenMatrix$1);\n }\n getViewport(viewportIndex) {\n return this._viewports[viewportIndex];\n }\n getFrameExtents() {\n return this._frameExtents;\n }\n dispose() {\n if (this.map) this.map.dispose();\n if (this.mapPass) this.mapPass.dispose();\n }\n copy(source) {\n this.camera = source.camera.clone();\n this.bias = source.bias;\n this.radius = source.radius;\n this.mapSize.copy(source.mapSize);\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n toJSON() {\n const object = {};\n if (this.bias !== 0) object.bias = this.bias;\n if (this.normalBias !== 0) object.normalBias = this.normalBias;\n if (this.radius !== 1) object.radius = this.radius;\n if (this.mapSize.x !== 512 || this.mapSize.y !== 512) object.mapSize = this.mapSize.toArray();\n object.camera = this.camera.toJSON(false).object;\n delete object.camera.matrix;\n return object;\n }\n}\nclass $d5b33d7c30034067$var$SpotLightShadow extends $d5b33d7c30034067$var$LightShadow {\n constructor(){\n super(new $d5b33d7c30034067$export$74e4ae24825f68d7(50, 1, 0.5, 500));\n this.isSpotLightShadow = true;\n this.focus = 1;\n }\n updateMatrices(light) {\n const camera = this.camera;\n const fov = $d5b33d7c30034067$var$RAD2DEG * 2 * light.angle * this.focus;\n const aspect = this.mapSize.width / this.mapSize.height;\n const far = light.distance || camera.far;\n if (fov !== camera.fov || aspect !== camera.aspect || far !== camera.far) {\n camera.fov = fov;\n camera.aspect = aspect;\n camera.far = far;\n camera.updateProjectionMatrix();\n }\n super.updateMatrices(light);\n }\n copy(source) {\n super.copy(source);\n this.focus = source.focus;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$81495cbb73897362 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2){\n super(color, intensity);\n this.isSpotLight = true;\n this.type = \"SpotLight\";\n this.position.copy($d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP);\n this.updateMatrix();\n this.target = new $d5b33d7c30034067$export$e4dd07dff30cc924();\n this.distance = distance;\n this.angle = angle;\n this.penumbra = penumbra;\n this.decay = decay;\n this.map = null;\n this.shadow = new $d5b33d7c30034067$var$SpotLightShadow();\n }\n get power() {\n // compute the light's luminous power (in lumens) from its intensity (in candela)\n // by convention for a spotlight, luminous power (lm) = π * luminous intensity (cd)\n return this.intensity * Math.PI;\n }\n set power(power) {\n // set the light's intensity (in candela) from the desired luminous power (in lumens)\n this.intensity = power / Math.PI;\n }\n dispose() {\n this.shadow.dispose();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.distance = source.distance;\n this.angle = source.angle;\n this.penumbra = source.penumbra;\n this.decay = source.decay;\n this.target = source.target.clone();\n this.shadow = source.shadow.clone();\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_projScreenMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_lightPositionWorld = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_lookTarget = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$var$PointLightShadow extends $d5b33d7c30034067$var$LightShadow {\n constructor(){\n super(new $d5b33d7c30034067$export$74e4ae24825f68d7(90, 1, 0.5, 500));\n this.isPointLightShadow = true;\n this._frameExtents = new $d5b33d7c30034067$export$c977b3e384af9ae1(4, 2);\n this._viewportCount = 6;\n this._viewports = [\n // These viewports map a cube-map onto a 2D texture with the\n // following orientation:\n //\n // xzXZ\n // y Y\n //\n // X - Positive x direction\n // x - Negative x direction\n // Y - Positive y direction\n // y - Negative y direction\n // Z - Positive z direction\n // z - Negative z direction\n // positive X\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(2, 1, 1, 1),\n // negative X\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(0, 1, 1, 1),\n // positive Z\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(3, 1, 1, 1),\n // negative Z\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(1, 1, 1, 1),\n // positive Y\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(3, 0, 1, 1),\n // negative Y\n new $d5b33d7c30034067$export$fa7daccca11cdbe3(1, 0, 1, 1)\n ];\n this._cubeDirections = [\n new $d5b33d7c30034067$export$64b5c384219d3699(1, 0, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(-1, 0, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, -1),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, -1, 0)\n ];\n this._cubeUps = [\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 1, 0),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1),\n new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, -1)\n ];\n }\n updateMatrices(light, viewportIndex = 0) {\n const camera = this.camera;\n const shadowMatrix = this.matrix;\n const far = light.distance || camera.far;\n if (far !== camera.far) {\n camera.far = far;\n camera.updateProjectionMatrix();\n }\n $d5b33d7c30034067$var$_lightPositionWorld.setFromMatrixPosition(light.matrixWorld);\n camera.position.copy($d5b33d7c30034067$var$_lightPositionWorld);\n $d5b33d7c30034067$var$_lookTarget.copy(camera.position);\n $d5b33d7c30034067$var$_lookTarget.add(this._cubeDirections[viewportIndex]);\n camera.up.copy(this._cubeUps[viewportIndex]);\n camera.lookAt($d5b33d7c30034067$var$_lookTarget);\n camera.updateMatrixWorld();\n shadowMatrix.makeTranslation(-$d5b33d7c30034067$var$_lightPositionWorld.x, -$d5b33d7c30034067$var$_lightPositionWorld.y, -$d5b33d7c30034067$var$_lightPositionWorld.z);\n $d5b33d7c30034067$var$_projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n this._frustum.setFromProjectionMatrix($d5b33d7c30034067$var$_projScreenMatrix);\n }\n}\nclass $d5b33d7c30034067$export$4c9c1cb3f0b6f455 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity, distance = 0, decay = 2){\n super(color, intensity);\n this.isPointLight = true;\n this.type = \"PointLight\";\n this.distance = distance;\n this.decay = decay;\n this.shadow = new $d5b33d7c30034067$var$PointLightShadow();\n }\n get power() {\n // compute the light's luminous power (in lumens) from its intensity (in candela)\n // for an isotropic light source, luminous power (lm) = 4 π luminous intensity (cd)\n return this.intensity * 4 * Math.PI;\n }\n set power(power) {\n // set the light's intensity (in candela) from the desired luminous power (in lumens)\n this.intensity = power / (4 * Math.PI);\n }\n dispose() {\n this.shadow.dispose();\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.distance = source.distance;\n this.decay = source.decay;\n this.shadow = source.shadow.clone();\n return this;\n }\n}\nclass $d5b33d7c30034067$var$DirectionalLightShadow extends $d5b33d7c30034067$var$LightShadow {\n constructor(){\n super(new $d5b33d7c30034067$export$9ebf355ee4ed261b(-5, 5, 5, -5, 0.5, 500));\n this.isDirectionalLightShadow = true;\n }\n}\nclass $d5b33d7c30034067$export$3fea33cc9972c868 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity){\n super(color, intensity);\n this.isDirectionalLight = true;\n this.type = \"DirectionalLight\";\n this.position.copy($d5b33d7c30034067$export$e4dd07dff30cc924.DEFAULT_UP);\n this.updateMatrix();\n this.target = new $d5b33d7c30034067$export$e4dd07dff30cc924();\n this.shadow = new $d5b33d7c30034067$var$DirectionalLightShadow();\n }\n dispose() {\n this.shadow.dispose();\n }\n copy(source) {\n super.copy(source);\n this.target = source.target.clone();\n this.shadow = source.shadow.clone();\n return this;\n }\n}\nclass $d5b33d7c30034067$export$af279bfef9ec2c96 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity){\n super(color, intensity);\n this.isAmbientLight = true;\n this.type = \"AmbientLight\";\n }\n}\nclass $d5b33d7c30034067$export$61db2d908bbd2429 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(color, intensity, width = 10, height = 10){\n super(color, intensity);\n this.isRectAreaLight = true;\n this.type = \"RectAreaLight\";\n this.width = width;\n this.height = height;\n }\n get power() {\n // compute the light's luminous power (in lumens) from its intensity (in nits)\n return this.intensity * this.width * this.height * Math.PI;\n }\n set power(power) {\n // set the light's intensity (in nits) from the desired luminous power (in lumens)\n this.intensity = power / (this.width * this.height * Math.PI);\n }\n copy(source) {\n super.copy(source);\n this.width = source.width;\n this.height = source.height;\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.width = this.width;\n data.object.height = this.height;\n return data;\n }\n}\n/**\n * Primary reference:\n * https://graphics.stanford.edu/papers/envmap/envmap.pdf\n *\n * Secondary reference:\n * https://www.ppsloan.org/publications/StupidSH36.pdf\n */ // 3-band SH defined by 9 coefficients\nclass $d5b33d7c30034067$export$ba61ce607e1f405a {\n constructor(){\n this.isSphericalHarmonics3 = true;\n this.coefficients = [];\n for(let i = 0; i < 9; i++)this.coefficients.push(new $d5b33d7c30034067$export$64b5c384219d3699());\n }\n set(coefficients) {\n for(let i = 0; i < 9; i++)this.coefficients[i].copy(coefficients[i]);\n return this;\n }\n zero() {\n for(let i = 0; i < 9; i++)this.coefficients[i].set(0, 0, 0);\n return this;\n }\n // get the radiance in the direction of the normal\n // target is a Vector3\n getAt(normal, target) {\n // normal is assumed to be unit length\n const x = normal.x, y = normal.y, z = normal.z;\n const coeff = this.coefficients;\n // band 0\n target.copy(coeff[0]).multiplyScalar(0.282095);\n // band 1\n target.addScaledVector(coeff[1], 0.488603 * y);\n target.addScaledVector(coeff[2], 0.488603 * z);\n target.addScaledVector(coeff[3], 0.488603 * x);\n // band 2\n target.addScaledVector(coeff[4], 1.092548 * (x * y));\n target.addScaledVector(coeff[5], 1.092548 * (y * z));\n target.addScaledVector(coeff[6], 0.315392 * (3.0 * z * z - 1.0));\n target.addScaledVector(coeff[7], 1.092548 * (x * z));\n target.addScaledVector(coeff[8], 0.546274 * (x * x - y * y));\n return target;\n }\n // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n // target is a Vector3\n // https://graphics.stanford.edu/papers/envmap/envmap.pdf\n getIrradianceAt(normal, target) {\n // normal is assumed to be unit length\n const x = normal.x, y = normal.y, z = normal.z;\n const coeff = this.coefficients;\n // band 0\n target.copy(coeff[0]).multiplyScalar(0.886227); // π * 0.282095\n // band 1\n target.addScaledVector(coeff[1], 1.023328 * y); // ( 2 * π / 3 ) * 0.488603\n target.addScaledVector(coeff[2], 1.023328 * z);\n target.addScaledVector(coeff[3], 1.023328 * x);\n // band 2\n target.addScaledVector(coeff[4], 0.858086 * x * y); // ( π / 4 ) * 1.092548\n target.addScaledVector(coeff[5], 0.858086 * y * z);\n target.addScaledVector(coeff[6], 0.743125 * z * z - 0.247708); // ( π / 4 ) * 0.315392 * 3\n target.addScaledVector(coeff[7], 0.858086 * x * z);\n target.addScaledVector(coeff[8], 0.429043 * (x * x - y * y)); // ( π / 4 ) * 0.546274\n return target;\n }\n add(sh) {\n for(let i = 0; i < 9; i++)this.coefficients[i].add(sh.coefficients[i]);\n return this;\n }\n addScaledSH(sh, s) {\n for(let i = 0; i < 9; i++)this.coefficients[i].addScaledVector(sh.coefficients[i], s);\n return this;\n }\n scale(s) {\n for(let i = 0; i < 9; i++)this.coefficients[i].multiplyScalar(s);\n return this;\n }\n lerp(sh, alpha) {\n for(let i = 0; i < 9; i++)this.coefficients[i].lerp(sh.coefficients[i], alpha);\n return this;\n }\n equals(sh) {\n for(let i = 0; i < 9; i++){\n if (!this.coefficients[i].equals(sh.coefficients[i])) return false;\n }\n return true;\n }\n copy(sh) {\n return this.set(sh.coefficients);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n fromArray(array, offset = 0) {\n const coefficients = this.coefficients;\n for(let i = 0; i < 9; i++)coefficients[i].fromArray(array, offset + i * 3);\n return this;\n }\n toArray(array = [], offset = 0) {\n const coefficients = this.coefficients;\n for(let i = 0; i < 9; i++)coefficients[i].toArray(array, offset + i * 3);\n return array;\n }\n // evaluate the basis functions\n // shBasis is an Array[ 9 ]\n static getBasisAt(normal, shBasis) {\n // normal is assumed to be unit length\n const x = normal.x, y = normal.y, z = normal.z;\n // band 0\n shBasis[0] = 0.282095;\n // band 1\n shBasis[1] = 0.488603 * y;\n shBasis[2] = 0.488603 * z;\n shBasis[3] = 0.488603 * x;\n // band 2\n shBasis[4] = 1.092548 * x * y;\n shBasis[5] = 1.092548 * y * z;\n shBasis[6] = 0.315392 * (3 * z * z - 1);\n shBasis[7] = 1.092548 * x * z;\n shBasis[8] = 0.546274 * (x * x - y * y);\n }\n}\nclass $d5b33d7c30034067$export$e7ef036e309b38d2 extends $d5b33d7c30034067$export$6ecadb6ed240d696 {\n constructor(sh = new $d5b33d7c30034067$export$ba61ce607e1f405a(), intensity = 1){\n super(undefined, intensity);\n this.isLightProbe = true;\n this.sh = sh;\n }\n copy(source) {\n super.copy(source);\n this.sh.copy(source.sh);\n return this;\n }\n fromJSON(json) {\n this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n this.sh.fromArray(json.sh);\n return this;\n }\n toJSON(meta) {\n const data = super.toJSON(meta);\n data.object.sh = this.sh.toArray();\n return data;\n }\n}\nclass $d5b33d7c30034067$export$3bd6d323353dcf96 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n this.textures = {};\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(scope.manager);\n loader.setPath(scope.path);\n loader.setRequestHeader(scope.requestHeader);\n loader.setWithCredentials(scope.withCredentials);\n loader.load(url, function(text) {\n try {\n onLoad(scope.parse(JSON.parse(text)));\n } catch (e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }, onProgress, onError);\n }\n parse(json) {\n const textures = this.textures;\n function getTexture(name) {\n if (textures[name] === undefined) console.warn(\"THREE.MaterialLoader: Undefined texture\", name);\n return textures[name];\n }\n const material = $d5b33d7c30034067$export$3bd6d323353dcf96.createMaterialFromType(json.type);\n if (json.uuid !== undefined) material.uuid = json.uuid;\n if (json.name !== undefined) material.name = json.name;\n if (json.color !== undefined && material.color !== undefined) material.color.setHex(json.color);\n if (json.roughness !== undefined) material.roughness = json.roughness;\n if (json.metalness !== undefined) material.metalness = json.metalness;\n if (json.sheen !== undefined) material.sheen = json.sheen;\n if (json.sheenColor !== undefined) material.sheenColor = new $d5b33d7c30034067$export$892596cec99bc70e().setHex(json.sheenColor);\n if (json.sheenRoughness !== undefined) material.sheenRoughness = json.sheenRoughness;\n if (json.emissive !== undefined && material.emissive !== undefined) material.emissive.setHex(json.emissive);\n if (json.specular !== undefined && material.specular !== undefined) material.specular.setHex(json.specular);\n if (json.specularIntensity !== undefined) material.specularIntensity = json.specularIntensity;\n if (json.specularColor !== undefined && material.specularColor !== undefined) material.specularColor.setHex(json.specularColor);\n if (json.shininess !== undefined) material.shininess = json.shininess;\n if (json.clearcoat !== undefined) material.clearcoat = json.clearcoat;\n if (json.clearcoatRoughness !== undefined) material.clearcoatRoughness = json.clearcoatRoughness;\n if (json.iridescence !== undefined) material.iridescence = json.iridescence;\n if (json.iridescenceIOR !== undefined) material.iridescenceIOR = json.iridescenceIOR;\n if (json.iridescenceThicknessRange !== undefined) material.iridescenceThicknessRange = json.iridescenceThicknessRange;\n if (json.transmission !== undefined) material.transmission = json.transmission;\n if (json.thickness !== undefined) material.thickness = json.thickness;\n if (json.attenuationDistance !== undefined) material.attenuationDistance = json.attenuationDistance;\n if (json.attenuationColor !== undefined && material.attenuationColor !== undefined) material.attenuationColor.setHex(json.attenuationColor);\n if (json.anisotropy !== undefined) material.anisotropy = json.anisotropy;\n if (json.anisotropyRotation !== undefined) material.anisotropyRotation = json.anisotropyRotation;\n if (json.fog !== undefined) material.fog = json.fog;\n if (json.flatShading !== undefined) material.flatShading = json.flatShading;\n if (json.blending !== undefined) material.blending = json.blending;\n if (json.combine !== undefined) material.combine = json.combine;\n if (json.side !== undefined) material.side = json.side;\n if (json.shadowSide !== undefined) material.shadowSide = json.shadowSide;\n if (json.opacity !== undefined) material.opacity = json.opacity;\n if (json.transparent !== undefined) material.transparent = json.transparent;\n if (json.alphaTest !== undefined) material.alphaTest = json.alphaTest;\n if (json.alphaHash !== undefined) material.alphaHash = json.alphaHash;\n if (json.depthFunc !== undefined) material.depthFunc = json.depthFunc;\n if (json.depthTest !== undefined) material.depthTest = json.depthTest;\n if (json.depthWrite !== undefined) material.depthWrite = json.depthWrite;\n if (json.colorWrite !== undefined) material.colorWrite = json.colorWrite;\n if (json.blendSrc !== undefined) material.blendSrc = json.blendSrc;\n if (json.blendDst !== undefined) material.blendDst = json.blendDst;\n if (json.blendEquation !== undefined) material.blendEquation = json.blendEquation;\n if (json.blendSrcAlpha !== undefined) material.blendSrcAlpha = json.blendSrcAlpha;\n if (json.blendDstAlpha !== undefined) material.blendDstAlpha = json.blendDstAlpha;\n if (json.blendEquationAlpha !== undefined) material.blendEquationAlpha = json.blendEquationAlpha;\n if (json.blendColor !== undefined && material.blendColor !== undefined) material.blendColor.setHex(json.blendColor);\n if (json.blendAlpha !== undefined) material.blendAlpha = json.blendAlpha;\n if (json.stencilWriteMask !== undefined) material.stencilWriteMask = json.stencilWriteMask;\n if (json.stencilFunc !== undefined) material.stencilFunc = json.stencilFunc;\n if (json.stencilRef !== undefined) material.stencilRef = json.stencilRef;\n if (json.stencilFuncMask !== undefined) material.stencilFuncMask = json.stencilFuncMask;\n if (json.stencilFail !== undefined) material.stencilFail = json.stencilFail;\n if (json.stencilZFail !== undefined) material.stencilZFail = json.stencilZFail;\n if (json.stencilZPass !== undefined) material.stencilZPass = json.stencilZPass;\n if (json.stencilWrite !== undefined) material.stencilWrite = json.stencilWrite;\n if (json.wireframe !== undefined) material.wireframe = json.wireframe;\n if (json.wireframeLinewidth !== undefined) material.wireframeLinewidth = json.wireframeLinewidth;\n if (json.wireframeLinecap !== undefined) material.wireframeLinecap = json.wireframeLinecap;\n if (json.wireframeLinejoin !== undefined) material.wireframeLinejoin = json.wireframeLinejoin;\n if (json.rotation !== undefined) material.rotation = json.rotation;\n if (json.linewidth !== undefined) material.linewidth = json.linewidth;\n if (json.dashSize !== undefined) material.dashSize = json.dashSize;\n if (json.gapSize !== undefined) material.gapSize = json.gapSize;\n if (json.scale !== undefined) material.scale = json.scale;\n if (json.polygonOffset !== undefined) material.polygonOffset = json.polygonOffset;\n if (json.polygonOffsetFactor !== undefined) material.polygonOffsetFactor = json.polygonOffsetFactor;\n if (json.polygonOffsetUnits !== undefined) material.polygonOffsetUnits = json.polygonOffsetUnits;\n if (json.dithering !== undefined) material.dithering = json.dithering;\n if (json.alphaToCoverage !== undefined) material.alphaToCoverage = json.alphaToCoverage;\n if (json.premultipliedAlpha !== undefined) material.premultipliedAlpha = json.premultipliedAlpha;\n if (json.forceSinglePass !== undefined) material.forceSinglePass = json.forceSinglePass;\n if (json.visible !== undefined) material.visible = json.visible;\n if (json.toneMapped !== undefined) material.toneMapped = json.toneMapped;\n if (json.userData !== undefined) material.userData = json.userData;\n if (json.vertexColors !== undefined) {\n if (typeof json.vertexColors === \"number\") material.vertexColors = json.vertexColors > 0 ? true : false;\n else material.vertexColors = json.vertexColors;\n }\n // Shader Material\n if (json.uniforms !== undefined) for(const name in json.uniforms){\n const uniform = json.uniforms[name];\n material.uniforms[name] = {};\n switch(uniform.type){\n case \"t\":\n material.uniforms[name].value = getTexture(uniform.value);\n break;\n case \"c\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$892596cec99bc70e().setHex(uniform.value);\n break;\n case \"v2\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(uniform.value);\n break;\n case \"v3\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$64b5c384219d3699().fromArray(uniform.value);\n break;\n case \"v4\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$fa7daccca11cdbe3().fromArray(uniform.value);\n break;\n case \"m3\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$8ff26dafa08918().fromArray(uniform.value);\n break;\n case \"m4\":\n material.uniforms[name].value = new $d5b33d7c30034067$export$2ae72fc923e5eb5().fromArray(uniform.value);\n break;\n default:\n material.uniforms[name].value = uniform.value;\n }\n }\n if (json.defines !== undefined) material.defines = json.defines;\n if (json.vertexShader !== undefined) material.vertexShader = json.vertexShader;\n if (json.fragmentShader !== undefined) material.fragmentShader = json.fragmentShader;\n if (json.glslVersion !== undefined) material.glslVersion = json.glslVersion;\n if (json.extensions !== undefined) for(const key in json.extensions)material.extensions[key] = json.extensions[key];\n if (json.lights !== undefined) material.lights = json.lights;\n if (json.clipping !== undefined) material.clipping = json.clipping;\n // for PointsMaterial\n if (json.size !== undefined) material.size = json.size;\n if (json.sizeAttenuation !== undefined) material.sizeAttenuation = json.sizeAttenuation;\n // maps\n if (json.map !== undefined) material.map = getTexture(json.map);\n if (json.matcap !== undefined) material.matcap = getTexture(json.matcap);\n if (json.alphaMap !== undefined) material.alphaMap = getTexture(json.alphaMap);\n if (json.bumpMap !== undefined) material.bumpMap = getTexture(json.bumpMap);\n if (json.bumpScale !== undefined) material.bumpScale = json.bumpScale;\n if (json.normalMap !== undefined) material.normalMap = getTexture(json.normalMap);\n if (json.normalMapType !== undefined) material.normalMapType = json.normalMapType;\n if (json.normalScale !== undefined) {\n let normalScale = json.normalScale;\n if (Array.isArray(normalScale) === false) // Blender exporter used to export a scalar. See #7459\n normalScale = [\n normalScale,\n normalScale\n ];\n material.normalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(normalScale);\n }\n if (json.displacementMap !== undefined) material.displacementMap = getTexture(json.displacementMap);\n if (json.displacementScale !== undefined) material.displacementScale = json.displacementScale;\n if (json.displacementBias !== undefined) material.displacementBias = json.displacementBias;\n if (json.roughnessMap !== undefined) material.roughnessMap = getTexture(json.roughnessMap);\n if (json.metalnessMap !== undefined) material.metalnessMap = getTexture(json.metalnessMap);\n if (json.emissiveMap !== undefined) material.emissiveMap = getTexture(json.emissiveMap);\n if (json.emissiveIntensity !== undefined) material.emissiveIntensity = json.emissiveIntensity;\n if (json.specularMap !== undefined) material.specularMap = getTexture(json.specularMap);\n if (json.specularIntensityMap !== undefined) material.specularIntensityMap = getTexture(json.specularIntensityMap);\n if (json.specularColorMap !== undefined) material.specularColorMap = getTexture(json.specularColorMap);\n if (json.envMap !== undefined) material.envMap = getTexture(json.envMap);\n if (json.envMapIntensity !== undefined) material.envMapIntensity = json.envMapIntensity;\n if (json.reflectivity !== undefined) material.reflectivity = json.reflectivity;\n if (json.refractionRatio !== undefined) material.refractionRatio = json.refractionRatio;\n if (json.lightMap !== undefined) material.lightMap = getTexture(json.lightMap);\n if (json.lightMapIntensity !== undefined) material.lightMapIntensity = json.lightMapIntensity;\n if (json.aoMap !== undefined) material.aoMap = getTexture(json.aoMap);\n if (json.aoMapIntensity !== undefined) material.aoMapIntensity = json.aoMapIntensity;\n if (json.gradientMap !== undefined) material.gradientMap = getTexture(json.gradientMap);\n if (json.clearcoatMap !== undefined) material.clearcoatMap = getTexture(json.clearcoatMap);\n if (json.clearcoatRoughnessMap !== undefined) material.clearcoatRoughnessMap = getTexture(json.clearcoatRoughnessMap);\n if (json.clearcoatNormalMap !== undefined) material.clearcoatNormalMap = getTexture(json.clearcoatNormalMap);\n if (json.clearcoatNormalScale !== undefined) material.clearcoatNormalScale = new $d5b33d7c30034067$export$c977b3e384af9ae1().fromArray(json.clearcoatNormalScale);\n if (json.iridescenceMap !== undefined) material.iridescenceMap = getTexture(json.iridescenceMap);\n if (json.iridescenceThicknessMap !== undefined) material.iridescenceThicknessMap = getTexture(json.iridescenceThicknessMap);\n if (json.transmissionMap !== undefined) material.transmissionMap = getTexture(json.transmissionMap);\n if (json.thicknessMap !== undefined) material.thicknessMap = getTexture(json.thicknessMap);\n if (json.anisotropyMap !== undefined) material.anisotropyMap = getTexture(json.anisotropyMap);\n if (json.sheenColorMap !== undefined) material.sheenColorMap = getTexture(json.sheenColorMap);\n if (json.sheenRoughnessMap !== undefined) material.sheenRoughnessMap = getTexture(json.sheenRoughnessMap);\n return material;\n }\n setTextures(value) {\n this.textures = value;\n return this;\n }\n static createMaterialFromType(type) {\n const materialLib = {\n ShadowMaterial: $d5b33d7c30034067$export$e8564da406055a3,\n SpriteMaterial: $d5b33d7c30034067$export$5ec7dd1c6994bf8e,\n RawShaderMaterial: $d5b33d7c30034067$export$21c421a2e1df9d22,\n ShaderMaterial: $d5b33d7c30034067$export$83c7d75d550a8b0d,\n PointsMaterial: $d5b33d7c30034067$export$a178c45366ce5d6b,\n MeshPhysicalMaterial: $d5b33d7c30034067$export$28d04986c4269c9f,\n MeshStandardMaterial: $d5b33d7c30034067$export$f2980790215acccd,\n MeshPhongMaterial: $d5b33d7c30034067$export$24c72f71cbaf0678,\n MeshToonMaterial: $d5b33d7c30034067$export$df893cf97e765622,\n MeshNormalMaterial: $d5b33d7c30034067$export$bfe8c0a091f41ae7,\n MeshLambertMaterial: $d5b33d7c30034067$export$5023a9a8114806b8,\n MeshDepthMaterial: $d5b33d7c30034067$export$2698c22ec13825db,\n MeshDistanceMaterial: $d5b33d7c30034067$export$33e187ed002f2a19,\n MeshBasicMaterial: $d5b33d7c30034067$export$55cbcc9b622fe1f5,\n MeshMatcapMaterial: $d5b33d7c30034067$export$6f5fef6235ec12ee,\n LineDashedMaterial: $d5b33d7c30034067$export$327886a3efaeaebe,\n LineBasicMaterial: $d5b33d7c30034067$export$fbaaa33907730a0c,\n Material: $d5b33d7c30034067$export$a2d8b23205c25948\n };\n return new materialLib[type]();\n }\n}\nclass $d5b33d7c30034067$export$b5d2dc08d867e41a {\n static decodeText(array) {\n if (typeof TextDecoder !== \"undefined\") return new TextDecoder().decode(array);\n // Avoid the String.fromCharCode.apply(null, array) shortcut, which\n // throws a \"maximum call stack size exceeded\" error for large arrays.\n let s = \"\";\n for(let i = 0, il = array.length; i < il; i++)// Implicitly assumes little-endian.\n s += String.fromCharCode(array[i]);\n try {\n // merges multi-byte utf-8 characters.\n return decodeURIComponent(escape(s));\n } catch (e) {\n return s;\n }\n }\n static extractUrlBase(url) {\n const index = url.lastIndexOf(\"/\");\n if (index === -1) return \"./\";\n return url.slice(0, index + 1);\n }\n static resolveURL(url, path) {\n // Invalid URL\n if (typeof url !== \"string\" || url === \"\") return \"\";\n // Host Relative URL\n if (/^https?:\\/\\//i.test(path) && /^\\//.test(url)) path = path.replace(/(^https?:\\/\\/[^\\/]+).*/i, \"$1\");\n // Absolute URL http://,https://,//\n if (/^(https?:)?\\/\\//i.test(url)) return url;\n // Data URI\n if (/^data:.*,.*$/i.test(url)) return url;\n // Blob URL\n if (/^blob:.*$/i.test(url)) return url;\n // Relative URL\n return path + url;\n }\n}\nclass $d5b33d7c30034067$export$231f009cbe414146 extends $d5b33d7c30034067$export$b7be63a67df8959 {\n constructor(){\n super();\n this.isInstancedBufferGeometry = true;\n this.type = \"InstancedBufferGeometry\";\n this.instanceCount = Infinity;\n }\n copy(source) {\n super.copy(source);\n this.instanceCount = source.instanceCount;\n return this;\n }\n toJSON() {\n const data = super.toJSON();\n data.instanceCount = this.instanceCount;\n data.isInstancedBufferGeometry = true;\n return data;\n }\n}\nclass $d5b33d7c30034067$export$dc275bb96327833a extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(scope.manager);\n loader.setPath(scope.path);\n loader.setRequestHeader(scope.requestHeader);\n loader.setWithCredentials(scope.withCredentials);\n loader.load(url, function(text) {\n try {\n onLoad(scope.parse(JSON.parse(text)));\n } catch (e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }, onProgress, onError);\n }\n parse(json) {\n const interleavedBufferMap = {};\n const arrayBufferMap = {};\n function getInterleavedBuffer(json, uuid) {\n if (interleavedBufferMap[uuid] !== undefined) return interleavedBufferMap[uuid];\n const interleavedBuffers = json.interleavedBuffers;\n const interleavedBuffer = interleavedBuffers[uuid];\n const buffer = getArrayBuffer(json, interleavedBuffer.buffer);\n const array = $d5b33d7c30034067$var$getTypedArray(interleavedBuffer.type, buffer);\n const ib = new $d5b33d7c30034067$export$3d5cd879f108f53f(array, interleavedBuffer.stride);\n ib.uuid = interleavedBuffer.uuid;\n interleavedBufferMap[uuid] = ib;\n return ib;\n }\n function getArrayBuffer(json, uuid) {\n if (arrayBufferMap[uuid] !== undefined) return arrayBufferMap[uuid];\n const arrayBuffers = json.arrayBuffers;\n const arrayBuffer = arrayBuffers[uuid];\n const ab = new Uint32Array(arrayBuffer).buffer;\n arrayBufferMap[uuid] = ab;\n return ab;\n }\n const geometry = json.isInstancedBufferGeometry ? new $d5b33d7c30034067$export$231f009cbe414146() : new $d5b33d7c30034067$export$b7be63a67df8959();\n const index = json.data.index;\n if (index !== undefined) {\n const typedArray = $d5b33d7c30034067$var$getTypedArray(index.type, index.array);\n geometry.setIndex(new $d5b33d7c30034067$export$8dea267bd6bde117(typedArray, 1));\n }\n const attributes = json.data.attributes;\n for(const key in attributes){\n const attribute = attributes[key];\n let bufferAttribute;\n if (attribute.isInterleavedBufferAttribute) {\n const interleavedBuffer = getInterleavedBuffer(json.data, attribute.data);\n bufferAttribute = new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized);\n } else {\n const typedArray = $d5b33d7c30034067$var$getTypedArray(attribute.type, attribute.array);\n const bufferAttributeConstr = attribute.isInstancedBufferAttribute ? $d5b33d7c30034067$export$32ea87a8b54d744a : $d5b33d7c30034067$export$8dea267bd6bde117;\n bufferAttribute = new bufferAttributeConstr(typedArray, attribute.itemSize, attribute.normalized);\n }\n if (attribute.name !== undefined) bufferAttribute.name = attribute.name;\n if (attribute.usage !== undefined) bufferAttribute.setUsage(attribute.usage);\n if (attribute.updateRange !== undefined) {\n bufferAttribute.updateRange.offset = attribute.updateRange.offset;\n bufferAttribute.updateRange.count = attribute.updateRange.count;\n }\n geometry.setAttribute(key, bufferAttribute);\n }\n const morphAttributes = json.data.morphAttributes;\n if (morphAttributes) for(const key in morphAttributes){\n const attributeArray = morphAttributes[key];\n const array = [];\n for(let i = 0, il = attributeArray.length; i < il; i++){\n const attribute = attributeArray[i];\n let bufferAttribute;\n if (attribute.isInterleavedBufferAttribute) {\n const interleavedBuffer = getInterleavedBuffer(json.data, attribute.data);\n bufferAttribute = new $d5b33d7c30034067$export$920b6d07334599c7(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized);\n } else {\n const typedArray = $d5b33d7c30034067$var$getTypedArray(attribute.type, attribute.array);\n bufferAttribute = new $d5b33d7c30034067$export$8dea267bd6bde117(typedArray, attribute.itemSize, attribute.normalized);\n }\n if (attribute.name !== undefined) bufferAttribute.name = attribute.name;\n array.push(bufferAttribute);\n }\n geometry.morphAttributes[key] = array;\n }\n const morphTargetsRelative = json.data.morphTargetsRelative;\n if (morphTargetsRelative) geometry.morphTargetsRelative = true;\n const groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n if (groups !== undefined) for(let i = 0, n = groups.length; i !== n; ++i){\n const group = groups[i];\n geometry.addGroup(group.start, group.count, group.materialIndex);\n }\n const boundingSphere = json.data.boundingSphere;\n if (boundingSphere !== undefined) {\n const center = new $d5b33d7c30034067$export$64b5c384219d3699();\n if (boundingSphere.center !== undefined) center.fromArray(boundingSphere.center);\n geometry.boundingSphere = new $d5b33d7c30034067$export$805e8b72413ccaba(center, boundingSphere.radius);\n }\n if (json.name) geometry.name = json.name;\n if (json.userData) geometry.userData = json.userData;\n return geometry;\n }\n}\nclass $d5b33d7c30034067$export$40110c8505c5ad19 extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const path = this.path === \"\" ? $d5b33d7c30034067$export$b5d2dc08d867e41a.extractUrlBase(url) : this.path;\n this.resourcePath = this.resourcePath || path;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function(text) {\n let json = null;\n try {\n json = JSON.parse(text);\n } catch (error) {\n if (onError !== undefined) onError(error);\n console.error(\"THREE:ObjectLoader: Can't parse \" + url + \".\", error.message);\n return;\n }\n const metadata = json.metadata;\n if (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === \"geometry\") {\n if (onError !== undefined) onError(new Error(\"THREE.ObjectLoader: Can't load \" + url));\n console.error(\"THREE.ObjectLoader: Can't load \" + url);\n return;\n }\n scope.parse(json, onLoad);\n }, onProgress, onError);\n }\n async loadAsync(url, onProgress) {\n const scope = this;\n const path = this.path === \"\" ? $d5b33d7c30034067$export$b5d2dc08d867e41a.extractUrlBase(url) : this.path;\n this.resourcePath = this.resourcePath || path;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n const text = await loader.loadAsync(url, onProgress);\n const json = JSON.parse(text);\n const metadata = json.metadata;\n if (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === \"geometry\") throw new Error(\"THREE.ObjectLoader: Can't load \" + url);\n return await scope.parseAsync(json);\n }\n parse(json, onLoad) {\n const animations = this.parseAnimations(json.animations);\n const shapes = this.parseShapes(json.shapes);\n const geometries = this.parseGeometries(json.geometries, shapes);\n const images = this.parseImages(json.images, function() {\n if (onLoad !== undefined) onLoad(object);\n });\n const textures = this.parseTextures(json.textures, images);\n const materials = this.parseMaterials(json.materials, textures);\n const object = this.parseObject(json.object, geometries, materials, textures, animations);\n const skeletons = this.parseSkeletons(json.skeletons, object);\n this.bindSkeletons(object, skeletons);\n //\n if (onLoad !== undefined) {\n let hasImages = false;\n for(const uuid in images)if (images[uuid].data instanceof HTMLImageElement) {\n hasImages = true;\n break;\n }\n if (hasImages === false) onLoad(object);\n }\n return object;\n }\n async parseAsync(json) {\n const animations = this.parseAnimations(json.animations);\n const shapes = this.parseShapes(json.shapes);\n const geometries = this.parseGeometries(json.geometries, shapes);\n const images = await this.parseImagesAsync(json.images);\n const textures = this.parseTextures(json.textures, images);\n const materials = this.parseMaterials(json.materials, textures);\n const object = this.parseObject(json.object, geometries, materials, textures, animations);\n const skeletons = this.parseSkeletons(json.skeletons, object);\n this.bindSkeletons(object, skeletons);\n return object;\n }\n parseShapes(json) {\n const shapes = {};\n if (json !== undefined) for(let i = 0, l = json.length; i < l; i++){\n const shape = new $d5b33d7c30034067$export$6428a7f2611ef1fa().fromJSON(json[i]);\n shapes[shape.uuid] = shape;\n }\n return shapes;\n }\n parseSkeletons(json, object) {\n const skeletons = {};\n const bones = {};\n // generate bone lookup table\n object.traverse(function(child) {\n if (child.isBone) bones[child.uuid] = child;\n });\n // create skeletons\n if (json !== undefined) for(let i = 0, l = json.length; i < l; i++){\n const skeleton = new $d5b33d7c30034067$export$8f31e4c4a37b8e9c().fromJSON(json[i], bones);\n skeletons[skeleton.uuid] = skeleton;\n }\n return skeletons;\n }\n parseGeometries(json, shapes) {\n const geometries = {};\n if (json !== undefined) {\n const bufferGeometryLoader = new $d5b33d7c30034067$export$dc275bb96327833a();\n for(let i = 0, l = json.length; i < l; i++){\n let geometry;\n const data = json[i];\n switch(data.type){\n case \"BufferGeometry\":\n case \"InstancedBufferGeometry\":\n geometry = bufferGeometryLoader.parse(data);\n break;\n default:\n if (data.type in $d5b33d7c30034067$var$Geometries) geometry = $d5b33d7c30034067$var$Geometries[data.type].fromJSON(data, shapes);\n else console.warn(`THREE.ObjectLoader: Unsupported geometry type \"${data.type}\"`);\n }\n geometry.uuid = data.uuid;\n if (data.name !== undefined) geometry.name = data.name;\n if (data.userData !== undefined) geometry.userData = data.userData;\n geometries[data.uuid] = geometry;\n }\n }\n return geometries;\n }\n parseMaterials(json, textures) {\n const cache = {}; // MultiMaterial\n const materials = {};\n if (json !== undefined) {\n const loader = new $d5b33d7c30034067$export$3bd6d323353dcf96();\n loader.setTextures(textures);\n for(let i = 0, l = json.length; i < l; i++){\n const data = json[i];\n if (cache[data.uuid] === undefined) cache[data.uuid] = loader.parse(data);\n materials[data.uuid] = cache[data.uuid];\n }\n }\n return materials;\n }\n parseAnimations(json) {\n const animations = {};\n if (json !== undefined) for(let i = 0; i < json.length; i++){\n const data = json[i];\n const clip = $d5b33d7c30034067$export$d942c706bf23829c.parse(data);\n animations[clip.uuid] = clip;\n }\n return animations;\n }\n parseImages(json, onLoad) {\n const scope = this;\n const images = {};\n let loader;\n function loadImage(url) {\n scope.manager.itemStart(url);\n return loader.load(url, function() {\n scope.manager.itemEnd(url);\n }, undefined, function() {\n scope.manager.itemError(url);\n scope.manager.itemEnd(url);\n });\n }\n function deserializeImage(image) {\n if (typeof image === \"string\") {\n const url = image;\n const path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(url) ? url : scope.resourcePath + url;\n return loadImage(path);\n } else {\n if (image.data) return {\n data: $d5b33d7c30034067$var$getTypedArray(image.type, image.data),\n width: image.width,\n height: image.height\n };\n else return null;\n }\n }\n if (json !== undefined && json.length > 0) {\n const manager = new $d5b33d7c30034067$export$99cc795e99919eed(onLoad);\n loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(manager);\n loader.setCrossOrigin(this.crossOrigin);\n for(let i = 0, il = json.length; i < il; i++){\n const image = json[i];\n const url = image.url;\n if (Array.isArray(url)) {\n // load array of images e.g CubeTexture\n const imageArray = [];\n for(let j = 0, jl = url.length; j < jl; j++){\n const currentUrl = url[j];\n const deserializedImage = deserializeImage(currentUrl);\n if (deserializedImage !== null) {\n if (deserializedImage instanceof HTMLImageElement) imageArray.push(deserializedImage);\n else // special case: handle array of data textures for cube textures\n imageArray.push(new $d5b33d7c30034067$export$b691f601014eabe1(deserializedImage.data, deserializedImage.width, deserializedImage.height));\n }\n }\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(imageArray);\n } else {\n // load single image\n const deserializedImage = deserializeImage(image.url);\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(deserializedImage);\n }\n }\n }\n return images;\n }\n async parseImagesAsync(json) {\n const scope = this;\n const images = {};\n let loader;\n async function deserializeImage(image) {\n if (typeof image === \"string\") {\n const url = image;\n const path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(url) ? url : scope.resourcePath + url;\n return await loader.loadAsync(path);\n } else {\n if (image.data) return {\n data: $d5b33d7c30034067$var$getTypedArray(image.type, image.data),\n width: image.width,\n height: image.height\n };\n else return null;\n }\n }\n if (json !== undefined && json.length > 0) {\n loader = new $d5b33d7c30034067$export$8905ce1c7a2464a1(this.manager);\n loader.setCrossOrigin(this.crossOrigin);\n for(let i = 0, il = json.length; i < il; i++){\n const image = json[i];\n const url = image.url;\n if (Array.isArray(url)) {\n // load array of images e.g CubeTexture\n const imageArray = [];\n for(let j = 0, jl = url.length; j < jl; j++){\n const currentUrl = url[j];\n const deserializedImage = await deserializeImage(currentUrl);\n if (deserializedImage !== null) {\n if (deserializedImage instanceof HTMLImageElement) imageArray.push(deserializedImage);\n else // special case: handle array of data textures for cube textures\n imageArray.push(new $d5b33d7c30034067$export$b691f601014eabe1(deserializedImage.data, deserializedImage.width, deserializedImage.height));\n }\n }\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(imageArray);\n } else {\n // load single image\n const deserializedImage = await deserializeImage(image.url);\n images[image.uuid] = new $d5b33d7c30034067$export$1d2df86270c81ecb(deserializedImage);\n }\n }\n }\n return images;\n }\n parseTextures(json, images) {\n function parseConstant(value, type) {\n if (typeof value === \"number\") return value;\n console.warn(\"THREE.ObjectLoader.parseTexture: Constant should be in numeric form.\", value);\n return type[value];\n }\n const textures = {};\n if (json !== undefined) for(let i = 0, l = json.length; i < l; i++){\n const data = json[i];\n if (data.image === undefined) console.warn('THREE.ObjectLoader: No \"image\" specified for', data.uuid);\n if (images[data.image] === undefined) console.warn(\"THREE.ObjectLoader: Undefined image\", data.image);\n const source = images[data.image];\n const image = source.data;\n let texture;\n if (Array.isArray(image)) {\n texture = new $d5b33d7c30034067$export$ee2e5a18258a4049();\n if (image.length === 6) texture.needsUpdate = true;\n } else {\n if (image && image.data) texture = new $d5b33d7c30034067$export$b691f601014eabe1();\n else texture = new $d5b33d7c30034067$export$5431306cf43de24a();\n if (image) texture.needsUpdate = true; // textures can have undefined image data\n }\n texture.source = source;\n texture.uuid = data.uuid;\n if (data.name !== undefined) texture.name = data.name;\n if (data.mapping !== undefined) texture.mapping = parseConstant(data.mapping, $d5b33d7c30034067$var$TEXTURE_MAPPING);\n if (data.channel !== undefined) texture.channel = data.channel;\n if (data.offset !== undefined) texture.offset.fromArray(data.offset);\n if (data.repeat !== undefined) texture.repeat.fromArray(data.repeat);\n if (data.center !== undefined) texture.center.fromArray(data.center);\n if (data.rotation !== undefined) texture.rotation = data.rotation;\n if (data.wrap !== undefined) {\n texture.wrapS = parseConstant(data.wrap[0], $d5b33d7c30034067$var$TEXTURE_WRAPPING);\n texture.wrapT = parseConstant(data.wrap[1], $d5b33d7c30034067$var$TEXTURE_WRAPPING);\n }\n if (data.format !== undefined) texture.format = data.format;\n if (data.internalFormat !== undefined) texture.internalFormat = data.internalFormat;\n if (data.type !== undefined) texture.type = data.type;\n if (data.colorSpace !== undefined) texture.colorSpace = data.colorSpace;\n if (data.encoding !== undefined) texture.encoding = data.encoding; // @deprecated, r152\n if (data.minFilter !== undefined) texture.minFilter = parseConstant(data.minFilter, $d5b33d7c30034067$var$TEXTURE_FILTER);\n if (data.magFilter !== undefined) texture.magFilter = parseConstant(data.magFilter, $d5b33d7c30034067$var$TEXTURE_FILTER);\n if (data.anisotropy !== undefined) texture.anisotropy = data.anisotropy;\n if (data.flipY !== undefined) texture.flipY = data.flipY;\n if (data.generateMipmaps !== undefined) texture.generateMipmaps = data.generateMipmaps;\n if (data.premultiplyAlpha !== undefined) texture.premultiplyAlpha = data.premultiplyAlpha;\n if (data.unpackAlignment !== undefined) texture.unpackAlignment = data.unpackAlignment;\n if (data.compareFunction !== undefined) texture.compareFunction = data.compareFunction;\n if (data.userData !== undefined) texture.userData = data.userData;\n textures[data.uuid] = texture;\n }\n return textures;\n }\n parseObject(data, geometries, materials, textures, animations) {\n let object;\n function getGeometry(name) {\n if (geometries[name] === undefined) console.warn(\"THREE.ObjectLoader: Undefined geometry\", name);\n return geometries[name];\n }\n function getMaterial(name) {\n if (name === undefined) return undefined;\n if (Array.isArray(name)) {\n const array = [];\n for(let i = 0, l = name.length; i < l; i++){\n const uuid = name[i];\n if (materials[uuid] === undefined) console.warn(\"THREE.ObjectLoader: Undefined material\", uuid);\n array.push(materials[uuid]);\n }\n return array;\n }\n if (materials[name] === undefined) console.warn(\"THREE.ObjectLoader: Undefined material\", name);\n return materials[name];\n }\n function getTexture(uuid) {\n if (textures[uuid] === undefined) console.warn(\"THREE.ObjectLoader: Undefined texture\", uuid);\n return textures[uuid];\n }\n let geometry, material;\n switch(data.type){\n case \"Scene\":\n object = new $d5b33d7c30034067$export$38af1803e3442a7f();\n if (data.background !== undefined) {\n if (Number.isInteger(data.background)) object.background = new $d5b33d7c30034067$export$892596cec99bc70e(data.background);\n else object.background = getTexture(data.background);\n }\n if (data.environment !== undefined) object.environment = getTexture(data.environment);\n if (data.fog !== undefined) {\n if (data.fog.type === \"Fog\") object.fog = new $d5b33d7c30034067$export$3c890837b09508d4(data.fog.color, data.fog.near, data.fog.far);\n else if (data.fog.type === \"FogExp2\") object.fog = new $d5b33d7c30034067$export$6f1519f023b8d0f6(data.fog.color, data.fog.density);\n if (data.fog.name !== \"\") object.fog.name = data.fog.name;\n }\n if (data.backgroundBlurriness !== undefined) object.backgroundBlurriness = data.backgroundBlurriness;\n if (data.backgroundIntensity !== undefined) object.backgroundIntensity = data.backgroundIntensity;\n break;\n case \"PerspectiveCamera\":\n object = new $d5b33d7c30034067$export$74e4ae24825f68d7(data.fov, data.aspect, data.near, data.far);\n if (data.focus !== undefined) object.focus = data.focus;\n if (data.zoom !== undefined) object.zoom = data.zoom;\n if (data.filmGauge !== undefined) object.filmGauge = data.filmGauge;\n if (data.filmOffset !== undefined) object.filmOffset = data.filmOffset;\n if (data.view !== undefined) object.view = Object.assign({}, data.view);\n break;\n case \"OrthographicCamera\":\n object = new $d5b33d7c30034067$export$9ebf355ee4ed261b(data.left, data.right, data.top, data.bottom, data.near, data.far);\n if (data.zoom !== undefined) object.zoom = data.zoom;\n if (data.view !== undefined) object.view = Object.assign({}, data.view);\n break;\n case \"AmbientLight\":\n object = new $d5b33d7c30034067$export$af279bfef9ec2c96(data.color, data.intensity);\n break;\n case \"DirectionalLight\":\n object = new $d5b33d7c30034067$export$3fea33cc9972c868(data.color, data.intensity);\n break;\n case \"PointLight\":\n object = new $d5b33d7c30034067$export$4c9c1cb3f0b6f455(data.color, data.intensity, data.distance, data.decay);\n break;\n case \"RectAreaLight\":\n object = new $d5b33d7c30034067$export$61db2d908bbd2429(data.color, data.intensity, data.width, data.height);\n break;\n case \"SpotLight\":\n object = new $d5b33d7c30034067$export$81495cbb73897362(data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay);\n break;\n case \"HemisphereLight\":\n object = new $d5b33d7c30034067$export$8d474f55edbb9624(data.color, data.groundColor, data.intensity);\n break;\n case \"LightProbe\":\n object = new $d5b33d7c30034067$export$e7ef036e309b38d2().fromJSON(data);\n break;\n case \"SkinnedMesh\":\n geometry = getGeometry(data.geometry);\n material = getMaterial(data.material);\n object = new $d5b33d7c30034067$export$b303577035157ecf(geometry, material);\n if (data.bindMode !== undefined) object.bindMode = data.bindMode;\n if (data.bindMatrix !== undefined) object.bindMatrix.fromArray(data.bindMatrix);\n if (data.skeleton !== undefined) object.skeleton = data.skeleton;\n break;\n case \"Mesh\":\n geometry = getGeometry(data.geometry);\n material = getMaterial(data.material);\n object = new $d5b33d7c30034067$export$e176487c05830cc5(geometry, material);\n break;\n case \"InstancedMesh\":\n geometry = getGeometry(data.geometry);\n material = getMaterial(data.material);\n const count = data.count;\n const instanceMatrix = data.instanceMatrix;\n const instanceColor = data.instanceColor;\n object = new $d5b33d7c30034067$export$f3c979c331175ad7(geometry, material, count);\n object.instanceMatrix = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(instanceMatrix.array), 16);\n if (instanceColor !== undefined) object.instanceColor = new $d5b33d7c30034067$export$32ea87a8b54d744a(new Float32Array(instanceColor.array), instanceColor.itemSize);\n break;\n case \"LOD\":\n object = new $d5b33d7c30034067$export$112e7237be0c5f30();\n break;\n case \"Line\":\n object = new $d5b33d7c30034067$export$17d680238e50603e(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"LineLoop\":\n object = new $d5b33d7c30034067$export$f85a24d745e4f17d(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"LineSegments\":\n object = new $d5b33d7c30034067$export$ff1ed10fedfdd604(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"PointCloud\":\n case \"Points\":\n object = new $d5b33d7c30034067$export$1c787534cb11aa3e(getGeometry(data.geometry), getMaterial(data.material));\n break;\n case \"Sprite\":\n object = new $d5b33d7c30034067$export$3075603db8e6204c(getMaterial(data.material));\n break;\n case \"Group\":\n object = new $d5b33d7c30034067$export$eb2fcfdbd7ba97d4();\n break;\n case \"Bone\":\n object = new $d5b33d7c30034067$export$b127726e56765aa4();\n break;\n default:\n object = new $d5b33d7c30034067$export$e4dd07dff30cc924();\n }\n object.uuid = data.uuid;\n if (data.name !== undefined) object.name = data.name;\n if (data.matrix !== undefined) {\n object.matrix.fromArray(data.matrix);\n if (data.matrixAutoUpdate !== undefined) object.matrixAutoUpdate = data.matrixAutoUpdate;\n if (object.matrixAutoUpdate) object.matrix.decompose(object.position, object.quaternion, object.scale);\n } else {\n if (data.position !== undefined) object.position.fromArray(data.position);\n if (data.rotation !== undefined) object.rotation.fromArray(data.rotation);\n if (data.quaternion !== undefined) object.quaternion.fromArray(data.quaternion);\n if (data.scale !== undefined) object.scale.fromArray(data.scale);\n }\n if (data.up !== undefined) object.up.fromArray(data.up);\n if (data.castShadow !== undefined) object.castShadow = data.castShadow;\n if (data.receiveShadow !== undefined) object.receiveShadow = data.receiveShadow;\n if (data.shadow) {\n if (data.shadow.bias !== undefined) object.shadow.bias = data.shadow.bias;\n if (data.shadow.normalBias !== undefined) object.shadow.normalBias = data.shadow.normalBias;\n if (data.shadow.radius !== undefined) object.shadow.radius = data.shadow.radius;\n if (data.shadow.mapSize !== undefined) object.shadow.mapSize.fromArray(data.shadow.mapSize);\n if (data.shadow.camera !== undefined) object.shadow.camera = this.parseObject(data.shadow.camera);\n }\n if (data.visible !== undefined) object.visible = data.visible;\n if (data.frustumCulled !== undefined) object.frustumCulled = data.frustumCulled;\n if (data.renderOrder !== undefined) object.renderOrder = data.renderOrder;\n if (data.userData !== undefined) object.userData = data.userData;\n if (data.layers !== undefined) object.layers.mask = data.layers;\n if (data.children !== undefined) {\n const children = data.children;\n for(let i = 0; i < children.length; i++)object.add(this.parseObject(children[i], geometries, materials, textures, animations));\n }\n if (data.animations !== undefined) {\n const objectAnimations = data.animations;\n for(let i = 0; i < objectAnimations.length; i++){\n const uuid = objectAnimations[i];\n object.animations.push(animations[uuid]);\n }\n }\n if (data.type === \"LOD\") {\n if (data.autoUpdate !== undefined) object.autoUpdate = data.autoUpdate;\n const levels = data.levels;\n for(let l = 0; l < levels.length; l++){\n const level = levels[l];\n const child = object.getObjectByProperty(\"uuid\", level.object);\n if (child !== undefined) object.addLevel(child, level.distance, level.hysteresis);\n }\n }\n return object;\n }\n bindSkeletons(object, skeletons) {\n if (Object.keys(skeletons).length === 0) return;\n object.traverse(function(child) {\n if (child.isSkinnedMesh === true && child.skeleton !== undefined) {\n const skeleton = skeletons[child.skeleton];\n if (skeleton === undefined) console.warn(\"THREE.ObjectLoader: No skeleton found with UUID:\", child.skeleton);\n else child.bind(skeleton, child.bindMatrix);\n }\n });\n }\n}\nconst $d5b33d7c30034067$var$TEXTURE_MAPPING = {\n UVMapping: $d5b33d7c30034067$export$1beec6768cbb3d2d,\n CubeReflectionMapping: $d5b33d7c30034067$export$8759762a6477f2c4,\n CubeRefractionMapping: $d5b33d7c30034067$export$dc59f8aed047f61d,\n EquirectangularReflectionMapping: $d5b33d7c30034067$export$d64030b316d3b087,\n EquirectangularRefractionMapping: $d5b33d7c30034067$export$ee99d97d46898098,\n CubeUVReflectionMapping: $d5b33d7c30034067$export$dbf3e70ff37af79\n};\nconst $d5b33d7c30034067$var$TEXTURE_WRAPPING = {\n RepeatWrapping: $d5b33d7c30034067$export$533346c8e8dac0f5,\n ClampToEdgeWrapping: $d5b33d7c30034067$export$9d9334239a5a5e06,\n MirroredRepeatWrapping: $d5b33d7c30034067$export$c7e7c00b14f51a4f\n};\nconst $d5b33d7c30034067$var$TEXTURE_FILTER = {\n NearestFilter: $d5b33d7c30034067$export$727aa5ec3fe39bf0,\n NearestMipmapNearestFilter: $d5b33d7c30034067$export$d129e38cf6feaa8c,\n NearestMipmapLinearFilter: $d5b33d7c30034067$export$d2327c1afe5bfdf2,\n LinearFilter: $d5b33d7c30034067$export$8a72f490b25c56c8,\n LinearMipmapNearestFilter: $d5b33d7c30034067$export$19a719f377145a13,\n LinearMipmapLinearFilter: $d5b33d7c30034067$export$5d8599b6a933fb1b\n};\nclass $d5b33d7c30034067$export$52286b55c4a9b51f extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n this.isImageBitmapLoader = true;\n if (typeof createImageBitmap === \"undefined\") console.warn(\"THREE.ImageBitmapLoader: createImageBitmap() not supported.\");\n if (typeof fetch === \"undefined\") console.warn(\"THREE.ImageBitmapLoader: fetch() not supported.\");\n this.options = {\n premultiplyAlpha: \"none\"\n };\n }\n setOptions(options) {\n this.options = options;\n return this;\n }\n load(url, onLoad, onProgress, onError) {\n if (url === undefined) url = \"\";\n if (this.path !== undefined) url = this.path + url;\n url = this.manager.resolveURL(url);\n const scope = this;\n const cached = $d5b33d7c30034067$export$94affb487e701bf2.get(url);\n if (cached !== undefined) {\n scope.manager.itemStart(url);\n setTimeout(function() {\n if (onLoad) onLoad(cached);\n scope.manager.itemEnd(url);\n }, 0);\n return cached;\n }\n const fetchOptions = {};\n fetchOptions.credentials = this.crossOrigin === \"anonymous\" ? \"same-origin\" : \"include\";\n fetchOptions.headers = this.requestHeader;\n fetch(url, fetchOptions).then(function(res) {\n return res.blob();\n }).then(function(blob) {\n return createImageBitmap(blob, Object.assign(scope.options, {\n colorSpaceConversion: \"none\"\n }));\n }).then(function(imageBitmap) {\n $d5b33d7c30034067$export$94affb487e701bf2.add(url, imageBitmap);\n if (onLoad) onLoad(imageBitmap);\n scope.manager.itemEnd(url);\n }).catch(function(e) {\n if (onError) onError(e);\n scope.manager.itemError(url);\n scope.manager.itemEnd(url);\n });\n scope.manager.itemStart(url);\n }\n}\nlet $d5b33d7c30034067$var$_context;\nclass $d5b33d7c30034067$export$fcbc63750ec2a81f {\n static getContext() {\n if ($d5b33d7c30034067$var$_context === undefined) $d5b33d7c30034067$var$_context = new (window.AudioContext || window.webkitAudioContext)();\n return $d5b33d7c30034067$var$_context;\n }\n static setContext(value) {\n $d5b33d7c30034067$var$_context = value;\n }\n}\nclass $d5b33d7c30034067$export$d8d5fccfbf47714e extends $d5b33d7c30034067$export$3b0d6d7590275603 {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new $d5b33d7c30034067$export$98435a25b5cf7b2b(this.manager);\n loader.setResponseType(\"arraybuffer\");\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function(buffer) {\n try {\n // Create a copy of the buffer. The `decodeAudioData` method\n // detaches the buffer when complete, preventing reuse.\n const bufferCopy = buffer.slice(0);\n const context = $d5b33d7c30034067$export$fcbc63750ec2a81f.getContext();\n context.decodeAudioData(bufferCopy, function(audioBuffer) {\n onLoad(audioBuffer);\n }, handleError);\n } catch (e) {\n handleError(e);\n }\n }, onProgress, onError);\n function handleError(e) {\n if (onError) onError(e);\n else console.error(e);\n scope.manager.itemError(url);\n }\n }\n}\nconst $d5b33d7c30034067$var$_eyeRight = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_eyeLeft = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_projectionMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nclass $d5b33d7c30034067$export$bc7f73a1065bee0c {\n constructor(){\n this.type = \"StereoCamera\";\n this.aspect = 1;\n this.eyeSep = 0.064;\n this.cameraL = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n this.cameraL.layers.enable(1);\n this.cameraL.matrixAutoUpdate = false;\n this.cameraR = new $d5b33d7c30034067$export$74e4ae24825f68d7();\n this.cameraR.layers.enable(2);\n this.cameraR.matrixAutoUpdate = false;\n this._cache = {\n focus: null,\n fov: null,\n aspect: null,\n near: null,\n far: null,\n zoom: null,\n eyeSep: null\n };\n }\n update(camera) {\n const cache = this._cache;\n const needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n if (needsUpdate) {\n cache.focus = camera.focus;\n cache.fov = camera.fov;\n cache.aspect = camera.aspect * this.aspect;\n cache.near = camera.near;\n cache.far = camera.far;\n cache.zoom = camera.zoom;\n cache.eyeSep = this.eyeSep;\n // Off-axis stereoscopic effect based on\n // http://paulbourke.net/stereographics/stereorender/\n $d5b33d7c30034067$var$_projectionMatrix.copy(camera.projectionMatrix);\n const eyeSepHalf = cache.eyeSep / 2;\n const eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n const ymax = cache.near * Math.tan($d5b33d7c30034067$var$DEG2RAD * cache.fov * 0.5) / cache.zoom;\n let xmin, xmax;\n // translate xOffset\n $d5b33d7c30034067$var$_eyeLeft.elements[12] = -eyeSepHalf;\n $d5b33d7c30034067$var$_eyeRight.elements[12] = eyeSepHalf;\n // for left eye\n xmin = -ymax * cache.aspect + eyeSepOnProjection;\n xmax = ymax * cache.aspect + eyeSepOnProjection;\n $d5b33d7c30034067$var$_projectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n $d5b33d7c30034067$var$_projectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n this.cameraL.projectionMatrix.copy($d5b33d7c30034067$var$_projectionMatrix);\n // for right eye\n xmin = -ymax * cache.aspect - eyeSepOnProjection;\n xmax = ymax * cache.aspect - eyeSepOnProjection;\n $d5b33d7c30034067$var$_projectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n $d5b33d7c30034067$var$_projectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n this.cameraR.projectionMatrix.copy($d5b33d7c30034067$var$_projectionMatrix);\n }\n this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply($d5b33d7c30034067$var$_eyeLeft);\n this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply($d5b33d7c30034067$var$_eyeRight);\n }\n}\nclass $d5b33d7c30034067$export$9735c82c4bae3302 {\n constructor(autoStart = true){\n this.autoStart = autoStart;\n this.startTime = 0;\n this.oldTime = 0;\n this.elapsedTime = 0;\n this.running = false;\n }\n start() {\n this.startTime = $d5b33d7c30034067$var$now();\n this.oldTime = this.startTime;\n this.elapsedTime = 0;\n this.running = true;\n }\n stop() {\n this.getElapsedTime();\n this.running = false;\n this.autoStart = false;\n }\n getElapsedTime() {\n this.getDelta();\n return this.elapsedTime;\n }\n getDelta() {\n let diff = 0;\n if (this.autoStart && !this.running) {\n this.start();\n return 0;\n }\n if (this.running) {\n const newTime = $d5b33d7c30034067$var$now();\n diff = (newTime - this.oldTime) / 1000;\n this.oldTime = newTime;\n this.elapsedTime += diff;\n }\n return diff;\n }\n}\nfunction $d5b33d7c30034067$var$now() {\n return (typeof performance === \"undefined\" ? Date : performance).now(); // see #10732\n}\nconst $d5b33d7c30034067$var$_position$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_scale$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_orientation$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$8a1b810c6fde8951 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(){\n super();\n this.type = \"AudioListener\";\n this.context = $d5b33d7c30034067$export$fcbc63750ec2a81f.getContext();\n this.gain = this.context.createGain();\n this.gain.connect(this.context.destination);\n this.filter = null;\n this.timeDelta = 0;\n // private\n this._clock = new $d5b33d7c30034067$export$9735c82c4bae3302();\n }\n getInput() {\n return this.gain;\n }\n removeFilter() {\n if (this.filter !== null) {\n this.gain.disconnect(this.filter);\n this.filter.disconnect(this.context.destination);\n this.gain.connect(this.context.destination);\n this.filter = null;\n }\n return this;\n }\n getFilter() {\n return this.filter;\n }\n setFilter(value) {\n if (this.filter !== null) {\n this.gain.disconnect(this.filter);\n this.filter.disconnect(this.context.destination);\n } else this.gain.disconnect(this.context.destination);\n this.filter = value;\n this.gain.connect(this.filter);\n this.filter.connect(this.context.destination);\n return this;\n }\n getMasterVolume() {\n return this.gain.gain.value;\n }\n setMasterVolume(value) {\n this.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n return this;\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n const listener = this.context.listener;\n const up = this.up;\n this.timeDelta = this._clock.getDelta();\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position$1, $d5b33d7c30034067$var$_quaternion$1, $d5b33d7c30034067$var$_scale$1);\n $d5b33d7c30034067$var$_orientation$1.set(0, 0, -1).applyQuaternion($d5b33d7c30034067$var$_quaternion$1);\n if (listener.positionX) {\n // code path for Chrome (see #14393)\n const endTime = this.context.currentTime + this.timeDelta;\n listener.positionX.linearRampToValueAtTime($d5b33d7c30034067$var$_position$1.x, endTime);\n listener.positionY.linearRampToValueAtTime($d5b33d7c30034067$var$_position$1.y, endTime);\n listener.positionZ.linearRampToValueAtTime($d5b33d7c30034067$var$_position$1.z, endTime);\n listener.forwardX.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation$1.x, endTime);\n listener.forwardY.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation$1.y, endTime);\n listener.forwardZ.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation$1.z, endTime);\n listener.upX.linearRampToValueAtTime(up.x, endTime);\n listener.upY.linearRampToValueAtTime(up.y, endTime);\n listener.upZ.linearRampToValueAtTime(up.z, endTime);\n } else {\n listener.setPosition($d5b33d7c30034067$var$_position$1.x, $d5b33d7c30034067$var$_position$1.y, $d5b33d7c30034067$var$_position$1.z);\n listener.setOrientation($d5b33d7c30034067$var$_orientation$1.x, $d5b33d7c30034067$var$_orientation$1.y, $d5b33d7c30034067$var$_orientation$1.z, up.x, up.y, up.z);\n }\n }\n}\nclass $d5b33d7c30034067$export$153755f98d9861de extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(listener){\n super();\n this.type = \"Audio\";\n this.listener = listener;\n this.context = listener.context;\n this.gain = this.context.createGain();\n this.gain.connect(listener.getInput());\n this.autoplay = false;\n this.buffer = null;\n this.detune = 0;\n this.loop = false;\n this.loopStart = 0;\n this.loopEnd = 0;\n this.offset = 0;\n this.duration = undefined;\n this.playbackRate = 1;\n this.isPlaying = false;\n this.hasPlaybackControl = true;\n this.source = null;\n this.sourceType = \"empty\";\n this._startedAt = 0;\n this._progress = 0;\n this._connected = false;\n this.filters = [];\n }\n getOutput() {\n return this.gain;\n }\n setNodeSource(audioNode) {\n this.hasPlaybackControl = false;\n this.sourceType = \"audioNode\";\n this.source = audioNode;\n this.connect();\n return this;\n }\n setMediaElementSource(mediaElement) {\n this.hasPlaybackControl = false;\n this.sourceType = \"mediaNode\";\n this.source = this.context.createMediaElementSource(mediaElement);\n this.connect();\n return this;\n }\n setMediaStreamSource(mediaStream) {\n this.hasPlaybackControl = false;\n this.sourceType = \"mediaStreamNode\";\n this.source = this.context.createMediaStreamSource(mediaStream);\n this.connect();\n return this;\n }\n setBuffer(audioBuffer) {\n this.buffer = audioBuffer;\n this.sourceType = \"buffer\";\n if (this.autoplay) this.play();\n return this;\n }\n play(delay = 0) {\n if (this.isPlaying === true) {\n console.warn(\"THREE.Audio: Audio is already playing.\");\n return;\n }\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this._startedAt = this.context.currentTime + delay;\n const source = this.context.createBufferSource();\n source.buffer = this.buffer;\n source.loop = this.loop;\n source.loopStart = this.loopStart;\n source.loopEnd = this.loopEnd;\n source.onended = this.onEnded.bind(this);\n source.start(this._startedAt, this._progress + this.offset, this.duration);\n this.isPlaying = true;\n this.source = source;\n this.setDetune(this.detune);\n this.setPlaybackRate(this.playbackRate);\n return this.connect();\n }\n pause() {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n if (this.isPlaying === true) {\n // update current progress\n this._progress += Math.max(this.context.currentTime - this._startedAt, 0) * this.playbackRate;\n if (this.loop === true) // ensure _progress does not exceed duration with looped audios\n this._progress = this._progress % (this.duration || this.buffer.duration);\n this.source.stop();\n this.source.onended = null;\n this.isPlaying = false;\n }\n return this;\n }\n stop() {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this._progress = 0;\n if (this.source !== null) {\n this.source.stop();\n this.source.onended = null;\n }\n this.isPlaying = false;\n return this;\n }\n connect() {\n if (this.filters.length > 0) {\n this.source.connect(this.filters[0]);\n for(let i = 1, l = this.filters.length; i < l; i++)this.filters[i - 1].connect(this.filters[i]);\n this.filters[this.filters.length - 1].connect(this.getOutput());\n } else this.source.connect(this.getOutput());\n this._connected = true;\n return this;\n }\n disconnect() {\n if (this._connected === false) return;\n if (this.filters.length > 0) {\n this.source.disconnect(this.filters[0]);\n for(let i = 1, l = this.filters.length; i < l; i++)this.filters[i - 1].disconnect(this.filters[i]);\n this.filters[this.filters.length - 1].disconnect(this.getOutput());\n } else this.source.disconnect(this.getOutput());\n this._connected = false;\n return this;\n }\n getFilters() {\n return this.filters;\n }\n setFilters(value) {\n if (!value) value = [];\n if (this._connected === true) {\n this.disconnect();\n this.filters = value.slice();\n this.connect();\n } else this.filters = value.slice();\n return this;\n }\n setDetune(value) {\n this.detune = value;\n if (this.source.detune === undefined) return; // only set detune when available\n if (this.isPlaying === true) this.source.detune.setTargetAtTime(this.detune, this.context.currentTime, 0.01);\n return this;\n }\n getDetune() {\n return this.detune;\n }\n getFilter() {\n return this.getFilters()[0];\n }\n setFilter(filter) {\n return this.setFilters(filter ? [\n filter\n ] : []);\n }\n setPlaybackRate(value) {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this.playbackRate = value;\n if (this.isPlaying === true) this.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, 0.01);\n return this;\n }\n getPlaybackRate() {\n return this.playbackRate;\n }\n onEnded() {\n this.isPlaying = false;\n }\n getLoop() {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return false;\n }\n return this.loop;\n }\n setLoop(value) {\n if (this.hasPlaybackControl === false) {\n console.warn(\"THREE.Audio: this Audio has no playback control.\");\n return;\n }\n this.loop = value;\n if (this.isPlaying === true) this.source.loop = this.loop;\n return this;\n }\n setLoopStart(value) {\n this.loopStart = value;\n return this;\n }\n setLoopEnd(value) {\n this.loopEnd = value;\n return this;\n }\n getVolume() {\n return this.gain.gain.value;\n }\n setVolume(value) {\n this.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_position = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_quaternion = /*@__PURE__*/ new $d5b33d7c30034067$export$23d6a54f0bbc85a3();\nconst $d5b33d7c30034067$var$_scale = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_orientation = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$4b3e397ef1832507 extends $d5b33d7c30034067$export$153755f98d9861de {\n constructor(listener){\n super(listener);\n this.panner = this.context.createPanner();\n this.panner.panningModel = \"HRTF\";\n this.panner.connect(this.gain);\n }\n connect() {\n super.connect();\n this.panner.connect(this.gain);\n }\n disconnect() {\n super.disconnect();\n this.panner.disconnect(this.gain);\n }\n getOutput() {\n return this.panner;\n }\n getRefDistance() {\n return this.panner.refDistance;\n }\n setRefDistance(value) {\n this.panner.refDistance = value;\n return this;\n }\n getRolloffFactor() {\n return this.panner.rolloffFactor;\n }\n setRolloffFactor(value) {\n this.panner.rolloffFactor = value;\n return this;\n }\n getDistanceModel() {\n return this.panner.distanceModel;\n }\n setDistanceModel(value) {\n this.panner.distanceModel = value;\n return this;\n }\n getMaxDistance() {\n return this.panner.maxDistance;\n }\n setMaxDistance(value) {\n this.panner.maxDistance = value;\n return this;\n }\n setDirectionalCone(coneInnerAngle, coneOuterAngle, coneOuterGain) {\n this.panner.coneInnerAngle = coneInnerAngle;\n this.panner.coneOuterAngle = coneOuterAngle;\n this.panner.coneOuterGain = coneOuterGain;\n return this;\n }\n updateMatrixWorld(force) {\n super.updateMatrixWorld(force);\n if (this.hasPlaybackControl === true && this.isPlaying === false) return;\n this.matrixWorld.decompose($d5b33d7c30034067$var$_position, $d5b33d7c30034067$var$_quaternion, $d5b33d7c30034067$var$_scale);\n $d5b33d7c30034067$var$_orientation.set(0, 0, 1).applyQuaternion($d5b33d7c30034067$var$_quaternion);\n const panner = this.panner;\n if (panner.positionX) {\n // code path for Chrome and Firefox (see #14393)\n const endTime = this.context.currentTime + this.listener.timeDelta;\n panner.positionX.linearRampToValueAtTime($d5b33d7c30034067$var$_position.x, endTime);\n panner.positionY.linearRampToValueAtTime($d5b33d7c30034067$var$_position.y, endTime);\n panner.positionZ.linearRampToValueAtTime($d5b33d7c30034067$var$_position.z, endTime);\n panner.orientationX.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation.x, endTime);\n panner.orientationY.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation.y, endTime);\n panner.orientationZ.linearRampToValueAtTime($d5b33d7c30034067$var$_orientation.z, endTime);\n } else {\n panner.setPosition($d5b33d7c30034067$var$_position.x, $d5b33d7c30034067$var$_position.y, $d5b33d7c30034067$var$_position.z);\n panner.setOrientation($d5b33d7c30034067$var$_orientation.x, $d5b33d7c30034067$var$_orientation.y, $d5b33d7c30034067$var$_orientation.z);\n }\n }\n}\nclass $d5b33d7c30034067$export$d47da1ef3d382827 {\n constructor(audio, fftSize = 2048){\n this.analyser = audio.context.createAnalyser();\n this.analyser.fftSize = fftSize;\n this.data = new Uint8Array(this.analyser.frequencyBinCount);\n audio.getOutput().connect(this.analyser);\n }\n getFrequencyData() {\n this.analyser.getByteFrequencyData(this.data);\n return this.data;\n }\n getAverageFrequency() {\n let value = 0;\n const data = this.getFrequencyData();\n for(let i = 0; i < data.length; i++)value += data[i];\n return value / data.length;\n }\n}\nclass $d5b33d7c30034067$export$dfe0af1ca1acb78a {\n constructor(binding, typeName, valueSize){\n this.binding = binding;\n this.valueSize = valueSize;\n let mixFunction, mixFunctionAdditive, setIdentity;\n // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n //\n // interpolators can use .buffer as their .result\n // the data then goes to 'incoming'\n //\n // 'accu0' and 'accu1' are used frame-interleaved for\n // the cumulative result and are compared to detect\n // changes\n //\n // 'orig' stores the original state of the property\n //\n // 'add' is used for additive cumulative results\n //\n // 'work' is optional and is only present for quaternion types. It is used\n // to store intermediate quaternion multiplication results\n switch(typeName){\n case \"quaternion\":\n mixFunction = this._slerp;\n mixFunctionAdditive = this._slerpAdditive;\n setIdentity = this._setAdditiveIdentityQuaternion;\n this.buffer = new Float64Array(valueSize * 6);\n this._workIndex = 5;\n break;\n case \"string\":\n case \"bool\":\n mixFunction = this._select;\n // Use the regular mix function and for additive on these types,\n // additive is not relevant for non-numeric types\n mixFunctionAdditive = this._select;\n setIdentity = this._setAdditiveIdentityOther;\n this.buffer = new Array(valueSize * 5);\n break;\n default:\n mixFunction = this._lerp;\n mixFunctionAdditive = this._lerpAdditive;\n setIdentity = this._setAdditiveIdentityNumeric;\n this.buffer = new Float64Array(valueSize * 5);\n }\n this._mixBufferRegion = mixFunction;\n this._mixBufferRegionAdditive = mixFunctionAdditive;\n this._setIdentity = setIdentity;\n this._origIndex = 3;\n this._addIndex = 4;\n this.cumulativeWeight = 0;\n this.cumulativeWeightAdditive = 0;\n this.useCount = 0;\n this.referenceCount = 0;\n }\n // accumulate data in the 'incoming' region into 'accu'\n accumulate(accuIndex, weight) {\n // note: happily accumulating nothing when weight = 0, the caller knows\n // the weight and shouldn't have made the call in the first place\n const buffer = this.buffer, stride = this.valueSize, offset = accuIndex * stride + stride;\n let currentWeight = this.cumulativeWeight;\n if (currentWeight === 0) {\n // accuN := incoming * weight\n for(let i = 0; i !== stride; ++i)buffer[offset + i] = buffer[i];\n currentWeight = weight;\n } else {\n // accuN := accuN + incoming * weight\n currentWeight += weight;\n const mix = weight / currentWeight;\n this._mixBufferRegion(buffer, offset, 0, mix, stride);\n }\n this.cumulativeWeight = currentWeight;\n }\n // accumulate data in the 'incoming' region into 'add'\n accumulateAdditive(weight) {\n const buffer = this.buffer, stride = this.valueSize, offset = stride * this._addIndex;\n if (this.cumulativeWeightAdditive === 0) // add = identity\n this._setIdentity();\n // add := add + incoming * weight\n this._mixBufferRegionAdditive(buffer, offset, 0, weight, stride);\n this.cumulativeWeightAdditive += weight;\n }\n // apply the state of 'accu' to the binding when accus differ\n apply(accuIndex) {\n const stride = this.valueSize, buffer = this.buffer, offset = accuIndex * stride + stride, weight = this.cumulativeWeight, weightAdditive = this.cumulativeWeightAdditive, binding = this.binding;\n this.cumulativeWeight = 0;\n this.cumulativeWeightAdditive = 0;\n if (weight < 1) {\n // accuN := accuN + original * ( 1 - cumulativeWeight )\n const originalValueOffset = stride * this._origIndex;\n this._mixBufferRegion(buffer, offset, originalValueOffset, 1 - weight, stride);\n }\n if (weightAdditive > 0) // accuN := accuN + additive accuN\n this._mixBufferRegionAdditive(buffer, offset, this._addIndex * stride, 1, stride);\n for(let i = stride, e = stride + stride; i !== e; ++i)if (buffer[i] !== buffer[i + stride]) {\n // value has changed -> update scene graph\n binding.setValue(buffer, offset);\n break;\n }\n }\n // remember the state of the bound property and copy it to both accus\n saveOriginalState() {\n const binding = this.binding;\n const buffer = this.buffer, stride = this.valueSize, originalValueOffset = stride * this._origIndex;\n binding.getValue(buffer, originalValueOffset);\n // accu[0..1] := orig -- initially detect changes against the original\n for(let i = stride, e = originalValueOffset; i !== e; ++i)buffer[i] = buffer[originalValueOffset + i % stride];\n // Add to identity for additive\n this._setIdentity();\n this.cumulativeWeight = 0;\n this.cumulativeWeightAdditive = 0;\n }\n // apply the state previously taken via 'saveOriginalState' to the binding\n restoreOriginalState() {\n const originalValueOffset = this.valueSize * 3;\n this.binding.setValue(this.buffer, originalValueOffset);\n }\n _setAdditiveIdentityNumeric() {\n const startIndex = this._addIndex * this.valueSize;\n const endIndex = startIndex + this.valueSize;\n for(let i = startIndex; i < endIndex; i++)this.buffer[i] = 0;\n }\n _setAdditiveIdentityQuaternion() {\n this._setAdditiveIdentityNumeric();\n this.buffer[this._addIndex * this.valueSize + 3] = 1;\n }\n _setAdditiveIdentityOther() {\n const startIndex = this._origIndex * this.valueSize;\n const targetIndex = this._addIndex * this.valueSize;\n for(let i = 0; i < this.valueSize; i++)this.buffer[targetIndex + i] = this.buffer[startIndex + i];\n }\n // mix functions\n _select(buffer, dstOffset, srcOffset, t, stride) {\n if (t >= 0.5) for(let i = 0; i !== stride; ++i)buffer[dstOffset + i] = buffer[srcOffset + i];\n }\n _slerp(buffer, dstOffset, srcOffset, t) {\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t);\n }\n _slerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n const workOffset = this._workIndex * stride;\n // Store result in intermediate buffer offset\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.multiplyQuaternionsFlat(buffer, workOffset, buffer, dstOffset, buffer, srcOffset);\n // Slerp to the intermediate result\n $d5b33d7c30034067$export$23d6a54f0bbc85a3.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t);\n }\n _lerp(buffer, dstOffset, srcOffset, t, stride) {\n const s = 1 - t;\n for(let i = 0; i !== stride; ++i){\n const j = dstOffset + i;\n buffer[j] = buffer[j] * s + buffer[srcOffset + i] * t;\n }\n }\n _lerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n for(let i = 0; i !== stride; ++i){\n const j = dstOffset + i;\n buffer[j] = buffer[j] + buffer[srcOffset + i] * t;\n }\n }\n}\n// Characters [].:/ are reserved for track binding syntax.\nconst $d5b33d7c30034067$var$_RESERVED_CHARS_RE = \"\\\\[\\\\]\\\\.:\\\\/\";\nconst $d5b33d7c30034067$var$_reservedRe = new RegExp(\"[\" + $d5b33d7c30034067$var$_RESERVED_CHARS_RE + \"]\", \"g\");\n// Attempts to allow node names from any language. ES5's `\\w` regexp matches\n// only latin characters, and the unicode \\p{L} is not yet supported. So\n// instead, we exclude reserved characters and match everything else.\nconst $d5b33d7c30034067$var$_wordChar = \"[^\" + $d5b33d7c30034067$var$_RESERVED_CHARS_RE + \"]\";\nconst $d5b33d7c30034067$var$_wordCharOrDot = \"[^\" + $d5b33d7c30034067$var$_RESERVED_CHARS_RE.replace(\"\\\\.\", \"\") + \"]\";\n// Parent directories, delimited by '/' or ':'. Currently unused, but must\n// be matched to parse the rest of the track name.\nconst $d5b33d7c30034067$var$_directoryRe = /*@__PURE__*/ /((?:WC+[\\/:])*)/.source.replace(\"WC\", $d5b33d7c30034067$var$_wordChar);\n// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\nconst $d5b33d7c30034067$var$_nodeRe = /*@__PURE__*/ /(WCOD+)?/.source.replace(\"WCOD\", $d5b33d7c30034067$var$_wordCharOrDot);\n// Object on target node, and accessor. May not contain reserved\n// characters. Accessor may contain any character except closing bracket.\nconst $d5b33d7c30034067$var$_objectRe = /*@__PURE__*/ /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace(\"WC\", $d5b33d7c30034067$var$_wordChar);\n// Property and accessor. May not contain reserved characters. Accessor may\n// contain any non-bracket characters.\nconst $d5b33d7c30034067$var$_propertyRe = /*@__PURE__*/ /\\.(WC+)(?:\\[(.+)\\])?/.source.replace(\"WC\", $d5b33d7c30034067$var$_wordChar);\nconst $d5b33d7c30034067$var$_trackRe = new RegExp(\"^\" + $d5b33d7c30034067$var$_directoryRe + $d5b33d7c30034067$var$_nodeRe + $d5b33d7c30034067$var$_objectRe + $d5b33d7c30034067$var$_propertyRe + \"$\");\nconst $d5b33d7c30034067$var$_supportedObjectNames = [\n \"material\",\n \"materials\",\n \"bones\",\n \"map\"\n];\nclass $d5b33d7c30034067$var$Composite {\n constructor(targetGroup, path, optionalParsedPath){\n const parsedPath = optionalParsedPath || $d5b33d7c30034067$export$7bf70fcf9f891893.parseTrackName(path);\n this._targetGroup = targetGroup;\n this._bindings = targetGroup.subscribe_(path, parsedPath);\n }\n getValue(array, offset) {\n this.bind(); // bind all binding\n const firstValidIndex = this._targetGroup.nCachedObjects_, binding = this._bindings[firstValidIndex];\n // and only call .getValue on the first\n if (binding !== undefined) binding.getValue(array, offset);\n }\n setValue(array, offset) {\n const bindings = this._bindings;\n for(let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i)bindings[i].setValue(array, offset);\n }\n bind() {\n const bindings = this._bindings;\n for(let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i)bindings[i].bind();\n }\n unbind() {\n const bindings = this._bindings;\n for(let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i)bindings[i].unbind();\n }\n}\n// Note: This class uses a State pattern on a per-method basis:\n// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n// prototype version of these methods with one that represents\n// the bound state. When the property is not found, the methods\n// become no-ops.\nclass $d5b33d7c30034067$export$7bf70fcf9f891893 {\n constructor(rootNode, path, parsedPath){\n this.path = path;\n this.parsedPath = parsedPath || $d5b33d7c30034067$export$7bf70fcf9f891893.parseTrackName(path);\n this.node = $d5b33d7c30034067$export$7bf70fcf9f891893.findNode(rootNode, this.parsedPath.nodeName);\n this.rootNode = rootNode;\n // initial state of these methods that calls 'bind'\n this.getValue = this._getValue_unbound;\n this.setValue = this._setValue_unbound;\n }\n static create(root, path, parsedPath) {\n if (!(root && root.isAnimationObjectGroup)) return new $d5b33d7c30034067$export$7bf70fcf9f891893(root, path, parsedPath);\n else return new $d5b33d7c30034067$export$7bf70fcf9f891893.Composite(root, path, parsedPath);\n }\n /**\n\t * Replaces spaces with underscores and removes unsupported characters from\n\t * node names, to ensure compatibility with parseTrackName().\n\t *\n\t * @param {string} name Node name to be sanitized.\n\t * @return {string}\n\t */ static sanitizeNodeName(name) {\n return name.replace(/\\s/g, \"_\").replace($d5b33d7c30034067$var$_reservedRe, \"\");\n }\n static parseTrackName(trackName) {\n const matches = $d5b33d7c30034067$var$_trackRe.exec(trackName);\n if (matches === null) throw new Error(\"PropertyBinding: Cannot parse trackName: \" + trackName);\n const results = {\n // directoryName: matches[ 1 ], // (tschw) currently unused\n nodeName: matches[2],\n objectName: matches[3],\n objectIndex: matches[4],\n propertyName: matches[5],\n propertyIndex: matches[6]\n };\n const lastDot = results.nodeName && results.nodeName.lastIndexOf(\".\");\n if (lastDot !== undefined && lastDot !== -1) {\n const objectName = results.nodeName.substring(lastDot + 1);\n // Object names must be checked against an allowlist. Otherwise, there\n // is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n // 'bar' could be the objectName, or part of a nodeName (which can\n // include '.' characters).\n if ($d5b33d7c30034067$var$_supportedObjectNames.indexOf(objectName) !== -1) {\n results.nodeName = results.nodeName.substring(0, lastDot);\n results.objectName = objectName;\n }\n }\n if (results.propertyName === null || results.propertyName.length === 0) throw new Error(\"PropertyBinding: can not parse propertyName from trackName: \" + trackName);\n return results;\n }\n static findNode(root, nodeName) {\n if (nodeName === undefined || nodeName === \"\" || nodeName === \".\" || nodeName === -1 || nodeName === root.name || nodeName === root.uuid) return root;\n // search into skeleton bones.\n if (root.skeleton) {\n const bone = root.skeleton.getBoneByName(nodeName);\n if (bone !== undefined) return bone;\n }\n // search into node subtree.\n if (root.children) {\n const searchNodeSubtree = function(children) {\n for(let i = 0; i < children.length; i++){\n const childNode = children[i];\n if (childNode.name === nodeName || childNode.uuid === nodeName) return childNode;\n const result = searchNodeSubtree(childNode.children);\n if (result) return result;\n }\n return null;\n };\n const subTreeNode = searchNodeSubtree(root.children);\n if (subTreeNode) return subTreeNode;\n }\n return null;\n }\n // these are used to \"bind\" a nonexistent property\n _getValue_unavailable() {}\n _setValue_unavailable() {}\n // Getters\n _getValue_direct(buffer, offset) {\n buffer[offset] = this.targetObject[this.propertyName];\n }\n _getValue_array(buffer, offset) {\n const source = this.resolvedProperty;\n for(let i = 0, n = source.length; i !== n; ++i)buffer[offset++] = source[i];\n }\n _getValue_arrayElement(buffer, offset) {\n buffer[offset] = this.resolvedProperty[this.propertyIndex];\n }\n _getValue_toArray(buffer, offset) {\n this.resolvedProperty.toArray(buffer, offset);\n }\n // Direct\n _setValue_direct(buffer, offset) {\n this.targetObject[this.propertyName] = buffer[offset];\n }\n _setValue_direct_setNeedsUpdate(buffer, offset) {\n this.targetObject[this.propertyName] = buffer[offset];\n this.targetObject.needsUpdate = true;\n }\n _setValue_direct_setMatrixWorldNeedsUpdate(buffer, offset) {\n this.targetObject[this.propertyName] = buffer[offset];\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n // EntireArray\n _setValue_array(buffer, offset) {\n const dest = this.resolvedProperty;\n for(let i = 0, n = dest.length; i !== n; ++i)dest[i] = buffer[offset++];\n }\n _setValue_array_setNeedsUpdate(buffer, offset) {\n const dest = this.resolvedProperty;\n for(let i = 0, n = dest.length; i !== n; ++i)dest[i] = buffer[offset++];\n this.targetObject.needsUpdate = true;\n }\n _setValue_array_setMatrixWorldNeedsUpdate(buffer, offset) {\n const dest = this.resolvedProperty;\n for(let i = 0, n = dest.length; i !== n; ++i)dest[i] = buffer[offset++];\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n // ArrayElement\n _setValue_arrayElement(buffer, offset) {\n this.resolvedProperty[this.propertyIndex] = buffer[offset];\n }\n _setValue_arrayElement_setNeedsUpdate(buffer, offset) {\n this.resolvedProperty[this.propertyIndex] = buffer[offset];\n this.targetObject.needsUpdate = true;\n }\n _setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer, offset) {\n this.resolvedProperty[this.propertyIndex] = buffer[offset];\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n // HasToFromArray\n _setValue_fromArray(buffer, offset) {\n this.resolvedProperty.fromArray(buffer, offset);\n }\n _setValue_fromArray_setNeedsUpdate(buffer, offset) {\n this.resolvedProperty.fromArray(buffer, offset);\n this.targetObject.needsUpdate = true;\n }\n _setValue_fromArray_setMatrixWorldNeedsUpdate(buffer, offset) {\n this.resolvedProperty.fromArray(buffer, offset);\n this.targetObject.matrixWorldNeedsUpdate = true;\n }\n _getValue_unbound(targetArray, offset) {\n this.bind();\n this.getValue(targetArray, offset);\n }\n _setValue_unbound(sourceArray, offset) {\n this.bind();\n this.setValue(sourceArray, offset);\n }\n // create getter / setter pair for a property in the scene graph\n bind() {\n let targetObject = this.node;\n const parsedPath = this.parsedPath;\n const objectName = parsedPath.objectName;\n const propertyName = parsedPath.propertyName;\n let propertyIndex = parsedPath.propertyIndex;\n if (!targetObject) {\n targetObject = $d5b33d7c30034067$export$7bf70fcf9f891893.findNode(this.rootNode, parsedPath.nodeName);\n this.node = targetObject;\n }\n // set fail state so we can just 'return' on error\n this.getValue = this._getValue_unavailable;\n this.setValue = this._setValue_unavailable;\n // ensure there is a value node\n if (!targetObject) {\n console.warn(\"THREE.PropertyBinding: No target node found for track: \" + this.path + \".\");\n return;\n }\n if (objectName) {\n let objectIndex = parsedPath.objectIndex;\n // special cases were we need to reach deeper into the hierarchy to get the face materials....\n switch(objectName){\n case \"materials\":\n if (!targetObject.material) {\n console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\", this);\n return;\n }\n if (!targetObject.material.materials) {\n console.error(\"THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.\", this);\n return;\n }\n targetObject = targetObject.material.materials;\n break;\n case \"bones\":\n if (!targetObject.skeleton) {\n console.error(\"THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.\", this);\n return;\n }\n // potential future optimization: skip this if propertyIndex is already an integer\n // and convert the integer string to a true integer.\n targetObject = targetObject.skeleton.bones;\n // support resolving morphTarget names into indices.\n for(let i = 0; i < targetObject.length; i++)if (targetObject[i].name === objectIndex) {\n objectIndex = i;\n break;\n }\n break;\n case \"map\":\n if (\"map\" in targetObject) {\n targetObject = targetObject.map;\n break;\n }\n if (!targetObject.material) {\n console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\", this);\n return;\n }\n if (!targetObject.material.map) {\n console.error(\"THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.\", this);\n return;\n }\n targetObject = targetObject.material.map;\n break;\n default:\n if (targetObject[objectName] === undefined) {\n console.error(\"THREE.PropertyBinding: Can not bind to objectName of node undefined.\", this);\n return;\n }\n targetObject = targetObject[objectName];\n }\n if (objectIndex !== undefined) {\n if (targetObject[objectIndex] === undefined) {\n console.error(\"THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.\", this, targetObject);\n return;\n }\n targetObject = targetObject[objectIndex];\n }\n }\n // resolve property\n const nodeProperty = targetObject[propertyName];\n if (nodeProperty === undefined) {\n const nodeName = parsedPath.nodeName;\n console.error(\"THREE.PropertyBinding: Trying to update property for track: \" + nodeName + \".\" + propertyName + \" but it wasn't found.\", targetObject);\n return;\n }\n // determine versioning scheme\n let versioning = this.Versioning.None;\n this.targetObject = targetObject;\n if (targetObject.needsUpdate !== undefined) versioning = this.Versioning.NeedsUpdate;\n else if (targetObject.matrixWorldNeedsUpdate !== undefined) versioning = this.Versioning.MatrixWorldNeedsUpdate;\n // determine how the property gets bound\n let bindingType = this.BindingType.Direct;\n if (propertyIndex !== undefined) {\n // access a sub element of the property array (only primitives are supported right now)\n if (propertyName === \"morphTargetInfluences\") {\n // potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n // support resolving morphTarget names into indices.\n if (!targetObject.geometry) {\n console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.\", this);\n return;\n }\n if (!targetObject.geometry.morphAttributes) {\n console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.\", this);\n return;\n }\n if (targetObject.morphTargetDictionary[propertyIndex] !== undefined) propertyIndex = targetObject.morphTargetDictionary[propertyIndex];\n }\n bindingType = this.BindingType.ArrayElement;\n this.resolvedProperty = nodeProperty;\n this.propertyIndex = propertyIndex;\n } else if (nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined) {\n // must use copy for Object3D.Euler/Quaternion\n bindingType = this.BindingType.HasFromToArray;\n this.resolvedProperty = nodeProperty;\n } else if (Array.isArray(nodeProperty)) {\n bindingType = this.BindingType.EntireArray;\n this.resolvedProperty = nodeProperty;\n } else this.propertyName = propertyName;\n // select getter / setter\n this.getValue = this.GetterByBindingType[bindingType];\n this.setValue = this.SetterByBindingTypeAndVersioning[bindingType][versioning];\n }\n unbind() {\n this.node = null;\n // back to the prototype version of getValue / setValue\n // note: avoiding to mutate the shape of 'this' via 'delete'\n this.getValue = this._getValue_unbound;\n this.setValue = this._setValue_unbound;\n }\n}\n$d5b33d7c30034067$export$7bf70fcf9f891893.Composite = $d5b33d7c30034067$var$Composite;\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.BindingType = {\n Direct: 0,\n EntireArray: 1,\n ArrayElement: 2,\n HasFromToArray: 3\n};\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.Versioning = {\n None: 0,\n NeedsUpdate: 1,\n MatrixWorldNeedsUpdate: 2\n};\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.GetterByBindingType = [\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_direct,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_array,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_arrayElement,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._getValue_toArray\n];\n$d5b33d7c30034067$export$7bf70fcf9f891893.prototype.SetterByBindingTypeAndVersioning = [\n [\n // Direct\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_direct,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_direct_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_direct_setMatrixWorldNeedsUpdate\n ],\n [\n // EntireArray\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_array,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_array_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_array_setMatrixWorldNeedsUpdate\n ],\n [\n // ArrayElement\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_arrayElement,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_arrayElement_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate\n ],\n [\n // HasToFromArray\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_fromArray,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_fromArray_setNeedsUpdate,\n $d5b33d7c30034067$export$7bf70fcf9f891893.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate\n ]\n];\n/**\n *\n * A group of objects that receives a shared animation state.\n *\n * Usage:\n *\n * - Add objects you would otherwise pass as 'root' to the\n * constructor or the .clipAction method of AnimationMixer.\n *\n * - Instead pass this object as 'root'.\n *\n * - You can also add and remove objects later when the mixer\n * is running.\n *\n * Note:\n *\n * Objects of this class appear as one object to the mixer,\n * so cache control of the individual objects must be done\n * on the group.\n *\n * Limitation:\n *\n * - The animated properties must be compatible among the\n * all objects in the group.\n *\n * - A single property can either be controlled through a\n * target group or directly, but not both.\n */ class $d5b33d7c30034067$export$30619c2afd3f34db {\n constructor(){\n this.isAnimationObjectGroup = true;\n this.uuid = $d5b33d7c30034067$var$generateUUID();\n // cached objects followed by the active ones\n this._objects = Array.prototype.slice.call(arguments);\n this.nCachedObjects_ = 0; // threshold\n // note: read by PropertyBinding.Composite\n const indices = {};\n this._indicesByUUID = indices; // for bookkeeping\n for(let i = 0, n = arguments.length; i !== n; ++i)indices[arguments[i].uuid] = i;\n this._paths = []; // inside: string\n this._parsedPaths = []; // inside: { we don't care, here }\n this._bindings = []; // inside: Array< PropertyBinding >\n this._bindingsIndicesByPath = {}; // inside: indices in these arrays\n const scope = this;\n this.stats = {\n objects: {\n get total () {\n return scope._objects.length;\n },\n get inUse () {\n return this.total - scope.nCachedObjects_;\n }\n },\n get bindingsPerObject () {\n return scope._bindings.length;\n }\n };\n }\n add() {\n const objects = this._objects, indicesByUUID = this._indicesByUUID, paths = this._paths, parsedPaths = this._parsedPaths, bindings = this._bindings, nBindings = bindings.length;\n let knownObject = undefined, nObjects = objects.length, nCachedObjects = this.nCachedObjects_;\n for(let i = 0, n = arguments.length; i !== n; ++i){\n const object = arguments[i], uuid = object.uuid;\n let index = indicesByUUID[uuid];\n if (index === undefined) {\n // unknown object -> add it to the ACTIVE region\n index = nObjects++;\n indicesByUUID[uuid] = index;\n objects.push(object);\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j)bindings[j].push(new $d5b33d7c30034067$export$7bf70fcf9f891893(object, paths[j], parsedPaths[j]));\n } else if (index < nCachedObjects) {\n knownObject = objects[index];\n // move existing object to the ACTIVE region\n const firstActiveIndex = --nCachedObjects, lastCachedObject = objects[firstActiveIndex];\n indicesByUUID[lastCachedObject.uuid] = index;\n objects[index] = lastCachedObject;\n indicesByUUID[uuid] = firstActiveIndex;\n objects[firstActiveIndex] = object;\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j], lastCached = bindingsForPath[firstActiveIndex];\n let binding = bindingsForPath[index];\n bindingsForPath[index] = lastCached;\n if (binding === undefined) // since we do not bother to create new bindings\n // for objects that are cached, the binding may\n // or may not exist\n binding = new $d5b33d7c30034067$export$7bf70fcf9f891893(object, paths[j], parsedPaths[j]);\n bindingsForPath[firstActiveIndex] = binding;\n }\n } else if (objects[index] !== knownObject) console.error(\"THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.\");\n // else the object is already where we want it to be\n } // for arguments\n this.nCachedObjects_ = nCachedObjects;\n }\n remove() {\n const objects = this._objects, indicesByUUID = this._indicesByUUID, bindings = this._bindings, nBindings = bindings.length;\n let nCachedObjects = this.nCachedObjects_;\n for(let i = 0, n = arguments.length; i !== n; ++i){\n const object = arguments[i], uuid = object.uuid, index = indicesByUUID[uuid];\n if (index !== undefined && index >= nCachedObjects) {\n // move existing object into the CACHED region\n const lastCachedIndex = nCachedObjects++, firstActiveObject = objects[lastCachedIndex];\n indicesByUUID[firstActiveObject.uuid] = index;\n objects[index] = firstActiveObject;\n indicesByUUID[uuid] = lastCachedIndex;\n objects[lastCachedIndex] = object;\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j], firstActive = bindingsForPath[lastCachedIndex], binding = bindingsForPath[index];\n bindingsForPath[index] = firstActive;\n bindingsForPath[lastCachedIndex] = binding;\n }\n }\n } // for arguments\n this.nCachedObjects_ = nCachedObjects;\n }\n // remove & forget\n uncache() {\n const objects = this._objects, indicesByUUID = this._indicesByUUID, bindings = this._bindings, nBindings = bindings.length;\n let nCachedObjects = this.nCachedObjects_, nObjects = objects.length;\n for(let i = 0, n = arguments.length; i !== n; ++i){\n const object = arguments[i], uuid = object.uuid, index = indicesByUUID[uuid];\n if (index !== undefined) {\n delete indicesByUUID[uuid];\n if (index < nCachedObjects) {\n // object is cached, shrink the CACHED region\n const firstActiveIndex = --nCachedObjects, lastCachedObject = objects[firstActiveIndex], lastIndex = --nObjects, lastObject = objects[lastIndex];\n // last cached object takes this object's place\n indicesByUUID[lastCachedObject.uuid] = index;\n objects[index] = lastCachedObject;\n // last object goes to the activated slot and pop\n indicesByUUID[lastObject.uuid] = firstActiveIndex;\n objects[firstActiveIndex] = lastObject;\n objects.pop();\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j], lastCached = bindingsForPath[firstActiveIndex], last = bindingsForPath[lastIndex];\n bindingsForPath[index] = lastCached;\n bindingsForPath[firstActiveIndex] = last;\n bindingsForPath.pop();\n }\n } else {\n // object is active, just swap with the last and pop\n const lastIndex = --nObjects, lastObject = objects[lastIndex];\n if (lastIndex > 0) indicesByUUID[lastObject.uuid] = index;\n objects[index] = lastObject;\n objects.pop();\n // accounting is done, now do the same for all bindings\n for(let j = 0, m = nBindings; j !== m; ++j){\n const bindingsForPath = bindings[j];\n bindingsForPath[index] = bindingsForPath[lastIndex];\n bindingsForPath.pop();\n }\n } // cached or active\n } // if object is known\n } // for arguments\n this.nCachedObjects_ = nCachedObjects;\n }\n // Internal interface used by befriended PropertyBinding.Composite:\n subscribe_(path, parsedPath) {\n // returns an array of bindings for the given path that is changed\n // according to the contained objects in the group\n const indicesByPath = this._bindingsIndicesByPath;\n let index = indicesByPath[path];\n const bindings = this._bindings;\n if (index !== undefined) return bindings[index];\n const paths = this._paths, parsedPaths = this._parsedPaths, objects = this._objects, nObjects = objects.length, nCachedObjects = this.nCachedObjects_, bindingsForPath = new Array(nObjects);\n index = bindings.length;\n indicesByPath[path] = index;\n paths.push(path);\n parsedPaths.push(parsedPath);\n bindings.push(bindingsForPath);\n for(let i = nCachedObjects, n = objects.length; i !== n; ++i){\n const object = objects[i];\n bindingsForPath[i] = new $d5b33d7c30034067$export$7bf70fcf9f891893(object, path, parsedPath);\n }\n return bindingsForPath;\n }\n unsubscribe_(path) {\n // tells the group to forget about a property path and no longer\n // update the array previously obtained with 'subscribe_'\n const indicesByPath = this._bindingsIndicesByPath, index = indicesByPath[path];\n if (index !== undefined) {\n const paths = this._paths, parsedPaths = this._parsedPaths, bindings = this._bindings, lastBindingsIndex = bindings.length - 1, lastBindings = bindings[lastBindingsIndex], lastBindingsPath = path[lastBindingsIndex];\n indicesByPath[lastBindingsPath] = index;\n bindings[index] = lastBindings;\n bindings.pop();\n parsedPaths[index] = parsedPaths[lastBindingsIndex];\n parsedPaths.pop();\n paths[index] = paths[lastBindingsIndex];\n paths.pop();\n }\n }\n}\nclass $d5b33d7c30034067$export$6946940a69e799e {\n constructor(mixer, clip, localRoot = null, blendMode = clip.blendMode){\n this._mixer = mixer;\n this._clip = clip;\n this._localRoot = localRoot;\n this.blendMode = blendMode;\n const tracks = clip.tracks, nTracks = tracks.length, interpolants = new Array(nTracks);\n const interpolantSettings = {\n endingStart: $d5b33d7c30034067$export$7f795934b84ab523,\n endingEnd: $d5b33d7c30034067$export$7f795934b84ab523\n };\n for(let i = 0; i !== nTracks; ++i){\n const interpolant = tracks[i].createInterpolant(null);\n interpolants[i] = interpolant;\n interpolant.settings = interpolantSettings;\n }\n this._interpolantSettings = interpolantSettings;\n this._interpolants = interpolants; // bound by the mixer\n // inside: PropertyMixer (managed by the mixer)\n this._propertyBindings = new Array(nTracks);\n this._cacheIndex = null; // for the memory manager\n this._byClipCacheIndex = null; // for the memory manager\n this._timeScaleInterpolant = null;\n this._weightInterpolant = null;\n this.loop = $d5b33d7c30034067$export$dfaf4422ce096e29;\n this._loopCount = -1;\n // global mixer time when the action is to be started\n // it's set back to 'null' upon start of the action\n this._startTime = null;\n // scaled local time of the action\n // gets clamped or wrapped to 0..clip.duration according to loop\n this.time = 0;\n this.timeScale = 1;\n this._effectiveTimeScale = 1;\n this.weight = 1;\n this._effectiveWeight = 1;\n this.repetitions = Infinity; // no. of repetitions when looping\n this.paused = false; // true -> zero effective time scale\n this.enabled = true; // false -> zero effective weight\n this.clampWhenFinished = false; // keep feeding the last frame?\n this.zeroSlopeAtStart = true; // for smooth interpolation w/o separate\n this.zeroSlopeAtEnd = true; // clips for start, loop and end\n }\n // State & Scheduling\n play() {\n this._mixer._activateAction(this);\n return this;\n }\n stop() {\n this._mixer._deactivateAction(this);\n return this.reset();\n }\n reset() {\n this.paused = false;\n this.enabled = true;\n this.time = 0; // restart clip\n this._loopCount = -1; // forget previous loops\n this._startTime = null; // forget scheduling\n return this.stopFading().stopWarping();\n }\n isRunning() {\n return this.enabled && !this.paused && this.timeScale !== 0 && this._startTime === null && this._mixer._isActiveAction(this);\n }\n // return true when play has been called\n isScheduled() {\n return this._mixer._isActiveAction(this);\n }\n startAt(time) {\n this._startTime = time;\n return this;\n }\n setLoop(mode, repetitions) {\n this.loop = mode;\n this.repetitions = repetitions;\n return this;\n }\n // Weight\n // set the weight stopping any scheduled fading\n // although .enabled = false yields an effective weight of zero, this\n // method does *not* change .enabled, because it would be confusing\n setEffectiveWeight(weight) {\n this.weight = weight;\n // note: same logic as when updated at runtime\n this._effectiveWeight = this.enabled ? weight : 0;\n return this.stopFading();\n }\n // return the weight considering fading and .enabled\n getEffectiveWeight() {\n return this._effectiveWeight;\n }\n fadeIn(duration) {\n return this._scheduleFading(duration, 0, 1);\n }\n fadeOut(duration) {\n return this._scheduleFading(duration, 1, 0);\n }\n crossFadeFrom(fadeOutAction, duration, warp) {\n fadeOutAction.fadeOut(duration);\n this.fadeIn(duration);\n if (warp) {\n const fadeInDuration = this._clip.duration, fadeOutDuration = fadeOutAction._clip.duration, startEndRatio = fadeOutDuration / fadeInDuration, endStartRatio = fadeInDuration / fadeOutDuration;\n fadeOutAction.warp(1.0, startEndRatio, duration);\n this.warp(endStartRatio, 1.0, duration);\n }\n return this;\n }\n crossFadeTo(fadeInAction, duration, warp) {\n return fadeInAction.crossFadeFrom(this, duration, warp);\n }\n stopFading() {\n const weightInterpolant = this._weightInterpolant;\n if (weightInterpolant !== null) {\n this._weightInterpolant = null;\n this._mixer._takeBackControlInterpolant(weightInterpolant);\n }\n return this;\n }\n // Time Scale Control\n // set the time scale stopping any scheduled warping\n // although .paused = true yields an effective time scale of zero, this\n // method does *not* change .paused, because it would be confusing\n setEffectiveTimeScale(timeScale) {\n this.timeScale = timeScale;\n this._effectiveTimeScale = this.paused ? 0 : timeScale;\n return this.stopWarping();\n }\n // return the time scale considering warping and .paused\n getEffectiveTimeScale() {\n return this._effectiveTimeScale;\n }\n setDuration(duration) {\n this.timeScale = this._clip.duration / duration;\n return this.stopWarping();\n }\n syncWith(action) {\n this.time = action.time;\n this.timeScale = action.timeScale;\n return this.stopWarping();\n }\n halt(duration) {\n return this.warp(this._effectiveTimeScale, 0, duration);\n }\n warp(startTimeScale, endTimeScale, duration) {\n const mixer = this._mixer, now = mixer.time, timeScale = this.timeScale;\n let interpolant = this._timeScaleInterpolant;\n if (interpolant === null) {\n interpolant = mixer._lendControlInterpolant();\n this._timeScaleInterpolant = interpolant;\n }\n const times = interpolant.parameterPositions, values = interpolant.sampleValues;\n times[0] = now;\n times[1] = now + duration;\n values[0] = startTimeScale / timeScale;\n values[1] = endTimeScale / timeScale;\n return this;\n }\n stopWarping() {\n const timeScaleInterpolant = this._timeScaleInterpolant;\n if (timeScaleInterpolant !== null) {\n this._timeScaleInterpolant = null;\n this._mixer._takeBackControlInterpolant(timeScaleInterpolant);\n }\n return this;\n }\n // Object Accessors\n getMixer() {\n return this._mixer;\n }\n getClip() {\n return this._clip;\n }\n getRoot() {\n return this._localRoot || this._mixer._root;\n }\n // Interna\n _update(time, deltaTime, timeDirection, accuIndex) {\n // called by the mixer\n if (!this.enabled) {\n // call ._updateWeight() to update ._effectiveWeight\n this._updateWeight(time);\n return;\n }\n const startTime = this._startTime;\n if (startTime !== null) {\n // check for scheduled start of action\n const timeRunning = (time - startTime) * timeDirection;\n if (timeRunning < 0 || timeDirection === 0) deltaTime = 0;\n else {\n this._startTime = null; // unschedule\n deltaTime = timeDirection * timeRunning;\n }\n }\n // apply time scale and advance time\n deltaTime *= this._updateTimeScale(time);\n const clipTime = this._updateTime(deltaTime);\n // note: _updateTime may disable the action resulting in\n // an effective weight of 0\n const weight = this._updateWeight(time);\n if (weight > 0) {\n const interpolants = this._interpolants;\n const propertyMixers = this._propertyBindings;\n switch(this.blendMode){\n case $d5b33d7c30034067$export$d875e029ef558d3:\n for(let j = 0, m = interpolants.length; j !== m; ++j){\n interpolants[j].evaluate(clipTime);\n propertyMixers[j].accumulateAdditive(weight);\n }\n break;\n case $d5b33d7c30034067$export$bcfbbdcf8de7f8cd:\n default:\n for(let j = 0, m = interpolants.length; j !== m; ++j){\n interpolants[j].evaluate(clipTime);\n propertyMixers[j].accumulate(accuIndex, weight);\n }\n }\n }\n }\n _updateWeight(time) {\n let weight = 0;\n if (this.enabled) {\n weight = this.weight;\n const interpolant = this._weightInterpolant;\n if (interpolant !== null) {\n const interpolantValue = interpolant.evaluate(time)[0];\n weight *= interpolantValue;\n if (time > interpolant.parameterPositions[1]) {\n this.stopFading();\n if (interpolantValue === 0) // faded out, disable\n this.enabled = false;\n }\n }\n }\n this._effectiveWeight = weight;\n return weight;\n }\n _updateTimeScale(time) {\n let timeScale = 0;\n if (!this.paused) {\n timeScale = this.timeScale;\n const interpolant = this._timeScaleInterpolant;\n if (interpolant !== null) {\n const interpolantValue = interpolant.evaluate(time)[0];\n timeScale *= interpolantValue;\n if (time > interpolant.parameterPositions[1]) {\n this.stopWarping();\n if (timeScale === 0) // motion has halted, pause\n this.paused = true;\n else // warp done - apply final time scale\n this.timeScale = timeScale;\n }\n }\n }\n this._effectiveTimeScale = timeScale;\n return timeScale;\n }\n _updateTime(deltaTime) {\n const duration = this._clip.duration;\n const loop = this.loop;\n let time = this.time + deltaTime;\n let loopCount = this._loopCount;\n const pingPong = loop === $d5b33d7c30034067$export$f8f6f2041b78e210;\n if (deltaTime === 0) {\n if (loopCount === -1) return time;\n return pingPong && (loopCount & 1) === 1 ? duration - time : time;\n }\n if (loop === $d5b33d7c30034067$export$d62fdc9d1b1cccad) {\n if (loopCount === -1) {\n // just started\n this._loopCount = 0;\n this._setEndings(true, true, false);\n }\n handle_stop: {\n if (time >= duration) time = duration;\n else if (time < 0) time = 0;\n else {\n this.time = time;\n break handle_stop;\n }\n if (this.clampWhenFinished) this.paused = true;\n else this.enabled = false;\n this.time = time;\n this._mixer.dispatchEvent({\n type: \"finished\",\n action: this,\n direction: deltaTime < 0 ? -1 : 1\n });\n }\n } else {\n if (loopCount === -1) {\n // just started\n if (deltaTime >= 0) {\n loopCount = 0;\n this._setEndings(true, this.repetitions === 0, pingPong);\n } else // when looping in reverse direction, the initial\n // transition through zero counts as a repetition,\n // so leave loopCount at -1\n this._setEndings(this.repetitions === 0, true, pingPong);\n }\n if (time >= duration || time < 0) {\n // wrap around\n const loopDelta = Math.floor(time / duration); // signed\n time -= duration * loopDelta;\n loopCount += Math.abs(loopDelta);\n const pending = this.repetitions - loopCount;\n if (pending <= 0) {\n // have to stop (switch state, clamp time, fire event)\n if (this.clampWhenFinished) this.paused = true;\n else this.enabled = false;\n time = deltaTime > 0 ? duration : 0;\n this.time = time;\n this._mixer.dispatchEvent({\n type: \"finished\",\n action: this,\n direction: deltaTime > 0 ? 1 : -1\n });\n } else {\n // keep running\n if (pending === 1) {\n // entering the last round\n const atStart = deltaTime < 0;\n this._setEndings(atStart, !atStart, pingPong);\n } else this._setEndings(false, false, pingPong);\n this._loopCount = loopCount;\n this.time = time;\n this._mixer.dispatchEvent({\n type: \"loop\",\n action: this,\n loopDelta: loopDelta\n });\n }\n } else this.time = time;\n if (pingPong && (loopCount & 1) === 1) // invert time for the \"pong round\"\n return duration - time;\n }\n return time;\n }\n _setEndings(atStart, atEnd, pingPong) {\n const settings = this._interpolantSettings;\n if (pingPong) {\n settings.endingStart = $d5b33d7c30034067$export$24a4ccb5099273b5;\n settings.endingEnd = $d5b33d7c30034067$export$24a4ccb5099273b5;\n } else {\n // assuming for LoopOnce atStart == atEnd == true\n if (atStart) settings.endingStart = this.zeroSlopeAtStart ? $d5b33d7c30034067$export$24a4ccb5099273b5 : $d5b33d7c30034067$export$7f795934b84ab523;\n else settings.endingStart = $d5b33d7c30034067$export$8e8c3ecdcd8e1fee;\n if (atEnd) settings.endingEnd = this.zeroSlopeAtEnd ? $d5b33d7c30034067$export$24a4ccb5099273b5 : $d5b33d7c30034067$export$7f795934b84ab523;\n else settings.endingEnd = $d5b33d7c30034067$export$8e8c3ecdcd8e1fee;\n }\n }\n _scheduleFading(duration, weightNow, weightThen) {\n const mixer = this._mixer, now = mixer.time;\n let interpolant = this._weightInterpolant;\n if (interpolant === null) {\n interpolant = mixer._lendControlInterpolant();\n this._weightInterpolant = interpolant;\n }\n const times = interpolant.parameterPositions, values = interpolant.sampleValues;\n times[0] = now;\n values[0] = weightNow;\n times[1] = now + duration;\n values[1] = weightThen;\n return this;\n }\n}\nconst $d5b33d7c30034067$var$_controlInterpolantsResultBuffer = new Float32Array(1);\nclass $d5b33d7c30034067$export$fbd77e5aefaa0102 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(root){\n super();\n this._root = root;\n this._initMemoryManager();\n this._accuIndex = 0;\n this.time = 0;\n this.timeScale = 1.0;\n }\n _bindAction(action, prototypeAction) {\n const root = action._localRoot || this._root, tracks = action._clip.tracks, nTracks = tracks.length, bindings = action._propertyBindings, interpolants = action._interpolants, rootUuid = root.uuid, bindingsByRoot = this._bindingsByRootAndName;\n let bindingsByName = bindingsByRoot[rootUuid];\n if (bindingsByName === undefined) {\n bindingsByName = {};\n bindingsByRoot[rootUuid] = bindingsByName;\n }\n for(let i = 0; i !== nTracks; ++i){\n const track = tracks[i], trackName = track.name;\n let binding = bindingsByName[trackName];\n if (binding !== undefined) {\n ++binding.referenceCount;\n bindings[i] = binding;\n } else {\n binding = bindings[i];\n if (binding !== undefined) {\n // existing binding, make sure the cache knows\n if (binding._cacheIndex === null) {\n ++binding.referenceCount;\n this._addInactiveBinding(binding, rootUuid, trackName);\n }\n continue;\n }\n const path = prototypeAction && prototypeAction._propertyBindings[i].binding.parsedPath;\n binding = new $d5b33d7c30034067$export$dfe0af1ca1acb78a($d5b33d7c30034067$export$7bf70fcf9f891893.create(root, trackName, path), track.ValueTypeName, track.getValueSize());\n ++binding.referenceCount;\n this._addInactiveBinding(binding, rootUuid, trackName);\n bindings[i] = binding;\n }\n interpolants[i].resultBuffer = binding.buffer;\n }\n }\n _activateAction(action) {\n if (!this._isActiveAction(action)) {\n if (action._cacheIndex === null) {\n // this action has been forgotten by the cache, but the user\n // appears to be still using it -> rebind\n const rootUuid = (action._localRoot || this._root).uuid, clipUuid = action._clip.uuid, actionsForClip = this._actionsByClip[clipUuid];\n this._bindAction(action, actionsForClip && actionsForClip.knownActions[0]);\n this._addInactiveAction(action, clipUuid, rootUuid);\n }\n const bindings = action._propertyBindings;\n // increment reference counts / sort out state\n for(let i = 0, n = bindings.length; i !== n; ++i){\n const binding = bindings[i];\n if (binding.useCount++ === 0) {\n this._lendBinding(binding);\n binding.saveOriginalState();\n }\n }\n this._lendAction(action);\n }\n }\n _deactivateAction(action) {\n if (this._isActiveAction(action)) {\n const bindings = action._propertyBindings;\n // decrement reference counts / sort out state\n for(let i = 0, n = bindings.length; i !== n; ++i){\n const binding = bindings[i];\n if (--binding.useCount === 0) {\n binding.restoreOriginalState();\n this._takeBackBinding(binding);\n }\n }\n this._takeBackAction(action);\n }\n }\n // Memory manager\n _initMemoryManager() {\n this._actions = []; // 'nActiveActions' followed by inactive ones\n this._nActiveActions = 0;\n this._actionsByClip = {};\n // inside:\n // {\n // \tknownActions: Array< AnimationAction > - used as prototypes\n // \tactionByRoot: AnimationAction - lookup\n // }\n this._bindings = []; // 'nActiveBindings' followed by inactive ones\n this._nActiveBindings = 0;\n this._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n this._controlInterpolants = []; // same game as above\n this._nActiveControlInterpolants = 0;\n const scope = this;\n this.stats = {\n actions: {\n get total () {\n return scope._actions.length;\n },\n get inUse () {\n return scope._nActiveActions;\n }\n },\n bindings: {\n get total () {\n return scope._bindings.length;\n },\n get inUse () {\n return scope._nActiveBindings;\n }\n },\n controlInterpolants: {\n get total () {\n return scope._controlInterpolants.length;\n },\n get inUse () {\n return scope._nActiveControlInterpolants;\n }\n }\n };\n }\n // Memory management for AnimationAction objects\n _isActiveAction(action) {\n const index = action._cacheIndex;\n return index !== null && index < this._nActiveActions;\n }\n _addInactiveAction(action, clipUuid, rootUuid) {\n const actions = this._actions, actionsByClip = this._actionsByClip;\n let actionsForClip = actionsByClip[clipUuid];\n if (actionsForClip === undefined) {\n actionsForClip = {\n knownActions: [\n action\n ],\n actionByRoot: {}\n };\n action._byClipCacheIndex = 0;\n actionsByClip[clipUuid] = actionsForClip;\n } else {\n const knownActions = actionsForClip.knownActions;\n action._byClipCacheIndex = knownActions.length;\n knownActions.push(action);\n }\n action._cacheIndex = actions.length;\n actions.push(action);\n actionsForClip.actionByRoot[rootUuid] = action;\n }\n _removeInactiveAction(action) {\n const actions = this._actions, lastInactiveAction = actions[actions.length - 1], cacheIndex = action._cacheIndex;\n lastInactiveAction._cacheIndex = cacheIndex;\n actions[cacheIndex] = lastInactiveAction;\n actions.pop();\n action._cacheIndex = null;\n const clipUuid = action._clip.uuid, actionsByClip = this._actionsByClip, actionsForClip = actionsByClip[clipUuid], knownActionsForClip = actionsForClip.knownActions, lastKnownAction = knownActionsForClip[knownActionsForClip.length - 1], byClipCacheIndex = action._byClipCacheIndex;\n lastKnownAction._byClipCacheIndex = byClipCacheIndex;\n knownActionsForClip[byClipCacheIndex] = lastKnownAction;\n knownActionsForClip.pop();\n action._byClipCacheIndex = null;\n const actionByRoot = actionsForClip.actionByRoot, rootUuid = (action._localRoot || this._root).uuid;\n delete actionByRoot[rootUuid];\n if (knownActionsForClip.length === 0) delete actionsByClip[clipUuid];\n this._removeInactiveBindingsForAction(action);\n }\n _removeInactiveBindingsForAction(action) {\n const bindings = action._propertyBindings;\n for(let i = 0, n = bindings.length; i !== n; ++i){\n const binding = bindings[i];\n if (--binding.referenceCount === 0) this._removeInactiveBinding(binding);\n }\n }\n _lendAction(action) {\n // [ active actions | inactive actions ]\n // [ active actions >| inactive actions ]\n // s a\n // <-swap->\n // a s\n const actions = this._actions, prevIndex = action._cacheIndex, lastActiveIndex = this._nActiveActions++, firstInactiveAction = actions[lastActiveIndex];\n action._cacheIndex = lastActiveIndex;\n actions[lastActiveIndex] = action;\n firstInactiveAction._cacheIndex = prevIndex;\n actions[prevIndex] = firstInactiveAction;\n }\n _takeBackAction(action) {\n // [ active actions | inactive actions ]\n // [ active actions |< inactive actions ]\n // a s\n // <-swap->\n // s a\n const actions = this._actions, prevIndex = action._cacheIndex, firstInactiveIndex = --this._nActiveActions, lastActiveAction = actions[firstInactiveIndex];\n action._cacheIndex = firstInactiveIndex;\n actions[firstInactiveIndex] = action;\n lastActiveAction._cacheIndex = prevIndex;\n actions[prevIndex] = lastActiveAction;\n }\n // Memory management for PropertyMixer objects\n _addInactiveBinding(binding, rootUuid, trackName) {\n const bindingsByRoot = this._bindingsByRootAndName, bindings = this._bindings;\n let bindingByName = bindingsByRoot[rootUuid];\n if (bindingByName === undefined) {\n bindingByName = {};\n bindingsByRoot[rootUuid] = bindingByName;\n }\n bindingByName[trackName] = binding;\n binding._cacheIndex = bindings.length;\n bindings.push(binding);\n }\n _removeInactiveBinding(binding) {\n const bindings = this._bindings, propBinding = binding.binding, rootUuid = propBinding.rootNode.uuid, trackName = propBinding.path, bindingsByRoot = this._bindingsByRootAndName, bindingByName = bindingsByRoot[rootUuid], lastInactiveBinding = bindings[bindings.length - 1], cacheIndex = binding._cacheIndex;\n lastInactiveBinding._cacheIndex = cacheIndex;\n bindings[cacheIndex] = lastInactiveBinding;\n bindings.pop();\n delete bindingByName[trackName];\n if (Object.keys(bindingByName).length === 0) delete bindingsByRoot[rootUuid];\n }\n _lendBinding(binding) {\n const bindings = this._bindings, prevIndex = binding._cacheIndex, lastActiveIndex = this._nActiveBindings++, firstInactiveBinding = bindings[lastActiveIndex];\n binding._cacheIndex = lastActiveIndex;\n bindings[lastActiveIndex] = binding;\n firstInactiveBinding._cacheIndex = prevIndex;\n bindings[prevIndex] = firstInactiveBinding;\n }\n _takeBackBinding(binding) {\n const bindings = this._bindings, prevIndex = binding._cacheIndex, firstInactiveIndex = --this._nActiveBindings, lastActiveBinding = bindings[firstInactiveIndex];\n binding._cacheIndex = firstInactiveIndex;\n bindings[firstInactiveIndex] = binding;\n lastActiveBinding._cacheIndex = prevIndex;\n bindings[prevIndex] = lastActiveBinding;\n }\n // Memory management of Interpolants for weight and time scale\n _lendControlInterpolant() {\n const interpolants = this._controlInterpolants, lastActiveIndex = this._nActiveControlInterpolants++;\n let interpolant = interpolants[lastActiveIndex];\n if (interpolant === undefined) {\n interpolant = new $d5b33d7c30034067$export$a8e6009059f51e1a(new Float32Array(2), new Float32Array(2), 1, $d5b33d7c30034067$var$_controlInterpolantsResultBuffer);\n interpolant.__cacheIndex = lastActiveIndex;\n interpolants[lastActiveIndex] = interpolant;\n }\n return interpolant;\n }\n _takeBackControlInterpolant(interpolant) {\n const interpolants = this._controlInterpolants, prevIndex = interpolant.__cacheIndex, firstInactiveIndex = --this._nActiveControlInterpolants, lastActiveInterpolant = interpolants[firstInactiveIndex];\n interpolant.__cacheIndex = firstInactiveIndex;\n interpolants[firstInactiveIndex] = interpolant;\n lastActiveInterpolant.__cacheIndex = prevIndex;\n interpolants[prevIndex] = lastActiveInterpolant;\n }\n // return an action for a clip optionally using a custom root target\n // object (this method allocates a lot of dynamic memory in case a\n // previously unknown clip/root combination is specified)\n clipAction(clip, optionalRoot, blendMode) {\n const root = optionalRoot || this._root, rootUuid = root.uuid;\n let clipObject = typeof clip === \"string\" ? $d5b33d7c30034067$export$d942c706bf23829c.findByName(root, clip) : clip;\n const clipUuid = clipObject !== null ? clipObject.uuid : clip;\n const actionsForClip = this._actionsByClip[clipUuid];\n let prototypeAction = null;\n if (blendMode === undefined) {\n if (clipObject !== null) blendMode = clipObject.blendMode;\n else blendMode = $d5b33d7c30034067$export$bcfbbdcf8de7f8cd;\n }\n if (actionsForClip !== undefined) {\n const existingAction = actionsForClip.actionByRoot[rootUuid];\n if (existingAction !== undefined && existingAction.blendMode === blendMode) return existingAction;\n // we know the clip, so we don't have to parse all\n // the bindings again but can just copy\n prototypeAction = actionsForClip.knownActions[0];\n // also, take the clip from the prototype action\n if (clipObject === null) clipObject = prototypeAction._clip;\n }\n // clip must be known when specified via string\n if (clipObject === null) return null;\n // allocate all resources required to run it\n const newAction = new $d5b33d7c30034067$export$6946940a69e799e(this, clipObject, optionalRoot, blendMode);\n this._bindAction(newAction, prototypeAction);\n // and make the action known to the memory manager\n this._addInactiveAction(newAction, clipUuid, rootUuid);\n return newAction;\n }\n // get an existing action\n existingAction(clip, optionalRoot) {\n const root = optionalRoot || this._root, rootUuid = root.uuid, clipObject = typeof clip === \"string\" ? $d5b33d7c30034067$export$d942c706bf23829c.findByName(root, clip) : clip, clipUuid = clipObject ? clipObject.uuid : clip, actionsForClip = this._actionsByClip[clipUuid];\n if (actionsForClip !== undefined) return actionsForClip.actionByRoot[rootUuid] || null;\n return null;\n }\n // deactivates all previously scheduled actions\n stopAllAction() {\n const actions = this._actions, nActions = this._nActiveActions;\n for(let i = nActions - 1; i >= 0; --i)actions[i].stop();\n return this;\n }\n // advance the time and update apply the animation\n update(deltaTime) {\n deltaTime *= this.timeScale;\n const actions = this._actions, nActions = this._nActiveActions, time = this.time += deltaTime, timeDirection = Math.sign(deltaTime), accuIndex = this._accuIndex ^= 1;\n // run active actions\n for(let i = 0; i !== nActions; ++i){\n const action = actions[i];\n action._update(time, deltaTime, timeDirection, accuIndex);\n }\n // update scene graph\n const bindings = this._bindings, nBindings = this._nActiveBindings;\n for(let i = 0; i !== nBindings; ++i)bindings[i].apply(accuIndex);\n return this;\n }\n // Allows you to seek to a specific time in an animation.\n setTime(timeInSeconds) {\n this.time = 0; // Zero out time attribute for AnimationMixer object;\n for(let i = 0; i < this._actions.length; i++)this._actions[i].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n return this.update(timeInSeconds); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n }\n // return this mixer's root target object\n getRoot() {\n return this._root;\n }\n // free all resources specific to a particular clip\n uncacheClip(clip) {\n const actions = this._actions, clipUuid = clip.uuid, actionsByClip = this._actionsByClip, actionsForClip = actionsByClip[clipUuid];\n if (actionsForClip !== undefined) {\n // note: just calling _removeInactiveAction would mess up the\n // iteration state and also require updating the state we can\n // just throw away\n const actionsToRemove = actionsForClip.knownActions;\n for(let i = 0, n = actionsToRemove.length; i !== n; ++i){\n const action = actionsToRemove[i];\n this._deactivateAction(action);\n const cacheIndex = action._cacheIndex, lastInactiveAction = actions[actions.length - 1];\n action._cacheIndex = null;\n action._byClipCacheIndex = null;\n lastInactiveAction._cacheIndex = cacheIndex;\n actions[cacheIndex] = lastInactiveAction;\n actions.pop();\n this._removeInactiveBindingsForAction(action);\n }\n delete actionsByClip[clipUuid];\n }\n }\n // free all resources specific to a particular root target object\n uncacheRoot(root) {\n const rootUuid = root.uuid, actionsByClip = this._actionsByClip;\n for(const clipUuid in actionsByClip){\n const actionByRoot = actionsByClip[clipUuid].actionByRoot, action = actionByRoot[rootUuid];\n if (action !== undefined) {\n this._deactivateAction(action);\n this._removeInactiveAction(action);\n }\n }\n const bindingsByRoot = this._bindingsByRootAndName, bindingByName = bindingsByRoot[rootUuid];\n if (bindingByName !== undefined) for(const trackName in bindingByName){\n const binding = bindingByName[trackName];\n binding.restoreOriginalState();\n this._removeInactiveBinding(binding);\n }\n }\n // remove a targeted clip from the cache\n uncacheAction(clip, optionalRoot) {\n const action = this.existingAction(clip, optionalRoot);\n if (action !== null) {\n this._deactivateAction(action);\n this._removeInactiveAction(action);\n }\n }\n}\nclass $d5b33d7c30034067$export$2947cebfe91c02f8 {\n constructor(value){\n this.value = value;\n }\n clone() {\n return new $d5b33d7c30034067$export$2947cebfe91c02f8(this.value.clone === undefined ? this.value : this.value.clone());\n }\n}\nlet $d5b33d7c30034067$var$_id = 0;\nclass $d5b33d7c30034067$export$c412d5ffe1f79209 extends $d5b33d7c30034067$export$ec8b666c5fe2c75a {\n constructor(){\n super();\n this.isUniformsGroup = true;\n Object.defineProperty(this, \"id\", {\n value: $d5b33d7c30034067$var$_id++\n });\n this.name = \"\";\n this.usage = $d5b33d7c30034067$export$763e8360f4d7f77d;\n this.uniforms = [];\n }\n add(uniform) {\n this.uniforms.push(uniform);\n return this;\n }\n remove(uniform) {\n const index = this.uniforms.indexOf(uniform);\n if (index !== -1) this.uniforms.splice(index, 1);\n return this;\n }\n setName(name) {\n this.name = name;\n return this;\n }\n setUsage(value) {\n this.usage = value;\n return this;\n }\n dispose() {\n this.dispatchEvent({\n type: \"dispose\"\n });\n return this;\n }\n copy(source) {\n this.name = source.name;\n this.usage = source.usage;\n const uniformsSource = source.uniforms;\n this.uniforms.length = 0;\n for(let i = 0, l = uniformsSource.length; i < l; i++)this.uniforms.push(uniformsSource[i].clone());\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nclass $d5b33d7c30034067$export$25ec0e1af1389358 extends $d5b33d7c30034067$export$3d5cd879f108f53f {\n constructor(array, stride, meshPerAttribute = 1){\n super(array, stride);\n this.isInstancedInterleavedBuffer = true;\n this.meshPerAttribute = meshPerAttribute;\n }\n copy(source) {\n super.copy(source);\n this.meshPerAttribute = source.meshPerAttribute;\n return this;\n }\n clone(data) {\n const ib = super.clone(data);\n ib.meshPerAttribute = this.meshPerAttribute;\n return ib;\n }\n toJSON(data) {\n const json = super.toJSON(data);\n json.isInstancedInterleavedBuffer = true;\n json.meshPerAttribute = this.meshPerAttribute;\n return json;\n }\n}\nclass $d5b33d7c30034067$export$6b7339ae8dbddf73 {\n constructor(buffer, type, itemSize, elementSize, count){\n this.isGLBufferAttribute = true;\n this.name = \"\";\n this.buffer = buffer;\n this.type = type;\n this.itemSize = itemSize;\n this.elementSize = elementSize;\n this.count = count;\n this.version = 0;\n }\n set needsUpdate(value) {\n if (value === true) this.version++;\n }\n setBuffer(buffer) {\n this.buffer = buffer;\n return this;\n }\n setType(type, elementSize) {\n this.type = type;\n this.elementSize = elementSize;\n return this;\n }\n setItemSize(itemSize) {\n this.itemSize = itemSize;\n return this;\n }\n setCount(count) {\n this.count = count;\n return this;\n }\n}\nclass $d5b33d7c30034067$export$8b7aaceff00bd2f {\n constructor(origin, direction, near = 0, far = Infinity){\n this.ray = new $d5b33d7c30034067$export$a186db52eed6d40e(origin, direction);\n // direction is assumed to be normalized (for accurate distance calculations)\n this.near = near;\n this.far = far;\n this.camera = null;\n this.layers = new $d5b33d7c30034067$export$89312ce47c0ca777();\n this.params = {\n Mesh: {},\n Line: {\n threshold: 1\n },\n LOD: {},\n Points: {\n threshold: 1\n },\n Sprite: {}\n };\n }\n set(origin, direction) {\n // direction is assumed to be normalized (for accurate distance calculations)\n this.ray.set(origin, direction);\n }\n setFromCamera(coords, camera) {\n if (camera.isPerspectiveCamera) {\n this.ray.origin.setFromMatrixPosition(camera.matrixWorld);\n this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();\n this.camera = camera;\n } else if (camera.isOrthographicCamera) {\n this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera\n this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);\n this.camera = camera;\n } else console.error(\"THREE.Raycaster: Unsupported camera type: \" + camera.type);\n }\n intersectObject(object, recursive = true, intersects = []) {\n $d5b33d7c30034067$var$intersectObject(object, this, intersects, recursive);\n intersects.sort($d5b33d7c30034067$var$ascSort);\n return intersects;\n }\n intersectObjects(objects, recursive = true, intersects = []) {\n for(let i = 0, l = objects.length; i < l; i++)$d5b33d7c30034067$var$intersectObject(objects[i], this, intersects, recursive);\n intersects.sort($d5b33d7c30034067$var$ascSort);\n return intersects;\n }\n}\nfunction $d5b33d7c30034067$var$ascSort(a, b) {\n return a.distance - b.distance;\n}\nfunction $d5b33d7c30034067$var$intersectObject(object, raycaster, intersects, recursive) {\n if (object.layers.test(raycaster.layers)) object.raycast(raycaster, intersects);\n if (recursive === true) {\n const children = object.children;\n for(let i = 0, l = children.length; i < l; i++)$d5b33d7c30034067$var$intersectObject(children[i], raycaster, intersects, true);\n }\n}\n/**\n * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n *\n * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n * The azimuthal angle (theta) is measured from the positive z-axis.\n */ class $d5b33d7c30034067$export$d712cd887b4a00f7 {\n constructor(radius = 1, phi = 0, theta = 0){\n this.radius = radius;\n this.phi = phi; // polar angle\n this.theta = theta; // azimuthal angle\n return this;\n }\n set(radius, phi, theta) {\n this.radius = radius;\n this.phi = phi;\n this.theta = theta;\n return this;\n }\n copy(other) {\n this.radius = other.radius;\n this.phi = other.phi;\n this.theta = other.theta;\n return this;\n }\n // restrict phi to be between EPS and PI-EPS\n makeSafe() {\n const EPS = 0.000001;\n this.phi = Math.max(EPS, Math.min(Math.PI - EPS, this.phi));\n return this;\n }\n setFromVector3(v) {\n return this.setFromCartesianCoords(v.x, v.y, v.z);\n }\n setFromCartesianCoords(x, y, z) {\n this.radius = Math.sqrt(x * x + y * y + z * z);\n if (this.radius === 0) {\n this.theta = 0;\n this.phi = 0;\n } else {\n this.theta = Math.atan2(x, z);\n this.phi = Math.acos($d5b33d7c30034067$var$clamp(y / this.radius, -1, 1));\n }\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\n/**\n * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n */ class $d5b33d7c30034067$export$287165bb2177f4fd {\n constructor(radius = 1, theta = 0, y = 0){\n this.radius = radius; // distance from the origin to a point in the x-z plane\n this.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n this.y = y; // height above the x-z plane\n return this;\n }\n set(radius, theta, y) {\n this.radius = radius;\n this.theta = theta;\n this.y = y;\n return this;\n }\n copy(other) {\n this.radius = other.radius;\n this.theta = other.theta;\n this.y = other.y;\n return this;\n }\n setFromVector3(v) {\n return this.setFromCartesianCoords(v.x, v.y, v.z);\n }\n setFromCartesianCoords(x, y, z) {\n this.radius = Math.sqrt(x * x + z * z);\n this.theta = Math.atan2(x, z);\n this.y = y;\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_vector$4 = /*@__PURE__*/ new $d5b33d7c30034067$export$c977b3e384af9ae1();\nclass $d5b33d7c30034067$export$60f553fa130f08b0 {\n constructor(min = new $d5b33d7c30034067$export$c977b3e384af9ae1(Infinity, Infinity), max = new $d5b33d7c30034067$export$c977b3e384af9ae1(-Infinity, -Infinity)){\n this.isBox2 = true;\n this.min = min;\n this.max = max;\n }\n set(min, max) {\n this.min.copy(min);\n this.max.copy(max);\n return this;\n }\n setFromPoints(points) {\n this.makeEmpty();\n for(let i = 0, il = points.length; i < il; i++)this.expandByPoint(points[i]);\n return this;\n }\n setFromCenterAndSize(center, size) {\n const halfSize = $d5b33d7c30034067$var$_vector$4.copy(size).multiplyScalar(0.5);\n this.min.copy(center).sub(halfSize);\n this.max.copy(center).add(halfSize);\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n copy(box) {\n this.min.copy(box.min);\n this.max.copy(box.max);\n return this;\n }\n makeEmpty() {\n this.min.x = this.min.y = Infinity;\n this.max.x = this.max.y = -Infinity;\n return this;\n }\n isEmpty() {\n // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n return this.max.x < this.min.x || this.max.y < this.min.y;\n }\n getCenter(target) {\n return this.isEmpty() ? target.set(0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n }\n getSize(target) {\n return this.isEmpty() ? target.set(0, 0) : target.subVectors(this.max, this.min);\n }\n expandByPoint(point) {\n this.min.min(point);\n this.max.max(point);\n return this;\n }\n expandByVector(vector) {\n this.min.sub(vector);\n this.max.add(vector);\n return this;\n }\n expandByScalar(scalar) {\n this.min.addScalar(-scalar);\n this.max.addScalar(scalar);\n return this;\n }\n containsPoint(point) {\n return point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y ? false : true;\n }\n containsBox(box) {\n return this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y;\n }\n getParameter(point, target) {\n // This can potentially have a divide by zero if the box\n // has a size dimension of 0.\n return target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y));\n }\n intersectsBox(box) {\n // using 4 splitting planes to rule out intersections\n return box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n }\n clampPoint(point, target) {\n return target.copy(point).clamp(this.min, this.max);\n }\n distanceToPoint(point) {\n return this.clampPoint(point, $d5b33d7c30034067$var$_vector$4).distanceTo(point);\n }\n intersect(box) {\n this.min.max(box.min);\n this.max.min(box.max);\n if (this.isEmpty()) this.makeEmpty();\n return this;\n }\n union(box) {\n this.min.min(box.min);\n this.max.max(box.max);\n return this;\n }\n translate(offset) {\n this.min.add(offset);\n this.max.add(offset);\n return this;\n }\n equals(box) {\n return box.min.equals(this.min) && box.max.equals(this.max);\n }\n}\nconst $d5b33d7c30034067$var$_startP = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_startEnd = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$e0ba6359f1954fd3 {\n constructor(start = new $d5b33d7c30034067$export$64b5c384219d3699(), end = new $d5b33d7c30034067$export$64b5c384219d3699()){\n this.start = start;\n this.end = end;\n }\n set(start, end) {\n this.start.copy(start);\n this.end.copy(end);\n return this;\n }\n copy(line) {\n this.start.copy(line.start);\n this.end.copy(line.end);\n return this;\n }\n getCenter(target) {\n return target.addVectors(this.start, this.end).multiplyScalar(0.5);\n }\n delta(target) {\n return target.subVectors(this.end, this.start);\n }\n distanceSq() {\n return this.start.distanceToSquared(this.end);\n }\n distance() {\n return this.start.distanceTo(this.end);\n }\n at(t, target) {\n return this.delta(target).multiplyScalar(t).add(this.start);\n }\n closestPointToPointParameter(point, clampToLine) {\n $d5b33d7c30034067$var$_startP.subVectors(point, this.start);\n $d5b33d7c30034067$var$_startEnd.subVectors(this.end, this.start);\n const startEnd2 = $d5b33d7c30034067$var$_startEnd.dot($d5b33d7c30034067$var$_startEnd);\n const startEnd_startP = $d5b33d7c30034067$var$_startEnd.dot($d5b33d7c30034067$var$_startP);\n let t = startEnd_startP / startEnd2;\n if (clampToLine) t = $d5b33d7c30034067$var$clamp(t, 0, 1);\n return t;\n }\n closestPointToPoint(point, clampToLine, target) {\n const t = this.closestPointToPointParameter(point, clampToLine);\n return this.delta(target).multiplyScalar(t).add(this.start);\n }\n applyMatrix4(matrix) {\n this.start.applyMatrix4(matrix);\n this.end.applyMatrix4(matrix);\n return this;\n }\n equals(line) {\n return line.start.equals(this.start) && line.end.equals(this.end);\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\nconst $d5b33d7c30034067$var$_vector$3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$4b14638ffdd81e68 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(light, color){\n super();\n this.light = light;\n this.matrix = light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.color = color;\n this.type = \"SpotLightHelper\";\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const positions = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 1,\n 0,\n 0,\n 0,\n -1,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n -1,\n 1\n ];\n for(let i = 0, j = 1, l = 32; i < l; i++, j++){\n const p1 = i / l * Math.PI * 2;\n const p2 = j / l * Math.PI * 2;\n positions.push(Math.cos(p1), Math.sin(p1), 1, Math.cos(p2), Math.sin(p2), 1);\n }\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n fog: false,\n toneMapped: false\n });\n this.cone = new $d5b33d7c30034067$export$ff1ed10fedfdd604(geometry, material);\n this.add(this.cone);\n this.update();\n }\n dispose() {\n this.cone.geometry.dispose();\n this.cone.material.dispose();\n }\n update() {\n this.light.updateWorldMatrix(true, false);\n this.light.target.updateWorldMatrix(true, false);\n const coneLength = this.light.distance ? this.light.distance : 1000;\n const coneWidth = coneLength * Math.tan(this.light.angle);\n this.cone.scale.set(coneWidth, coneWidth, coneLength);\n $d5b33d7c30034067$var$_vector$3.setFromMatrixPosition(this.light.target.matrixWorld);\n this.cone.lookAt($d5b33d7c30034067$var$_vector$3);\n if (this.color !== undefined) this.cone.material.color.set(this.color);\n else this.cone.material.color.copy(this.light.color);\n }\n}\nconst $d5b33d7c30034067$var$_vector$2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_boneMatrix = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nconst $d5b33d7c30034067$var$_matrixWorldInv = /*@__PURE__*/ new $d5b33d7c30034067$export$2ae72fc923e5eb5();\nclass $d5b33d7c30034067$export$5277df3c9e732259 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(object){\n const bones = $d5b33d7c30034067$var$getBoneList(object);\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const vertices = [];\n const colors = [];\n const color1 = new $d5b33d7c30034067$export$892596cec99bc70e(0, 0, 1);\n const color2 = new $d5b33d7c30034067$export$892596cec99bc70e(0, 1, 0);\n for(let i = 0; i < bones.length; i++){\n const bone = bones[i];\n if (bone.parent && bone.parent.isBone) {\n vertices.push(0, 0, 0);\n vertices.push(0, 0, 0);\n colors.push(color1.r, color1.g, color1.b);\n colors.push(color2.r, color2.g, color2.b);\n }\n }\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n depthTest: false,\n depthWrite: false,\n toneMapped: false,\n transparent: true\n });\n super(geometry, material);\n this.isSkeletonHelper = true;\n this.type = \"SkeletonHelper\";\n this.root = object;\n this.bones = bones;\n this.matrix = object.matrixWorld;\n this.matrixAutoUpdate = false;\n }\n updateMatrixWorld(force) {\n const bones = this.bones;\n const geometry = this.geometry;\n const position = geometry.getAttribute(\"position\");\n $d5b33d7c30034067$var$_matrixWorldInv.copy(this.root.matrixWorld).invert();\n for(let i = 0, j = 0; i < bones.length; i++){\n const bone = bones[i];\n if (bone.parent && bone.parent.isBone) {\n $d5b33d7c30034067$var$_boneMatrix.multiplyMatrices($d5b33d7c30034067$var$_matrixWorldInv, bone.matrixWorld);\n $d5b33d7c30034067$var$_vector$2.setFromMatrixPosition($d5b33d7c30034067$var$_boneMatrix);\n position.setXYZ(j, $d5b33d7c30034067$var$_vector$2.x, $d5b33d7c30034067$var$_vector$2.y, $d5b33d7c30034067$var$_vector$2.z);\n $d5b33d7c30034067$var$_boneMatrix.multiplyMatrices($d5b33d7c30034067$var$_matrixWorldInv, bone.parent.matrixWorld);\n $d5b33d7c30034067$var$_vector$2.setFromMatrixPosition($d5b33d7c30034067$var$_boneMatrix);\n position.setXYZ(j + 1, $d5b33d7c30034067$var$_vector$2.x, $d5b33d7c30034067$var$_vector$2.y, $d5b33d7c30034067$var$_vector$2.z);\n j += 2;\n }\n }\n geometry.getAttribute(\"position\").needsUpdate = true;\n super.updateMatrixWorld(force);\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nfunction $d5b33d7c30034067$var$getBoneList(object) {\n const boneList = [];\n if (object.isBone === true) boneList.push(object);\n for(let i = 0; i < object.children.length; i++)boneList.push.apply(boneList, $d5b33d7c30034067$var$getBoneList(object.children[i]));\n return boneList;\n}\nclass $d5b33d7c30034067$export$9a9291685b9e4023 extends $d5b33d7c30034067$export$e176487c05830cc5 {\n constructor(light, sphereSize, color){\n const geometry = new $d5b33d7c30034067$export$1b417fc3b307a251(sphereSize, 4, 2);\n const material = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n wireframe: true,\n fog: false,\n toneMapped: false\n });\n super(geometry, material);\n this.light = light;\n this.color = color;\n this.type = \"PointLightHelper\";\n this.matrix = this.light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.update();\n /*\n\t// TODO: delete this comment?\n\tconst distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );\n\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\n\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\n\tconst d = light.distance;\n\n\tif ( d === 0.0 ) {\n\n\t\tthis.lightDistance.visible = false;\n\n\t} else {\n\n\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t}\n\n\tthis.add( this.lightDistance );\n\t*/ }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n update() {\n this.light.updateWorldMatrix(true, false);\n if (this.color !== undefined) this.material.color.set(this.color);\n else this.material.color.copy(this.light.color);\n /*\n\t\tconst d = this.light.distance;\n\n\t\tif ( d === 0.0 ) {\n\n\t\t\tthis.lightDistance.visible = false;\n\n\t\t} else {\n\n\t\t\tthis.lightDistance.visible = true;\n\t\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t\t}\n\t\t*/ }\n}\nconst $d5b33d7c30034067$var$_vector$1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_color1 = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\nconst $d5b33d7c30034067$var$_color2 = /*@__PURE__*/ new $d5b33d7c30034067$export$892596cec99bc70e();\nclass $d5b33d7c30034067$export$8dca15f13f4f8172 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(light, size, color){\n super();\n this.light = light;\n this.matrix = light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.color = color;\n this.type = \"HemisphereLightHelper\";\n const geometry = new $d5b33d7c30034067$export$1954e2b809fe361e(size);\n geometry.rotateY(Math.PI * 0.5);\n this.material = new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n wireframe: true,\n fog: false,\n toneMapped: false\n });\n if (this.color === undefined) this.material.vertexColors = true;\n const position = geometry.getAttribute(\"position\");\n const colors = new Float32Array(position.count * 3);\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$8dea267bd6bde117(colors, 3));\n this.add(new $d5b33d7c30034067$export$e176487c05830cc5(geometry, this.material));\n this.update();\n }\n dispose() {\n this.children[0].geometry.dispose();\n this.children[0].material.dispose();\n }\n update() {\n const mesh = this.children[0];\n if (this.color !== undefined) this.material.color.set(this.color);\n else {\n const colors = mesh.geometry.getAttribute(\"color\");\n $d5b33d7c30034067$var$_color1.copy(this.light.color);\n $d5b33d7c30034067$var$_color2.copy(this.light.groundColor);\n for(let i = 0, l = colors.count; i < l; i++){\n const color = i < l / 2 ? $d5b33d7c30034067$var$_color1 : $d5b33d7c30034067$var$_color2;\n colors.setXYZ(i, color.r, color.g, color.b);\n }\n colors.needsUpdate = true;\n }\n this.light.updateWorldMatrix(true, false);\n mesh.lookAt($d5b33d7c30034067$var$_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate());\n }\n}\nclass $d5b33d7c30034067$export$3875d39926561055 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888){\n color1 = new $d5b33d7c30034067$export$892596cec99bc70e(color1);\n color2 = new $d5b33d7c30034067$export$892596cec99bc70e(color2);\n const center = divisions / 2;\n const step = size / divisions;\n const halfSize = size / 2;\n const vertices = [], colors = [];\n for(let i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step){\n vertices.push(-halfSize, 0, k, halfSize, 0, k);\n vertices.push(k, 0, -halfSize, k, 0, halfSize);\n const color = i === center ? color1 : color2;\n color.toArray(colors, j);\n j += 3;\n color.toArray(colors, j);\n j += 3;\n color.toArray(colors, j);\n j += 3;\n color.toArray(colors, j);\n j += 3;\n }\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n toneMapped: false\n });\n super(geometry, material);\n this.type = \"GridHelper\";\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$361430a10f533cd3 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(radius = 10, sectors = 16, rings = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888){\n color1 = new $d5b33d7c30034067$export$892596cec99bc70e(color1);\n color2 = new $d5b33d7c30034067$export$892596cec99bc70e(color2);\n const vertices = [];\n const colors = [];\n // create the sectors\n if (sectors > 1) for(let i = 0; i < sectors; i++){\n const v = i / sectors * (Math.PI * 2);\n const x = Math.sin(v) * radius;\n const z = Math.cos(v) * radius;\n vertices.push(0, 0, 0);\n vertices.push(x, 0, z);\n const color = i & 1 ? color1 : color2;\n colors.push(color.r, color.g, color.b);\n colors.push(color.r, color.g, color.b);\n }\n // create the rings\n for(let i = 0; i < rings; i++){\n const color = i & 1 ? color1 : color2;\n const r = radius - radius / rings * i;\n for(let j = 0; j < divisions; j++){\n // first vertex\n let v = j / divisions * (Math.PI * 2);\n let x = Math.sin(v) * r;\n let z = Math.cos(v) * r;\n vertices.push(x, 0, z);\n colors.push(color.r, color.g, color.b);\n // second vertex\n v = (j + 1) / divisions * (Math.PI * 2);\n x = Math.sin(v) * r;\n z = Math.cos(v) * r;\n vertices.push(x, 0, z);\n colors.push(color.r, color.g, color.b);\n }\n }\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n toneMapped: false\n });\n super(geometry, material);\n this.type = \"PolarGridHelper\";\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nconst $d5b33d7c30034067$var$_v1 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v2 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_v3 = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nclass $d5b33d7c30034067$export$f8e434dc14203e7d extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n constructor(light, size, color){\n super();\n this.light = light;\n this.matrix = light.matrixWorld;\n this.matrixAutoUpdate = false;\n this.color = color;\n this.type = \"DirectionalLightHelper\";\n if (size === undefined) size = 1;\n let geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd([\n -size,\n size,\n 0,\n size,\n size,\n 0,\n size,\n -size,\n 0,\n -size,\n -size,\n 0,\n -size,\n size,\n 0\n ], 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n fog: false,\n toneMapped: false\n });\n this.lightPlane = new $d5b33d7c30034067$export$17d680238e50603e(geometry, material);\n this.add(this.lightPlane);\n geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd([\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ], 3));\n this.targetLine = new $d5b33d7c30034067$export$17d680238e50603e(geometry, material);\n this.add(this.targetLine);\n this.update();\n }\n dispose() {\n this.lightPlane.geometry.dispose();\n this.lightPlane.material.dispose();\n this.targetLine.geometry.dispose();\n this.targetLine.material.dispose();\n }\n update() {\n this.light.updateWorldMatrix(true, false);\n this.light.target.updateWorldMatrix(true, false);\n $d5b33d7c30034067$var$_v1.setFromMatrixPosition(this.light.matrixWorld);\n $d5b33d7c30034067$var$_v2.setFromMatrixPosition(this.light.target.matrixWorld);\n $d5b33d7c30034067$var$_v3.subVectors($d5b33d7c30034067$var$_v2, $d5b33d7c30034067$var$_v1);\n this.lightPlane.lookAt($d5b33d7c30034067$var$_v2);\n if (this.color !== undefined) {\n this.lightPlane.material.color.set(this.color);\n this.targetLine.material.color.set(this.color);\n } else {\n this.lightPlane.material.color.copy(this.light.color);\n this.targetLine.material.color.copy(this.light.color);\n }\n this.targetLine.lookAt($d5b33d7c30034067$var$_v2);\n this.targetLine.scale.z = $d5b33d7c30034067$var$_v3.length();\n }\n}\nconst $d5b33d7c30034067$var$_vector = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nconst $d5b33d7c30034067$var$_camera = /*@__PURE__*/ new $d5b33d7c30034067$export$79f141de891a5fed();\n/**\n *\t- shows frustum, line of sight and up of the camera\n *\t- suitable for fast updates\n * \t- based on frustum visualization in lightgl.js shadowmap example\n *\t\thttps://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html\n */ class $d5b33d7c30034067$export$ed8e93f853cd795 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(camera){\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: 0xffffff,\n vertexColors: true,\n toneMapped: false\n });\n const vertices = [];\n const colors = [];\n const pointMap = {};\n // near\n addLine(\"n1\", \"n2\");\n addLine(\"n2\", \"n4\");\n addLine(\"n4\", \"n3\");\n addLine(\"n3\", \"n1\");\n // far\n addLine(\"f1\", \"f2\");\n addLine(\"f2\", \"f4\");\n addLine(\"f4\", \"f3\");\n addLine(\"f3\", \"f1\");\n // sides\n addLine(\"n1\", \"f1\");\n addLine(\"n2\", \"f2\");\n addLine(\"n3\", \"f3\");\n addLine(\"n4\", \"f4\");\n // cone\n addLine(\"p\", \"n1\");\n addLine(\"p\", \"n2\");\n addLine(\"p\", \"n3\");\n addLine(\"p\", \"n4\");\n // up\n addLine(\"u1\", \"u2\");\n addLine(\"u2\", \"u3\");\n addLine(\"u3\", \"u1\");\n // target\n addLine(\"c\", \"t\");\n addLine(\"p\", \"c\");\n // cross\n addLine(\"cn1\", \"cn2\");\n addLine(\"cn3\", \"cn4\");\n addLine(\"cf1\", \"cf2\");\n addLine(\"cf3\", \"cf4\");\n function addLine(a, b) {\n addPoint(a);\n addPoint(b);\n }\n function addPoint(id) {\n vertices.push(0, 0, 0);\n colors.push(0, 0, 0);\n if (pointMap[id] === undefined) pointMap[id] = [];\n pointMap[id].push(vertices.length / 3 - 1);\n }\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n super(geometry, material);\n this.type = \"CameraHelper\";\n this.camera = camera;\n if (this.camera.updateProjectionMatrix) this.camera.updateProjectionMatrix();\n this.matrix = camera.matrixWorld;\n this.matrixAutoUpdate = false;\n this.pointMap = pointMap;\n this.update();\n // colors\n const colorFrustum = new $d5b33d7c30034067$export$892596cec99bc70e(0xffaa00);\n const colorCone = new $d5b33d7c30034067$export$892596cec99bc70e(0xff0000);\n const colorUp = new $d5b33d7c30034067$export$892596cec99bc70e(0x00aaff);\n const colorTarget = new $d5b33d7c30034067$export$892596cec99bc70e(0xffffff);\n const colorCross = new $d5b33d7c30034067$export$892596cec99bc70e(0x333333);\n this.setColors(colorFrustum, colorCone, colorUp, colorTarget, colorCross);\n }\n setColors(frustum, cone, up, target, cross) {\n const geometry = this.geometry;\n const colorAttribute = geometry.getAttribute(\"color\");\n // near\n colorAttribute.setXYZ(0, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(1, frustum.r, frustum.g, frustum.b); // n1, n2\n colorAttribute.setXYZ(2, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(3, frustum.r, frustum.g, frustum.b); // n2, n4\n colorAttribute.setXYZ(4, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(5, frustum.r, frustum.g, frustum.b); // n4, n3\n colorAttribute.setXYZ(6, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(7, frustum.r, frustum.g, frustum.b); // n3, n1\n // far\n colorAttribute.setXYZ(8, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(9, frustum.r, frustum.g, frustum.b); // f1, f2\n colorAttribute.setXYZ(10, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(11, frustum.r, frustum.g, frustum.b); // f2, f4\n colorAttribute.setXYZ(12, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(13, frustum.r, frustum.g, frustum.b); // f4, f3\n colorAttribute.setXYZ(14, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(15, frustum.r, frustum.g, frustum.b); // f3, f1\n // sides\n colorAttribute.setXYZ(16, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(17, frustum.r, frustum.g, frustum.b); // n1, f1\n colorAttribute.setXYZ(18, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(19, frustum.r, frustum.g, frustum.b); // n2, f2\n colorAttribute.setXYZ(20, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(21, frustum.r, frustum.g, frustum.b); // n3, f3\n colorAttribute.setXYZ(22, frustum.r, frustum.g, frustum.b);\n colorAttribute.setXYZ(23, frustum.r, frustum.g, frustum.b); // n4, f4\n // cone\n colorAttribute.setXYZ(24, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(25, cone.r, cone.g, cone.b); // p, n1\n colorAttribute.setXYZ(26, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(27, cone.r, cone.g, cone.b); // p, n2\n colorAttribute.setXYZ(28, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(29, cone.r, cone.g, cone.b); // p, n3\n colorAttribute.setXYZ(30, cone.r, cone.g, cone.b);\n colorAttribute.setXYZ(31, cone.r, cone.g, cone.b); // p, n4\n // up\n colorAttribute.setXYZ(32, up.r, up.g, up.b);\n colorAttribute.setXYZ(33, up.r, up.g, up.b); // u1, u2\n colorAttribute.setXYZ(34, up.r, up.g, up.b);\n colorAttribute.setXYZ(35, up.r, up.g, up.b); // u2, u3\n colorAttribute.setXYZ(36, up.r, up.g, up.b);\n colorAttribute.setXYZ(37, up.r, up.g, up.b); // u3, u1\n // target\n colorAttribute.setXYZ(38, target.r, target.g, target.b);\n colorAttribute.setXYZ(39, target.r, target.g, target.b); // c, t\n colorAttribute.setXYZ(40, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(41, cross.r, cross.g, cross.b); // p, c\n // cross\n colorAttribute.setXYZ(42, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(43, cross.r, cross.g, cross.b); // cn1, cn2\n colorAttribute.setXYZ(44, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(45, cross.r, cross.g, cross.b); // cn3, cn4\n colorAttribute.setXYZ(46, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(47, cross.r, cross.g, cross.b); // cf1, cf2\n colorAttribute.setXYZ(48, cross.r, cross.g, cross.b);\n colorAttribute.setXYZ(49, cross.r, cross.g, cross.b); // cf3, cf4\n colorAttribute.needsUpdate = true;\n }\n update() {\n const geometry = this.geometry;\n const pointMap = this.pointMap;\n const w = 1, h = 1;\n // we need just camera projection matrix inverse\n // world matrix must be identity\n $d5b33d7c30034067$var$_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);\n // center / target\n $d5b33d7c30034067$var$setPoint(\"c\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, 0, -1);\n $d5b33d7c30034067$var$setPoint(\"t\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, 0, 1);\n // near\n $d5b33d7c30034067$var$setPoint(\"n1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, -h, -1);\n $d5b33d7c30034067$var$setPoint(\"n2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, -h, -1);\n $d5b33d7c30034067$var$setPoint(\"n3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, h, -1);\n $d5b33d7c30034067$var$setPoint(\"n4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, h, -1);\n // far\n $d5b33d7c30034067$var$setPoint(\"f1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, -h, 1);\n $d5b33d7c30034067$var$setPoint(\"f2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, -h, 1);\n $d5b33d7c30034067$var$setPoint(\"f3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, h, 1);\n $d5b33d7c30034067$var$setPoint(\"f4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, h, 1);\n // up\n $d5b33d7c30034067$var$setPoint(\"u1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w * 0.7, h * 1.1, -1);\n $d5b33d7c30034067$var$setPoint(\"u2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w * 0.7, h * 1.1, -1);\n $d5b33d7c30034067$var$setPoint(\"u3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, h * 2, -1);\n // cross\n $d5b33d7c30034067$var$setPoint(\"cf1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, 0, 1);\n $d5b33d7c30034067$var$setPoint(\"cf2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, 0, 1);\n $d5b33d7c30034067$var$setPoint(\"cf3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, -h, 1);\n $d5b33d7c30034067$var$setPoint(\"cf4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, h, 1);\n $d5b33d7c30034067$var$setPoint(\"cn1\", pointMap, geometry, $d5b33d7c30034067$var$_camera, -w, 0, -1);\n $d5b33d7c30034067$var$setPoint(\"cn2\", pointMap, geometry, $d5b33d7c30034067$var$_camera, w, 0, -1);\n $d5b33d7c30034067$var$setPoint(\"cn3\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, -h, -1);\n $d5b33d7c30034067$var$setPoint(\"cn4\", pointMap, geometry, $d5b33d7c30034067$var$_camera, 0, h, -1);\n geometry.getAttribute(\"position\").needsUpdate = true;\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nfunction $d5b33d7c30034067$var$setPoint(point, pointMap, geometry, camera, x, y, z) {\n $d5b33d7c30034067$var$_vector.set(x, y, z).unproject(camera);\n const points = pointMap[point];\n if (points !== undefined) {\n const position = geometry.getAttribute(\"position\");\n for(let i = 0, l = points.length; i < l; i++)position.setXYZ(points[i], $d5b33d7c30034067$var$_vector.x, $d5b33d7c30034067$var$_vector.y, $d5b33d7c30034067$var$_vector.z);\n }\n}\nconst $d5b33d7c30034067$var$_box = /*@__PURE__*/ new $d5b33d7c30034067$export$6f7d5a9418ab2aa3();\nclass $d5b33d7c30034067$export$38a664cc862a6a9d extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(object, color = 0xffff00){\n const indices = new Uint16Array([\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 0,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 4,\n 0,\n 4,\n 1,\n 5,\n 2,\n 6,\n 3,\n 7\n ]);\n const positions = new Float32Array(24);\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setIndex(new $d5b33d7c30034067$export$8dea267bd6bde117(indices, 1));\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$8dea267bd6bde117(positions, 3));\n super(geometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.object = object;\n this.type = \"BoxHelper\";\n this.matrixAutoUpdate = false;\n this.update();\n }\n update(object) {\n if (object !== undefined) console.warn(\"THREE.BoxHelper: .update() has no longer arguments.\");\n if (this.object !== undefined) $d5b33d7c30034067$var$_box.setFromObject(this.object);\n if ($d5b33d7c30034067$var$_box.isEmpty()) return;\n const min = $d5b33d7c30034067$var$_box.min;\n const max = $d5b33d7c30034067$var$_box.max;\n /*\n\t\t\t5____4\n\t\t1/___0/|\n\t\t| 6__|_7\n\t\t2/___3/\n\n\t\t0: max.x, max.y, max.z\n\t\t1: min.x, max.y, max.z\n\t\t2: min.x, min.y, max.z\n\t\t3: max.x, min.y, max.z\n\t\t4: max.x, max.y, min.z\n\t\t5: min.x, max.y, min.z\n\t\t6: min.x, min.y, min.z\n\t\t7: max.x, min.y, min.z\n\t\t*/ const position = this.geometry.attributes.position;\n const array = position.array;\n array[0] = max.x;\n array[1] = max.y;\n array[2] = max.z;\n array[3] = min.x;\n array[4] = max.y;\n array[5] = max.z;\n array[6] = min.x;\n array[7] = min.y;\n array[8] = max.z;\n array[9] = max.x;\n array[10] = min.y;\n array[11] = max.z;\n array[12] = max.x;\n array[13] = max.y;\n array[14] = min.z;\n array[15] = min.x;\n array[16] = max.y;\n array[17] = min.z;\n array[18] = min.x;\n array[19] = min.y;\n array[20] = min.z;\n array[21] = max.x;\n array[22] = min.y;\n array[23] = min.z;\n position.needsUpdate = true;\n this.geometry.computeBoundingSphere();\n }\n setFromObject(object) {\n this.object = object;\n this.update();\n return this;\n }\n copy(source, recursive) {\n super.copy(source, recursive);\n this.object = source.object;\n return this;\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$ce39f4bb96c9a290 extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(box, color = 0xffff00){\n const indices = new Uint16Array([\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 0,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 4,\n 0,\n 4,\n 1,\n 5,\n 2,\n 6,\n 3,\n 7\n ]);\n const positions = [\n 1,\n 1,\n 1,\n -1,\n 1,\n 1,\n -1,\n -1,\n 1,\n 1,\n -1,\n 1,\n 1,\n 1,\n -1,\n -1,\n 1,\n -1,\n -1,\n -1,\n -1,\n 1,\n -1,\n -1\n ];\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setIndex(new $d5b33d7c30034067$export$8dea267bd6bde117(indices, 1));\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions, 3));\n super(geometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.box = box;\n this.type = \"Box3Helper\";\n this.geometry.computeBoundingSphere();\n }\n updateMatrixWorld(force) {\n const box = this.box;\n if (box.isEmpty()) return;\n box.getCenter(this.position);\n box.getSize(this.scale);\n this.scale.multiplyScalar(0.5);\n super.updateMatrixWorld(force);\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$a34fe8156c66e5d7 extends $d5b33d7c30034067$export$17d680238e50603e {\n constructor(plane, size = 1, hex = 0xffff00){\n const color = hex;\n const positions = [\n 1,\n -1,\n 0,\n -1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n 1,\n 0,\n -1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n -1,\n 0,\n 1,\n 1,\n 0\n ];\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions, 3));\n geometry.computeBoundingSphere();\n super(geometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.type = \"PlaneHelper\";\n this.plane = plane;\n this.size = size;\n const positions2 = [\n 1,\n 1,\n 0,\n -1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n 1,\n 0,\n -1,\n -1,\n 0,\n 1,\n -1,\n 0\n ];\n const geometry2 = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry2.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(positions2, 3));\n geometry2.computeBoundingSphere();\n this.add(new $d5b33d7c30034067$export$e176487c05830cc5(geometry2, new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n color: color,\n opacity: 0.2,\n transparent: true,\n depthWrite: false,\n toneMapped: false\n })));\n }\n updateMatrixWorld(force) {\n this.position.set(0, 0, 0);\n this.scale.set(0.5 * this.size, 0.5 * this.size, 1);\n this.lookAt(this.plane.normal);\n this.translateZ(-this.plane.constant);\n super.updateMatrixWorld(force);\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n this.children[0].geometry.dispose();\n this.children[0].material.dispose();\n }\n}\nconst $d5b33d7c30034067$var$_axis = /*@__PURE__*/ new $d5b33d7c30034067$export$64b5c384219d3699();\nlet $d5b33d7c30034067$var$_lineGeometry, $d5b33d7c30034067$var$_coneGeometry;\nclass $d5b33d7c30034067$export$a3008e7bd8d2cbe7 extends $d5b33d7c30034067$export$e4dd07dff30cc924 {\n // dir is assumed to be normalized\n constructor(dir = new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 1), origin = new $d5b33d7c30034067$export$64b5c384219d3699(0, 0, 0), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2){\n super();\n this.type = \"ArrowHelper\";\n if ($d5b33d7c30034067$var$_lineGeometry === undefined) {\n $d5b33d7c30034067$var$_lineGeometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n $d5b33d7c30034067$var$_lineGeometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd([\n 0,\n 0,\n 0,\n 0,\n 1,\n 0\n ], 3));\n $d5b33d7c30034067$var$_coneGeometry = new $d5b33d7c30034067$export$68f745719dbe5198(0, 0.5, 1, 5, 1);\n $d5b33d7c30034067$var$_coneGeometry.translate(0, -0.5, 0);\n }\n this.position.copy(origin);\n this.line = new $d5b33d7c30034067$export$17d680238e50603e($d5b33d7c30034067$var$_lineGeometry, new $d5b33d7c30034067$export$fbaaa33907730a0c({\n color: color,\n toneMapped: false\n }));\n this.line.matrixAutoUpdate = false;\n this.add(this.line);\n this.cone = new $d5b33d7c30034067$export$e176487c05830cc5($d5b33d7c30034067$var$_coneGeometry, new $d5b33d7c30034067$export$55cbcc9b622fe1f5({\n color: color,\n toneMapped: false\n }));\n this.cone.matrixAutoUpdate = false;\n this.add(this.cone);\n this.setDirection(dir);\n this.setLength(length, headLength, headWidth);\n }\n setDirection(dir) {\n // dir is assumed to be normalized\n if (dir.y > 0.99999) this.quaternion.set(0, 0, 0, 1);\n else if (dir.y < -0.99999) this.quaternion.set(1, 0, 0, 0);\n else {\n $d5b33d7c30034067$var$_axis.set(dir.z, 0, -dir.x).normalize();\n const radians = Math.acos(dir.y);\n this.quaternion.setFromAxisAngle($d5b33d7c30034067$var$_axis, radians);\n }\n }\n setLength(length, headLength = length * 0.2, headWidth = headLength * 0.2) {\n this.line.scale.set(1, Math.max(0.0001, length - headLength), 1); // see #17458\n this.line.updateMatrix();\n this.cone.scale.set(headWidth, headLength, headWidth);\n this.cone.position.y = length;\n this.cone.updateMatrix();\n }\n setColor(color) {\n this.line.material.color.set(color);\n this.cone.material.color.set(color);\n }\n copy(source) {\n super.copy(source, false);\n this.line.copy(source.line);\n this.cone.copy(source.cone);\n return this;\n }\n dispose() {\n this.line.geometry.dispose();\n this.line.material.dispose();\n this.cone.geometry.dispose();\n this.cone.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$6c8303f35b8578fd extends $d5b33d7c30034067$export$ff1ed10fedfdd604 {\n constructor(size = 1){\n const vertices = [\n 0,\n 0,\n 0,\n size,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n size,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n size\n ];\n const colors = [\n 1,\n 0,\n 0,\n 1,\n 0.6,\n 0,\n 0,\n 1,\n 0,\n 0.6,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0.6,\n 1\n ];\n const geometry = new $d5b33d7c30034067$export$b7be63a67df8959();\n geometry.setAttribute(\"position\", new $d5b33d7c30034067$export$cbe7a62641830ebd(vertices, 3));\n geometry.setAttribute(\"color\", new $d5b33d7c30034067$export$cbe7a62641830ebd(colors, 3));\n const material = new $d5b33d7c30034067$export$fbaaa33907730a0c({\n vertexColors: true,\n toneMapped: false\n });\n super(geometry, material);\n this.type = \"AxesHelper\";\n }\n setColors(xAxisColor, yAxisColor, zAxisColor) {\n const color = new $d5b33d7c30034067$export$892596cec99bc70e();\n const array = this.geometry.attributes.color.array;\n color.set(xAxisColor);\n color.toArray(array, 0);\n color.toArray(array, 3);\n color.set(yAxisColor);\n color.toArray(array, 6);\n color.toArray(array, 9);\n color.set(zAxisColor);\n color.toArray(array, 12);\n color.toArray(array, 15);\n this.geometry.attributes.color.needsUpdate = true;\n return this;\n }\n dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\nclass $d5b33d7c30034067$export$148534a3c727230b {\n constructor(){\n this.type = \"ShapePath\";\n this.color = new $d5b33d7c30034067$export$892596cec99bc70e();\n this.subPaths = [];\n this.currentPath = null;\n }\n moveTo(x, y) {\n this.currentPath = new $d5b33d7c30034067$export$4b2950bdac9b6ee9();\n this.subPaths.push(this.currentPath);\n this.currentPath.moveTo(x, y);\n return this;\n }\n lineTo(x, y) {\n this.currentPath.lineTo(x, y);\n return this;\n }\n quadraticCurveTo(aCPx, aCPy, aX, aY) {\n this.currentPath.quadraticCurveTo(aCPx, aCPy, aX, aY);\n return this;\n }\n bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n this.currentPath.bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY);\n return this;\n }\n splineThru(pts) {\n this.currentPath.splineThru(pts);\n return this;\n }\n toShapes(isCCW) {\n function toShapesNoHoles(inSubpaths) {\n const shapes = [];\n for(let i = 0, l = inSubpaths.length; i < l; i++){\n const tmpPath = inSubpaths[i];\n const tmpShape = new $d5b33d7c30034067$export$6428a7f2611ef1fa();\n tmpShape.curves = tmpPath.curves;\n shapes.push(tmpShape);\n }\n return shapes;\n }\n function isPointInsidePolygon(inPt, inPolygon) {\n const polyLen = inPolygon.length;\n // inPt on polygon contour => immediate success or\n // toggling of inside/outside at every single! intersection point of an edge\n // with the horizontal line through inPt, left of inPt\n // not counting lowerY endpoints of edges and whole edges on that line\n let inside = false;\n for(let p = polyLen - 1, q = 0; q < polyLen; p = q++){\n let edgeLowPt = inPolygon[p];\n let edgeHighPt = inPolygon[q];\n let edgeDx = edgeHighPt.x - edgeLowPt.x;\n let edgeDy = edgeHighPt.y - edgeLowPt.y;\n if (Math.abs(edgeDy) > Number.EPSILON) {\n // not parallel\n if (edgeDy < 0) {\n edgeLowPt = inPolygon[q];\n edgeDx = -edgeDx;\n edgeHighPt = inPolygon[p];\n edgeDy = -edgeDy;\n }\n if (inPt.y < edgeLowPt.y || inPt.y > edgeHighPt.y) continue;\n if (inPt.y === edgeLowPt.y) {\n if (inPt.x === edgeLowPt.x) return true; // inPt is on contour ?\n // continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n } else {\n const perpEdge = edgeDy * (inPt.x - edgeLowPt.x) - edgeDx * (inPt.y - edgeLowPt.y);\n if (perpEdge === 0) return true; // inPt is on contour ?\n if (perpEdge < 0) continue;\n inside = !inside; // true intersection left of inPt\n }\n } else {\n // parallel or collinear\n if (inPt.y !== edgeLowPt.y) continue; // parallel\n // edge lies on the same horizontal line as inPt\n if (edgeHighPt.x <= inPt.x && inPt.x <= edgeLowPt.x || edgeLowPt.x <= inPt.x && inPt.x <= edgeHighPt.x) return true; // inPt: Point on contour !\n // continue;\n }\n }\n return inside;\n }\n const isClockWise = $d5b33d7c30034067$export$96bdf6d9c66d7ba8.isClockWise;\n const subPaths = this.subPaths;\n if (subPaths.length === 0) return [];\n let solid, tmpPath, tmpShape;\n const shapes = [];\n if (subPaths.length === 1) {\n tmpPath = subPaths[0];\n tmpShape = new $d5b33d7c30034067$export$6428a7f2611ef1fa();\n tmpShape.curves = tmpPath.curves;\n shapes.push(tmpShape);\n return shapes;\n }\n let holesFirst = !isClockWise(subPaths[0].getPoints());\n holesFirst = isCCW ? !holesFirst : holesFirst;\n // console.log(\"Holes first\", holesFirst);\n const betterShapeHoles = [];\n const newShapes = [];\n let newShapeHoles = [];\n let mainIdx = 0;\n let tmpPoints;\n newShapes[mainIdx] = undefined;\n newShapeHoles[mainIdx] = [];\n for(let i = 0, l = subPaths.length; i < l; i++){\n tmpPath = subPaths[i];\n tmpPoints = tmpPath.getPoints();\n solid = isClockWise(tmpPoints);\n solid = isCCW ? !solid : solid;\n if (solid) {\n if (!holesFirst && newShapes[mainIdx]) mainIdx++;\n newShapes[mainIdx] = {\n s: new $d5b33d7c30034067$export$6428a7f2611ef1fa(),\n p: tmpPoints\n };\n newShapes[mainIdx].s.curves = tmpPath.curves;\n if (holesFirst) mainIdx++;\n newShapeHoles[mainIdx] = [];\n //console.log('cw', i);\n } else newShapeHoles[mainIdx].push({\n h: tmpPath,\n p: tmpPoints[0]\n });\n }\n // only Holes? -> probably all Shapes with wrong orientation\n if (!newShapes[0]) return toShapesNoHoles(subPaths);\n if (newShapes.length > 1) {\n let ambiguous = false;\n let toChange = 0;\n for(let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++)betterShapeHoles[sIdx] = [];\n for(let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++){\n const sho = newShapeHoles[sIdx];\n for(let hIdx = 0; hIdx < sho.length; hIdx++){\n const ho = sho[hIdx];\n let hole_unassigned = true;\n for(let s2Idx = 0; s2Idx < newShapes.length; s2Idx++)if (isPointInsidePolygon(ho.p, newShapes[s2Idx].p)) {\n if (sIdx !== s2Idx) toChange++;\n if (hole_unassigned) {\n hole_unassigned = false;\n betterShapeHoles[s2Idx].push(ho);\n } else ambiguous = true;\n }\n if (hole_unassigned) betterShapeHoles[sIdx].push(ho);\n }\n }\n if (toChange > 0 && ambiguous === false) newShapeHoles = betterShapeHoles;\n }\n let tmpHoles;\n for(let i = 0, il = newShapes.length; i < il; i++){\n tmpShape = newShapes[i].s;\n shapes.push(tmpShape);\n tmpHoles = newShapeHoles[i];\n for(let j = 0, jl = tmpHoles.length; j < jl; j++)tmpShape.holes.push(tmpHoles[j].h);\n }\n //console.log(\"shape\", shapes);\n return shapes;\n }\n}\nif (typeof __THREE_DEVTOOLS__ !== \"undefined\") __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"register\", {\n detail: {\n revision: $d5b33d7c30034067$export$3545e07a80636437\n }\n}));\nif (typeof window !== \"undefined\") {\n if (window.__THREE__) console.warn(\"WARNING: Multiple instances of Three.js being imported.\");\n else window.__THREE__ = $d5b33d7c30034067$export$3545e07a80636437;\n}\n\n});\n\nparcelRegister(\"5Rd1x\", function(module, exports) {\n\n$parcel$export(module.exports, \"OrbitControls\", () => $443c013b983d0324$export$8ff7788029dfdf52);\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n// OrbitControls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n//\n// Orbit - left mouse / touch: one-finger move\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move\nconst $443c013b983d0324$var$_changeEvent = {\n type: \"change\"\n};\nconst $443c013b983d0324$var$_startEvent = {\n type: \"start\"\n};\nconst $443c013b983d0324$var$_endEvent = {\n type: \"end\"\n};\nconst $443c013b983d0324$var$_ray = new (0, $ilwiq.Ray)();\nconst $443c013b983d0324$var$_plane = new (0, $ilwiq.Plane)();\nconst $443c013b983d0324$var$TILT_LIMIT = Math.cos(70 * (0, $ilwiq.MathUtils).DEG2RAD);\nclass $443c013b983d0324$export$8ff7788029dfdf52 extends (0, $ilwiq.EventDispatcher) {\n constructor(object, domElement){\n super();\n this.object = object;\n this.domElement = domElement;\n this.domElement.style.touchAction = \"none\"; // disable touch scroll\n // Set to false to disable this control\n this.enabled = true;\n // \"target\" sets the location of focus, where the object orbits around\n this.target = new (0, $ilwiq.Vector3)();\n // Sets the 3D cursor (similar to Blender), from which the maxTargetRadius takes effect\n this.cursor = new (0, $ilwiq.Vector3)();\n // How far you can dolly in and out ( PerspectiveCamera only )\n this.minDistance = 0;\n this.maxDistance = Infinity;\n // How far you can zoom in and out ( OrthographicCamera only )\n this.minZoom = 0;\n this.maxZoom = Infinity;\n // Limit camera target within a spherical area around the cursor\n this.minTargetRadius = 0;\n this.maxTargetRadius = Infinity;\n // How far you can orbit vertically, upper and lower limits.\n // Range is 0 to Math.PI radians.\n this.minPolarAngle = 0; // radians\n this.maxPolarAngle = Math.PI; // radians\n // How far you can orbit horizontally, upper and lower limits.\n // If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI )\n this.minAzimuthAngle = -Infinity; // radians\n this.maxAzimuthAngle = Infinity; // radians\n // Set to true to enable damping (inertia)\n // If damping is enabled, you must call controls.update() in your animation loop\n this.enableDamping = false;\n this.dampingFactor = 0.05;\n // This option actually enables dollying in and out; left as \"zoom\" for backwards compatibility.\n // Set to false to disable zooming\n this.enableZoom = true;\n this.zoomSpeed = 1.0;\n // Set to false to disable rotating\n this.enableRotate = true;\n this.rotateSpeed = 1.0;\n // Set to false to disable panning\n this.enablePan = true;\n this.panSpeed = 1.0;\n this.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up\n this.keyPanSpeed = 7.0; // pixels moved per arrow key push\n this.zoomToCursor = false;\n // Set to true to automatically rotate around the target\n // If auto-rotate is enabled, you must call controls.update() in your animation loop\n this.autoRotate = false;\n this.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60\n // The four arrow keys\n this.keys = {\n LEFT: \"ArrowLeft\",\n UP: \"ArrowUp\",\n RIGHT: \"ArrowRight\",\n BOTTOM: \"ArrowDown\"\n };\n // Mouse buttons\n this.mouseButtons = {\n LEFT: (0, $ilwiq.MOUSE).ROTATE,\n MIDDLE: (0, $ilwiq.MOUSE).DOLLY,\n RIGHT: (0, $ilwiq.MOUSE).PAN\n };\n // Touch fingers\n this.touches = {\n ONE: (0, $ilwiq.TOUCH).ROTATE,\n TWO: (0, $ilwiq.TOUCH).DOLLY_PAN\n };\n // for reset\n this.target0 = this.target.clone();\n this.position0 = this.object.position.clone();\n this.zoom0 = this.object.zoom;\n // the target DOM element for key events\n this._domElementKeyEvents = null;\n //\n // public methods\n //\n this.getPolarAngle = function() {\n return spherical.phi;\n };\n this.getAzimuthalAngle = function() {\n return spherical.theta;\n };\n this.getDistance = function() {\n return this.object.position.distanceTo(this.target);\n };\n this.listenToKeyEvents = function(domElement) {\n domElement.addEventListener(\"keydown\", onKeyDown);\n this._domElementKeyEvents = domElement;\n };\n this.stopListenToKeyEvents = function() {\n this._domElementKeyEvents.removeEventListener(\"keydown\", onKeyDown);\n this._domElementKeyEvents = null;\n };\n this.saveState = function() {\n scope.target0.copy(scope.target);\n scope.position0.copy(scope.object.position);\n scope.zoom0 = scope.object.zoom;\n };\n this.reset = function() {\n scope.target.copy(scope.target0);\n scope.object.position.copy(scope.position0);\n scope.object.zoom = scope.zoom0;\n scope.object.updateProjectionMatrix();\n scope.dispatchEvent($443c013b983d0324$var$_changeEvent);\n scope.update();\n state = STATE.NONE;\n };\n // this method is exposed, but perhaps it would be better if we can make it private...\n this.update = function() {\n const offset = new (0, $ilwiq.Vector3)();\n // so camera.up is the orbit axis\n const quat = new (0, $ilwiq.Quaternion)().setFromUnitVectors(object.up, new (0, $ilwiq.Vector3)(0, 1, 0));\n const quatInverse = quat.clone().invert();\n const lastPosition = new (0, $ilwiq.Vector3)();\n const lastQuaternion = new (0, $ilwiq.Quaternion)();\n const lastTargetPosition = new (0, $ilwiq.Vector3)();\n const twoPI = 2 * Math.PI;\n return function update(deltaTime = null) {\n const position = scope.object.position;\n offset.copy(position).sub(scope.target);\n // rotate offset to \"y-axis-is-up\" space\n offset.applyQuaternion(quat);\n // angle from z-axis around y-axis\n spherical.setFromVector3(offset);\n if (scope.autoRotate && state === STATE.NONE) rotateLeft(getAutoRotationAngle(deltaTime));\n if (scope.enableDamping) {\n spherical.theta += sphericalDelta.theta * scope.dampingFactor;\n spherical.phi += sphericalDelta.phi * scope.dampingFactor;\n } else {\n spherical.theta += sphericalDelta.theta;\n spherical.phi += sphericalDelta.phi;\n }\n // restrict theta to be between desired limits\n let min = scope.minAzimuthAngle;\n let max = scope.maxAzimuthAngle;\n if (isFinite(min) && isFinite(max)) {\n if (min < -Math.PI) min += twoPI;\n else if (min > Math.PI) min -= twoPI;\n if (max < -Math.PI) max += twoPI;\n else if (max > Math.PI) max -= twoPI;\n if (min <= max) spherical.theta = Math.max(min, Math.min(max, spherical.theta));\n else spherical.theta = spherical.theta > (min + max) / 2 ? Math.max(min, spherical.theta) : Math.min(max, spherical.theta);\n }\n // restrict phi to be between desired limits\n spherical.phi = Math.max(scope.minPolarAngle, Math.min(scope.maxPolarAngle, spherical.phi));\n spherical.makeSafe();\n // move target to panned location\n if (scope.enableDamping === true) scope.target.addScaledVector(panOffset, scope.dampingFactor);\n else scope.target.add(panOffset);\n // Limit the target distance from the cursor to create a sphere around the center of interest\n scope.target.sub(scope.cursor);\n scope.target.clampLength(scope.minTargetRadius, scope.maxTargetRadius);\n scope.target.add(scope.cursor);\n // adjust the camera position based on zoom only if we're not zooming to the cursor or if it's an ortho camera\n // we adjust zoom later in these cases\n if (scope.zoomToCursor && performCursorZoom || scope.object.isOrthographicCamera) spherical.radius = clampDistance(spherical.radius);\n else spherical.radius = clampDistance(spherical.radius * scale);\n offset.setFromSpherical(spherical);\n // rotate offset back to \"camera-up-vector-is-up\" space\n offset.applyQuaternion(quatInverse);\n position.copy(scope.target).add(offset);\n scope.object.lookAt(scope.target);\n if (scope.enableDamping === true) {\n sphericalDelta.theta *= 1 - scope.dampingFactor;\n sphericalDelta.phi *= 1 - scope.dampingFactor;\n panOffset.multiplyScalar(1 - scope.dampingFactor);\n } else {\n sphericalDelta.set(0, 0, 0);\n panOffset.set(0, 0, 0);\n }\n // adjust camera position\n let zoomChanged = false;\n if (scope.zoomToCursor && performCursorZoom) {\n let newRadius = null;\n if (scope.object.isPerspectiveCamera) {\n // move the camera down the pointer ray\n // this method avoids floating point error\n const prevRadius = offset.length();\n newRadius = clampDistance(prevRadius * scale);\n const radiusDelta = prevRadius - newRadius;\n scope.object.position.addScaledVector(dollyDirection, radiusDelta);\n scope.object.updateMatrixWorld();\n } else if (scope.object.isOrthographicCamera) {\n // adjust the ortho camera position based on zoom changes\n const mouseBefore = new (0, $ilwiq.Vector3)(mouse.x, mouse.y, 0);\n mouseBefore.unproject(scope.object);\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / scale));\n scope.object.updateProjectionMatrix();\n zoomChanged = true;\n const mouseAfter = new (0, $ilwiq.Vector3)(mouse.x, mouse.y, 0);\n mouseAfter.unproject(scope.object);\n scope.object.position.sub(mouseAfter).add(mouseBefore);\n scope.object.updateMatrixWorld();\n newRadius = offset.length();\n } else {\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.\");\n scope.zoomToCursor = false;\n }\n // handle the placement of the target\n if (newRadius !== null) {\n if (this.screenSpacePanning) // position the orbit target in front of the new camera position\n scope.target.set(0, 0, -1).transformDirection(scope.object.matrix).multiplyScalar(newRadius).add(scope.object.position);\n else {\n // get the ray and translation plane to compute target\n $443c013b983d0324$var$_ray.origin.copy(scope.object.position);\n $443c013b983d0324$var$_ray.direction.set(0, 0, -1).transformDirection(scope.object.matrix);\n // if the camera is 20 degrees above the horizon then don't adjust the focus target to avoid\n // extremely large values\n if (Math.abs(scope.object.up.dot($443c013b983d0324$var$_ray.direction)) < $443c013b983d0324$var$TILT_LIMIT) object.lookAt(scope.target);\n else {\n $443c013b983d0324$var$_plane.setFromNormalAndCoplanarPoint(scope.object.up, scope.target);\n $443c013b983d0324$var$_ray.intersectPlane($443c013b983d0324$var$_plane, scope.target);\n }\n }\n }\n } else if (scope.object.isOrthographicCamera) {\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / scale));\n scope.object.updateProjectionMatrix();\n zoomChanged = true;\n }\n scale = 1;\n performCursorZoom = false;\n // update condition is:\n // min(camera displacement, camera rotation in radians)^2 > EPS\n // using small-angle approximation cos(x/2) = 1 - x^2 / 8\n if (zoomChanged || lastPosition.distanceToSquared(scope.object.position) > EPS || 8 * (1 - lastQuaternion.dot(scope.object.quaternion)) > EPS || lastTargetPosition.distanceToSquared(scope.target) > 0) {\n scope.dispatchEvent($443c013b983d0324$var$_changeEvent);\n lastPosition.copy(scope.object.position);\n lastQuaternion.copy(scope.object.quaternion);\n lastTargetPosition.copy(scope.target);\n zoomChanged = false;\n return true;\n }\n return false;\n };\n }();\n this.dispose = function() {\n scope.domElement.removeEventListener(\"contextmenu\", onContextMenu);\n scope.domElement.removeEventListener(\"pointerdown\", onPointerDown);\n scope.domElement.removeEventListener(\"pointercancel\", onPointerUp);\n scope.domElement.removeEventListener(\"wheel\", onMouseWheel);\n scope.domElement.removeEventListener(\"pointermove\", onPointerMove);\n scope.domElement.removeEventListener(\"pointerup\", onPointerUp);\n if (scope._domElementKeyEvents !== null) {\n scope._domElementKeyEvents.removeEventListener(\"keydown\", onKeyDown);\n scope._domElementKeyEvents = null;\n }\n //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?\n };\n //\n // internals\n //\n const scope = this;\n const STATE = {\n NONE: -1,\n ROTATE: 0,\n DOLLY: 1,\n PAN: 2,\n TOUCH_ROTATE: 3,\n TOUCH_PAN: 4,\n TOUCH_DOLLY_PAN: 5,\n TOUCH_DOLLY_ROTATE: 6\n };\n let state = STATE.NONE;\n const EPS = 0.000001;\n // current position in spherical coordinates\n const spherical = new (0, $ilwiq.Spherical)();\n const sphericalDelta = new (0, $ilwiq.Spherical)();\n let scale = 1;\n const panOffset = new (0, $ilwiq.Vector3)();\n const rotateStart = new (0, $ilwiq.Vector2)();\n const rotateEnd = new (0, $ilwiq.Vector2)();\n const rotateDelta = new (0, $ilwiq.Vector2)();\n const panStart = new (0, $ilwiq.Vector2)();\n const panEnd = new (0, $ilwiq.Vector2)();\n const panDelta = new (0, $ilwiq.Vector2)();\n const dollyStart = new (0, $ilwiq.Vector2)();\n const dollyEnd = new (0, $ilwiq.Vector2)();\n const dollyDelta = new (0, $ilwiq.Vector2)();\n const dollyDirection = new (0, $ilwiq.Vector3)();\n const mouse = new (0, $ilwiq.Vector2)();\n let performCursorZoom = false;\n const pointers = [];\n const pointerPositions = {};\n function getAutoRotationAngle(deltaTime) {\n if (deltaTime !== null) return 2 * Math.PI / 60 * scope.autoRotateSpeed * deltaTime;\n else return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;\n }\n function getZoomScale() {\n return Math.pow(0.95, scope.zoomSpeed);\n }\n function rotateLeft(angle) {\n sphericalDelta.theta -= angle;\n }\n function rotateUp(angle) {\n sphericalDelta.phi -= angle;\n }\n const panLeft = function() {\n const v = new (0, $ilwiq.Vector3)();\n return function panLeft(distance, objectMatrix) {\n v.setFromMatrixColumn(objectMatrix, 0); // get X column of objectMatrix\n v.multiplyScalar(-distance);\n panOffset.add(v);\n };\n }();\n const panUp = function() {\n const v = new (0, $ilwiq.Vector3)();\n return function panUp(distance, objectMatrix) {\n if (scope.screenSpacePanning === true) v.setFromMatrixColumn(objectMatrix, 1);\n else {\n v.setFromMatrixColumn(objectMatrix, 0);\n v.crossVectors(scope.object.up, v);\n }\n v.multiplyScalar(distance);\n panOffset.add(v);\n };\n }();\n // deltaX and deltaY are in pixels; right and down are positive\n const pan = function() {\n const offset = new (0, $ilwiq.Vector3)();\n return function pan(deltaX, deltaY) {\n const element = scope.domElement;\n if (scope.object.isPerspectiveCamera) {\n // perspective\n const position = scope.object.position;\n offset.copy(position).sub(scope.target);\n let targetDistance = offset.length();\n // half of the fov is center to top of screen\n targetDistance *= Math.tan(scope.object.fov / 2 * Math.PI / 180.0);\n // we use only clientHeight here so aspect ratio does not distort speed\n panLeft(2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix);\n panUp(2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix);\n } else if (scope.object.isOrthographicCamera) {\n // orthographic\n panLeft(deltaX * (scope.object.right - scope.object.left) / scope.object.zoom / element.clientWidth, scope.object.matrix);\n panUp(deltaY * (scope.object.top - scope.object.bottom) / scope.object.zoom / element.clientHeight, scope.object.matrix);\n } else {\n // camera neither orthographic nor perspective\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.\");\n scope.enablePan = false;\n }\n };\n }();\n function dollyOut(dollyScale) {\n if (scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera) scale /= dollyScale;\n else {\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\");\n scope.enableZoom = false;\n }\n }\n function dollyIn(dollyScale) {\n if (scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera) scale *= dollyScale;\n else {\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\");\n scope.enableZoom = false;\n }\n }\n function updateMouseParameters(event) {\n if (!scope.zoomToCursor) return;\n performCursorZoom = true;\n const rect = scope.domElement.getBoundingClientRect();\n const x = event.clientX - rect.left;\n const y = event.clientY - rect.top;\n const w = rect.width;\n const h = rect.height;\n mouse.x = x / w * 2 - 1;\n mouse.y = -(y / h) * 2 + 1;\n dollyDirection.set(mouse.x, mouse.y, 1).unproject(scope.object).sub(scope.object.position).normalize();\n }\n function clampDistance(dist) {\n return Math.max(scope.minDistance, Math.min(scope.maxDistance, dist));\n }\n //\n // event callbacks - update the object state\n //\n function handleMouseDownRotate(event) {\n rotateStart.set(event.clientX, event.clientY);\n }\n function handleMouseDownDolly(event) {\n updateMouseParameters(event);\n dollyStart.set(event.clientX, event.clientY);\n }\n function handleMouseDownPan(event) {\n panStart.set(event.clientX, event.clientY);\n }\n function handleMouseMoveRotate(event) {\n rotateEnd.set(event.clientX, event.clientY);\n rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);\n const element = scope.domElement;\n rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height\n rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);\n rotateStart.copy(rotateEnd);\n scope.update();\n }\n function handleMouseMoveDolly(event) {\n dollyEnd.set(event.clientX, event.clientY);\n dollyDelta.subVectors(dollyEnd, dollyStart);\n if (dollyDelta.y > 0) dollyOut(getZoomScale());\n else if (dollyDelta.y < 0) dollyIn(getZoomScale());\n dollyStart.copy(dollyEnd);\n scope.update();\n }\n function handleMouseMovePan(event) {\n panEnd.set(event.clientX, event.clientY);\n panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);\n pan(panDelta.x, panDelta.y);\n panStart.copy(panEnd);\n scope.update();\n }\n function handleMouseWheel(event) {\n updateMouseParameters(event);\n if (event.deltaY < 0) dollyIn(getZoomScale());\n else if (event.deltaY > 0) dollyOut(getZoomScale());\n scope.update();\n }\n function handleKeyDown(event) {\n let needsUpdate = false;\n switch(event.code){\n case scope.keys.UP:\n if (event.ctrlKey || event.metaKey || event.shiftKey) rotateUp(2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n else pan(0, scope.keyPanSpeed);\n needsUpdate = true;\n break;\n case scope.keys.BOTTOM:\n if (event.ctrlKey || event.metaKey || event.shiftKey) rotateUp(-2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n else pan(0, -scope.keyPanSpeed);\n needsUpdate = true;\n break;\n case scope.keys.LEFT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) rotateLeft(2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n else pan(scope.keyPanSpeed, 0);\n needsUpdate = true;\n break;\n case scope.keys.RIGHT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) rotateLeft(-2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n else pan(-scope.keyPanSpeed, 0);\n needsUpdate = true;\n break;\n }\n if (needsUpdate) {\n // prevent the browser from scrolling on cursor keys\n event.preventDefault();\n scope.update();\n }\n }\n function handleTouchStartRotate() {\n if (pointers.length === 1) rotateStart.set(pointers[0].pageX, pointers[0].pageY);\n else {\n const x = 0.5 * (pointers[0].pageX + pointers[1].pageX);\n const y = 0.5 * (pointers[0].pageY + pointers[1].pageY);\n rotateStart.set(x, y);\n }\n }\n function handleTouchStartPan() {\n if (pointers.length === 1) panStart.set(pointers[0].pageX, pointers[0].pageY);\n else {\n const x = 0.5 * (pointers[0].pageX + pointers[1].pageX);\n const y = 0.5 * (pointers[0].pageY + pointers[1].pageY);\n panStart.set(x, y);\n }\n }\n function handleTouchStartDolly() {\n const dx = pointers[0].pageX - pointers[1].pageX;\n const dy = pointers[0].pageY - pointers[1].pageY;\n const distance = Math.sqrt(dx * dx + dy * dy);\n dollyStart.set(0, distance);\n }\n function handleTouchStartDollyPan() {\n if (scope.enableZoom) handleTouchStartDolly();\n if (scope.enablePan) handleTouchStartPan();\n }\n function handleTouchStartDollyRotate() {\n if (scope.enableZoom) handleTouchStartDolly();\n if (scope.enableRotate) handleTouchStartRotate();\n }\n function handleTouchMoveRotate(event) {\n if (pointers.length == 1) rotateEnd.set(event.pageX, event.pageY);\n else {\n const position = getSecondPointerPosition(event);\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n rotateEnd.set(x, y);\n }\n rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);\n const element = scope.domElement;\n rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height\n rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);\n rotateStart.copy(rotateEnd);\n }\n function handleTouchMovePan(event) {\n if (pointers.length === 1) panEnd.set(event.pageX, event.pageY);\n else {\n const position = getSecondPointerPosition(event);\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n panEnd.set(x, y);\n }\n panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);\n pan(panDelta.x, panDelta.y);\n panStart.copy(panEnd);\n }\n function handleTouchMoveDolly(event) {\n const position = getSecondPointerPosition(event);\n const dx = event.pageX - position.x;\n const dy = event.pageY - position.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n dollyEnd.set(0, distance);\n dollyDelta.set(0, Math.pow(dollyEnd.y / dollyStart.y, scope.zoomSpeed));\n dollyOut(dollyDelta.y);\n dollyStart.copy(dollyEnd);\n }\n function handleTouchMoveDollyPan(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n if (scope.enablePan) handleTouchMovePan(event);\n }\n function handleTouchMoveDollyRotate(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n if (scope.enableRotate) handleTouchMoveRotate(event);\n }\n //\n // event handlers - FSM: listen for events and reset state\n //\n function onPointerDown(event) {\n if (scope.enabled === false) return;\n if (pointers.length === 0) {\n scope.domElement.setPointerCapture(event.pointerId);\n scope.domElement.addEventListener(\"pointermove\", onPointerMove);\n scope.domElement.addEventListener(\"pointerup\", onPointerUp);\n }\n //\n addPointer(event);\n if (event.pointerType === \"touch\") onTouchStart(event);\n else onMouseDown(event);\n }\n function onPointerMove(event) {\n if (scope.enabled === false) return;\n if (event.pointerType === \"touch\") onTouchMove(event);\n else onMouseMove(event);\n }\n function onPointerUp(event) {\n removePointer(event);\n if (pointers.length === 0) {\n scope.domElement.releasePointerCapture(event.pointerId);\n scope.domElement.removeEventListener(\"pointermove\", onPointerMove);\n scope.domElement.removeEventListener(\"pointerup\", onPointerUp);\n }\n scope.dispatchEvent($443c013b983d0324$var$_endEvent);\n state = STATE.NONE;\n }\n function onMouseDown(event) {\n let mouseAction;\n switch(event.button){\n case 0:\n mouseAction = scope.mouseButtons.LEFT;\n break;\n case 1:\n mouseAction = scope.mouseButtons.MIDDLE;\n break;\n case 2:\n mouseAction = scope.mouseButtons.RIGHT;\n break;\n default:\n mouseAction = -1;\n }\n switch(mouseAction){\n case (0, $ilwiq.MOUSE).DOLLY:\n if (scope.enableZoom === false) return;\n handleMouseDownDolly(event);\n state = STATE.DOLLY;\n break;\n case (0, $ilwiq.MOUSE).ROTATE:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enablePan === false) return;\n handleMouseDownPan(event);\n state = STATE.PAN;\n } else {\n if (scope.enableRotate === false) return;\n handleMouseDownRotate(event);\n state = STATE.ROTATE;\n }\n break;\n case (0, $ilwiq.MOUSE).PAN:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enableRotate === false) return;\n handleMouseDownRotate(event);\n state = STATE.ROTATE;\n } else {\n if (scope.enablePan === false) return;\n handleMouseDownPan(event);\n state = STATE.PAN;\n }\n break;\n default:\n state = STATE.NONE;\n }\n if (state !== STATE.NONE) scope.dispatchEvent($443c013b983d0324$var$_startEvent);\n }\n function onMouseMove(event) {\n switch(state){\n case STATE.ROTATE:\n if (scope.enableRotate === false) return;\n handleMouseMoveRotate(event);\n break;\n case STATE.DOLLY:\n if (scope.enableZoom === false) return;\n handleMouseMoveDolly(event);\n break;\n case STATE.PAN:\n if (scope.enablePan === false) return;\n handleMouseMovePan(event);\n break;\n }\n }\n function onMouseWheel(event) {\n if (scope.enabled === false || scope.enableZoom === false || state !== STATE.NONE) return;\n event.preventDefault();\n scope.dispatchEvent($443c013b983d0324$var$_startEvent);\n handleMouseWheel(event);\n scope.dispatchEvent($443c013b983d0324$var$_endEvent);\n }\n function onKeyDown(event) {\n if (scope.enabled === false || scope.enablePan === false) return;\n handleKeyDown(event);\n }\n function onTouchStart(event) {\n trackPointer(event);\n switch(pointers.length){\n case 1:\n switch(scope.touches.ONE){\n case (0, $ilwiq.TOUCH).ROTATE:\n if (scope.enableRotate === false) return;\n handleTouchStartRotate();\n state = STATE.TOUCH_ROTATE;\n break;\n case (0, $ilwiq.TOUCH).PAN:\n if (scope.enablePan === false) return;\n handleTouchStartPan();\n state = STATE.TOUCH_PAN;\n break;\n default:\n state = STATE.NONE;\n }\n break;\n case 2:\n switch(scope.touches.TWO){\n case (0, $ilwiq.TOUCH).DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n handleTouchStartDollyPan();\n state = STATE.TOUCH_DOLLY_PAN;\n break;\n case (0, $ilwiq.TOUCH).DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n handleTouchStartDollyRotate();\n state = STATE.TOUCH_DOLLY_ROTATE;\n break;\n default:\n state = STATE.NONE;\n }\n break;\n default:\n state = STATE.NONE;\n }\n if (state !== STATE.NONE) scope.dispatchEvent($443c013b983d0324$var$_startEvent);\n }\n function onTouchMove(event) {\n trackPointer(event);\n switch(state){\n case STATE.TOUCH_ROTATE:\n if (scope.enableRotate === false) return;\n handleTouchMoveRotate(event);\n scope.update();\n break;\n case STATE.TOUCH_PAN:\n if (scope.enablePan === false) return;\n handleTouchMovePan(event);\n scope.update();\n break;\n case STATE.TOUCH_DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n handleTouchMoveDollyPan(event);\n scope.update();\n break;\n case STATE.TOUCH_DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n handleTouchMoveDollyRotate(event);\n scope.update();\n break;\n default:\n state = STATE.NONE;\n }\n }\n function onContextMenu(event) {\n if (scope.enabled === false) return;\n event.preventDefault();\n }\n function addPointer(event) {\n pointers.push(event);\n }\n function removePointer(event) {\n delete pointerPositions[event.pointerId];\n for(let i = 0; i < pointers.length; i++)if (pointers[i].pointerId == event.pointerId) {\n pointers.splice(i, 1);\n return;\n }\n }\n function trackPointer(event) {\n let position = pointerPositions[event.pointerId];\n if (position === undefined) {\n position = new (0, $ilwiq.Vector2)();\n pointerPositions[event.pointerId] = position;\n }\n position.set(event.pageX, event.pageY);\n }\n function getSecondPointerPosition(event) {\n const pointer = event.pointerId === pointers[0].pointerId ? pointers[1] : pointers[0];\n return pointerPositions[pointer.pointerId];\n }\n //\n scope.domElement.addEventListener(\"contextmenu\", onContextMenu);\n scope.domElement.addEventListener(\"pointerdown\", onPointerDown);\n scope.domElement.addEventListener(\"pointercancel\", onPointerUp);\n scope.domElement.addEventListener(\"wheel\", onMouseWheel, {\n passive: false\n });\n // force an update at start\n this.update();\n }\n}\n\n});\n\nparcelRegister(\"gbdyO\", function(module, exports) {\n\n$parcel$export(module.exports, \"Text\", () => $bc7831423112e56a$export$5f1af8db9871e1d6);\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\nvar $8ue7g = parcelRequire(\"8ue7g\");\n\nvar $ix9ca = parcelRequire(\"ix9ca\");\n\nvar $2y8EL = parcelRequire(\"2y8EL\");\n\nvar $4kOkh = parcelRequire(\"4kOkh\");\n/*!\nCustom build of Typr.ts (https://github.com/fredli74/Typr.ts) for use in Troika text rendering.\nOriginal MIT license applies: https://github.com/fredli74/Typr.ts/blob/master/LICENSE\n*/ function $bc7831423112e56a$var$typrFactory() {\n return \"undefined\" == typeof window && (self.window = self), function(r) {\n var e = {\n parse: function(r) {\n var t = e._bin, a = new Uint8Array(r);\n if (\"ttcf\" == t.readASCII(a, 0, 4)) {\n var n = 4;\n t.readUshort(a, n), n += 2, t.readUshort(a, n), n += 2;\n var o = t.readUint(a, n);\n n += 4;\n for(var s = [], i = 0; i < o; i++){\n var h = t.readUint(a, n);\n n += 4, s.push(e._readFont(a, h));\n }\n return s;\n }\n return [\n e._readFont(a, 0)\n ];\n },\n _readFont: function(r, t) {\n var a = e._bin, n = t;\n a.readFixed(r, t), t += 4;\n var o = a.readUshort(r, t);\n t += 2, a.readUshort(r, t), t += 2, a.readUshort(r, t), t += 2, a.readUshort(r, t), t += 2;\n for(var s = [\n \"cmap\",\n \"head\",\n \"hhea\",\n \"maxp\",\n \"hmtx\",\n \"name\",\n \"OS/2\",\n \"post\",\n \"loca\",\n \"glyf\",\n \"kern\",\n \"CFF \",\n \"GDEF\",\n \"GPOS\",\n \"GSUB\",\n \"SVG \"\n ], i = {\n _data: r,\n _offset: n\n }, h = {}, d = 0; d < o; d++){\n var f = a.readASCII(r, t, 4);\n t += 4, a.readUint(r, t), t += 4;\n var u = a.readUint(r, t);\n t += 4;\n var l = a.readUint(r, t);\n t += 4, h[f] = {\n offset: u,\n length: l\n };\n }\n for(d = 0; d < s.length; d++){\n var v = s[d];\n h[v] && (i[v.trim()] = e[v.trim()].parse(r, h[v].offset, h[v].length, i));\n }\n return i;\n },\n _tabOffset: function(r, t, a) {\n for(var n = e._bin, o = n.readUshort(r, a + 4), s = a + 12, i = 0; i < o; i++){\n var h = n.readASCII(r, s, 4);\n s += 4, n.readUint(r, s), s += 4;\n var d = n.readUint(r, s);\n if (s += 4, n.readUint(r, s), s += 4, h == t) return d;\n }\n return 0;\n }\n };\n e._bin = {\n readFixed: function(r, e) {\n return (r[e] << 8 | r[e + 1]) + (r[e + 2] << 8 | r[e + 3]) / 65540;\n },\n readF2dot14: function(r, t) {\n return e._bin.readShort(r, t) / 16384;\n },\n readInt: function(r, t) {\n return e._bin._view(r).getInt32(t);\n },\n readInt8: function(r, t) {\n return e._bin._view(r).getInt8(t);\n },\n readShort: function(r, t) {\n return e._bin._view(r).getInt16(t);\n },\n readUshort: function(r, t) {\n return e._bin._view(r).getUint16(t);\n },\n readUshorts: function(r, t, a) {\n for(var n = [], o = 0; o < a; o++)n.push(e._bin.readUshort(r, t + 2 * o));\n return n;\n },\n readUint: function(r, t) {\n return e._bin._view(r).getUint32(t);\n },\n readUint64: function(r, t) {\n return 4294967296 * e._bin.readUint(r, t) + e._bin.readUint(r, t + 4);\n },\n readASCII: function(r, e, t) {\n for(var a = \"\", n = 0; n < t; n++)a += String.fromCharCode(r[e + n]);\n return a;\n },\n readUnicode: function(r, e, t) {\n for(var a = \"\", n = 0; n < t; n++){\n var o = r[e++] << 8 | r[e++];\n a += String.fromCharCode(o);\n }\n return a;\n },\n _tdec: \"undefined\" != typeof window && window.TextDecoder ? new window.TextDecoder : null,\n readUTF8: function(r, t, a) {\n var n = e._bin._tdec;\n return n && 0 == t && a == r.length ? n.decode(r) : e._bin.readASCII(r, t, a);\n },\n readBytes: function(r, e, t) {\n for(var a = [], n = 0; n < t; n++)a.push(r[e + n]);\n return a;\n },\n readASCIIArray: function(r, e, t) {\n for(var a = [], n = 0; n < t; n++)a.push(String.fromCharCode(r[e + n]));\n return a;\n },\n _view: function(r) {\n return r._dataView || (r._dataView = r.buffer ? new DataView(r.buffer, r.byteOffset, r.byteLength) : new DataView(new Uint8Array(r).buffer));\n }\n }, e._lctf = {}, e._lctf.parse = function(r, t, a, n, o) {\n var s = e._bin, i = {}, h = t;\n s.readFixed(r, t), t += 4;\n var d = s.readUshort(r, t);\n t += 2;\n var f = s.readUshort(r, t);\n t += 2;\n var u = s.readUshort(r, t);\n return t += 2, i.scriptList = e._lctf.readScriptList(r, h + d), i.featureList = e._lctf.readFeatureList(r, h + f), i.lookupList = e._lctf.readLookupList(r, h + u, o), i;\n }, e._lctf.readLookupList = function(r, t, a) {\n var n = e._bin, o = t, s = [], i = n.readUshort(r, t);\n t += 2;\n for(var h = 0; h < i; h++){\n var d = n.readUshort(r, t);\n t += 2;\n var f = e._lctf.readLookupTable(r, o + d, a);\n s.push(f);\n }\n return s;\n }, e._lctf.readLookupTable = function(r, t, a) {\n var n = e._bin, o = t, s = {\n tabs: []\n };\n s.ltype = n.readUshort(r, t), t += 2, s.flag = n.readUshort(r, t), t += 2;\n var i = n.readUshort(r, t);\n t += 2;\n for(var h = s.ltype, d = 0; d < i; d++){\n var f = n.readUshort(r, t);\n t += 2;\n var u = a(r, h, o + f, s);\n s.tabs.push(u);\n }\n return s;\n }, e._lctf.numOfOnes = function(r) {\n for(var e = 0, t = 0; t < 32; t++)0 != (r >>> t & 1) && e++;\n return e;\n }, e._lctf.readClassDef = function(r, t) {\n var a = e._bin, n = [], o = a.readUshort(r, t);\n if (t += 2, 1 == o) {\n var s = a.readUshort(r, t);\n t += 2;\n var i = a.readUshort(r, t);\n t += 2;\n for(var h = 0; h < i; h++)n.push(s + h), n.push(s + h), n.push(a.readUshort(r, t)), t += 2;\n }\n if (2 == o) {\n var d = a.readUshort(r, t);\n t += 2;\n for(h = 0; h < d; h++)n.push(a.readUshort(r, t)), t += 2, n.push(a.readUshort(r, t)), t += 2, n.push(a.readUshort(r, t)), t += 2;\n }\n return n;\n }, e._lctf.getInterval = function(r, e) {\n for(var t = 0; t < r.length; t += 3){\n var a = r[t], n = r[t + 1];\n if (r[t + 2], a <= e && e <= n) return t;\n }\n return -1;\n }, e._lctf.readCoverage = function(r, t) {\n var a = e._bin, n = {};\n n.fmt = a.readUshort(r, t), t += 2;\n var o = a.readUshort(r, t);\n return t += 2, 1 == n.fmt && (n.tab = a.readUshorts(r, t, o)), 2 == n.fmt && (n.tab = a.readUshorts(r, t, 3 * o)), n;\n }, e._lctf.coverageIndex = function(r, t) {\n var a = r.tab;\n if (1 == r.fmt) return a.indexOf(t);\n if (2 == r.fmt) {\n var n = e._lctf.getInterval(a, t);\n if (-1 != n) return a[n + 2] + (t - a[n]);\n }\n return -1;\n }, e._lctf.readFeatureList = function(r, t) {\n var a = e._bin, n = t, o = [], s = a.readUshort(r, t);\n t += 2;\n for(var i = 0; i < s; i++){\n var h = a.readASCII(r, t, 4);\n t += 4;\n var d = a.readUshort(r, t);\n t += 2;\n var f = e._lctf.readFeatureTable(r, n + d);\n f.tag = h.trim(), o.push(f);\n }\n return o;\n }, e._lctf.readFeatureTable = function(r, t) {\n var a = e._bin, n = t, o = {}, s = a.readUshort(r, t);\n t += 2, s > 0 && (o.featureParams = n + s);\n var i = a.readUshort(r, t);\n t += 2, o.tab = [];\n for(var h = 0; h < i; h++)o.tab.push(a.readUshort(r, t + 2 * h));\n return o;\n }, e._lctf.readScriptList = function(r, t) {\n var a = e._bin, n = t, o = {}, s = a.readUshort(r, t);\n t += 2;\n for(var i = 0; i < s; i++){\n var h = a.readASCII(r, t, 4);\n t += 4;\n var d = a.readUshort(r, t);\n t += 2, o[h.trim()] = e._lctf.readScriptTable(r, n + d);\n }\n return o;\n }, e._lctf.readScriptTable = function(r, t) {\n var a = e._bin, n = t, o = {}, s = a.readUshort(r, t);\n t += 2, s > 0 && (o.default = e._lctf.readLangSysTable(r, n + s));\n var i = a.readUshort(r, t);\n t += 2;\n for(var h = 0; h < i; h++){\n var d = a.readASCII(r, t, 4);\n t += 4;\n var f = a.readUshort(r, t);\n t += 2, o[d.trim()] = e._lctf.readLangSysTable(r, n + f);\n }\n return o;\n }, e._lctf.readLangSysTable = function(r, t) {\n var a = e._bin, n = {};\n a.readUshort(r, t), t += 2, n.reqFeature = a.readUshort(r, t), t += 2;\n var o = a.readUshort(r, t);\n return t += 2, n.features = a.readUshorts(r, t, o), n;\n }, e.CFF = {}, e.CFF.parse = function(r, t, a) {\n var n = e._bin;\n (r = new Uint8Array(r.buffer, t, a))[t = 0], r[++t], r[++t], r[++t], t++;\n var o = [];\n t = e.CFF.readIndex(r, t, o);\n for(var s = [], i = 0; i < o.length - 1; i++)s.push(n.readASCII(r, t + o[i], o[i + 1] - o[i]));\n t += o[o.length - 1];\n var h = [];\n t = e.CFF.readIndex(r, t, h);\n var d = [];\n for(i = 0; i < h.length - 1; i++)d.push(e.CFF.readDict(r, t + h[i], t + h[i + 1]));\n t += h[h.length - 1];\n var f = d[0], u = [];\n t = e.CFF.readIndex(r, t, u);\n var l = [];\n for(i = 0; i < u.length - 1; i++)l.push(n.readASCII(r, t + u[i], u[i + 1] - u[i]));\n if (t += u[u.length - 1], e.CFF.readSubrs(r, t, f), f.CharStrings) {\n t = f.CharStrings;\n u = [];\n t = e.CFF.readIndex(r, t, u);\n var v = [];\n for(i = 0; i < u.length - 1; i++)v.push(n.readBytes(r, t + u[i], u[i + 1] - u[i]));\n f.CharStrings = v;\n }\n if (f.ROS) {\n t = f.FDArray;\n var c = [];\n t = e.CFF.readIndex(r, t, c), f.FDArray = [];\n for(i = 0; i < c.length - 1; i++){\n var p = e.CFF.readDict(r, t + c[i], t + c[i + 1]);\n e.CFF._readFDict(r, p, l), f.FDArray.push(p);\n }\n t += c[c.length - 1], t = f.FDSelect, f.FDSelect = [];\n var U = r[t];\n if (t++, 3 != U) throw U;\n var g = n.readUshort(r, t);\n t += 2;\n for(i = 0; i < g + 1; i++)f.FDSelect.push(n.readUshort(r, t), r[t + 2]), t += 3;\n }\n return f.Encoding && (f.Encoding = e.CFF.readEncoding(r, f.Encoding, f.CharStrings.length)), f.charset && (f.charset = e.CFF.readCharset(r, f.charset, f.CharStrings.length)), e.CFF._readFDict(r, f, l), f;\n }, e.CFF._readFDict = function(r, t, a) {\n var n;\n for(var o in t.Private && (n = t.Private[1], t.Private = e.CFF.readDict(r, n, n + t.Private[0]), t.Private.Subrs && e.CFF.readSubrs(r, n + t.Private.Subrs, t.Private)), t)-1 != [\n \"FamilyName\",\n \"FontName\",\n \"FullName\",\n \"Notice\",\n \"version\",\n \"Copyright\"\n ].indexOf(o) && (t[o] = a[t[o] - 426 + 35]);\n }, e.CFF.readSubrs = function(r, t, a) {\n var n = e._bin, o = [];\n t = e.CFF.readIndex(r, t, o);\n var s, i = o.length;\n s = i < 1240 ? 107 : i < 33900 ? 1131 : 32768, a.Bias = s, a.Subrs = [];\n for(var h = 0; h < o.length - 1; h++)a.Subrs.push(n.readBytes(r, t + o[h], o[h + 1] - o[h]));\n }, e.CFF.tableSE = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 91,\n 92,\n 93,\n 94,\n 95,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 96,\n 97,\n 98,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 107,\n 108,\n 109,\n 110,\n 0,\n 111,\n 112,\n 113,\n 114,\n 0,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 0,\n 123,\n 0,\n 124,\n 125,\n 126,\n 127,\n 128,\n 129,\n 130,\n 131,\n 0,\n 132,\n 133,\n 0,\n 134,\n 135,\n 136,\n 137,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 138,\n 0,\n 139,\n 0,\n 0,\n 0,\n 0,\n 140,\n 141,\n 142,\n 143,\n 0,\n 0,\n 0,\n 0,\n 0,\n 144,\n 0,\n 0,\n 0,\n 145,\n 0,\n 0,\n 146,\n 147,\n 148,\n 149,\n 0,\n 0,\n 0,\n 0\n ], e.CFF.glyphByUnicode = function(r, e) {\n for(var t = 0; t < r.charset.length; t++)if (r.charset[t] == e) return t;\n return -1;\n }, e.CFF.glyphBySE = function(r, t) {\n return t < 0 || t > 255 ? -1 : e.CFF.glyphByUnicode(r, e.CFF.tableSE[t]);\n }, e.CFF.readEncoding = function(r, t, a) {\n e._bin;\n var n = [\n \".notdef\"\n ], o = r[t];\n if (t++, 0 != o) throw \"error: unknown encoding format: \" + o;\n var s = r[t];\n t++;\n for(var i = 0; i < s; i++)n.push(r[t + i]);\n return n;\n }, e.CFF.readCharset = function(r, t, a) {\n var n = e._bin, o = [\n \".notdef\"\n ], s = r[t];\n if (t++, 0 == s) for(var i = 0; i < a; i++){\n var h = n.readUshort(r, t);\n t += 2, o.push(h);\n }\n else {\n if (1 != s && 2 != s) throw \"error: format: \" + s;\n for(; o.length < a;){\n h = n.readUshort(r, t);\n t += 2;\n var d = 0;\n 1 == s ? (d = r[t], t++) : (d = n.readUshort(r, t), t += 2);\n for(i = 0; i <= d; i++)o.push(h), h++;\n }\n }\n return o;\n }, e.CFF.readIndex = function(r, t, a) {\n var n = e._bin, o = n.readUshort(r, t) + 1, s = r[t += 2];\n if (t++, 1 == s) for(var i = 0; i < o; i++)a.push(r[t + i]);\n else if (2 == s) for(i = 0; i < o; i++)a.push(n.readUshort(r, t + 2 * i));\n else if (3 == s) for(i = 0; i < o; i++)a.push(16777215 & n.readUint(r, t + 3 * i - 1));\n else if (1 != o) throw \"unsupported offset size: \" + s + \", count: \" + o;\n return (t += o * s) - 1;\n }, e.CFF.getCharString = function(r, t, a) {\n var n = e._bin, o = r[t], s = r[t + 1];\n r[t + 2], r[t + 3], r[t + 4];\n var i = 1, h = null, d = null;\n o <= 20 && (h = o, i = 1), 12 == o && (h = 100 * o + s, i = 2), 21 <= o && o <= 27 && (h = o, i = 1), 28 == o && (d = n.readShort(r, t + 1), i = 3), 29 <= o && o <= 31 && (h = o, i = 1), 32 <= o && o <= 246 && (d = o - 139, i = 1), 247 <= o && o <= 250 && (d = 256 * (o - 247) + s + 108, i = 2), 251 <= o && o <= 254 && (d = 256 * -(o - 251) - s - 108, i = 2), 255 == o && (d = n.readInt(r, t + 1) / 65535, i = 5), a.val = null != d ? d : \"o\" + h, a.size = i;\n }, e.CFF.readCharString = function(r, t, a) {\n for(var n = t + a, o = e._bin, s = []; t < n;){\n var i = r[t], h = r[t + 1];\n r[t + 2], r[t + 3], r[t + 4];\n var d = 1, f = null, u = null;\n i <= 20 && (f = i, d = 1), 12 == i && (f = 100 * i + h, d = 2), 19 != i && 20 != i || (f = i, d = 2), 21 <= i && i <= 27 && (f = i, d = 1), 28 == i && (u = o.readShort(r, t + 1), d = 3), 29 <= i && i <= 31 && (f = i, d = 1), 32 <= i && i <= 246 && (u = i - 139, d = 1), 247 <= i && i <= 250 && (u = 256 * (i - 247) + h + 108, d = 2), 251 <= i && i <= 254 && (u = 256 * -(i - 251) - h - 108, d = 2), 255 == i && (u = o.readInt(r, t + 1) / 65535, d = 5), s.push(null != u ? u : \"o\" + f), t += d;\n }\n return s;\n }, e.CFF.readDict = function(r, t, a) {\n for(var n = e._bin, o = {}, s = []; t < a;){\n var i = r[t], h = r[t + 1];\n r[t + 2], r[t + 3], r[t + 4];\n var d = 1, f = null, u = null;\n if (28 == i && (u = n.readShort(r, t + 1), d = 3), 29 == i && (u = n.readInt(r, t + 1), d = 5), 32 <= i && i <= 246 && (u = i - 139, d = 1), 247 <= i && i <= 250 && (u = 256 * (i - 247) + h + 108, d = 2), 251 <= i && i <= 254 && (u = 256 * -(i - 251) - h - 108, d = 2), 255 == i) throw u = n.readInt(r, t + 1) / 65535, d = 5, \"unknown number\";\n if (30 == i) {\n var l = [];\n for(d = 1;;){\n var v = r[t + d];\n d++;\n var c = v >> 4, p = 15 & v;\n if (15 != c && l.push(c), 15 != p && l.push(p), 15 == p) break;\n }\n for(var U = \"\", g = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n \".\",\n \"e\",\n \"e-\",\n \"reserved\",\n \"-\",\n \"endOfNumber\"\n ], S = 0; S < l.length; S++)U += g[l[S]];\n u = parseFloat(U);\n }\n if (i <= 21) {\n if (f = [\n \"version\",\n \"Notice\",\n \"FullName\",\n \"FamilyName\",\n \"Weight\",\n \"FontBBox\",\n \"BlueValues\",\n \"OtherBlues\",\n \"FamilyBlues\",\n \"FamilyOtherBlues\",\n \"StdHW\",\n \"StdVW\",\n \"escape\",\n \"UniqueID\",\n \"XUID\",\n \"charset\",\n \"Encoding\",\n \"CharStrings\",\n \"Private\",\n \"Subrs\",\n \"defaultWidthX\",\n \"nominalWidthX\"\n ][i], d = 1, 12 == i) f = [\n \"Copyright\",\n \"isFixedPitch\",\n \"ItalicAngle\",\n \"UnderlinePosition\",\n \"UnderlineThickness\",\n \"PaintType\",\n \"CharstringType\",\n \"FontMatrix\",\n \"StrokeWidth\",\n \"BlueScale\",\n \"BlueShift\",\n \"BlueFuzz\",\n \"StemSnapH\",\n \"StemSnapV\",\n \"ForceBold\",\n 0,\n 0,\n \"LanguageGroup\",\n \"ExpansionFactor\",\n \"initialRandomSeed\",\n \"SyntheticBase\",\n \"PostScript\",\n \"BaseFontName\",\n \"BaseFontBlend\",\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n \"ROS\",\n \"CIDFontVersion\",\n \"CIDFontRevision\",\n \"CIDFontType\",\n \"CIDCount\",\n \"UIDBase\",\n \"FDArray\",\n \"FDSelect\",\n \"FontName\"\n ][h], d = 2;\n }\n null != f ? (o[f] = 1 == s.length ? s[0] : s, s = []) : s.push(u), t += d;\n }\n return o;\n }, e.cmap = {}, e.cmap.parse = function(r, t, a) {\n r = new Uint8Array(r.buffer, t, a), t = 0;\n var n = e._bin, o = {};\n n.readUshort(r, t), t += 2;\n var s = n.readUshort(r, t);\n t += 2;\n var i = [];\n o.tables = [];\n for(var h = 0; h < s; h++){\n var d = n.readUshort(r, t);\n t += 2;\n var f = n.readUshort(r, t);\n t += 2;\n var u = n.readUint(r, t);\n t += 4;\n var l = \"p\" + d + \"e\" + f, v = i.indexOf(u);\n if (-1 == v) {\n var c;\n v = o.tables.length, i.push(u);\n var p = n.readUshort(r, u);\n 0 == p ? c = e.cmap.parse0(r, u) : 4 == p ? c = e.cmap.parse4(r, u) : 6 == p ? c = e.cmap.parse6(r, u) : 12 == p ? c = e.cmap.parse12(r, u) : console.debug(\"unknown format: \" + p, d, f, u), o.tables.push(c);\n }\n if (null != o[l]) throw \"multiple tables for one platform+encoding\";\n o[l] = v;\n }\n return o;\n }, e.cmap.parse0 = function(r, t) {\n var a = e._bin, n = {};\n n.format = a.readUshort(r, t), t += 2;\n var o = a.readUshort(r, t);\n t += 2, a.readUshort(r, t), t += 2, n.map = [];\n for(var s = 0; s < o - 6; s++)n.map.push(r[t + s]);\n return n;\n }, e.cmap.parse4 = function(r, t) {\n var a = e._bin, n = t, o = {};\n o.format = a.readUshort(r, t), t += 2;\n var s = a.readUshort(r, t);\n t += 2, a.readUshort(r, t), t += 2;\n var i = a.readUshort(r, t);\n t += 2;\n var h = i / 2;\n o.searchRange = a.readUshort(r, t), t += 2, o.entrySelector = a.readUshort(r, t), t += 2, o.rangeShift = a.readUshort(r, t), t += 2, o.endCount = a.readUshorts(r, t, h), t += 2 * h, t += 2, o.startCount = a.readUshorts(r, t, h), t += 2 * h, o.idDelta = [];\n for(var d = 0; d < h; d++)o.idDelta.push(a.readShort(r, t)), t += 2;\n for(o.idRangeOffset = a.readUshorts(r, t, h), t += 2 * h, o.glyphIdArray = []; t < n + s;)o.glyphIdArray.push(a.readUshort(r, t)), t += 2;\n return o;\n }, e.cmap.parse6 = function(r, t) {\n var a = e._bin, n = {};\n n.format = a.readUshort(r, t), t += 2, a.readUshort(r, t), t += 2, a.readUshort(r, t), t += 2, n.firstCode = a.readUshort(r, t), t += 2;\n var o = a.readUshort(r, t);\n t += 2, n.glyphIdArray = [];\n for(var s = 0; s < o; s++)n.glyphIdArray.push(a.readUshort(r, t)), t += 2;\n return n;\n }, e.cmap.parse12 = function(r, t) {\n var a = e._bin, n = {};\n n.format = a.readUshort(r, t), t += 2, t += 2, a.readUint(r, t), t += 4, a.readUint(r, t), t += 4;\n var o = a.readUint(r, t);\n t += 4, n.groups = [];\n for(var s = 0; s < o; s++){\n var i = t + 12 * s, h = a.readUint(r, i + 0), d = a.readUint(r, i + 4), f = a.readUint(r, i + 8);\n n.groups.push([\n h,\n d,\n f\n ]);\n }\n return n;\n }, e.glyf = {}, e.glyf.parse = function(r, e, t, a) {\n for(var n = [], o = 0; o < a.maxp.numGlyphs; o++)n.push(null);\n return n;\n }, e.glyf._parseGlyf = function(r, t) {\n var a = e._bin, n = r._data, o = e._tabOffset(n, \"glyf\", r._offset) + r.loca[t];\n if (r.loca[t] == r.loca[t + 1]) return null;\n var s = {};\n if (s.noc = a.readShort(n, o), o += 2, s.xMin = a.readShort(n, o), o += 2, s.yMin = a.readShort(n, o), o += 2, s.xMax = a.readShort(n, o), o += 2, s.yMax = a.readShort(n, o), o += 2, s.xMin >= s.xMax || s.yMin >= s.yMax) return null;\n if (s.noc > 0) {\n s.endPts = [];\n for(var i = 0; i < s.noc; i++)s.endPts.push(a.readUshort(n, o)), o += 2;\n var h = a.readUshort(n, o);\n if (o += 2, n.length - o < h) return null;\n s.instructions = a.readBytes(n, o, h), o += h;\n var d = s.endPts[s.noc - 1] + 1;\n s.flags = [];\n for(i = 0; i < d; i++){\n var f = n[o];\n if (o++, s.flags.push(f), 0 != (8 & f)) {\n var u = n[o];\n o++;\n for(var l = 0; l < u; l++)s.flags.push(f), i++;\n }\n }\n s.xs = [];\n for(i = 0; i < d; i++){\n var v = 0 != (2 & s.flags[i]), c = 0 != (16 & s.flags[i]);\n v ? (s.xs.push(c ? n[o] : -n[o]), o++) : c ? s.xs.push(0) : (s.xs.push(a.readShort(n, o)), o += 2);\n }\n s.ys = [];\n for(i = 0; i < d; i++){\n v = 0 != (4 & s.flags[i]), c = 0 != (32 & s.flags[i]);\n v ? (s.ys.push(c ? n[o] : -n[o]), o++) : c ? s.ys.push(0) : (s.ys.push(a.readShort(n, o)), o += 2);\n }\n var p = 0, U = 0;\n for(i = 0; i < d; i++)p += s.xs[i], U += s.ys[i], s.xs[i] = p, s.ys[i] = U;\n } else {\n var g;\n s.parts = [];\n do {\n g = a.readUshort(n, o), o += 2;\n var S = {\n m: {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n tx: 0,\n ty: 0\n },\n p1: -1,\n p2: -1\n };\n if (s.parts.push(S), S.glyphIndex = a.readUshort(n, o), o += 2, 1 & g) {\n var m = a.readShort(n, o);\n o += 2;\n var b = a.readShort(n, o);\n o += 2;\n } else {\n m = a.readInt8(n, o);\n o++;\n b = a.readInt8(n, o);\n o++;\n }\n 2 & g ? (S.m.tx = m, S.m.ty = b) : (S.p1 = m, S.p2 = b), 8 & g ? (S.m.a = S.m.d = a.readF2dot14(n, o), o += 2) : 64 & g ? (S.m.a = a.readF2dot14(n, o), o += 2, S.m.d = a.readF2dot14(n, o), o += 2) : 128 & g && (S.m.a = a.readF2dot14(n, o), o += 2, S.m.b = a.readF2dot14(n, o), o += 2, S.m.c = a.readF2dot14(n, o), o += 2, S.m.d = a.readF2dot14(n, o), o += 2);\n }while (32 & g);\n if (256 & g) {\n var y = a.readUshort(n, o);\n o += 2, s.instr = [];\n for(i = 0; i < y; i++)s.instr.push(n[o]), o++;\n }\n }\n return s;\n }, e.GDEF = {}, e.GDEF.parse = function(r, t, a, n) {\n var o = t;\n t += 4;\n var s = e._bin.readUshort(r, t);\n return {\n glyphClassDef: 0 === s ? null : e._lctf.readClassDef(r, o + s)\n };\n }, e.GPOS = {}, e.GPOS.parse = function(r, t, a, n) {\n return e._lctf.parse(r, t, a, n, e.GPOS.subt);\n }, e.GPOS.subt = function(r, t, a, n) {\n var o = e._bin, s = a, i = {};\n if (i.fmt = o.readUshort(r, a), a += 2, 1 == t || 2 == t || 3 == t || 7 == t || 8 == t && i.fmt <= 2) {\n var h = o.readUshort(r, a);\n a += 2, i.coverage = e._lctf.readCoverage(r, h + s);\n }\n if (1 == t && 1 == i.fmt) {\n var d = o.readUshort(r, a);\n a += 2, 0 != d && (i.pos = e.GPOS.readValueRecord(r, a, d));\n } else if (2 == t && i.fmt >= 1 && i.fmt <= 2) {\n d = o.readUshort(r, a);\n a += 2;\n var f = o.readUshort(r, a);\n a += 2;\n var u = e._lctf.numOfOnes(d), l = e._lctf.numOfOnes(f);\n if (1 == i.fmt) {\n i.pairsets = [];\n var v = o.readUshort(r, a);\n a += 2;\n for(var c = 0; c < v; c++){\n var p = s + o.readUshort(r, a);\n a += 2;\n var U = o.readUshort(r, p);\n p += 2;\n for(var g = [], S = 0; S < U; S++){\n var m = o.readUshort(r, p);\n p += 2, 0 != d && (P = e.GPOS.readValueRecord(r, p, d), p += 2 * u), 0 != f && (x = e.GPOS.readValueRecord(r, p, f), p += 2 * l), g.push({\n gid2: m,\n val1: P,\n val2: x\n });\n }\n i.pairsets.push(g);\n }\n }\n if (2 == i.fmt) {\n var b = o.readUshort(r, a);\n a += 2;\n var y = o.readUshort(r, a);\n a += 2;\n var F = o.readUshort(r, a);\n a += 2;\n var C = o.readUshort(r, a);\n a += 2, i.classDef1 = e._lctf.readClassDef(r, s + b), i.classDef2 = e._lctf.readClassDef(r, s + y), i.matrix = [];\n for(c = 0; c < F; c++){\n var _ = [];\n for(S = 0; S < C; S++){\n var P = null, x = null;\n 0 != d && (P = e.GPOS.readValueRecord(r, a, d), a += 2 * u), 0 != f && (x = e.GPOS.readValueRecord(r, a, f), a += 2 * l), _.push({\n val1: P,\n val2: x\n });\n }\n i.matrix.push(_);\n }\n }\n } else if (4 == t && 1 == i.fmt) i.markCoverage = e._lctf.readCoverage(r, o.readUshort(r, a) + s), i.baseCoverage = e._lctf.readCoverage(r, o.readUshort(r, a + 2) + s), i.markClassCount = o.readUshort(r, a + 4), i.markArray = e.GPOS.readMarkArray(r, o.readUshort(r, a + 6) + s), i.baseArray = e.GPOS.readBaseArray(r, o.readUshort(r, a + 8) + s, i.markClassCount);\n else if (6 == t && 1 == i.fmt) i.mark1Coverage = e._lctf.readCoverage(r, o.readUshort(r, a) + s), i.mark2Coverage = e._lctf.readCoverage(r, o.readUshort(r, a + 2) + s), i.markClassCount = o.readUshort(r, a + 4), i.mark1Array = e.GPOS.readMarkArray(r, o.readUshort(r, a + 6) + s), i.mark2Array = e.GPOS.readBaseArray(r, o.readUshort(r, a + 8) + s, i.markClassCount);\n else {\n if (9 == t && 1 == i.fmt) {\n var I = o.readUshort(r, a);\n a += 2;\n var w = o.readUint(r, a);\n if (a += 4, 9 == n.ltype) n.ltype = I;\n else if (n.ltype != I) throw \"invalid extension substitution\";\n return e.GPOS.subt(r, n.ltype, s + w);\n }\n console.debug(\"unsupported GPOS table LookupType\", t, \"format\", i.fmt);\n }\n return i;\n }, e.GPOS.readValueRecord = function(r, t, a) {\n var n = e._bin, o = [];\n return o.push(1 & a ? n.readShort(r, t) : 0), t += 1 & a ? 2 : 0, o.push(2 & a ? n.readShort(r, t) : 0), t += 2 & a ? 2 : 0, o.push(4 & a ? n.readShort(r, t) : 0), t += 4 & a ? 2 : 0, o.push(8 & a ? n.readShort(r, t) : 0), t += 8 & a ? 2 : 0, o;\n }, e.GPOS.readBaseArray = function(r, t, a) {\n var n = e._bin, o = [], s = t, i = n.readUshort(r, t);\n t += 2;\n for(var h = 0; h < i; h++){\n for(var d = [], f = 0; f < a; f++)d.push(e.GPOS.readAnchorRecord(r, s + n.readUshort(r, t))), t += 2;\n o.push(d);\n }\n return o;\n }, e.GPOS.readMarkArray = function(r, t) {\n var a = e._bin, n = [], o = t, s = a.readUshort(r, t);\n t += 2;\n for(var i = 0; i < s; i++){\n var h = e.GPOS.readAnchorRecord(r, a.readUshort(r, t + 2) + o);\n h.markClass = a.readUshort(r, t), n.push(h), t += 4;\n }\n return n;\n }, e.GPOS.readAnchorRecord = function(r, t) {\n var a = e._bin, n = {};\n return n.fmt = a.readUshort(r, t), n.x = a.readShort(r, t + 2), n.y = a.readShort(r, t + 4), n;\n }, e.GSUB = {}, e.GSUB.parse = function(r, t, a, n) {\n return e._lctf.parse(r, t, a, n, e.GSUB.subt);\n }, e.GSUB.subt = function(r, t, a, n) {\n var o = e._bin, s = a, i = {};\n if (i.fmt = o.readUshort(r, a), a += 2, 1 != t && 2 != t && 4 != t && 5 != t && 6 != t) return null;\n if (1 == t || 2 == t || 4 == t || 5 == t && i.fmt <= 2 || 6 == t && i.fmt <= 2) {\n var h = o.readUshort(r, a);\n a += 2, i.coverage = e._lctf.readCoverage(r, s + h);\n }\n if (1 == t && i.fmt >= 1 && i.fmt <= 2) {\n if (1 == i.fmt) i.delta = o.readShort(r, a), a += 2;\n else if (2 == i.fmt) {\n var d = o.readUshort(r, a);\n a += 2, i.newg = o.readUshorts(r, a, d), a += 2 * i.newg.length;\n }\n } else if (2 == t && 1 == i.fmt) {\n d = o.readUshort(r, a);\n a += 2, i.seqs = [];\n for(var f = 0; f < d; f++){\n var u = o.readUshort(r, a) + s;\n a += 2;\n var l = o.readUshort(r, u);\n i.seqs.push(o.readUshorts(r, u + 2, l));\n }\n } else if (4 == t) {\n i.vals = [];\n d = o.readUshort(r, a);\n a += 2;\n for(f = 0; f < d; f++){\n var v = o.readUshort(r, a);\n a += 2, i.vals.push(e.GSUB.readLigatureSet(r, s + v));\n }\n } else if (5 == t && 2 == i.fmt) {\n if (2 == i.fmt) {\n var c = o.readUshort(r, a);\n a += 2, i.cDef = e._lctf.readClassDef(r, s + c), i.scset = [];\n var p = o.readUshort(r, a);\n a += 2;\n for(f = 0; f < p; f++){\n var U = o.readUshort(r, a);\n a += 2, i.scset.push(0 == U ? null : e.GSUB.readSubClassSet(r, s + U));\n }\n }\n } else if (6 == t && 3 == i.fmt) {\n if (3 == i.fmt) {\n for(f = 0; f < 3; f++){\n d = o.readUshort(r, a);\n a += 2;\n for(var g = [], S = 0; S < d; S++)g.push(e._lctf.readCoverage(r, s + o.readUshort(r, a + 2 * S)));\n a += 2 * d, 0 == f && (i.backCvg = g), 1 == f && (i.inptCvg = g), 2 == f && (i.ahedCvg = g);\n }\n d = o.readUshort(r, a);\n a += 2, i.lookupRec = e.GSUB.readSubstLookupRecords(r, a, d);\n }\n } else {\n if (7 == t && 1 == i.fmt) {\n var m = o.readUshort(r, a);\n a += 2;\n var b = o.readUint(r, a);\n if (a += 4, 9 == n.ltype) n.ltype = m;\n else if (n.ltype != m) throw \"invalid extension substitution\";\n return e.GSUB.subt(r, n.ltype, s + b);\n }\n console.debug(\"unsupported GSUB table LookupType\", t, \"format\", i.fmt);\n }\n return i;\n }, e.GSUB.readSubClassSet = function(r, t) {\n var a = e._bin.readUshort, n = t, o = [], s = a(r, t);\n t += 2;\n for(var i = 0; i < s; i++){\n var h = a(r, t);\n t += 2, o.push(e.GSUB.readSubClassRule(r, n + h));\n }\n return o;\n }, e.GSUB.readSubClassRule = function(r, t) {\n var a = e._bin.readUshort, n = {}, o = a(r, t), s = a(r, t += 2);\n t += 2, n.input = [];\n for(var i = 0; i < o - 1; i++)n.input.push(a(r, t)), t += 2;\n return n.substLookupRecords = e.GSUB.readSubstLookupRecords(r, t, s), n;\n }, e.GSUB.readSubstLookupRecords = function(r, t, a) {\n for(var n = e._bin.readUshort, o = [], s = 0; s < a; s++)o.push(n(r, t), n(r, t + 2)), t += 4;\n return o;\n }, e.GSUB.readChainSubClassSet = function(r, t) {\n var a = e._bin, n = t, o = [], s = a.readUshort(r, t);\n t += 2;\n for(var i = 0; i < s; i++){\n var h = a.readUshort(r, t);\n t += 2, o.push(e.GSUB.readChainSubClassRule(r, n + h));\n }\n return o;\n }, e.GSUB.readChainSubClassRule = function(r, t) {\n for(var a = e._bin, n = {}, o = [\n \"backtrack\",\n \"input\",\n \"lookahead\"\n ], s = 0; s < o.length; s++){\n var i = a.readUshort(r, t);\n t += 2, 1 == s && i--, n[o[s]] = a.readUshorts(r, t, i), t += 2 * n[o[s]].length;\n }\n i = a.readUshort(r, t);\n return t += 2, n.subst = a.readUshorts(r, t, 2 * i), t += 2 * n.subst.length, n;\n }, e.GSUB.readLigatureSet = function(r, t) {\n var a = e._bin, n = t, o = [], s = a.readUshort(r, t);\n t += 2;\n for(var i = 0; i < s; i++){\n var h = a.readUshort(r, t);\n t += 2, o.push(e.GSUB.readLigature(r, n + h));\n }\n return o;\n }, e.GSUB.readLigature = function(r, t) {\n var a = e._bin, n = {\n chain: []\n };\n n.nglyph = a.readUshort(r, t), t += 2;\n var o = a.readUshort(r, t);\n t += 2;\n for(var s = 0; s < o - 1; s++)n.chain.push(a.readUshort(r, t)), t += 2;\n return n;\n }, e.head = {}, e.head.parse = function(r, t, a) {\n var n = e._bin, o = {};\n return n.readFixed(r, t), t += 4, o.fontRevision = n.readFixed(r, t), t += 4, n.readUint(r, t), t += 4, n.readUint(r, t), t += 4, o.flags = n.readUshort(r, t), t += 2, o.unitsPerEm = n.readUshort(r, t), t += 2, o.created = n.readUint64(r, t), t += 8, o.modified = n.readUint64(r, t), t += 8, o.xMin = n.readShort(r, t), t += 2, o.yMin = n.readShort(r, t), t += 2, o.xMax = n.readShort(r, t), t += 2, o.yMax = n.readShort(r, t), t += 2, o.macStyle = n.readUshort(r, t), t += 2, o.lowestRecPPEM = n.readUshort(r, t), t += 2, o.fontDirectionHint = n.readShort(r, t), t += 2, o.indexToLocFormat = n.readShort(r, t), t += 2, o.glyphDataFormat = n.readShort(r, t), t += 2, o;\n }, e.hhea = {}, e.hhea.parse = function(r, t, a) {\n var n = e._bin, o = {};\n return n.readFixed(r, t), t += 4, o.ascender = n.readShort(r, t), t += 2, o.descender = n.readShort(r, t), t += 2, o.lineGap = n.readShort(r, t), t += 2, o.advanceWidthMax = n.readUshort(r, t), t += 2, o.minLeftSideBearing = n.readShort(r, t), t += 2, o.minRightSideBearing = n.readShort(r, t), t += 2, o.xMaxExtent = n.readShort(r, t), t += 2, o.caretSlopeRise = n.readShort(r, t), t += 2, o.caretSlopeRun = n.readShort(r, t), t += 2, o.caretOffset = n.readShort(r, t), t += 2, t += 8, o.metricDataFormat = n.readShort(r, t), t += 2, o.numberOfHMetrics = n.readUshort(r, t), t += 2, o;\n }, e.hmtx = {}, e.hmtx.parse = function(r, t, a, n) {\n for(var o = e._bin, s = {\n aWidth: [],\n lsBearing: []\n }, i = 0, h = 0, d = 0; d < n.maxp.numGlyphs; d++)d < n.hhea.numberOfHMetrics && (i = o.readUshort(r, t), t += 2, h = o.readShort(r, t), t += 2), s.aWidth.push(i), s.lsBearing.push(h);\n return s;\n }, e.kern = {}, e.kern.parse = function(r, t, a, n) {\n var o = e._bin, s = o.readUshort(r, t);\n if (t += 2, 1 == s) return e.kern.parseV1(r, t - 2, a, n);\n var i = o.readUshort(r, t);\n t += 2;\n for(var h = {\n glyph1: [],\n rval: []\n }, d = 0; d < i; d++){\n t += 2;\n a = o.readUshort(r, t);\n t += 2;\n var f = o.readUshort(r, t);\n t += 2;\n var u = f >>> 8;\n if (0 != (u &= 15)) throw \"unknown kern table format: \" + u;\n t = e.kern.readFormat0(r, t, h);\n }\n return h;\n }, e.kern.parseV1 = function(r, t, a, n) {\n var o = e._bin;\n o.readFixed(r, t), t += 4;\n var s = o.readUint(r, t);\n t += 4;\n for(var i = {\n glyph1: [],\n rval: []\n }, h = 0; h < s; h++){\n o.readUint(r, t), t += 4;\n var d = o.readUshort(r, t);\n t += 2, o.readUshort(r, t), t += 2;\n var f = d >>> 8;\n if (0 != (f &= 15)) throw \"unknown kern table format: \" + f;\n t = e.kern.readFormat0(r, t, i);\n }\n return i;\n }, e.kern.readFormat0 = function(r, t, a) {\n var n = e._bin, o = -1, s = n.readUshort(r, t);\n t += 2, n.readUshort(r, t), t += 2, n.readUshort(r, t), t += 2, n.readUshort(r, t), t += 2;\n for(var i = 0; i < s; i++){\n var h = n.readUshort(r, t);\n t += 2;\n var d = n.readUshort(r, t);\n t += 2;\n var f = n.readShort(r, t);\n t += 2, h != o && (a.glyph1.push(h), a.rval.push({\n glyph2: [],\n vals: []\n }));\n var u = a.rval[a.rval.length - 1];\n u.glyph2.push(d), u.vals.push(f), o = h;\n }\n return t;\n }, e.loca = {}, e.loca.parse = function(r, t, a, n) {\n var o = e._bin, s = [], i = n.head.indexToLocFormat, h = n.maxp.numGlyphs + 1;\n if (0 == i) for(var d = 0; d < h; d++)s.push(o.readUshort(r, t + (d << 1)) << 1);\n if (1 == i) for(d = 0; d < h; d++)s.push(o.readUint(r, t + (d << 2)));\n return s;\n }, e.maxp = {}, e.maxp.parse = function(r, t, a) {\n var n = e._bin, o = {}, s = n.readUint(r, t);\n return t += 4, o.numGlyphs = n.readUshort(r, t), t += 2, 65536 == s && (o.maxPoints = n.readUshort(r, t), t += 2, o.maxContours = n.readUshort(r, t), t += 2, o.maxCompositePoints = n.readUshort(r, t), t += 2, o.maxCompositeContours = n.readUshort(r, t), t += 2, o.maxZones = n.readUshort(r, t), t += 2, o.maxTwilightPoints = n.readUshort(r, t), t += 2, o.maxStorage = n.readUshort(r, t), t += 2, o.maxFunctionDefs = n.readUshort(r, t), t += 2, o.maxInstructionDefs = n.readUshort(r, t), t += 2, o.maxStackElements = n.readUshort(r, t), t += 2, o.maxSizeOfInstructions = n.readUshort(r, t), t += 2, o.maxComponentElements = n.readUshort(r, t), t += 2, o.maxComponentDepth = n.readUshort(r, t), t += 2), o;\n }, e.name = {}, e.name.parse = function(r, t, a) {\n var n = e._bin, o = {};\n n.readUshort(r, t), t += 2;\n var s = n.readUshort(r, t);\n t += 2, n.readUshort(r, t);\n for(var i, h = [\n \"copyright\",\n \"fontFamily\",\n \"fontSubfamily\",\n \"ID\",\n \"fullName\",\n \"version\",\n \"postScriptName\",\n \"trademark\",\n \"manufacturer\",\n \"designer\",\n \"description\",\n \"urlVendor\",\n \"urlDesigner\",\n \"licence\",\n \"licenceURL\",\n \"---\",\n \"typoFamilyName\",\n \"typoSubfamilyName\",\n \"compatibleFull\",\n \"sampleText\",\n \"postScriptCID\",\n \"wwsFamilyName\",\n \"wwsSubfamilyName\",\n \"lightPalette\",\n \"darkPalette\"\n ], d = t += 2, f = 0; f < s; f++){\n var u = n.readUshort(r, t);\n t += 2;\n var l = n.readUshort(r, t);\n t += 2;\n var v = n.readUshort(r, t);\n t += 2;\n var c = n.readUshort(r, t);\n t += 2;\n var p = n.readUshort(r, t);\n t += 2;\n var U = n.readUshort(r, t);\n t += 2;\n var g, S = h[c], m = d + 12 * s + U;\n if (0 == u) g = n.readUnicode(r, m, p / 2);\n else if (3 == u && 0 == l) g = n.readUnicode(r, m, p / 2);\n else if (0 == l) g = n.readASCII(r, m, p);\n else if (1 == l) g = n.readUnicode(r, m, p / 2);\n else if (3 == l) g = n.readUnicode(r, m, p / 2);\n else {\n if (1 != u) throw \"unknown encoding \" + l + \", platformID: \" + u;\n g = n.readASCII(r, m, p), console.debug(\"reading unknown MAC encoding \" + l + \" as ASCII\");\n }\n var b = \"p\" + u + \",\" + v.toString(16);\n null == o[b] && (o[b] = {}), o[b][void 0 !== S ? S : c] = g, o[b]._lang = v;\n }\n for(var y in o)if (null != o[y].postScriptName && 1033 == o[y]._lang) return o[y];\n for(var y in o)if (null != o[y].postScriptName && 0 == o[y]._lang) return o[y];\n for(var y in o)if (null != o[y].postScriptName && 3084 == o[y]._lang) return o[y];\n for(var y in o)if (null != o[y].postScriptName) return o[y];\n for(var y in o){\n i = y;\n break;\n }\n return console.debug(\"returning name table with languageID \" + o[i]._lang), o[i];\n }, e[\"OS/2\"] = {}, e[\"OS/2\"].parse = function(r, t, a) {\n var n = e._bin.readUshort(r, t);\n t += 2;\n var o = {};\n if (0 == n) e[\"OS/2\"].version0(r, t, o);\n else if (1 == n) e[\"OS/2\"].version1(r, t, o);\n else if (2 == n || 3 == n || 4 == n) e[\"OS/2\"].version2(r, t, o);\n else {\n if (5 != n) throw \"unknown OS/2 table version: \" + n;\n e[\"OS/2\"].version5(r, t, o);\n }\n return o;\n }, e[\"OS/2\"].version0 = function(r, t, a) {\n var n = e._bin;\n return a.xAvgCharWidth = n.readShort(r, t), t += 2, a.usWeightClass = n.readUshort(r, t), t += 2, a.usWidthClass = n.readUshort(r, t), t += 2, a.fsType = n.readUshort(r, t), t += 2, a.ySubscriptXSize = n.readShort(r, t), t += 2, a.ySubscriptYSize = n.readShort(r, t), t += 2, a.ySubscriptXOffset = n.readShort(r, t), t += 2, a.ySubscriptYOffset = n.readShort(r, t), t += 2, a.ySuperscriptXSize = n.readShort(r, t), t += 2, a.ySuperscriptYSize = n.readShort(r, t), t += 2, a.ySuperscriptXOffset = n.readShort(r, t), t += 2, a.ySuperscriptYOffset = n.readShort(r, t), t += 2, a.yStrikeoutSize = n.readShort(r, t), t += 2, a.yStrikeoutPosition = n.readShort(r, t), t += 2, a.sFamilyClass = n.readShort(r, t), t += 2, a.panose = n.readBytes(r, t, 10), t += 10, a.ulUnicodeRange1 = n.readUint(r, t), t += 4, a.ulUnicodeRange2 = n.readUint(r, t), t += 4, a.ulUnicodeRange3 = n.readUint(r, t), t += 4, a.ulUnicodeRange4 = n.readUint(r, t), t += 4, a.achVendID = [\n n.readInt8(r, t),\n n.readInt8(r, t + 1),\n n.readInt8(r, t + 2),\n n.readInt8(r, t + 3)\n ], t += 4, a.fsSelection = n.readUshort(r, t), t += 2, a.usFirstCharIndex = n.readUshort(r, t), t += 2, a.usLastCharIndex = n.readUshort(r, t), t += 2, a.sTypoAscender = n.readShort(r, t), t += 2, a.sTypoDescender = n.readShort(r, t), t += 2, a.sTypoLineGap = n.readShort(r, t), t += 2, a.usWinAscent = n.readUshort(r, t), t += 2, a.usWinDescent = n.readUshort(r, t), t += 2;\n }, e[\"OS/2\"].version1 = function(r, t, a) {\n var n = e._bin;\n return t = e[\"OS/2\"].version0(r, t, a), a.ulCodePageRange1 = n.readUint(r, t), t += 4, a.ulCodePageRange2 = n.readUint(r, t), t += 4;\n }, e[\"OS/2\"].version2 = function(r, t, a) {\n var n = e._bin;\n return t = e[\"OS/2\"].version1(r, t, a), a.sxHeight = n.readShort(r, t), t += 2, a.sCapHeight = n.readShort(r, t), t += 2, a.usDefault = n.readUshort(r, t), t += 2, a.usBreak = n.readUshort(r, t), t += 2, a.usMaxContext = n.readUshort(r, t), t += 2;\n }, e[\"OS/2\"].version5 = function(r, t, a) {\n var n = e._bin;\n return t = e[\"OS/2\"].version2(r, t, a), a.usLowerOpticalPointSize = n.readUshort(r, t), t += 2, a.usUpperOpticalPointSize = n.readUshort(r, t), t += 2;\n }, e.post = {}, e.post.parse = function(r, t, a) {\n var n = e._bin, o = {};\n return o.version = n.readFixed(r, t), t += 4, o.italicAngle = n.readFixed(r, t), t += 4, o.underlinePosition = n.readShort(r, t), t += 2, o.underlineThickness = n.readShort(r, t), t += 2, o;\n }, null == e && (e = {}), null == e.U && (e.U = {}), e.U.codeToGlyph = function(r, e) {\n var t = r.cmap, a = -1;\n if (null != t.p0e4 ? a = t.p0e4 : null != t.p3e1 ? a = t.p3e1 : null != t.p1e0 ? a = t.p1e0 : null != t.p0e3 && (a = t.p0e3), -1 == a) throw \"no familiar platform and encoding!\";\n var n = t.tables[a];\n if (0 == n.format) return e >= n.map.length ? 0 : n.map[e];\n if (4 == n.format) {\n for(var o = -1, s = 0; s < n.endCount.length; s++)if (e <= n.endCount[s]) {\n o = s;\n break;\n }\n if (-1 == o) return 0;\n if (n.startCount[o] > e) return 0;\n return 65535 & (0 != n.idRangeOffset[o] ? n.glyphIdArray[e - n.startCount[o] + (n.idRangeOffset[o] >> 1) - (n.idRangeOffset.length - o)] : e + n.idDelta[o]);\n }\n if (12 == n.format) {\n if (e > n.groups[n.groups.length - 1][1]) return 0;\n for(s = 0; s < n.groups.length; s++){\n var i = n.groups[s];\n if (i[0] <= e && e <= i[1]) return i[2] + (e - i[0]);\n }\n return 0;\n }\n throw \"unknown cmap table format \" + n.format;\n }, e.U.glyphToPath = function(r, t) {\n var a = {\n cmds: [],\n crds: []\n };\n if (r.SVG && r.SVG.entries[t]) {\n var n = r.SVG.entries[t];\n return null == n ? a : (\"string\" == typeof n && (n = e.SVG.toPath(n), r.SVG.entries[t] = n), n);\n }\n if (r.CFF) {\n var o = {\n x: 0,\n y: 0,\n stack: [],\n nStems: 0,\n haveWidth: !1,\n width: r.CFF.Private ? r.CFF.Private.defaultWidthX : 0,\n open: !1\n }, s = r.CFF, i = r.CFF.Private;\n if (s.ROS) {\n for(var h = 0; s.FDSelect[h + 2] <= t;)h += 2;\n i = s.FDArray[s.FDSelect[h + 1]].Private;\n }\n e.U._drawCFF(r.CFF.CharStrings[t], o, s, i, a);\n } else r.glyf && e.U._drawGlyf(t, r, a);\n return a;\n }, e.U._drawGlyf = function(r, t, a) {\n var n = t.glyf[r];\n null == n && (n = t.glyf[r] = e.glyf._parseGlyf(t, r)), null != n && (n.noc > -1 ? e.U._simpleGlyph(n, a) : e.U._compoGlyph(n, t, a));\n }, e.U._simpleGlyph = function(r, t) {\n for(var a = 0; a < r.noc; a++){\n for(var n = 0 == a ? 0 : r.endPts[a - 1] + 1, o = r.endPts[a], s = n; s <= o; s++){\n var i = s == n ? o : s - 1, h = s == o ? n : s + 1, d = 1 & r.flags[s], f = 1 & r.flags[i], u = 1 & r.flags[h], l = r.xs[s], v = r.ys[s];\n if (s == n) {\n if (d) {\n if (!f) {\n e.U.P.moveTo(t, l, v);\n continue;\n }\n e.U.P.moveTo(t, r.xs[i], r.ys[i]);\n } else f ? e.U.P.moveTo(t, r.xs[i], r.ys[i]) : e.U.P.moveTo(t, (r.xs[i] + l) / 2, (r.ys[i] + v) / 2);\n }\n d ? f && e.U.P.lineTo(t, l, v) : u ? e.U.P.qcurveTo(t, l, v, r.xs[h], r.ys[h]) : e.U.P.qcurveTo(t, l, v, (l + r.xs[h]) / 2, (v + r.ys[h]) / 2);\n }\n e.U.P.closePath(t);\n }\n }, e.U._compoGlyph = function(r, t, a) {\n for(var n = 0; n < r.parts.length; n++){\n var o = {\n cmds: [],\n crds: []\n }, s = r.parts[n];\n e.U._drawGlyf(s.glyphIndex, t, o);\n for(var i = s.m, h = 0; h < o.crds.length; h += 2){\n var d = o.crds[h], f = o.crds[h + 1];\n a.crds.push(d * i.a + f * i.b + i.tx), a.crds.push(d * i.c + f * i.d + i.ty);\n }\n for(h = 0; h < o.cmds.length; h++)a.cmds.push(o.cmds[h]);\n }\n }, e.U._getGlyphClass = function(r, t) {\n var a = e._lctf.getInterval(t, r);\n return -1 == a ? 0 : t[a + 2];\n }, e.U._applySubs = function(r, t, a, n) {\n for(var o = r.length - t - 1, s = 0; s < a.tabs.length; s++)if (null != a.tabs[s]) {\n var i, h = a.tabs[s];\n if (!h.coverage || -1 != (i = e._lctf.coverageIndex(h.coverage, r[t]))) {\n if (1 == a.ltype) r[t], 1 == h.fmt ? r[t] = r[t] + h.delta : r[t] = h.newg[i];\n else if (4 == a.ltype) for(var d = h.vals[i], f = 0; f < d.length; f++){\n var u = d[f], l = u.chain.length;\n if (!(l > o)) {\n for(var v = !0, c = 0, p = 0; p < l; p++){\n for(; -1 == r[t + c + (1 + p)];)c++;\n u.chain[p] != r[t + c + (1 + p)] && (v = !1);\n }\n if (v) {\n r[t] = u.nglyph;\n for(p = 0; p < l + c; p++)r[t + p + 1] = -1;\n break;\n }\n }\n }\n else if (5 == a.ltype && 2 == h.fmt) for(var U = e._lctf.getInterval(h.cDef, r[t]), g = h.cDef[U + 2], S = h.scset[g], m = 0; m < S.length; m++){\n var b = S[m], y = b.input;\n if (!(y.length > o)) {\n for(v = !0, p = 0; p < y.length; p++){\n var F = e._lctf.getInterval(h.cDef, r[t + 1 + p]);\n if (-1 == U && h.cDef[F + 2] != y[p]) {\n v = !1;\n break;\n }\n }\n if (v) {\n var C = b.substLookupRecords;\n for(f = 0; f < C.length; f += 2)C[f], C[f + 1];\n }\n }\n }\n else if (6 == a.ltype && 3 == h.fmt) {\n if (!e.U._glsCovered(r, h.backCvg, t - h.backCvg.length)) continue;\n if (!e.U._glsCovered(r, h.inptCvg, t)) continue;\n if (!e.U._glsCovered(r, h.ahedCvg, t + h.inptCvg.length)) continue;\n var _ = h.lookupRec;\n for(m = 0; m < _.length; m += 2){\n U = _[m];\n var P = n[_[m + 1]];\n e.U._applySubs(r, t + U, P, n);\n }\n }\n }\n }\n }, e.U._glsCovered = function(r, t, a) {\n for(var n = 0; n < t.length; n++){\n if (-1 == e._lctf.coverageIndex(t[n], r[a + n])) return !1;\n }\n return !0;\n }, e.U.glyphsToPath = function(r, t, a) {\n for(var n = {\n cmds: [],\n crds: []\n }, o = 0, s = 0; s < t.length; s++){\n var i = t[s];\n if (-1 != i) {\n for(var h = s < t.length - 1 && -1 != t[s + 1] ? t[s + 1] : 0, d = e.U.glyphToPath(r, i), f = 0; f < d.crds.length; f += 2)n.crds.push(d.crds[f] + o), n.crds.push(d.crds[f + 1]);\n a && n.cmds.push(a);\n for(f = 0; f < d.cmds.length; f++)n.cmds.push(d.cmds[f]);\n a && n.cmds.push(\"X\"), o += r.hmtx.aWidth[i], s < t.length - 1 && (o += e.U.getPairAdjustment(r, i, h));\n }\n }\n return n;\n }, e.U.P = {}, e.U.P.moveTo = function(r, e, t) {\n r.cmds.push(\"M\"), r.crds.push(e, t);\n }, e.U.P.lineTo = function(r, e, t) {\n r.cmds.push(\"L\"), r.crds.push(e, t);\n }, e.U.P.curveTo = function(r, e, t, a, n, o, s) {\n r.cmds.push(\"C\"), r.crds.push(e, t, a, n, o, s);\n }, e.U.P.qcurveTo = function(r, e, t, a, n) {\n r.cmds.push(\"Q\"), r.crds.push(e, t, a, n);\n }, e.U.P.closePath = function(r) {\n r.cmds.push(\"Z\");\n }, e.U._drawCFF = function(r, t, a, n, o) {\n for(var s = t.stack, i = t.nStems, h = t.haveWidth, d = t.width, f = t.open, u = 0, l = t.x, v = t.y, c = 0, p = 0, U = 0, g = 0, S = 0, m = 0, b = 0, y = 0, F = 0, C = 0, _ = {\n val: 0,\n size: 0\n }; u < r.length;){\n e.CFF.getCharString(r, u, _);\n var P = _.val;\n if (u += _.size, \"o1\" == P || \"o18\" == P) s.length % 2 != 0 && !h && (d = s.shift() + n.nominalWidthX), i += s.length >> 1, s.length = 0, h = !0;\n else if (\"o3\" == P || \"o23\" == P) s.length % 2 != 0 && !h && (d = s.shift() + n.nominalWidthX), i += s.length >> 1, s.length = 0, h = !0;\n else if (\"o4\" == P) s.length > 1 && !h && (d = s.shift() + n.nominalWidthX, h = !0), f && e.U.P.closePath(o), v += s.pop(), e.U.P.moveTo(o, l, v), f = !0;\n else if (\"o5\" == P) for(; s.length > 0;)l += s.shift(), v += s.shift(), e.U.P.lineTo(o, l, v);\n else if (\"o6\" == P || \"o7\" == P) for(var x = s.length, I = \"o6\" == P, w = 0; w < x; w++){\n var k = s.shift();\n I ? l += k : v += k, I = !I, e.U.P.lineTo(o, l, v);\n }\n else if (\"o8\" == P || \"o24\" == P) {\n x = s.length;\n for(var G = 0; G + 6 <= x;)c = l + s.shift(), p = v + s.shift(), U = c + s.shift(), g = p + s.shift(), l = U + s.shift(), v = g + s.shift(), e.U.P.curveTo(o, c, p, U, g, l, v), G += 6;\n \"o24\" == P && (l += s.shift(), v += s.shift(), e.U.P.lineTo(o, l, v));\n } else {\n if (\"o11\" == P) break;\n if (\"o1234\" == P || \"o1235\" == P || \"o1236\" == P || \"o1237\" == P) \"o1234\" == P && (p = v, U = (c = l + s.shift()) + s.shift(), C = g = p + s.shift(), m = g, y = v, l = (b = (S = (F = U + s.shift()) + s.shift()) + s.shift()) + s.shift(), e.U.P.curveTo(o, c, p, U, g, F, C), e.U.P.curveTo(o, S, m, b, y, l, v)), \"o1235\" == P && (c = l + s.shift(), p = v + s.shift(), U = c + s.shift(), g = p + s.shift(), F = U + s.shift(), C = g + s.shift(), S = F + s.shift(), m = C + s.shift(), b = S + s.shift(), y = m + s.shift(), l = b + s.shift(), v = y + s.shift(), s.shift(), e.U.P.curveTo(o, c, p, U, g, F, C), e.U.P.curveTo(o, S, m, b, y, l, v)), \"o1236\" == P && (c = l + s.shift(), p = v + s.shift(), U = c + s.shift(), C = g = p + s.shift(), m = g, b = (S = (F = U + s.shift()) + s.shift()) + s.shift(), y = m + s.shift(), l = b + s.shift(), e.U.P.curveTo(o, c, p, U, g, F, C), e.U.P.curveTo(o, S, m, b, y, l, v)), \"o1237\" == P && (c = l + s.shift(), p = v + s.shift(), U = c + s.shift(), g = p + s.shift(), F = U + s.shift(), C = g + s.shift(), S = F + s.shift(), m = C + s.shift(), b = S + s.shift(), y = m + s.shift(), Math.abs(b - l) > Math.abs(y - v) ? l = b + s.shift() : v = y + s.shift(), e.U.P.curveTo(o, c, p, U, g, F, C), e.U.P.curveTo(o, S, m, b, y, l, v));\n else if (\"o14\" == P) {\n if (s.length > 0 && !h && (d = s.shift() + a.nominalWidthX, h = !0), 4 == s.length) {\n var O = s.shift(), T = s.shift(), D = s.shift(), B = s.shift(), A = e.CFF.glyphBySE(a, D), R = e.CFF.glyphBySE(a, B);\n e.U._drawCFF(a.CharStrings[A], t, a, n, o), t.x = O, t.y = T, e.U._drawCFF(a.CharStrings[R], t, a, n, o);\n }\n f && (e.U.P.closePath(o), f = !1);\n } else if (\"o19\" == P || \"o20\" == P) s.length % 2 != 0 && !h && (d = s.shift() + n.nominalWidthX), i += s.length >> 1, s.length = 0, h = !0, u += i + 7 >> 3;\n else if (\"o21\" == P) s.length > 2 && !h && (d = s.shift() + n.nominalWidthX, h = !0), v += s.pop(), l += s.pop(), f && e.U.P.closePath(o), e.U.P.moveTo(o, l, v), f = !0;\n else if (\"o22\" == P) s.length > 1 && !h && (d = s.shift() + n.nominalWidthX, h = !0), l += s.pop(), f && e.U.P.closePath(o), e.U.P.moveTo(o, l, v), f = !0;\n else if (\"o25\" == P) {\n for(; s.length > 6;)l += s.shift(), v += s.shift(), e.U.P.lineTo(o, l, v);\n c = l + s.shift(), p = v + s.shift(), U = c + s.shift(), g = p + s.shift(), l = U + s.shift(), v = g + s.shift(), e.U.P.curveTo(o, c, p, U, g, l, v);\n } else if (\"o26\" == P) for(s.length % 2 && (l += s.shift()); s.length > 0;)c = l, p = v + s.shift(), l = U = c + s.shift(), v = (g = p + s.shift()) + s.shift(), e.U.P.curveTo(o, c, p, U, g, l, v);\n else if (\"o27\" == P) for(s.length % 2 && (v += s.shift()); s.length > 0;)p = v, U = (c = l + s.shift()) + s.shift(), g = p + s.shift(), l = U + s.shift(), v = g, e.U.P.curveTo(o, c, p, U, g, l, v);\n else if (\"o10\" == P || \"o29\" == P) {\n var L = \"o10\" == P ? n : a;\n if (0 == s.length) console.debug(\"error: empty stack\");\n else {\n var W = s.pop(), M = L.Subrs[W + L.Bias];\n t.x = l, t.y = v, t.nStems = i, t.haveWidth = h, t.width = d, t.open = f, e.U._drawCFF(M, t, a, n, o), l = t.x, v = t.y, i = t.nStems, h = t.haveWidth, d = t.width, f = t.open;\n }\n } else if (\"o30\" == P || \"o31\" == P) {\n var V = s.length, E = (G = 0, \"o31\" == P);\n for(G += V - (x = -3 & V); G < x;)E ? (p = v, U = (c = l + s.shift()) + s.shift(), v = (g = p + s.shift()) + s.shift(), x - G == 5 ? (l = U + s.shift(), G++) : l = U, E = !1) : (c = l, p = v + s.shift(), U = c + s.shift(), g = p + s.shift(), l = U + s.shift(), x - G == 5 ? (v = g + s.shift(), G++) : v = g, E = !0), e.U.P.curveTo(o, c, p, U, g, l, v), G += 4;\n } else {\n if (\"o\" == (P + \"\").charAt(0)) throw console.debug(\"Unknown operation: \" + P, r), P;\n s.push(P);\n }\n }\n }\n t.x = l, t.y = v, t.nStems = i, t.haveWidth = h, t.width = d, t.open = f;\n };\n var t = e, a = {\n Typr: t\n };\n return r.Typr = t, r.default = a, Object.defineProperty(r, \"__esModule\", {\n value: !0\n }), r;\n }({}).Typr;\n}\n/*!\nCustom bundle of woff2otf (https://github.com/arty-name/woff2otf) with fflate\n(https://github.com/101arrowz/fflate) for use in Troika text rendering. \nOriginal licenses apply: \n- fflate: https://github.com/101arrowz/fflate/blob/master/LICENSE (MIT)\n- woff2otf.js: https://github.com/arty-name/woff2otf/blob/master/woff2otf.js (Apache2)\n*/ function $bc7831423112e56a$var$woff2otfFactory() {\n return function(r) {\n var e = Uint8Array, n = Uint16Array, t = Uint32Array, a = new e([\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 1,\n 1,\n 2,\n 2,\n 2,\n 2,\n 3,\n 3,\n 3,\n 3,\n 4,\n 4,\n 4,\n 4,\n 5,\n 5,\n 5,\n 5,\n 0,\n 0,\n 0,\n 0\n ]), i = new e([\n 0,\n 0,\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 3,\n 3,\n 4,\n 4,\n 5,\n 5,\n 6,\n 6,\n 7,\n 7,\n 8,\n 8,\n 9,\n 9,\n 10,\n 10,\n 11,\n 11,\n 12,\n 12,\n 13,\n 13,\n 0,\n 0\n ]), o = new e([\n 16,\n 17,\n 18,\n 0,\n 8,\n 7,\n 9,\n 6,\n 10,\n 5,\n 11,\n 4,\n 12,\n 3,\n 13,\n 2,\n 14,\n 1,\n 15\n ]), f = function(r, e) {\n for(var a = new n(31), i = 0; i < 31; ++i)a[i] = e += 1 << r[i - 1];\n var o = new t(a[30]);\n for(i = 1; i < 30; ++i)for(var f = a[i]; f < a[i + 1]; ++f)o[f] = f - a[i] << 5 | i;\n return [\n a,\n o\n ];\n }, u = f(a, 2), v = u[0], s = u[1];\n v[28] = 258, s[258] = 28;\n for(var l = f(i, 0)[0], c = new n(32768), g = 0; g < 32768; ++g){\n var h = (43690 & g) >>> 1 | (21845 & g) << 1;\n h = (61680 & (h = (52428 & h) >>> 2 | (13107 & h) << 2)) >>> 4 | (3855 & h) << 4, c[g] = ((65280 & h) >>> 8 | (255 & h) << 8) >>> 1;\n }\n var w = function(r, e, t) {\n for(var a = r.length, i = 0, o = new n(e); i < a; ++i)++o[r[i] - 1];\n var f, u = new n(e);\n for(i = 0; i < e; ++i)u[i] = u[i - 1] + o[i - 1] << 1;\n if (t) {\n f = new n(1 << e);\n var v = 15 - e;\n for(i = 0; i < a; ++i)if (r[i]) for(var s = i << 4 | r[i], l = e - r[i], g = u[r[i] - 1]++ << l, h = g | (1 << l) - 1; g <= h; ++g)f[c[g] >>> v] = s;\n } else for(f = new n(a), i = 0; i < a; ++i)r[i] && (f[i] = c[u[r[i] - 1]++] >>> 15 - r[i]);\n return f;\n }, d = new e(288);\n for(g = 0; g < 144; ++g)d[g] = 8;\n for(g = 144; g < 256; ++g)d[g] = 9;\n for(g = 256; g < 280; ++g)d[g] = 7;\n for(g = 280; g < 288; ++g)d[g] = 8;\n var m = new e(32);\n for(g = 0; g < 32; ++g)m[g] = 5;\n var b = w(d, 9, 1), p = w(m, 5, 1), y = function(r) {\n for(var e = r[0], n = 1; n < r.length; ++n)r[n] > e && (e = r[n]);\n return e;\n }, L = function(r, e, n) {\n var t = e / 8 | 0;\n return (r[t] | r[t + 1] << 8) >> (7 & e) & n;\n }, U = function(r, e) {\n var n = e / 8 | 0;\n return (r[n] | r[n + 1] << 8 | r[n + 2] << 16) >> (7 & e);\n }, k = [\n \"unexpected EOF\",\n \"invalid block type\",\n \"invalid length/literal\",\n \"invalid distance\",\n \"stream finished\",\n \"no stream handler\",\n ,\n \"no callback\",\n \"invalid UTF-8 data\",\n \"extra field too long\",\n \"date not in range 1980-2099\",\n \"filename too long\",\n \"stream finishing\",\n \"invalid zip data\"\n ], T = function(r, e, n) {\n var t = new Error(e || k[r]);\n if (t.code = r, Error.captureStackTrace && Error.captureStackTrace(t, T), !n) throw t;\n return t;\n }, O = function(r, f, u) {\n var s = r.length;\n if (!s || u && !u.l && s < 5) return f || new e(0);\n var c = !f || u, g = !u || u.i;\n u || (u = {}), f || (f = new e(3 * s));\n var h, d = function(r) {\n var n = f.length;\n if (r > n) {\n var t = new e(Math.max(2 * n, r));\n t.set(f), f = t;\n }\n }, m = u.f || 0, k = u.p || 0, O = u.b || 0, A = u.l, x = u.d, E = u.m, D = u.n, M = 8 * s;\n do {\n if (!A) {\n u.f = m = L(r, k, 1);\n var S = L(r, k + 1, 3);\n if (k += 3, !S) {\n var V = r[(I = ((h = k) / 8 | 0) + (7 & h && 1) + 4) - 4] | r[I - 3] << 8, _ = I + V;\n if (_ > s) {\n g && T(0);\n break;\n }\n c && d(O + V), f.set(r.subarray(I, _), O), u.b = O += V, u.p = k = 8 * _;\n continue;\n }\n if (1 == S) A = b, x = p, E = 9, D = 5;\n else if (2 == S) {\n var j = L(r, k, 31) + 257, z = L(r, k + 10, 15) + 4, C = j + L(r, k + 5, 31) + 1;\n k += 14;\n for(var F = new e(C), P = new e(19), q = 0; q < z; ++q)P[o[q]] = L(r, k + 3 * q, 7);\n k += 3 * z;\n var B = y(P), G = (1 << B) - 1, H = w(P, B, 1);\n for(q = 0; q < C;){\n var I, J = H[L(r, k, G)];\n if (k += 15 & J, (I = J >>> 4) < 16) F[q++] = I;\n else {\n var K = 0, N = 0;\n for(16 == I ? (N = 3 + L(r, k, 3), k += 2, K = F[q - 1]) : 17 == I ? (N = 3 + L(r, k, 7), k += 3) : 18 == I && (N = 11 + L(r, k, 127), k += 7); N--;)F[q++] = K;\n }\n }\n var Q = F.subarray(0, j), R = F.subarray(j);\n E = y(Q), D = y(R), A = w(Q, E, 1), x = w(R, D, 1);\n } else T(1);\n if (k > M) {\n g && T(0);\n break;\n }\n }\n c && d(O + 131072);\n for(var W = (1 << E) - 1, X = (1 << D) - 1, Y = k;; Y = k){\n var Z = (K = A[U(r, k) & W]) >>> 4;\n if ((k += 15 & K) > M) {\n g && T(0);\n break;\n }\n if (K || T(2), Z < 256) f[O++] = Z;\n else {\n if (256 == Z) {\n Y = k, A = null;\n break;\n }\n var $ = Z - 254;\n if (Z > 264) {\n var rr = a[q = Z - 257];\n $ = L(r, k, (1 << rr) - 1) + v[q], k += rr;\n }\n var er = x[U(r, k) & X], nr = er >>> 4;\n er || T(3), k += 15 & er;\n R = l[nr];\n if (nr > 3) {\n rr = i[nr];\n R += U(r, k) & (1 << rr) - 1, k += rr;\n }\n if (k > M) {\n g && T(0);\n break;\n }\n c && d(O + 131072);\n for(var tr = O + $; O < tr; O += 4)f[O] = f[O - R], f[O + 1] = f[O + 1 - R], f[O + 2] = f[O + 2 - R], f[O + 3] = f[O + 3 - R];\n O = tr;\n }\n }\n u.l = A, u.p = Y, u.b = O, A && (m = 1, u.m = E, u.d = x, u.n = D);\n }while (!m);\n return O == f.length ? f : function(r, a, i) {\n (null == a || a < 0) && (a = 0), (null == i || i > r.length) && (i = r.length);\n var o = new (r instanceof n ? n : r instanceof t ? t : e)(i - a);\n return o.set(r.subarray(a, i)), o;\n }(f, 0, O);\n }, A = new e(0);\n var x = \"undefined\" != typeof TextDecoder && new TextDecoder;\n try {\n x.decode(A, {\n stream: !0\n });\n } catch (r) {}\n return r.convert_streams = function(r) {\n var e = new DataView(r), n = 0;\n function t() {\n var r = e.getUint16(n);\n return n += 2, r;\n }\n function a() {\n var r = e.getUint32(n);\n return n += 4, r;\n }\n function i(r) {\n m.setUint16(b, r), b += 2;\n }\n function o(r) {\n m.setUint32(b, r), b += 4;\n }\n for(var f = {\n signature: a(),\n flavor: a(),\n length: a(),\n numTables: t(),\n reserved: t(),\n totalSfntSize: a(),\n majorVersion: t(),\n minorVersion: t(),\n metaOffset: a(),\n metaLength: a(),\n metaOrigLength: a(),\n privOffset: a(),\n privLength: a()\n }, u = 0; Math.pow(2, u) <= f.numTables;)u++;\n u--;\n for(var v = 16 * Math.pow(2, u), s = 16 * f.numTables - v, l = 12, c = [], g = 0; g < f.numTables; g++)c.push({\n tag: a(),\n offset: a(),\n compLength: a(),\n origLength: a(),\n origChecksum: a()\n }), l += 16;\n var h, w = new Uint8Array(12 + 16 * c.length + c.reduce(function(r, e) {\n return r + e.origLength + 4;\n }, 0)), d = w.buffer, m = new DataView(d), b = 0;\n return o(f.flavor), i(f.numTables), i(v), i(u), i(s), c.forEach(function(r) {\n o(r.tag), o(r.origChecksum), o(l), o(r.origLength), r.outOffset = l, (l += r.origLength) % 4 != 0 && (l += 4 - l % 4);\n }), c.forEach(function(e) {\n var n, t = r.slice(e.offset, e.offset + e.compLength);\n if (e.compLength != e.origLength) {\n var a = new Uint8Array(e.origLength);\n n = new Uint8Array(t, 2), O(n, a);\n } else a = new Uint8Array(t);\n w.set(a, e.outOffset);\n var i = 0;\n (l = e.outOffset + e.origLength) % 4 != 0 && (i = 4 - l % 4), w.set(new Uint8Array(i).buffer, e.outOffset + e.origLength), h = l + i;\n }), d.slice(0, h);\n }, Object.defineProperty(r, \"__esModule\", {\n value: !0\n }), r;\n }({}).convert_streams;\n}\n/**\n * A factory wrapper parsing a font file using Typr.\n * Also adds support for WOFF files (not WOFF2).\n */ /**\n * @typedef ParsedFont\n * @property {number} ascender\n * @property {number} descender\n * @property {number} xHeight\n * @property {(number) => boolean} supportsCodePoint\n * @property {(text:string, fontSize:number, letterSpacing:number, callback) => number} forEachGlyph\n * @property {number} lineGap\n * @property {number} capHeight\n * @property {number} unitsPerEm\n */ /**\n * @typedef {(buffer: ArrayBuffer) => ParsedFont} FontParser\n */ /**\n * @returns {FontParser}\n */ function $bc7831423112e56a$var$parserFactory(Typr, woff2otf) {\n const cmdArgLengths = {\n M: 2,\n L: 2,\n Q: 4,\n C: 6,\n Z: 0\n };\n // {joinType: \"skip+step,...\"}\n const joiningTypeRawData = {\n \"C\": \"18g,ca,368,1kz\",\n \"D\": \"17k,6,2,2+4,5+c,2+6,2+1,10+1,9+f,j+11,2+1,a,2,2+1,15+2,3,j+2,6+3,2+8,2,2,2+1,w+a,4+e,3+3,2,3+2,3+5,23+w,2f+4,3,2+9,2,b,2+3,3,1k+9,6+1,3+1,2+2,2+d,30g,p+y,1,1+1g,f+x,2,sd2+1d,jf3+4,f+3,2+4,2+2,b+3,42,2,4+2,2+1,2,3,t+1,9f+w,2,el+2,2+g,d+2,2l,2+1,5,3+1,2+1,2,3,6,16wm+1v\",\n \"R\": \"17m+3,2,2,6+3,m,15+2,2+2,h+h,13,3+8,2,2,3+1,2,p+1,x,5+4,5,a,2,2,3,u,c+2,g+1,5,2+1,4+1,5j,6+1,2,b,2+2,f,2+1,1s+2,2,3+1,7,1ez0,2,2+1,4+4,b,4,3,b,42,2+2,4,3,2+1,2,o+3,ae,ep,x,2o+2,3+1,3,5+1,6\",\n \"L\": \"x9u,jff,a,fd,jv\",\n \"T\": \"4t,gj+33,7o+4,1+1,7c+18,2,2+1,2+1,2,21+a,2,1b+k,h,2u+6,3+5,3+1,2+3,y,2,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,3,7,6+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+d,1,1+1,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,ek,3+1,r+4,1e+4,6+5,2p+c,1+3,1,1+2,1+b,2db+2,3y,2p+v,ff+3,30+1,n9x,1+2,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,5s,6y+2,ea,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+9,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2,2b+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,470+8,at4+4,1o+6,t5,1s+3,2a,f5l+1,2+3,43o+2,a+7,1+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,1,gzau,v+2n,3l+6n\"\n };\n const JT_LEFT = 1, JT_RIGHT = 2, JT_DUAL = 4, JT_TRANSPARENT = 8, JT_JOIN_CAUSING = 16, JT_NON_JOINING = 32; //indicates that a character does not join with the preceding or with the subsequent character.,\n let joiningTypeMap;\n function getCharJoiningType(ch) {\n if (!joiningTypeMap) {\n const m = {\n R: JT_RIGHT,\n L: JT_LEFT,\n D: JT_DUAL,\n C: JT_JOIN_CAUSING,\n U: JT_NON_JOINING,\n T: JT_TRANSPARENT\n };\n joiningTypeMap = new Map();\n for(let type in joiningTypeRawData){\n let lastCode = 0;\n joiningTypeRawData[type].split(\",\").forEach((range)=>{\n let [skip, step] = range.split(\"+\");\n skip = parseInt(skip, 36);\n step = step ? parseInt(step, 36) : 0;\n joiningTypeMap.set(lastCode += skip, m[type]);\n for(let i = step; i--;)joiningTypeMap.set(++lastCode, m[type]);\n });\n }\n }\n return joiningTypeMap.get(ch) || JT_NON_JOINING;\n }\n const ISOL = 1, INIT = 2, FINA = 3, MEDI = 4;\n const formsToFeatures = [\n null,\n \"isol\",\n \"init\",\n \"fina\",\n \"medi\"\n ];\n function detectJoiningForms(str) {\n // This implements the algorithm described here:\n // https://github.com/n8willis/opentype-shaping-documents/blob/master/opentype-shaping-arabic-general.md\n const joiningForms = new Uint8Array(str.length);\n let prevJoiningType = JT_NON_JOINING;\n let prevForm = ISOL;\n let prevIndex = -1;\n for(let i = 0; i < str.length; i++){\n const code = str.codePointAt(i);\n let joiningType = getCharJoiningType(code) | 0;\n let form = ISOL;\n if (joiningType & JT_TRANSPARENT) continue;\n if (prevJoiningType & (JT_LEFT | JT_DUAL | JT_JOIN_CAUSING)) {\n if (joiningType & (JT_RIGHT | JT_DUAL | JT_JOIN_CAUSING)) {\n form = FINA;\n // isol->init, fina->medi\n if (prevForm === ISOL || prevForm === FINA) joiningForms[prevIndex]++;\n } else if (joiningType & (JT_LEFT | JT_NON_JOINING)) // medi->fina, init->isol\n {\n if (prevForm === INIT || prevForm === MEDI) joiningForms[prevIndex]--;\n }\n } else if (prevJoiningType & (JT_RIGHT | JT_NON_JOINING)) // medi->fina, init->isol\n {\n if (prevForm === INIT || prevForm === MEDI) joiningForms[prevIndex]--;\n }\n prevForm = joiningForms[i] = form;\n prevJoiningType = joiningType;\n prevIndex = i;\n if (code > 0xffff) i++;\n }\n // console.log(str.split('').map(ch => ch.codePointAt(0).toString(16)))\n // console.log(str.split('').map(ch => getCharJoiningType(ch.codePointAt(0))))\n // console.log(Array.from(joiningForms).map(f => formsToFeatures[f] || 'none'))\n return joiningForms;\n }\n function stringToGlyphs(font, str) {\n const glyphIds = [];\n for(let i = 0; i < str.length; i++){\n const cc = str.codePointAt(i);\n if (cc > 0xffff) i++;\n glyphIds.push(Typr.U.codeToGlyph(font, cc));\n }\n const gsub = font[\"GSUB\"];\n if (gsub) {\n const { lookupList: lookupList, featureList: featureList } = gsub;\n let joiningForms;\n const supportedFeatures = /^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws|ccmp)$/;\n const usedLookups = [];\n featureList.forEach((feature)=>{\n if (supportedFeatures.test(feature.tag)) for(let ti = 0; ti < feature.tab.length; ti++){\n if (usedLookups[feature.tab[ti]]) continue;\n usedLookups[feature.tab[ti]] = true;\n const tab = lookupList[feature.tab[ti]];\n const isJoiningFeature = /^(isol|init|fina|medi)$/.test(feature.tag);\n if (isJoiningFeature && !joiningForms) joiningForms = detectJoiningForms(str);\n for(let ci = 0; ci < glyphIds.length; ci++)if (!joiningForms || !isJoiningFeature || formsToFeatures[joiningForms[ci]] === feature.tag) Typr.U._applySubs(glyphIds, ci, tab, lookupList);\n }\n });\n }\n return glyphIds;\n }\n // Calculate advances and x/y offsets for each glyph, e.g. kerning and mark\n // attachments. This is a more complete version of Typr.U.getPairAdjustment\n // and should become an upstream replacement eventually.\n function calcGlyphPositions(font, glyphIds) {\n const positions = new Int16Array(glyphIds.length * 3); // [offsetX, offsetY, advanceX, ...]\n let glyphIndex = 0;\n for(; glyphIndex < glyphIds.length; glyphIndex++){\n const glyphId = glyphIds[glyphIndex];\n if (glyphId === -1) continue;\n positions[glyphIndex * 3 + 2] = font.hmtx.aWidth[glyphId]; // populate advanceX in...advance.\n const gpos = font.GPOS;\n if (gpos) {\n const llist = gpos.lookupList;\n for(let i = 0; i < llist.length; i++){\n const lookup = llist[i];\n for(let j = 0; j < lookup.tabs.length; j++){\n const tab = lookup.tabs[j];\n // Single char placement\n if (lookup.ltype === 1) {\n const ind = Typr._lctf.coverageIndex(tab.coverage, glyphId);\n if (ind !== -1 && tab.pos) {\n applyValueRecord(tab.pos, glyphIndex);\n break;\n }\n } else if (lookup.ltype === 2) {\n let adj = null;\n let prevGlyphIndex = getPrevGlyphIndex();\n if (prevGlyphIndex !== -1) {\n const coverageIndex = Typr._lctf.coverageIndex(tab.coverage, glyphIds[prevGlyphIndex]);\n if (coverageIndex !== -1) {\n if (tab.fmt === 1) {\n const right = tab.pairsets[coverageIndex];\n for(let k = 0; k < right.length; k++)if (right[k].gid2 === glyphId) adj = right[k];\n } else if (tab.fmt === 2) {\n const c1 = Typr.U._getGlyphClass(glyphIds[prevGlyphIndex], tab.classDef1);\n const c2 = Typr.U._getGlyphClass(glyphId, tab.classDef2);\n adj = tab.matrix[c1][c2];\n }\n if (adj) {\n if (adj.val1) applyValueRecord(adj.val1, prevGlyphIndex);\n if (adj.val2) applyValueRecord(adj.val2, glyphIndex);\n break;\n }\n }\n }\n } else if (lookup.ltype === 4) {\n const markArrIndex = Typr._lctf.coverageIndex(tab.markCoverage, glyphId);\n if (markArrIndex !== -1) {\n const baseGlyphIndex = getPrevGlyphIndex(isBaseGlyph);\n const baseArrIndex = baseGlyphIndex === -1 ? -1 : Typr._lctf.coverageIndex(tab.baseCoverage, glyphIds[baseGlyphIndex]);\n if (baseArrIndex !== -1) {\n const markRecord = tab.markArray[markArrIndex];\n const baseAnchor = tab.baseArray[baseArrIndex][markRecord.markClass];\n positions[glyphIndex * 3] = baseAnchor.x - markRecord.x + positions[baseGlyphIndex * 3] - positions[baseGlyphIndex * 3 + 2];\n positions[glyphIndex * 3 + 1] = baseAnchor.y - markRecord.y + positions[baseGlyphIndex * 3 + 1];\n break;\n }\n }\n } else if (lookup.ltype === 6) {\n const mark1ArrIndex = Typr._lctf.coverageIndex(tab.mark1Coverage, glyphId);\n if (mark1ArrIndex !== -1) {\n const prevGlyphIndex = getPrevGlyphIndex();\n if (prevGlyphIndex !== -1) {\n const prevGlyphId = glyphIds[prevGlyphIndex];\n if (getGlyphClass(font, prevGlyphId) === 3) {\n const mark2ArrIndex = Typr._lctf.coverageIndex(tab.mark2Coverage, prevGlyphId);\n if (mark2ArrIndex !== -1) {\n const mark1Record = tab.mark1Array[mark1ArrIndex];\n const mark2Anchor = tab.mark2Array[mark2ArrIndex][mark1Record.markClass];\n positions[glyphIndex * 3] = mark2Anchor.x - mark1Record.x + positions[prevGlyphIndex * 3] - positions[prevGlyphIndex * 3 + 2];\n positions[glyphIndex * 3 + 1] = mark2Anchor.y - mark1Record.y + positions[prevGlyphIndex * 3 + 1];\n break;\n }\n }\n }\n }\n }\n }\n }\n } else if (font.kern && !font.cff) {\n const prevGlyphIndex = getPrevGlyphIndex();\n if (prevGlyphIndex !== -1) {\n const ind1 = font.kern.glyph1.indexOf(glyphIds[prevGlyphIndex]);\n if (ind1 !== -1) {\n const ind2 = font.kern.rval[ind1].glyph2.indexOf(glyphId);\n if (ind2 !== -1) positions[prevGlyphIndex * 3 + 2] += font.kern.rval[ind1].vals[ind2];\n }\n }\n }\n }\n return positions;\n function getPrevGlyphIndex(filter) {\n for(let i = glyphIndex - 1; i >= 0; i--){\n if (glyphIds[i] !== -1 && (!filter || filter(glyphIds[i]))) return i;\n }\n return -1;\n }\n function isBaseGlyph(glyphId) {\n return getGlyphClass(font, glyphId) === 1;\n }\n function applyValueRecord(source, gi) {\n for(let i = 0; i < 3; i++)positions[gi * 3 + i] += source[i] || 0;\n }\n }\n function getGlyphClass(font, glyphId) {\n const classDef = font.GDEF && font.GDEF.glyphClassDef;\n return classDef ? Typr.U._getGlyphClass(glyphId, classDef) : 0;\n }\n function firstNum(...args) {\n for(let i = 0; i < args.length; i++){\n if (typeof args[i] === \"number\") return args[i];\n }\n }\n /**\n * @returns ParsedFont\n */ function wrapFontObj(typrFont) {\n const glyphMap = Object.create(null);\n const os2 = typrFont[\"OS/2\"];\n const hhea = typrFont.hhea;\n const unitsPerEm = typrFont.head.unitsPerEm;\n const ascender = firstNum(os2 && os2.sTypoAscender, hhea && hhea.ascender, unitsPerEm);\n /** @type ParsedFont */ const fontObj = {\n unitsPerEm: unitsPerEm,\n ascender: ascender,\n descender: firstNum(os2 && os2.sTypoDescender, hhea && hhea.descender, 0),\n capHeight: firstNum(os2 && os2.sCapHeight, ascender),\n xHeight: firstNum(os2 && os2.sxHeight, ascender),\n lineGap: firstNum(os2 && os2.sTypoLineGap, hhea && hhea.lineGap),\n supportsCodePoint (code) {\n return Typr.U.codeToGlyph(typrFont, code) > 0;\n },\n forEachGlyph (text, fontSize, letterSpacing, callback) {\n let penX = 0;\n const fontScale = 1 / fontObj.unitsPerEm * fontSize;\n const glyphIds = stringToGlyphs(typrFont, text);\n let charIndex = 0;\n const positions = calcGlyphPositions(typrFont, glyphIds);\n glyphIds.forEach((glyphId, i)=>{\n // Typr returns a glyph index per string codepoint, with -1s in place of those that\n // were omitted due to ligature substitution. So we can track original index in the\n // string via simple increment, and skip everything else when seeing a -1.\n if (glyphId !== -1) {\n let glyphObj = glyphMap[glyphId];\n if (!glyphObj) {\n const { cmds: cmds, crds: crds } = Typr.U.glyphToPath(typrFont, glyphId);\n // Build path string\n let path = \"\";\n let crdsIdx = 0;\n for(let i = 0, len = cmds.length; i < len; i++){\n const numArgs = cmdArgLengths[cmds[i]];\n path += cmds[i];\n for(let j = 1; j <= numArgs; j++)path += (j > 1 ? \",\" : \"\") + crds[crdsIdx++];\n }\n // Find extents - Glyf gives this in metadata but not CFF, and Typr doesn't\n // normalize the two, so it's simplest just to iterate ourselves.\n let xMin, yMin, xMax, yMax;\n if (crds.length) {\n xMin = yMin = Infinity;\n xMax = yMax = -Infinity;\n for(let i = 0, len = crds.length; i < len; i += 2){\n let x = crds[i];\n let y = crds[i + 1];\n if (x < xMin) xMin = x;\n if (y < yMin) yMin = y;\n if (x > xMax) xMax = x;\n if (y > yMax) yMax = y;\n }\n } else xMin = xMax = yMin = yMax = 0;\n glyphObj = glyphMap[glyphId] = {\n index: glyphId,\n advanceWidth: typrFont.hmtx.aWidth[glyphId],\n xMin: xMin,\n yMin: yMin,\n xMax: xMax,\n yMax: yMax,\n path: path\n };\n }\n callback.call(null, glyphObj, penX + positions[i * 3] * fontScale, positions[i * 3 + 1] * fontScale, charIndex);\n penX += positions[i * 3 + 2] * fontScale;\n if (letterSpacing) penX += letterSpacing * fontSize;\n }\n charIndex += text.codePointAt(charIndex) > 0xffff ? 2 : 1;\n });\n return penX;\n }\n };\n return fontObj;\n }\n /**\n * @type FontParser\n */ return function parse(buffer) {\n // Look to see if we have a WOFF file and convert it if so:\n const peek = new Uint8Array(buffer, 0, 4);\n const tag = Typr._bin.readASCII(peek, 0, 4);\n if (tag === \"wOFF\") buffer = woff2otf(buffer);\n else if (tag === \"wOF2\") throw new Error(\"woff2 fonts not supported\");\n return wrapFontObj(Typr.parse(buffer)[0]);\n };\n}\nconst $bc7831423112e56a$var$workerModule = /*#__PURE__*/ (0, $8ue7g.defineWorkerModule)({\n name: \"Typr Font Parser\",\n dependencies: [\n $bc7831423112e56a$var$typrFactory,\n $bc7831423112e56a$var$woff2otfFactory,\n $bc7831423112e56a$var$parserFactory\n ],\n init (typrFactory, woff2otfFactory, parserFactory) {\n const Typr = typrFactory();\n const woff2otf = woff2otfFactory();\n return parserFactory(Typr, woff2otf);\n }\n});\n/*!\nCustom bundle of @unicode-font-resolver/client v1.0.2 (https://github.com/lojjic/unicode-font-resolver)\nfor use in Troika text rendering. \nOriginal MIT license applies\n*/ function $bc7831423112e56a$var$unicodeFontResolverClientFactory() {\n return function(t) {\n var n = function() {\n this.buckets = new Map;\n };\n n.prototype.add = function(t) {\n var n = t >> 5;\n this.buckets.set(n, (this.buckets.get(n) || 0) | 1 << (31 & t));\n }, n.prototype.has = function(t) {\n var n = this.buckets.get(t >> 5);\n return void 0 !== n && 0 != (n & 1 << (31 & t));\n }, n.prototype.serialize = function() {\n var t = [];\n return this.buckets.forEach(function(n, r) {\n t.push((+r).toString(36) + \":\" + n.toString(36));\n }), t.join(\",\");\n }, n.prototype.deserialize = function(t) {\n var n = this;\n this.buckets.clear(), t.split(\",\").forEach(function(t) {\n var r = t.split(\":\");\n n.buckets.set(parseInt(r[0], 36), parseInt(r[1], 36));\n });\n };\n var r = Math.pow(2, 8), e = r - 1, o = ~e;\n function a(t) {\n var n = (function(t) {\n return t & o;\n })(t).toString(16), e = (function(t) {\n return (t & o) + r - 1;\n })(t).toString(16);\n return \"codepoint-index/plane\" + (t >> 16) + \"/\" + n + \"-\" + e + \".json\";\n }\n function i(t, n) {\n var r = t & e, o = n.codePointAt(r / 6 | 0);\n return 0 != ((o = (o || 48) - 48) & 1 << r % 6);\n }\n function u(t, n) {\n var r;\n (r = t, r.replace(/U\\+/gi, \"\").replace(/^,+|,+$/g, \"\").split(/,+/).map(function(t) {\n return t.split(\"-\").map(function(t) {\n return parseInt(t.trim(), 16);\n });\n })).forEach(function(t) {\n var r = t[0], e = t[1];\n void 0 === e && (e = r), n(r, e);\n });\n }\n function c(t, n) {\n u(t, function(t, r) {\n for(var e = t; e <= r; e++)n(e);\n });\n }\n var s = {}, f = {}, l = new WeakMap, v = \"https://cdn.jsdelivr.net/gh/lojjic/unicode-font-resolver@v1.0.1/packages/data\";\n function d(t) {\n var r = l.get(t);\n return r || (r = new n, c(t.ranges, function(t) {\n return r.add(t);\n }), l.set(t, r)), r;\n }\n var h, p = new Map;\n function g(t, n, r) {\n return t[n] ? n : t[r] ? r : function(t) {\n for(var n in t)return n;\n }(t);\n }\n function w(t, n) {\n var r = n;\n if (!t.includes(r)) {\n r = 1 / 0;\n for(var e = 0; e < t.length; e++)Math.abs(t[e] - n) < Math.abs(r - n) && (r = t[e]);\n }\n return r;\n }\n function k(t) {\n return h || (h = new Set, c(\"9-D,20,85,A0,1680,2000-200A,2028-202F,205F,3000\", function(t) {\n h.add(t);\n })), h.has(t);\n }\n return t.CodePointSet = n, t.clearCache = function() {\n s = {}, f = {};\n }, t.getFontsForString = function(t, n) {\n void 0 === n && (n = {});\n var r, e = n.lang;\n void 0 === e && (e = /\\p{Script=Hangul}/u.test(r = t) ? \"ko\" : /\\p{Script=Hiragana}|\\p{Script=Katakana}/u.test(r) ? \"ja\" : \"en\");\n var o = n.category;\n void 0 === o && (o = \"sans-serif\");\n var u = n.style;\n void 0 === u && (u = \"normal\");\n var c = n.weight;\n void 0 === c && (c = 400);\n var l = (n.dataUrl || v).replace(/\\/$/g, \"\"), h = new Map, y = new Uint8Array(t.length), b = {}, m = {}, A = new Array(t.length), S = new Map, j = !1;\n function M(t) {\n var n = p.get(t);\n return n || (n = fetch(l + \"/\" + t).then(function(t) {\n if (!t.ok) throw new Error(t.statusText);\n return t.json().then(function(t) {\n if (!Array.isArray(t) || 1 !== t[0]) throw new Error(\"Incorrect schema version; need 1, got \" + t[0]);\n return t[1];\n });\n }).catch(function(n) {\n if (l !== v) return j || (console.error('unicode-font-resolver: Failed loading from dataUrl \"' + l + '\", trying default CDN. ' + n.message), j = !0), l = v, p.delete(t), M(t);\n throw n;\n }), p.set(t, n)), n;\n }\n for(var P = function(n) {\n var r = t.codePointAt(n), e = a(r);\n A[n] = e, s[e] || S.has(e) || S.set(e, M(e).then(function(t) {\n s[e] = t;\n })), r > 65535 && (n++, E = n);\n }, E = 0; E < t.length; E++)P(E);\n return Promise.all(S.values()).then(function() {\n S.clear();\n for(var n = function(n) {\n var o = t.codePointAt(n), a = null, u = s[A[n]], c = void 0;\n for(var l in u){\n var v = m[l];\n if (void 0 === v && (v = m[l] = new RegExp(l).test(e || \"en\")), v) {\n for(var d in c = l, u[l])if (i(o, u[l][d])) {\n a = d;\n break;\n }\n break;\n }\n }\n if (!a) {\n t: for(var h in u)if (h !== c) {\n for(var p in u[h])if (i(o, u[h][p])) {\n a = p;\n break t;\n }\n }\n }\n a || (console.debug(\"No font coverage for U+\" + o.toString(16)), a = \"latin\"), A[n] = a, f[a] || S.has(a) || S.set(a, M(\"font-meta/\" + a + \".json\").then(function(t) {\n f[a] = t;\n })), o > 65535 && (n++, r = n);\n }, r = 0; r < t.length; r++)n(r);\n return Promise.all(S.values());\n }).then(function() {\n for(var n, r = null, e = 0; e < t.length; e++){\n var a = t.codePointAt(e);\n if (r && (k(a) || d(r).has(a))) y[e] = y[e - 1];\n else {\n r = f[A[e]];\n var i = b[r.id];\n if (!i) {\n var s = r.typeforms, v = g(s, o, \"sans-serif\"), p = g(s[v], u, \"normal\"), m = w(null === (n = s[v]) || void 0 === n ? void 0 : n[p], c);\n i = b[r.id] = l + \"/font-files/\" + r.id + \"/\" + v + \".\" + p + \".\" + m + \".woff\";\n }\n var S = h.get(i);\n null == S && (S = h.size, h.set(i, S)), y[e] = S;\n }\n a > 65535 && (e++, y[e] = y[e - 1]);\n }\n return {\n fontUrls: Array.from(h.keys()),\n chars: y\n };\n });\n }, Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t;\n }({});\n}\n/**\n * @typedef {string | {src:string, label?:string, unicodeRange?:string, lang?:string}} UserFont\n */ /**\n * @typedef {ClientOptions} FontResolverOptions\n * @property {Array|UserFont} [fonts]\n * @property {'normal'|'italic'} [style]\n * @property {'normal'|'bold'|number} [style]\n * @property {string} [unicodeFontsURL]\n */ /**\n * @typedef {Object} FontResolverResult\n * @property {Uint8Array} chars\n * @property {Array} fonts\n */ /**\n * @typedef {function} FontResolver\n * @param {string} text\n * @param {(FontResolverResult) => void} callback\n * @param {FontResolverOptions} [options]\n */ /**\n * Factory for the FontResolver function.\n * @param {FontParser} fontParser\n * @param {{getFontsForString: function, CodePointSet: function}} unicodeFontResolverClient\n * @return {FontResolver}\n */ function $bc7831423112e56a$var$createFontResolver(fontParser, unicodeFontResolverClient) {\n /**\n * @type {Record}\n */ const parsedFonts = Object.create(null);\n /**\n * @type {Record void>>}\n */ const loadingFonts = Object.create(null);\n /**\n * Load a given font url\n */ function doLoadFont(url, callback) {\n const onError = (err)=>{\n console.error(`Failure loading font ${url}`, err);\n };\n try {\n const request = new XMLHttpRequest();\n request.open(\"get\", url, true);\n request.responseType = \"arraybuffer\";\n request.onload = function() {\n if (request.status >= 400) onError(new Error(request.statusText));\n else if (request.status > 0) try {\n const fontObj = fontParser(request.response);\n fontObj.src = url;\n callback(fontObj);\n } catch (e) {\n onError(e);\n }\n };\n request.onerror = onError;\n request.send();\n } catch (err) {\n onError(err);\n }\n }\n /**\n * Load a given font url if needed, invoking a callback when it's loaded. If already\n * loaded, the callback will be called synchronously.\n * @param {string} fontUrl\n * @param {(font: ParsedFont) => void} callback\n */ function loadFont(fontUrl, callback) {\n let font = parsedFonts[fontUrl];\n if (font) callback(font);\n else if (loadingFonts[fontUrl]) loadingFonts[fontUrl].push(callback);\n else {\n loadingFonts[fontUrl] = [\n callback\n ];\n doLoadFont(fontUrl, (fontObj)=>{\n fontObj.src = fontUrl;\n parsedFonts[fontUrl] = fontObj;\n loadingFonts[fontUrl].forEach((cb)=>cb(fontObj));\n delete loadingFonts[fontUrl];\n });\n }\n }\n /**\n * For a given string of text, determine which fonts are required to fully render it and\n * ensure those fonts are loaded.\n */ return function(text, callback, { lang: lang, fonts: userFonts = [], style: style = \"normal\", weight: weight = \"normal\", unicodeFontsURL: unicodeFontsURL } = {}) {\n const charResolutions = new Uint8Array(text.length);\n const fontResolutions = [];\n if (!text.length) allDone();\n const fontIndices = new Map();\n const fallbackRanges = []; // [[start, end], ...]\n if (style !== \"italic\") style = \"normal\";\n if (typeof weight !== \"number\") weight = weight === \"bold\" ? 700 : 400;\n if (userFonts && !Array.isArray(userFonts)) userFonts = [\n userFonts\n ];\n userFonts = userFonts.slice()// filter by language\n .filter((def)=>!def.lang || def.lang.test(lang))// switch order for easier iteration\n .reverse();\n if (userFonts.length) {\n const UNKNOWN = 0;\n const RESOLVED = 1;\n const NEEDS_FALLBACK = 2;\n let prevCharResult = UNKNOWN;\n (function resolveUserFonts(startIndex = 0) {\n for(let i = startIndex, iLen = text.length; i < iLen; i++){\n const codePoint = text.codePointAt(i);\n // Carry previous character's result forward if:\n // - it resolved to a font that also covers this character\n // - this character is whitespace\n if (prevCharResult === RESOLVED && fontResolutions[charResolutions[i - 1]].supportsCodePoint(codePoint) || /\\s/.test(text[i])) {\n charResolutions[i] = charResolutions[i - 1];\n if (prevCharResult === NEEDS_FALLBACK) fallbackRanges[fallbackRanges.length - 1][1] = i;\n } else {\n for(let j = charResolutions[i], jLen = userFonts.length; j <= jLen; j++)if (j === jLen) {\n // none of the user fonts matched; needs fallback\n const range = prevCharResult === NEEDS_FALLBACK ? fallbackRanges[fallbackRanges.length - 1] : fallbackRanges[fallbackRanges.length] = [\n i,\n i\n ];\n range[1] = i;\n prevCharResult = NEEDS_FALLBACK;\n } else {\n charResolutions[i] = j;\n const { src: src, unicodeRange: unicodeRange } = userFonts[j];\n // filter by optional explicit unicode ranges\n if (!unicodeRange || isCodeInRanges(codePoint, unicodeRange)) {\n const fontObj = parsedFonts[src];\n // font not yet loaded, load it and resume\n if (!fontObj) {\n loadFont(src, ()=>{\n resolveUserFonts(i);\n });\n return;\n }\n // if the font actually contains a glyph for this char, lock it in\n if (fontObj.supportsCodePoint(codePoint)) {\n let fontIndex = fontIndices.get(fontObj);\n if (typeof fontIndex !== \"number\") {\n fontIndex = fontResolutions.length;\n fontResolutions.push(fontObj);\n fontIndices.set(fontObj, fontIndex);\n }\n charResolutions[i] = fontIndex;\n prevCharResult = RESOLVED;\n break;\n }\n }\n }\n }\n if (codePoint > 0xffff && i + 1 < iLen) {\n charResolutions[i + 1] = charResolutions[i];\n i++;\n if (prevCharResult === NEEDS_FALLBACK) fallbackRanges[fallbackRanges.length - 1][1] = i;\n }\n }\n resolveFallbacks();\n })();\n } else {\n fallbackRanges.push([\n 0,\n text.length - 1\n ]);\n resolveFallbacks();\n }\n function resolveFallbacks() {\n if (fallbackRanges.length) {\n // Combine all fallback substrings into a single string for querying\n const fallbackString = fallbackRanges.map((range)=>text.substring(range[0], range[1] + 1)).join(\"\\n\");\n unicodeFontResolverClient.getFontsForString(fallbackString, {\n lang: lang || undefined,\n style: style,\n weight: weight,\n dataUrl: unicodeFontsURL\n }).then(({ fontUrls: fontUrls, chars: chars })=>{\n // Extract results and put them back in the main array\n const fontIndexOffset = fontResolutions.length;\n let charIdx = 0;\n fallbackRanges.forEach((range)=>{\n for(let i = 0, endIdx = range[1] - range[0]; i <= endIdx; i++)charResolutions[range[0] + i] = chars[charIdx++] + fontIndexOffset;\n charIdx++; //skip segment separator\n });\n // Load and parse the fallback fonts - avoiding Promise here to prevent polyfills in the worker\n let loadedCount = 0;\n fontUrls.forEach((url, i)=>{\n loadFont(url, (fontObj)=>{\n fontResolutions[i + fontIndexOffset] = fontObj;\n if (++loadedCount === fontUrls.length) allDone();\n });\n });\n });\n } else allDone();\n }\n function allDone() {\n callback({\n chars: charResolutions,\n fonts: fontResolutions\n });\n }\n function isCodeInRanges(code, ranges) {\n // todo optimize search - CodePointSet from unicode-font-resolver?\n for(let k = 0; k < ranges.length; k++){\n const [start, end = start] = ranges[k];\n if (start <= code && code <= end) return true;\n }\n return false;\n }\n };\n}\nconst $bc7831423112e56a$export$85a5d697a084610 = /*#__PURE__*/ (0, $8ue7g.defineWorkerModule)({\n name: \"FontResolver\",\n dependencies: [\n $bc7831423112e56a$var$createFontResolver,\n $bc7831423112e56a$var$workerModule,\n $bc7831423112e56a$var$unicodeFontResolverClientFactory\n ],\n init (createFontResolver, fontParser, unicodeFontResolverClientFactory) {\n return createFontResolver(fontParser, unicodeFontResolverClientFactory());\n }\n});\n/**\n * @typedef {number|'left'|'center'|'right'} AnchorXValue\n */ /**\n * @typedef {number|'top'|'top-baseline'|'top-cap'|'top-ex'|'middle'|'bottom-baseline'|'bottom'} AnchorYValue\n */ /**\n * @typedef {object} TypesetParams\n * @property {string} text\n * @property {UserFont|UserFont[]} [font]\n * @property {string} [lang]\n * @property {number} [sdfGlyphSize=64]\n * @property {number} [fontSize=1]\n * @property {number|'normal'|'bold'} [fontWeight='normal']\n * @property {'normal'|'italic'} [fontStyle='normal']\n * @property {number} [letterSpacing=0]\n * @property {'normal'|number} [lineHeight='normal']\n * @property {number} [maxWidth]\n * @property {'ltr'|'rtl'} [direction='ltr']\n * @property {string} [textAlign='left']\n * @property {number} [textIndent=0]\n * @property {'normal'|'nowrap'} [whiteSpace='normal']\n * @property {'normal'|'break-word'} [overflowWrap='normal']\n * @property {AnchorXValue} [anchorX=0]\n * @property {AnchorYValue} [anchorY=0]\n * @property {boolean} [metricsOnly=false]\n * @property {string} [unicodeFontsURL]\n * @property {FontResolverResult} [preResolvedFonts]\n * @property {boolean} [includeCaretPositions=false]\n * @property {number} [chunkedBoundsSize=8192]\n * @property {{[rangeStartIndex]: number}} [colorRanges]\n */ /**\n * @typedef {object} TypesetResult\n * @property {Uint16Array} glyphIds id for each glyph, specific to that glyph's font\n * @property {Uint8Array} glyphFontIndices index into fontData for each glyph\n * @property {Float32Array} glyphPositions x,y of each glyph's origin in layout\n * @property {{[font]: {[glyphId]: {path: string, pathBounds: number[]}}}} glyphData data about each glyph appearing in the text\n * @property {TypesetFontData[]} fontData data about each font used in the text\n * @property {Float32Array} [caretPositions] startX,endX,bottomY caret positions for each char\n * @property {Uint8Array} [glyphColors] color for each glyph, if color ranges supplied\n * chunkedBounds, //total rects per (n=chunkedBoundsSize) consecutive glyphs\n * fontSize, //calculated em height\n * topBaseline: anchorYOffset + lines[0].baseline, //y coordinate of the top line's baseline\n * blockBounds: [ //bounds for the whole block of text, including vertical padding for lineHeight\n * anchorXOffset,\n * anchorYOffset - totalHeight,\n * anchorXOffset + maxLineWidth,\n * anchorYOffset\n * ],\n * visibleBounds, //total bounds of visible text paths, may be larger or smaller than blockBounds\n * timings\n */ /**\n * @typedef {object} TypesetFontData\n * @property src\n * @property unitsPerEm\n * @property ascender\n * @property descender\n * @property lineHeight\n * @property capHeight\n * @property xHeight\n */ /**\n * @typedef {function} TypesetterTypesetFunction - compute fonts and layout for some text.\n * @param {TypesetParams} params\n * @param {(TypesetResult) => void} callback - function called when typesetting is complete.\n * If the params included `preResolvedFonts`, this will be called synchronously.\n */ /**\n * @typedef {function} TypesetterMeasureFunction - compute width/height for some text.\n * @param {TypesetParams} params\n * @param {(width:number, height:number) => void} callback - function called when measurement is complete.\n * If the params included `preResolvedFonts`, this will be called synchronously.\n */ /**\n * Factory function that creates a self-contained environment for processing text typesetting requests.\n *\n * It is important that this function has no closure dependencies, so that it can be easily injected\n * into the source for a Worker without requiring a build step or complex dependency loading. All its\n * dependencies must be passed in at initialization.\n *\n * @param {FontResolver} resolveFonts - function to resolve a string to parsed fonts\n * @param {object} bidi - the bidi.js implementation object\n * @return {{typeset: TypesetterTypesetFunction, measure: TypesetterMeasureFunction}}\n */ function $bc7831423112e56a$var$createTypesetter(resolveFonts, bidi) {\n const INF = Infinity;\n // Set of Unicode Default_Ignorable_Code_Point characters, these will not produce visible glyphs\n // eslint-disable-next-line no-misleading-character-class\n const DEFAULT_IGNORABLE_CHARS = /[\\u00AD\\u034F\\u061C\\u115F-\\u1160\\u17B4-\\u17B5\\u180B-\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u3164\\uFE00-\\uFE0F\\uFEFF\\uFFA0\\uFFF0-\\uFFF8]/;\n // This regex (instead of /\\s/) allows us to select all whitespace EXCEPT for non-breaking white spaces\n const lineBreakingWhiteSpace = `[^\\\\S\\\\u00A0]`;\n // Incomplete set of characters that allow line breaking after them\n // In the future we may consider a full Unicode line breaking algorithm impl: https://www.unicode.org/reports/tr14\n const BREAK_AFTER_CHARS = new RegExp(`${lineBreakingWhiteSpace}|[\\\\-\\\\u007C\\\\u00AD\\\\u2010\\\\u2012-\\\\u2014\\\\u2027\\\\u2056\\\\u2E17\\\\u2E40]`);\n /**\n * Load and parse all the necessary fonts to render a given string of text, then group\n * them into consecutive runs of characters sharing a font.\n */ function calculateFontRuns({ text: text, lang: lang, fonts: fonts, style: style, weight: weight, preResolvedFonts: preResolvedFonts, unicodeFontsURL: unicodeFontsURL }, onDone) {\n const onResolved = ({ chars: chars, fonts: parsedFonts })=>{\n let curRun, prevVal;\n const runs = [];\n for(let i = 0; i < chars.length; i++)if (chars[i] !== prevVal) {\n prevVal = chars[i];\n runs.push(curRun = {\n start: i,\n end: i,\n fontObj: parsedFonts[chars[i]]\n });\n } else curRun.end = i;\n onDone(runs);\n };\n if (preResolvedFonts) onResolved(preResolvedFonts);\n else resolveFonts(text, onResolved, {\n lang: lang,\n fonts: fonts,\n style: style,\n weight: weight,\n unicodeFontsURL: unicodeFontsURL\n });\n }\n /**\n * Main entry point.\n * Process a text string with given font and formatting parameters, and return all info\n * necessary to render all its glyphs.\n * @type TypesetterTypesetFunction\n */ function typeset({ text: text = \"\", font: font, lang: lang, sdfGlyphSize: sdfGlyphSize = 64, fontSize: fontSize = 400, fontWeight: fontWeight = 1, fontStyle: fontStyle = \"normal\", letterSpacing: letterSpacing = 0, lineHeight: lineHeight = \"normal\", maxWidth: maxWidth = INF, direction: direction, textAlign: textAlign = \"left\", textIndent: textIndent = 0, whiteSpace: whiteSpace = \"normal\", overflowWrap: overflowWrap = \"normal\", anchorX: anchorX = 0, anchorY: anchorY = 0, metricsOnly: metricsOnly = false, unicodeFontsURL: unicodeFontsURL, preResolvedFonts: preResolvedFonts = null, includeCaretPositions: includeCaretPositions = false, chunkedBoundsSize: chunkedBoundsSize = 8192, colorRanges: colorRanges = null }, callback) {\n const mainStart = now();\n const timings = {\n fontLoad: 0,\n typesetting: 0\n };\n // Ensure newlines are normalized\n if (text.indexOf(\"\\r\") > -1) {\n console.info(\"Typesetter: got text with \\\\r chars; normalizing to \\\\n\");\n text = text.replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n }\n // Ensure we've got numbers not strings\n fontSize = +fontSize;\n letterSpacing = +letterSpacing;\n maxWidth = +maxWidth;\n lineHeight = lineHeight || \"normal\";\n textIndent = +textIndent;\n calculateFontRuns({\n text: text,\n lang: lang,\n style: fontStyle,\n weight: fontWeight,\n fonts: typeof font === \"string\" ? [\n {\n src: font\n }\n ] : font,\n unicodeFontsURL: unicodeFontsURL,\n preResolvedFonts: preResolvedFonts\n }, (runs)=>{\n timings.fontLoad = now() - mainStart;\n const hasMaxWidth = isFinite(maxWidth);\n let glyphIds = null;\n let glyphFontIndices = null;\n let glyphPositions = null;\n let glyphData = null;\n let glyphColors = null;\n let caretPositions = null;\n let visibleBounds = null;\n let chunkedBounds = null;\n let maxLineWidth = 0;\n let renderableGlyphCount = 0;\n let canWrap = whiteSpace !== \"nowrap\";\n const metricsByFont = new Map(); // fontObj -> metrics\n const typesetStart = now();\n // Distribute glyphs into lines based on wrapping\n let lineXOffset = textIndent;\n let prevRunEndX = 0;\n let currentLine = new TextLine();\n const lines = [\n currentLine\n ];\n runs.forEach((run)=>{\n const { fontObj: fontObj } = run;\n const { ascender: ascender, descender: descender, unitsPerEm: unitsPerEm, lineGap: lineGap, capHeight: capHeight, xHeight: xHeight } = fontObj;\n // Calculate metrics for each font used\n let fontData = metricsByFont.get(fontObj);\n if (!fontData) {\n // Find conversion between native font units and fontSize units\n const fontSizeMult = fontSize / unitsPerEm;\n // Determine appropriate value for 'normal' line height based on the font's actual metrics\n // This does not guarantee individual glyphs won't exceed the line height, e.g. Roboto; should we use yMin/Max instead?\n const calcLineHeight = lineHeight === \"normal\" ? (ascender - descender + lineGap) * fontSizeMult : lineHeight * fontSize;\n // Determine line height and leading adjustments\n const halfLeading = (calcLineHeight - (ascender - descender) * fontSizeMult) / 2;\n const caretHeight = Math.min(calcLineHeight, (ascender - descender) * fontSizeMult);\n const caretTop = (ascender + descender) / 2 * fontSizeMult + caretHeight / 2;\n fontData = {\n index: metricsByFont.size,\n src: fontObj.src,\n fontObj: fontObj,\n fontSizeMult: fontSizeMult,\n unitsPerEm: unitsPerEm,\n ascender: ascender * fontSizeMult,\n descender: descender * fontSizeMult,\n capHeight: capHeight * fontSizeMult,\n xHeight: xHeight * fontSizeMult,\n lineHeight: calcLineHeight,\n baseline: -halfLeading - ascender * fontSizeMult,\n // cap: -halfLeading - capHeight * fontSizeMult, // cap from top of line height\n // ex: -halfLeading - xHeight * fontSizeMult, // ex from top of line height\n caretTop: (ascender + descender) / 2 * fontSizeMult + caretHeight / 2,\n caretBottom: caretTop - caretHeight\n };\n metricsByFont.set(fontObj, fontData);\n }\n const { fontSizeMult: fontSizeMult } = fontData;\n const runText = text.slice(run.start, run.end + 1);\n let prevGlyphX, prevGlyphObj;\n fontObj.forEachGlyph(runText, fontSize, letterSpacing, (glyphObj, glyphX, glyphY, charIndex)=>{\n glyphX += prevRunEndX;\n charIndex += run.start;\n prevGlyphX = glyphX;\n prevGlyphObj = glyphObj;\n const char = text.charAt(charIndex);\n const glyphWidth = glyphObj.advanceWidth * fontSizeMult;\n const curLineCount = currentLine.count;\n let nextLine;\n // Calc isWhitespace and isEmpty once per glyphObj\n if (!(\"isEmpty\" in glyphObj)) {\n glyphObj.isWhitespace = !!char && new RegExp(lineBreakingWhiteSpace).test(char);\n glyphObj.canBreakAfter = !!char && BREAK_AFTER_CHARS.test(char);\n glyphObj.isEmpty = glyphObj.xMin === glyphObj.xMax || glyphObj.yMin === glyphObj.yMax || DEFAULT_IGNORABLE_CHARS.test(char);\n }\n if (!glyphObj.isWhitespace && !glyphObj.isEmpty) renderableGlyphCount++;\n // If a non-whitespace character overflows the max width, we need to soft-wrap\n if (canWrap && hasMaxWidth && !glyphObj.isWhitespace && glyphX + glyphWidth + lineXOffset > maxWidth && curLineCount) {\n // If it's the first char after a whitespace, start a new line\n if (currentLine.glyphAt(curLineCount - 1).glyphObj.canBreakAfter) {\n nextLine = new TextLine();\n lineXOffset = -glyphX;\n } else // Back up looking for a whitespace character to wrap at\n for(let i = curLineCount; i--;){\n // If we got the start of the line there's no soft break point; make hard break if overflowWrap='break-word'\n if (i === 0 && overflowWrap === \"break-word\") {\n nextLine = new TextLine();\n lineXOffset = -glyphX;\n break;\n } else if (currentLine.glyphAt(i).glyphObj.canBreakAfter) {\n nextLine = currentLine.splitAt(i + 1);\n const adjustX = nextLine.glyphAt(0).x;\n lineXOffset -= adjustX;\n for(let j = nextLine.count; j--;)nextLine.glyphAt(j).x -= adjustX;\n break;\n }\n }\n if (nextLine) {\n currentLine.isSoftWrapped = true;\n currentLine = nextLine;\n lines.push(currentLine);\n maxLineWidth = maxWidth; //after soft wrapping use maxWidth as calculated width\n }\n }\n let fly = currentLine.glyphAt(currentLine.count);\n fly.glyphObj = glyphObj;\n fly.x = glyphX + lineXOffset;\n fly.y = glyphY;\n fly.width = glyphWidth;\n fly.charIndex = charIndex;\n fly.fontData = fontData;\n // Handle hard line breaks\n if (char === \"\\n\") {\n currentLine = new TextLine();\n lines.push(currentLine);\n lineXOffset = -(glyphX + glyphWidth + letterSpacing * fontSize) + textIndent;\n }\n });\n // At the end of a run we must capture the x position as the starting point for the next run\n prevRunEndX = prevGlyphX + prevGlyphObj.advanceWidth * fontSizeMult + letterSpacing * fontSize;\n });\n // Calculate width/height/baseline of each line (excluding trailing whitespace) and maximum block width\n let totalHeight = 0;\n lines.forEach((line)=>{\n let isTrailingWhitespace = true;\n for(let i = line.count; i--;){\n const glyphInfo = line.glyphAt(i);\n // omit trailing whitespace from width calculation\n if (isTrailingWhitespace && !glyphInfo.glyphObj.isWhitespace) {\n line.width = glyphInfo.x + glyphInfo.width;\n if (line.width > maxLineWidth) maxLineWidth = line.width;\n isTrailingWhitespace = false;\n }\n // use the tallest line height, lowest baseline, and highest cap/ex\n let { lineHeight: lineHeight, capHeight: capHeight, xHeight: xHeight, baseline: baseline } = glyphInfo.fontData;\n if (lineHeight > line.lineHeight) line.lineHeight = lineHeight;\n const baselineDiff = baseline - line.baseline;\n if (baselineDiff < 0) {\n line.baseline += baselineDiff;\n line.cap += baselineDiff;\n line.ex += baselineDiff;\n }\n // compare cap/ex based on new lowest baseline\n line.cap = Math.max(line.cap, line.baseline + capHeight);\n line.ex = Math.max(line.ex, line.baseline + xHeight);\n }\n line.baseline -= totalHeight;\n line.cap -= totalHeight;\n line.ex -= totalHeight;\n totalHeight += line.lineHeight;\n });\n // Find overall position adjustments for anchoring\n let anchorXOffset = 0;\n let anchorYOffset = 0;\n if (anchorX) {\n if (typeof anchorX === \"number\") anchorXOffset = -anchorX;\n else if (typeof anchorX === \"string\") anchorXOffset = -maxLineWidth * (anchorX === \"left\" ? 0 : anchorX === \"center\" ? 0.5 : anchorX === \"right\" ? 1 : parsePercent(anchorX));\n }\n if (anchorY) {\n if (typeof anchorY === \"number\") anchorYOffset = -anchorY;\n else if (typeof anchorY === \"string\") anchorYOffset = anchorY === \"top\" ? 0 : anchorY === \"top-baseline\" ? -lines[0].baseline : anchorY === \"top-cap\" ? -lines[0].cap : anchorY === \"top-ex\" ? -lines[0].ex : anchorY === \"middle\" ? totalHeight / 2 : anchorY === \"bottom\" ? totalHeight : anchorY === \"bottom-baseline\" ? lines[lines.length - 1].baseline : parsePercent(anchorY) * totalHeight;\n }\n if (!metricsOnly) {\n // Resolve bidi levels\n const bidiLevelsResult = bidi.getEmbeddingLevels(text, direction);\n // Process each line, applying alignment offsets, adding each glyph to the atlas, and\n // collecting all renderable glyphs into a single collection.\n glyphIds = new Uint16Array(renderableGlyphCount);\n glyphFontIndices = new Uint8Array(renderableGlyphCount);\n glyphPositions = new Float32Array(renderableGlyphCount * 2);\n glyphData = {};\n visibleBounds = [\n INF,\n INF,\n -INF,\n -INF\n ];\n chunkedBounds = [];\n if (includeCaretPositions) caretPositions = new Float32Array(text.length * 4);\n if (colorRanges) glyphColors = new Uint8Array(renderableGlyphCount * 3);\n let renderableGlyphIndex = 0;\n let prevCharIndex = -1;\n let colorCharIndex = -1;\n let chunk;\n let currentColor;\n lines.forEach((line, lineIndex)=>{\n let { count: lineGlyphCount, width: lineWidth } = line;\n // Ignore empty lines\n if (lineGlyphCount > 0) {\n // Count trailing whitespaces, we want to ignore these for certain things\n let trailingWhitespaceCount = 0;\n for(let i = lineGlyphCount; i-- && line.glyphAt(i).glyphObj.isWhitespace;)trailingWhitespaceCount++;\n // Apply horizontal alignment adjustments\n let lineXOffset = 0;\n let justifyAdjust = 0;\n if (textAlign === \"center\") lineXOffset = (maxLineWidth - lineWidth) / 2;\n else if (textAlign === \"right\") lineXOffset = maxLineWidth - lineWidth;\n else if (textAlign === \"justify\" && line.isSoftWrapped) {\n // count non-trailing whitespace characters, and we'll adjust the offsets per character in the next loop\n let whitespaceCount = 0;\n for(let i = lineGlyphCount - trailingWhitespaceCount; i--;)if (line.glyphAt(i).glyphObj.isWhitespace) whitespaceCount++;\n justifyAdjust = (maxLineWidth - lineWidth) / whitespaceCount;\n }\n if (justifyAdjust || lineXOffset) {\n let justifyOffset = 0;\n for(let i = 0; i < lineGlyphCount; i++){\n let glyphInfo = line.glyphAt(i);\n const glyphObj = glyphInfo.glyphObj;\n glyphInfo.x += lineXOffset + justifyOffset;\n // Expand non-trailing whitespaces for justify alignment\n if (justifyAdjust !== 0 && glyphObj.isWhitespace && i < lineGlyphCount - trailingWhitespaceCount) {\n justifyOffset += justifyAdjust;\n glyphInfo.width += justifyAdjust;\n }\n }\n }\n // Perform bidi range flipping\n const flips = bidi.getReorderSegments(text, bidiLevelsResult, line.glyphAt(0).charIndex, line.glyphAt(line.count - 1).charIndex);\n for(let fi = 0; fi < flips.length; fi++){\n const [start, end] = flips[fi];\n // Map start/end string indices to indices in the line\n let left = Infinity, right = -Infinity;\n for(let i = 0; i < lineGlyphCount; i++)if (line.glyphAt(i).charIndex >= start) {\n let startInLine = i, endInLine = i;\n for(; endInLine < lineGlyphCount; endInLine++){\n let info = line.glyphAt(endInLine);\n if (info.charIndex > end) break;\n if (endInLine < lineGlyphCount - trailingWhitespaceCount) {\n left = Math.min(left, info.x);\n right = Math.max(right, info.x + info.width);\n }\n }\n for(let j = startInLine; j < endInLine; j++){\n const glyphInfo = line.glyphAt(j);\n glyphInfo.x = right - (glyphInfo.x + glyphInfo.width - left);\n }\n break;\n }\n }\n // Assemble final data arrays\n let glyphObj;\n const setGlyphObj = (g)=>glyphObj = g;\n for(let i = 0; i < lineGlyphCount; i++){\n const glyphInfo = line.glyphAt(i);\n glyphObj = glyphInfo.glyphObj;\n const glyphId = glyphObj.index;\n // Replace mirrored characters in rtl\n const rtl = bidiLevelsResult.levels[glyphInfo.charIndex] & 1; //odd level means rtl\n if (rtl) {\n const mirrored = bidi.getMirroredCharacter(text[glyphInfo.charIndex]);\n if (mirrored) glyphInfo.fontData.fontObj.forEachGlyph(mirrored, 0, 0, setGlyphObj);\n }\n // Add caret positions\n if (includeCaretPositions) {\n const { charIndex: charIndex, fontData: fontData } = glyphInfo;\n const caretLeft = glyphInfo.x + anchorXOffset;\n const caretRight = glyphInfo.x + glyphInfo.width + anchorXOffset;\n caretPositions[charIndex * 4] = rtl ? caretRight : caretLeft; //start edge x\n caretPositions[charIndex * 4 + 1] = rtl ? caretLeft : caretRight; //end edge x\n caretPositions[charIndex * 4 + 2] = line.baseline + fontData.caretBottom + anchorYOffset; //common bottom y\n caretPositions[charIndex * 4 + 3] = line.baseline + fontData.caretTop + anchorYOffset; //common top y\n // If we skipped any chars from the previous glyph (due to ligature subs), fill in caret\n // positions for those missing char indices; currently this uses a best-guess by dividing\n // the ligature's width evenly. In the future we may try to use the font's LigatureCaretList\n // table to get better interior caret positions.\n const ligCount = charIndex - prevCharIndex;\n if (ligCount > 1) fillLigatureCaretPositions(caretPositions, prevCharIndex, ligCount);\n prevCharIndex = charIndex;\n }\n // Track current color range\n if (colorRanges) {\n const { charIndex: charIndex } = glyphInfo;\n while(charIndex > colorCharIndex){\n colorCharIndex++;\n if (colorRanges.hasOwnProperty(colorCharIndex)) currentColor = colorRanges[colorCharIndex];\n }\n }\n // Get atlas data for renderable glyphs\n if (!glyphObj.isWhitespace && !glyphObj.isEmpty) {\n const idx = renderableGlyphIndex++;\n const { fontSizeMult: fontSizeMult, src: fontSrc, index: fontIndex } = glyphInfo.fontData;\n // Add this glyph's path data\n const fontGlyphData = glyphData[fontSrc] || (glyphData[fontSrc] = {});\n if (!fontGlyphData[glyphId]) fontGlyphData[glyphId] = {\n path: glyphObj.path,\n pathBounds: [\n glyphObj.xMin,\n glyphObj.yMin,\n glyphObj.xMax,\n glyphObj.yMax\n ]\n };\n // Determine final glyph position and add to glyphPositions array\n const glyphX = glyphInfo.x + anchorXOffset;\n const glyphY = glyphInfo.y + line.baseline + anchorYOffset;\n glyphPositions[idx * 2] = glyphX;\n glyphPositions[idx * 2 + 1] = glyphY;\n // Track total visible bounds\n const visX0 = glyphX + glyphObj.xMin * fontSizeMult;\n const visY0 = glyphY + glyphObj.yMin * fontSizeMult;\n const visX1 = glyphX + glyphObj.xMax * fontSizeMult;\n const visY1 = glyphY + glyphObj.yMax * fontSizeMult;\n if (visX0 < visibleBounds[0]) visibleBounds[0] = visX0;\n if (visY0 < visibleBounds[1]) visibleBounds[1] = visY0;\n if (visX1 > visibleBounds[2]) visibleBounds[2] = visX1;\n if (visY1 > visibleBounds[3]) visibleBounds[3] = visY1;\n // Track bounding rects for each chunk of N glyphs\n if (idx % chunkedBoundsSize === 0) {\n chunk = {\n start: idx,\n end: idx,\n rect: [\n INF,\n INF,\n -INF,\n -INF\n ]\n };\n chunkedBounds.push(chunk);\n }\n chunk.end++;\n const chunkRect = chunk.rect;\n if (visX0 < chunkRect[0]) chunkRect[0] = visX0;\n if (visY0 < chunkRect[1]) chunkRect[1] = visY0;\n if (visX1 > chunkRect[2]) chunkRect[2] = visX1;\n if (visY1 > chunkRect[3]) chunkRect[3] = visY1;\n // Add to glyph ids and font indices arrays\n glyphIds[idx] = glyphId;\n glyphFontIndices[idx] = fontIndex;\n // Add colors\n if (colorRanges) {\n const start = idx * 3;\n glyphColors[start] = currentColor >> 16 & 255;\n glyphColors[start + 1] = currentColor >> 8 & 255;\n glyphColors[start + 2] = currentColor & 255;\n }\n }\n }\n }\n });\n // Fill in remaining caret positions in case the final character was a ligature\n if (caretPositions) {\n const ligCount = text.length - prevCharIndex;\n if (ligCount > 1) fillLigatureCaretPositions(caretPositions, prevCharIndex, ligCount);\n }\n }\n // Assemble final data about each font used\n const fontData = [];\n metricsByFont.forEach(({ index: index, src: src, unitsPerEm: unitsPerEm, ascender: ascender, descender: descender, lineHeight: lineHeight, capHeight: capHeight, xHeight: xHeight })=>{\n fontData[index] = {\n src: src,\n unitsPerEm: unitsPerEm,\n ascender: ascender,\n descender: descender,\n lineHeight: lineHeight,\n capHeight: capHeight,\n xHeight: xHeight\n };\n });\n // Timing stats\n timings.typesetting = now() - typesetStart;\n callback({\n glyphIds: glyphIds,\n glyphFontIndices: glyphFontIndices,\n glyphPositions: glyphPositions,\n glyphData: glyphData,\n fontData: fontData,\n caretPositions: caretPositions,\n glyphColors: // caretHeight, //height of cursor from bottom to top - todo per glyph?\n glyphColors,\n chunkedBounds: chunkedBounds,\n fontSize: fontSize,\n topBaseline: anchorYOffset + lines[0].baseline,\n blockBounds: [\n anchorXOffset,\n anchorYOffset - totalHeight,\n anchorXOffset + maxLineWidth,\n anchorYOffset\n ],\n visibleBounds: visibleBounds,\n timings: timings\n });\n });\n }\n /**\n * For a given text string and font parameters, determine the resulting block dimensions\n * after wrapping for the given maxWidth.\n * @param args\n * @param callback\n */ function measure(args, callback) {\n typeset({\n ...args,\n metricsOnly: true\n }, (result)=>{\n const [x0, y0, x1, y1] = result.blockBounds;\n callback({\n width: x1 - x0,\n height: y1 - y0\n });\n });\n }\n function parsePercent(str) {\n let match = str.match(/^([\\d.]+)%$/);\n let pct = match ? parseFloat(match[1]) : NaN;\n return isNaN(pct) ? 0 : pct / 100;\n }\n function fillLigatureCaretPositions(caretPositions, ligStartIndex, ligCount) {\n const ligStartX = caretPositions[ligStartIndex * 4];\n const ligEndX = caretPositions[ligStartIndex * 4 + 1];\n const ligBottom = caretPositions[ligStartIndex * 4 + 2];\n const ligTop = caretPositions[ligStartIndex * 4 + 3];\n const guessedAdvanceX = (ligEndX - ligStartX) / ligCount;\n for(let i = 0; i < ligCount; i++){\n const startIndex = (ligStartIndex + i) * 4;\n caretPositions[startIndex] = ligStartX + guessedAdvanceX * i;\n caretPositions[startIndex + 1] = ligStartX + guessedAdvanceX * (i + 1);\n caretPositions[startIndex + 2] = ligBottom;\n caretPositions[startIndex + 3] = ligTop;\n }\n }\n function now() {\n return (self.performance || Date).now();\n }\n // Array-backed structure for a single line's glyphs data\n function TextLine() {\n this.data = [];\n }\n const textLineProps = [\n \"glyphObj\",\n \"x\",\n \"y\",\n \"width\",\n \"charIndex\",\n \"fontData\"\n ];\n TextLine.prototype = {\n width: 0,\n lineHeight: 0,\n baseline: 0,\n cap: 0,\n ex: 0,\n isSoftWrapped: false,\n get count () {\n return Math.ceil(this.data.length / textLineProps.length);\n },\n glyphAt (i) {\n let fly = TextLine.flyweight;\n fly.data = this.data;\n fly.index = i;\n return fly;\n },\n splitAt (i) {\n let newLine = new TextLine();\n newLine.data = this.data.splice(i * textLineProps.length);\n return newLine;\n }\n };\n TextLine.flyweight = textLineProps.reduce((obj, prop, i, all)=>{\n Object.defineProperty(obj, prop, {\n get () {\n return this.data[this.index * textLineProps.length + i];\n },\n set (val) {\n this.data[this.index * textLineProps.length + i] = val;\n }\n });\n return obj;\n }, {\n data: null,\n index: 0\n });\n return {\n typeset: typeset,\n measure: measure\n };\n}\nconst $bc7831423112e56a$var$now = ()=>(self.performance || Date).now();\nconst $bc7831423112e56a$var$mainThreadGenerator = /*#__PURE__*/ (0, $ix9ca.default)();\nlet $bc7831423112e56a$var$warned;\n/**\n * Generate an SDF texture image for a single glyph path, placing the result into a webgl canvas at a\n * given location and channel. Utilizes the webgl-sdf-generator external package for GPU-accelerated SDF\n * generation when supported.\n */ function $bc7831423112e56a$var$generateSDF(width, height, path, viewBox, distance, exponent, canvas, x, y, channel, useWebGL = true) {\n // Allow opt-out\n if (!useWebGL) return $bc7831423112e56a$var$generateSDF_JS_Worker(width, height, path, viewBox, distance, exponent, canvas, x, y, channel);\n // Attempt GPU-accelerated generation first\n return $bc7831423112e56a$var$generateSDF_GL(width, height, path, viewBox, distance, exponent, canvas, x, y, channel).then(null, (err)=>{\n // WebGL failed either due to a hard error or unexpected results; fall back to JS in workers\n if (!$bc7831423112e56a$var$warned) {\n console.warn(`WebGL SDF generation failed, falling back to JS`, err);\n $bc7831423112e56a$var$warned = true;\n }\n return $bc7831423112e56a$var$generateSDF_JS_Worker(width, height, path, viewBox, distance, exponent, canvas, x, y, channel);\n });\n}\nconst $bc7831423112e56a$var$queue = [];\nconst $bc7831423112e56a$var$chunkTimeBudget = 5; // ms\nlet $bc7831423112e56a$var$timer = 0;\nfunction $bc7831423112e56a$var$nextChunk() {\n const start = $bc7831423112e56a$var$now();\n while($bc7831423112e56a$var$queue.length && $bc7831423112e56a$var$now() - start < $bc7831423112e56a$var$chunkTimeBudget)$bc7831423112e56a$var$queue.shift()();\n $bc7831423112e56a$var$timer = $bc7831423112e56a$var$queue.length ? setTimeout($bc7831423112e56a$var$nextChunk, 0) : 0;\n}\n/**\n * WebGL-based implementation executed on the main thread. Requests are executed in time-bounded\n * macrotask chunks to allow render frames to execute in between.\n */ const $bc7831423112e56a$var$generateSDF_GL = (...args)=>{\n return new Promise((resolve, reject)=>{\n $bc7831423112e56a$var$queue.push(()=>{\n const start = $bc7831423112e56a$var$now();\n try {\n $bc7831423112e56a$var$mainThreadGenerator.webgl.generateIntoCanvas(...args);\n resolve({\n timing: $bc7831423112e56a$var$now() - start\n });\n } catch (err) {\n reject(err);\n }\n });\n if (!$bc7831423112e56a$var$timer) $bc7831423112e56a$var$timer = setTimeout($bc7831423112e56a$var$nextChunk, 0);\n });\n};\nconst $bc7831423112e56a$var$threadCount = 4; // how many workers to spawn\nconst $bc7831423112e56a$var$idleTimeout = 2000; // workers will be terminated after being idle this many milliseconds\nconst $bc7831423112e56a$var$threads = {};\nlet $bc7831423112e56a$var$callNum = 0;\n/**\n * Fallback JS-based implementation, fanned out to a number of worker threads for parallelism\n */ function $bc7831423112e56a$var$generateSDF_JS_Worker(width, height, path, viewBox, distance, exponent, canvas, x, y, channel) {\n const workerId = \"TroikaTextSDFGenerator_JS_\" + $bc7831423112e56a$var$callNum++ % $bc7831423112e56a$var$threadCount;\n let thread = $bc7831423112e56a$var$threads[workerId];\n if (!thread) thread = $bc7831423112e56a$var$threads[workerId] = {\n workerModule: (0, $8ue7g.defineWorkerModule)({\n name: workerId,\n workerId: workerId,\n dependencies: [\n (0, $ix9ca.default),\n $bc7831423112e56a$var$now\n ],\n init (_createSDFGenerator, now) {\n const generate = _createSDFGenerator().javascript.generate;\n return function(...args) {\n const start = now();\n const textureData = generate(...args);\n return {\n textureData: textureData,\n timing: now() - start\n };\n };\n },\n getTransferables (result) {\n return [\n result.textureData.buffer\n ];\n }\n }),\n requests: 0,\n idleTimer: null\n };\n thread.requests++;\n clearTimeout(thread.idleTimer);\n return thread.workerModule(width, height, path, viewBox, distance, exponent).then(({ textureData: textureData, timing: timing })=>{\n // copy result data into the canvas\n const start = $bc7831423112e56a$var$now();\n // expand single-channel data into rgba\n const imageData = new Uint8Array(textureData.length * 4);\n for(let i = 0; i < textureData.length; i++)imageData[i * 4 + channel] = textureData[i];\n $bc7831423112e56a$var$mainThreadGenerator.webglUtils.renderImageData(canvas, imageData, x, y, width, height, 1 << 3 - channel);\n timing += $bc7831423112e56a$var$now() - start;\n // clean up workers after a while\n if (--thread.requests === 0) thread.idleTimer = setTimeout(()=>{\n (0, $8ue7g.terminateWorker)(workerId);\n }, $bc7831423112e56a$var$idleTimeout);\n return {\n timing: timing\n };\n });\n}\nfunction $bc7831423112e56a$var$warmUpSDFCanvas(canvas) {\n if (!canvas._warm) {\n $bc7831423112e56a$var$mainThreadGenerator.webgl.isSupported(canvas);\n canvas._warm = true;\n }\n}\nconst $bc7831423112e56a$var$resizeWebGLCanvasWithoutClearing = $bc7831423112e56a$var$mainThreadGenerator.webglUtils.resizeWebGLCanvasWithoutClearing;\nconst $bc7831423112e56a$var$CONFIG = {\n defaultFontURL: null,\n unicodeFontsURL: null,\n sdfGlyphSize: 64,\n sdfMargin: 1 / 16,\n sdfExponent: 9,\n textureWidth: 2048\n};\nconst $bc7831423112e56a$var$tempColor = /*#__PURE__*/ new (0, $ilwiq.Color)();\nlet $bc7831423112e56a$var$hasRequested = false;\nfunction $bc7831423112e56a$var$now$1() {\n return (self.performance || Date).now();\n}\n/**\n * Customizes the text builder configuration. This must be called prior to the first font processing\n * request, and applies to all fonts.\n *\n * @param {String} config.defaultFontURL - The URL of the default font to use for text processing\n * requests, in case none is specified or the specifiede font fails to load or parse.\n * Defaults to \"Roboto Regular\" from Google Fonts.\n * @param {String} config.unicodeFontsURL - A custom location for the fallback unicode-font-resolver\n * data and font files, if you don't want to use the default CDN. See\n * https://github.com/lojjic/unicode-font-resolver for details. It can also be\n * configured per text instance, but this lets you do it once globally.\n * @param {Number} config.sdfGlyphSize - The default size of each glyph's SDF (signed distance field)\n * texture used for rendering. Must be a power-of-two number, and applies to all fonts,\n * but note that this can also be overridden per call to `getTextRenderInfo()`.\n * Larger sizes can improve the quality of glyph rendering by increasing the sharpness\n * of corners and preventing loss of very thin lines, at the expense of memory. Defaults\n * to 64 which is generally a good balance of size and quality.\n * @param {Number} config.sdfExponent - The exponent used when encoding the SDF values. A higher exponent\n * shifts the encoded 8-bit values to achieve higher precision/accuracy at texels nearer\n * the glyph's path, with lower precision further away. Defaults to 9.\n * @param {Number} config.sdfMargin - How much space to reserve in the SDF as margin outside the glyph's\n * path, as a percentage of the SDF width. A larger margin increases the quality of\n * extruded glyph outlines, but decreases the precision available for the glyph itself.\n * Defaults to 1/16th of the glyph size.\n * @param {Number} config.textureWidth - The width of the SDF texture; must be a power of 2. Defaults to\n * 2048 which is a safe maximum texture dimension according to the stats at\n * https://webglstats.com/webgl/parameter/MAX_TEXTURE_SIZE and should allow for a\n * reasonably large number of glyphs (default glyph size of 64^2 and safe texture size of\n * 2048^2, times 4 channels, allows for 4096 glyphs.) This can be increased if you need to\n * increase the glyph size and/or have an extraordinary number of glyphs.\n */ function $bc7831423112e56a$export$57e337d56090a178(config) {\n if ($bc7831423112e56a$var$hasRequested) console.warn(\"configureTextBuilder called after first font request; will be ignored.\");\n else $bc7831423112e56a$var$assign($bc7831423112e56a$var$CONFIG, config);\n}\n/**\n * Repository for all font SDF atlas textures and their glyph mappings. There is a separate atlas for\n * each sdfGlyphSize. Each atlas has a single Texture that holds all glyphs for all fonts.\n *\n * {\n * [sdfGlyphSize]: {\n * glyphCount: number,\n * sdfGlyphSize: number,\n * sdfTexture: Texture,\n * sdfCanvas: HTMLCanvasElement,\n * contextLost: boolean,\n * glyphsByFont: Map>\n * }\n * }\n */ const $bc7831423112e56a$var$atlases = Object.create(null);\n/**\n * @typedef {object} TroikaTextRenderInfo - Format of the result from `getTextRenderInfo`.\n * @property {TypesetParams} parameters - The normalized input arguments to the render call.\n * @property {Texture} sdfTexture - The SDF atlas texture.\n * @property {number} sdfGlyphSize - The size of each glyph's SDF; see `configureTextBuilder`.\n * @property {number} sdfExponent - The exponent used in encoding the SDF's values; see `configureTextBuilder`.\n * @property {Float32Array} glyphBounds - List of [minX, minY, maxX, maxY] quad bounds for each glyph.\n * @property {Float32Array} glyphAtlasIndices - List holding each glyph's index in the SDF atlas.\n * @property {Uint8Array} [glyphColors] - List holding each glyph's [r, g, b] color, if `colorRanges` was supplied.\n * @property {Float32Array} [caretPositions] - A list of caret positions for all characters in the string; each is\n * four elements: the starting X, the ending X, the bottom Y, and the top Y for the caret.\n * @property {number} [caretHeight] - An appropriate height for all selection carets.\n * @property {number} ascender - The font's ascender metric.\n * @property {number} descender - The font's descender metric.\n * @property {number} capHeight - The font's cap height metric, based on the height of Latin capital letters.\n * @property {number} xHeight - The font's x height metric, based on the height of Latin lowercase letters.\n * @property {number} lineHeight - The final computed lineHeight measurement.\n * @property {number} topBaseline - The y position of the top line's baseline.\n * @property {Array} blockBounds - The total [minX, minY, maxX, maxY] rect of the whole text block;\n * this can include extra vertical space beyond the visible glyphs due to lineHeight, and is\n * equivalent to the dimensions of a block-level text element in CSS.\n * @property {Array} visibleBounds - The total [minX, minY, maxX, maxY] rect of the whole text block;\n * unlike `blockBounds` this is tightly wrapped to the visible glyph paths.\n * @property {Array} chunkedBounds - List of bounding rects for each consecutive set of N glyphs,\n * in the format `{start:N, end:N, rect:[minX, minY, maxX, maxY]}`.\n * @property {object} timings - Timing info for various parts of the rendering logic including SDF\n * generation, typesetting, etc.\n * @frozen\n */ /**\n * @callback getTextRenderInfo~callback\n * @param {TroikaTextRenderInfo} textRenderInfo\n */ /**\n * Main entry point for requesting the data needed to render a text string with given font parameters.\n * This is an asynchronous call, performing most of the logic in a web worker thread.\n * @param {TypesetParams} args\n * @param {getTextRenderInfo~callback} callback\n */ function $bc7831423112e56a$export$8a83a1532cd0ce42(args, callback) {\n $bc7831423112e56a$var$hasRequested = true;\n args = $bc7831423112e56a$var$assign({}, args);\n const totalStart = $bc7831423112e56a$var$now$1();\n // Convert relative URL to absolute so it can be resolved in the worker, and add fallbacks.\n // In the future we'll allow args.font to be a list with unicode ranges too.\n const { defaultFontURL: defaultFontURL } = $bc7831423112e56a$var$CONFIG;\n const fonts = [];\n if (defaultFontURL) fonts.push({\n label: \"default\",\n src: $bc7831423112e56a$var$toAbsoluteURL(defaultFontURL)\n });\n if (args.font) fonts.push({\n label: \"user\",\n src: $bc7831423112e56a$var$toAbsoluteURL(args.font)\n });\n args.font = fonts;\n // Normalize text to a string\n args.text = \"\" + args.text;\n args.sdfGlyphSize = args.sdfGlyphSize || $bc7831423112e56a$var$CONFIG.sdfGlyphSize;\n args.unicodeFontsURL = args.unicodeFontsURL || $bc7831423112e56a$var$CONFIG.unicodeFontsURL;\n // Normalize colors\n if (args.colorRanges != null) {\n let colors = {};\n for(let key in args.colorRanges)if (args.colorRanges.hasOwnProperty(key)) {\n let val = args.colorRanges[key];\n if (typeof val !== \"number\") val = $bc7831423112e56a$var$tempColor.set(val).getHex();\n colors[key] = val;\n }\n args.colorRanges = colors;\n }\n Object.freeze(args);\n // Init the atlas if needed\n const { textureWidth: textureWidth, sdfExponent: sdfExponent } = $bc7831423112e56a$var$CONFIG;\n const { sdfGlyphSize: sdfGlyphSize } = args;\n const glyphsPerRow = textureWidth / sdfGlyphSize * 4;\n let atlas = $bc7831423112e56a$var$atlases[sdfGlyphSize];\n if (!atlas) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = textureWidth;\n canvas.height = sdfGlyphSize * 256 / glyphsPerRow; // start tall enough to fit 256 glyphs\n atlas = $bc7831423112e56a$var$atlases[sdfGlyphSize] = {\n glyphCount: 0,\n sdfGlyphSize: sdfGlyphSize,\n sdfCanvas: canvas,\n sdfTexture: new (0, $ilwiq.Texture)(canvas, undefined, undefined, undefined, (0, $ilwiq.LinearFilter), (0, $ilwiq.LinearFilter)),\n contextLost: false,\n glyphsByFont: new Map()\n };\n atlas.sdfTexture.generateMipmaps = false;\n $bc7831423112e56a$var$initContextLossHandling(atlas);\n }\n const { sdfTexture: sdfTexture, sdfCanvas: sdfCanvas } = atlas;\n // Issue request to the typesetting engine in the worker\n $bc7831423112e56a$var$typesetInWorker(args).then((result)=>{\n const { glyphIds: glyphIds, glyphFontIndices: glyphFontIndices, fontData: fontData, glyphPositions: glyphPositions, fontSize: fontSize, timings: timings } = result;\n const neededSDFs = [];\n const glyphBounds = new Float32Array(glyphIds.length * 4);\n let boundsIdx = 0;\n let positionsIdx = 0;\n const quadsStart = $bc7831423112e56a$var$now$1();\n const fontGlyphMaps = fontData.map((font)=>{\n let map = atlas.glyphsByFont.get(font.src);\n if (!map) atlas.glyphsByFont.set(font.src, map = new Map());\n return map;\n });\n glyphIds.forEach((glyphId, i)=>{\n const fontIndex = glyphFontIndices[i];\n const { src: fontSrc, unitsPerEm: unitsPerEm } = fontData[fontIndex];\n let glyphInfo = fontGlyphMaps[fontIndex].get(glyphId);\n // If this is a glyphId not seen before, add it to the atlas\n if (!glyphInfo) {\n const { path: path, pathBounds: pathBounds } = result.glyphData[fontSrc][glyphId];\n // Margin around path edges in SDF, based on a percentage of the glyph's max dimension.\n // Note we add an extra 0.5 px over the configured value because the outer 0.5 doesn't contain\n // useful interpolated values and will be ignored anyway.\n const fontUnitsMargin = Math.max(pathBounds[2] - pathBounds[0], pathBounds[3] - pathBounds[1]) / sdfGlyphSize * ($bc7831423112e56a$var$CONFIG.sdfMargin * sdfGlyphSize + 0.5);\n const atlasIndex = atlas.glyphCount++;\n const sdfViewBox = [\n pathBounds[0] - fontUnitsMargin,\n pathBounds[1] - fontUnitsMargin,\n pathBounds[2] + fontUnitsMargin,\n pathBounds[3] + fontUnitsMargin\n ];\n fontGlyphMaps[fontIndex].set(glyphId, glyphInfo = {\n path: path,\n atlasIndex: atlasIndex,\n sdfViewBox: sdfViewBox\n });\n // Collect those that need SDF generation\n neededSDFs.push(glyphInfo);\n }\n // Calculate bounds for renderable quads\n // TODO can we get this back off the main thread?\n const { sdfViewBox: sdfViewBox } = glyphInfo;\n const posX = glyphPositions[positionsIdx++];\n const posY = glyphPositions[positionsIdx++];\n const fontSizeMult = fontSize / unitsPerEm;\n glyphBounds[boundsIdx++] = posX + sdfViewBox[0] * fontSizeMult;\n glyphBounds[boundsIdx++] = posY + sdfViewBox[1] * fontSizeMult;\n glyphBounds[boundsIdx++] = posX + sdfViewBox[2] * fontSizeMult;\n glyphBounds[boundsIdx++] = posY + sdfViewBox[3] * fontSizeMult;\n // Convert glyphId to SDF index for the shader\n glyphIds[i] = glyphInfo.atlasIndex;\n });\n timings.quads = (timings.quads || 0) + ($bc7831423112e56a$var$now$1() - quadsStart);\n const sdfStart = $bc7831423112e56a$var$now$1();\n timings.sdf = {};\n // Grow the texture height by power of 2 if needed\n const currentHeight = sdfCanvas.height;\n const neededRows = Math.ceil(atlas.glyphCount / glyphsPerRow);\n const neededHeight = Math.pow(2, Math.ceil(Math.log2(neededRows * sdfGlyphSize)));\n if (neededHeight > currentHeight) {\n // Since resizing the canvas clears its render buffer, it needs special handling to copy the old contents over\n console.info(`Increasing SDF texture size ${currentHeight}->${neededHeight}`);\n $bc7831423112e56a$var$resizeWebGLCanvasWithoutClearing(sdfCanvas, textureWidth, neededHeight);\n // As of Three r136 textures cannot be resized once they're allocated on the GPU, we must dispose to reallocate it\n sdfTexture.dispose();\n }\n Promise.all(neededSDFs.map((glyphInfo)=>$bc7831423112e56a$var$generateGlyphSDF(glyphInfo, atlas, args.gpuAccelerateSDF).then(({ timing: timing })=>{\n timings.sdf[glyphInfo.atlasIndex] = timing;\n }))).then(()=>{\n if (neededSDFs.length && !atlas.contextLost) {\n $bc7831423112e56a$var$safariPre15Workaround(atlas);\n sdfTexture.needsUpdate = true;\n }\n timings.sdfTotal = $bc7831423112e56a$var$now$1() - sdfStart;\n timings.total = $bc7831423112e56a$var$now$1() - totalStart;\n // console.log(`SDF - ${timings.sdfTotal}, Total - ${timings.total - timings.fontLoad}`)\n // Invoke callback with the text layout arrays and updated texture\n callback(Object.freeze({\n parameters: args,\n sdfTexture: sdfTexture,\n sdfGlyphSize: sdfGlyphSize,\n sdfExponent: sdfExponent,\n glyphBounds: glyphBounds,\n glyphAtlasIndices: glyphIds,\n glyphColors: result.glyphColors,\n caretPositions: result.caretPositions,\n chunkedBounds: result.chunkedBounds,\n ascender: result.ascender,\n descender: result.descender,\n lineHeight: result.lineHeight,\n capHeight: result.capHeight,\n xHeight: result.xHeight,\n topBaseline: result.topBaseline,\n blockBounds: result.blockBounds,\n visibleBounds: result.visibleBounds,\n timings: result.timings\n }));\n });\n });\n // While the typesetting request is being handled, go ahead and make sure the atlas canvas context is\n // \"warmed up\"; the first request will be the longest due to shader program compilation so this gets\n // a head start on that process before SDFs actually start getting processed.\n Promise.resolve().then(()=>{\n if (!atlas.contextLost) $bc7831423112e56a$var$warmUpSDFCanvas(sdfCanvas);\n });\n}\nfunction $bc7831423112e56a$var$generateGlyphSDF({ path: path, atlasIndex: atlasIndex, sdfViewBox: sdfViewBox }, { sdfGlyphSize: sdfGlyphSize, sdfCanvas: sdfCanvas, contextLost: contextLost }, useGPU) {\n if (contextLost) // If the context is lost there's nothing we can do, just quit silently and let it\n // get regenerated when the context is restored\n return Promise.resolve({\n timing: -1\n });\n const { textureWidth: textureWidth, sdfExponent: sdfExponent } = $bc7831423112e56a$var$CONFIG;\n const maxDist = Math.max(sdfViewBox[2] - sdfViewBox[0], sdfViewBox[3] - sdfViewBox[1]);\n const squareIndex = Math.floor(atlasIndex / 4);\n const x = squareIndex % (textureWidth / sdfGlyphSize) * sdfGlyphSize;\n const y = Math.floor(squareIndex / (textureWidth / sdfGlyphSize)) * sdfGlyphSize;\n const channel = atlasIndex % 4;\n return $bc7831423112e56a$var$generateSDF(sdfGlyphSize, sdfGlyphSize, path, sdfViewBox, maxDist, sdfExponent, sdfCanvas, x, y, channel, useGPU);\n}\nfunction $bc7831423112e56a$var$initContextLossHandling(atlas) {\n const canvas = atlas.sdfCanvas;\n /*\n // Begin context loss simulation\n if (!window.WebGLDebugUtils) {\n let script = document.getElementById('WebGLDebugUtilsScript')\n if (!script) {\n script = document.createElement('script')\n script.id = 'WebGLDebugUtils'\n document.head.appendChild(script)\n script.src = 'https://cdn.jsdelivr.net/gh/KhronosGroup/WebGLDeveloperTools@b42e702/src/debug/webgl-debug.js'\n }\n script.addEventListener('load', () => {\n initContextLossHandling(atlas)\n })\n return\n }\n window.WebGLDebugUtils.makeLostContextSimulatingCanvas(canvas)\n canvas.loseContextInNCalls(500)\n canvas.addEventListener('webglcontextrestored', (event) => {\n canvas.loseContextInNCalls(5000)\n })\n // End context loss simulation\n */ canvas.addEventListener(\"webglcontextlost\", (event)=>{\n console.log(\"Context Lost\", event);\n event.preventDefault();\n atlas.contextLost = true;\n });\n canvas.addEventListener(\"webglcontextrestored\", (event)=>{\n console.log(\"Context Restored\", event);\n atlas.contextLost = false;\n // Regenerate all glyphs into the restored canvas:\n const promises = [];\n atlas.glyphsByFont.forEach((glyphMap)=>{\n glyphMap.forEach((glyph)=>{\n promises.push($bc7831423112e56a$var$generateGlyphSDF(glyph, atlas, true));\n });\n });\n Promise.all(promises).then(()=>{\n $bc7831423112e56a$var$safariPre15Workaround(atlas);\n atlas.sdfTexture.needsUpdate = true;\n });\n });\n}\n/**\n * Preload a given font and optionally pre-generate glyph SDFs for one or more character sequences.\n * This can be useful to avoid long pauses when first showing text in a scene, by preloading the\n * needed fonts and glyphs up front along with other assets.\n *\n * @param {object} options\n * @param {string} options.font - URL of the font file to preload. If not given, the default font will\n * be loaded.\n * @param {string|string[]} options.characters - One or more character sequences for which to pre-\n * generate glyph SDFs. Note that this will honor ligature substitution, so you may need\n * to specify ligature sequences in addition to their individual characters to get all\n * possible glyphs, e.g. `[\"t\", \"h\", \"th\"]` to get the \"t\" and \"h\" glyphs plus the \"th\" ligature.\n * @param {number} options.sdfGlyphSize - The size at which to prerender the SDF textures for the\n * specified `characters`.\n * @param {function} callback - A function that will be called when the preloading is complete.\n */ function $bc7831423112e56a$export$8a6ffa2d67c47c6c({ font: font, characters: characters, sdfGlyphSize: sdfGlyphSize }, callback) {\n let text = Array.isArray(characters) ? characters.join(\"\\n\") : \"\" + characters;\n $bc7831423112e56a$export$8a83a1532cd0ce42({\n font: font,\n sdfGlyphSize: sdfGlyphSize,\n text: text\n }, callback);\n}\n// Local assign impl so we don't have to import troika-core\nfunction $bc7831423112e56a$var$assign(toObj, fromObj) {\n for(let key in fromObj)if (fromObj.hasOwnProperty(key)) toObj[key] = fromObj[key];\n return toObj;\n}\n// Utility for making URLs absolute\nlet $bc7831423112e56a$var$linkEl;\nfunction $bc7831423112e56a$var$toAbsoluteURL(path) {\n if (!$bc7831423112e56a$var$linkEl) $bc7831423112e56a$var$linkEl = typeof document === \"undefined\" ? {} : document.createElement(\"a\");\n $bc7831423112e56a$var$linkEl.href = path;\n return $bc7831423112e56a$var$linkEl.href;\n}\n/**\n * Safari < v15 seems unable to use the SDF webgl canvas as a texture. This applies a workaround\n * where it reads the pixels out of that canvas and uploads them as a data texture instead, at\n * a slight performance cost.\n */ function $bc7831423112e56a$var$safariPre15Workaround(atlas) {\n // Use createImageBitmap support as a proxy for Safari<15, all other mainstream browsers\n // have supported it for a long while so any false positives should be minimal.\n if (typeof createImageBitmap !== \"function\") {\n console.info(\"Safari<15: applying SDF canvas workaround\");\n const { sdfCanvas: sdfCanvas, sdfTexture: sdfTexture } = atlas;\n const { width: width, height: height } = sdfCanvas;\n const gl = atlas.sdfCanvas.getContext(\"webgl\");\n let pixels = sdfTexture.image.data;\n if (!pixels || pixels.length !== width * height * 4) {\n pixels = new Uint8Array(width * height * 4);\n sdfTexture.image = {\n width: width,\n height: height,\n data: pixels\n };\n sdfTexture.flipY = false;\n sdfTexture.isDataTexture = true;\n }\n gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);\n }\n}\nconst $bc7831423112e56a$export$adeaafcde0994a07 = /*#__PURE__*/ (0, $8ue7g.defineWorkerModule)({\n name: \"Typesetter\",\n dependencies: [\n $bc7831423112e56a$var$createTypesetter,\n $bc7831423112e56a$export$85a5d697a084610,\n (0, $2y8EL.default)\n ],\n init (createTypesetter, fontResolver, bidiFactory) {\n return createTypesetter(fontResolver, bidiFactory());\n }\n});\nconst $bc7831423112e56a$var$typesetInWorker = /*#__PURE__*/ (0, $8ue7g.defineWorkerModule)({\n name: \"Typesetter\",\n dependencies: [\n $bc7831423112e56a$export$adeaafcde0994a07\n ],\n init (typesetter) {\n return function(args) {\n return new Promise((resolve)=>{\n typesetter.typeset(args, resolve);\n });\n };\n },\n getTransferables (result) {\n // Mark array buffers as transferable to avoid cloning during postMessage\n const transferables = [];\n for(let p in result)if (result[p] && result[p].buffer) transferables.push(result[p].buffer);\n return transferables;\n }\n});\nfunction $bc7831423112e56a$export$f81271cf861a33c1() {\n Object.keys($bc7831423112e56a$var$atlases).forEach((size)=>{\n const canvas = $bc7831423112e56a$var$atlases[size].sdfCanvas;\n const { width: width, height: height } = canvas;\n console.log(\"%c.\", `\n background: url(${canvas.toDataURL()});\n background-size: ${width}px ${height}px;\n color: transparent;\n font-size: 0;\n line-height: ${height}px;\n padding-left: ${width}px;\n `);\n });\n}\nconst $bc7831423112e56a$var$templateGeometries = {};\nfunction $bc7831423112e56a$var$getTemplateGeometry(detail) {\n let geom = $bc7831423112e56a$var$templateGeometries[detail];\n if (!geom) {\n // Geometry is two planes back-to-back, which will always be rendered FrontSide only but\n // appear as DoubleSide by default. FrontSide/BackSide are emulated using drawRange.\n // We do it this way to avoid the performance hit of two draw calls for DoubleSide materials\n // introduced by Three.js in r130 - see https://github.com/mrdoob/three.js/pull/21967\n const front = new (0, $ilwiq.PlaneGeometry)(1, 1, detail, detail);\n const back = front.clone();\n const frontAttrs = front.attributes;\n const backAttrs = back.attributes;\n const combined = new (0, $ilwiq.BufferGeometry)();\n const vertCount = frontAttrs.uv.count;\n for(let i = 0; i < vertCount; i++){\n backAttrs.position.array[i * 3] *= -1; // flip position x\n backAttrs.normal.array[i * 3 + 2] *= -1; // flip normal z\n }\n [\n \"position\",\n \"normal\",\n \"uv\"\n ].forEach((name)=>{\n combined.setAttribute(name, new (0, $ilwiq.Float32BufferAttribute)([\n ...frontAttrs[name].array,\n ...backAttrs[name].array\n ], frontAttrs[name].itemSize));\n });\n combined.setIndex([\n ...front.index.array,\n ...back.index.array.map((n)=>n + vertCount)\n ]);\n combined.translate(0.5, 0.5, 0);\n geom = $bc7831423112e56a$var$templateGeometries[detail] = combined;\n }\n return geom;\n}\nconst $bc7831423112e56a$var$glyphBoundsAttrName = \"aTroikaGlyphBounds\";\nconst $bc7831423112e56a$var$glyphIndexAttrName = \"aTroikaGlyphIndex\";\nconst $bc7831423112e56a$var$glyphColorAttrName = \"aTroikaGlyphColor\";\n/**\n@class GlyphsGeometry\n\nA specialized Geometry for rendering a set of text glyphs. Uses InstancedBufferGeometry to\nrender the glyphs using GPU instancing of a single quad, rather than constructing a whole\ngeometry with vertices, for much smaller attribute arraybuffers according to this math:\n\n Where N = number of glyphs...\n\n Instanced:\n - position: 4 * 3\n - index: 2 * 3\n - normal: 4 * 3\n - uv: 4 * 2\n - glyph x/y bounds: N * 4\n - glyph indices: N * 1\n = 5N + 38\n\n Non-instanced:\n - position: N * 4 * 3\n - index: N * 2 * 3\n - normal: N * 4 * 3\n - uv: N * 4 * 2\n - glyph indices: N * 1\n = 39N\n\nA downside of this is the rare-but-possible lack of the instanced arrays extension,\nwhich we could potentially work around with a fallback non-instanced implementation.\n\n*/ class $bc7831423112e56a$export$16fe3b8f85ab6e35 extends (0, $ilwiq.InstancedBufferGeometry) {\n constructor(){\n super();\n this.detail = 1;\n this.curveRadius = 0;\n // Define groups for rendering text outline as a separate pass; these will only\n // be used when the `material` getter returns an array, i.e. outlineWidth > 0.\n this.groups = [\n {\n start: 0,\n count: Infinity,\n materialIndex: 0\n },\n {\n start: 0,\n count: Infinity,\n materialIndex: 1\n }\n ];\n // Preallocate empty bounding objects\n this.boundingSphere = new (0, $ilwiq.Sphere)();\n this.boundingBox = new (0, $ilwiq.Box3)();\n }\n computeBoundingSphere() {\n // No-op; we'll sync the boundingSphere proactively when needed.\n }\n computeBoundingBox() {\n // No-op; we'll sync the boundingBox proactively when needed.\n }\n // Since our base geometry contains triangles for both front and back sides, we can emulate\n // the \"side\" by restricting the draw range.\n setSide(side) {\n const verts = this.getIndex().count;\n this.setDrawRange(side === (0, $ilwiq.BackSide) ? verts / 2 : 0, side === (0, $ilwiq.DoubleSide) ? verts : verts / 2);\n }\n set detail(detail) {\n if (detail !== this._detail) {\n this._detail = detail;\n if (typeof detail !== \"number\" || detail < 1) detail = 1;\n let tpl = $bc7831423112e56a$var$getTemplateGeometry(detail);\n [\n \"position\",\n \"normal\",\n \"uv\"\n ].forEach((attr)=>{\n this.attributes[attr] = tpl.attributes[attr].clone();\n });\n this.setIndex(tpl.getIndex().clone());\n }\n }\n get detail() {\n return this._detail;\n }\n set curveRadius(r) {\n if (r !== this._curveRadius) {\n this._curveRadius = r;\n this._updateBounds();\n }\n }\n get curveRadius() {\n return this._curveRadius;\n }\n /**\n * Update the geometry for a new set of glyphs.\n * @param {Float32Array} glyphBounds - An array holding the planar bounds for all glyphs\n * to be rendered, 4 entries for each glyph: x1,x2,y1,y1\n * @param {Float32Array} glyphAtlasIndices - An array holding the index of each glyph within\n * the SDF atlas texture.\n * @param {Array} blockBounds - An array holding the [minX, minY, maxX, maxY] across all glyphs\n * @param {Array} [chunkedBounds] - An array of objects describing bounds for each chunk of N\n * consecutive glyphs: `{start:N, end:N, rect:[minX, minY, maxX, maxY]}`. This can be\n * used with `applyClipRect` to choose an optimized `instanceCount`.\n * @param {Uint8Array} [glyphColors] - An array holding r,g,b values for each glyph.\n */ updateGlyphs(glyphBounds, glyphAtlasIndices, blockBounds, chunkedBounds, glyphColors) {\n // Update the instance attributes\n $bc7831423112e56a$var$updateBufferAttr(this, $bc7831423112e56a$var$glyphBoundsAttrName, glyphBounds, 4);\n $bc7831423112e56a$var$updateBufferAttr(this, $bc7831423112e56a$var$glyphIndexAttrName, glyphAtlasIndices, 1);\n $bc7831423112e56a$var$updateBufferAttr(this, $bc7831423112e56a$var$glyphColorAttrName, glyphColors, 3);\n this._blockBounds = blockBounds;\n this._chunkedBounds = chunkedBounds;\n this.instanceCount = glyphAtlasIndices.length;\n this._updateBounds();\n }\n _updateBounds() {\n const bounds = this._blockBounds;\n if (bounds) {\n const { curveRadius: curveRadius, boundingBox: bbox } = this;\n if (curveRadius) {\n const { PI: PI, floor: floor, min: min, max: max, sin: sin, cos: cos } = Math;\n const halfPi = PI / 2;\n const twoPi = PI * 2;\n const absR = Math.abs(curveRadius);\n const leftAngle = bounds[0] / absR;\n const rightAngle = bounds[2] / absR;\n const minX = floor((leftAngle + halfPi) / twoPi) !== floor((rightAngle + halfPi) / twoPi) ? -absR : min(sin(leftAngle) * absR, sin(rightAngle) * absR);\n const maxX = floor((leftAngle - halfPi) / twoPi) !== floor((rightAngle - halfPi) / twoPi) ? absR : max(sin(leftAngle) * absR, sin(rightAngle) * absR);\n const maxZ = floor((leftAngle + PI) / twoPi) !== floor((rightAngle + PI) / twoPi) ? absR * 2 : max(absR - cos(leftAngle) * absR, absR - cos(rightAngle) * absR);\n bbox.min.set(minX, bounds[1], curveRadius < 0 ? -maxZ : 0);\n bbox.max.set(maxX, bounds[3], curveRadius < 0 ? 0 : maxZ);\n } else {\n bbox.min.set(bounds[0], bounds[1], 0);\n bbox.max.set(bounds[2], bounds[3], 0);\n }\n bbox.getBoundingSphere(this.boundingSphere);\n }\n }\n /**\n * Given a clipping rect, and the chunkedBounds from the last updateGlyphs call, choose the lowest\n * `instanceCount` that will show all glyphs within the clipped view. This is an optimization\n * for long blocks of text that are clipped, to skip vertex shader evaluation for glyphs that would\n * be clipped anyway.\n *\n * Note that since `drawElementsInstanced[ANGLE]` only accepts an instance count and not a starting\n * offset, this optimization becomes less effective as the clipRect moves closer to the end of the\n * text block. We could fix that by switching from instancing to a full geometry with a drawRange,\n * but at the expense of much larger attribute buffers (see classdoc above.)\n *\n * @param {Vector4} clipRect\n */ applyClipRect(clipRect) {\n let count = this.getAttribute($bc7831423112e56a$var$glyphIndexAttrName).count;\n let chunks = this._chunkedBounds;\n if (chunks) for(let i = chunks.length; i--;){\n count = chunks[i].end;\n let rect = chunks[i].rect;\n // note: both rects are l-b-r-t\n if (rect[1] < clipRect.w && rect[3] > clipRect.y && rect[0] < clipRect.z && rect[2] > clipRect.x) break;\n }\n this.instanceCount = count;\n }\n}\nfunction $bc7831423112e56a$var$updateBufferAttr(geom, attrName, newArray, itemSize) {\n const attr = geom.getAttribute(attrName);\n if (newArray) {\n // If length isn't changing, just update the attribute's array data\n if (attr && attr.array.length === newArray.length) {\n attr.array.set(newArray);\n attr.needsUpdate = true;\n } else {\n geom.setAttribute(attrName, new (0, $ilwiq.InstancedBufferAttribute)(newArray, itemSize));\n // If the new attribute has a different size, we also have to (as of r117) manually clear the\n // internal cached max instance count. See https://github.com/mrdoob/three.js/issues/19706\n // It's unclear if this is a threejs bug or a truly unsupported scenario; discussion in\n // that ticket is ambiguous as to whether replacing a BufferAttribute with one of a\n // different size is supported, but https://github.com/mrdoob/three.js/pull/17418 strongly\n // implies it should be supported. It's possible we need to\n delete geom._maxInstanceCount; //for r117+, could be fragile\n geom.dispose(); //for r118+, more robust feeling, but more heavy-handed than I'd like\n }\n } else if (attr) geom.deleteAttribute(attrName);\n}\n// language=GLSL\nconst $bc7831423112e56a$var$VERTEX_DEFS = `\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform vec4 uTroikaTotalBounds;\nuniform vec4 uTroikaClipRect;\nuniform mat3 uTroikaOrient;\nuniform bool uTroikaUseGlyphColors;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaBlurRadius;\nuniform vec2 uTroikaPositionOffset;\nuniform float uTroikaCurveRadius;\nattribute vec4 aTroikaGlyphBounds;\nattribute float aTroikaGlyphIndex;\nattribute vec3 aTroikaGlyphColor;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec3 vTroikaGlyphColor;\nvarying vec2 vTroikaGlyphDimensions;\n`;\n// language=GLSL prefix=\"void main() {\" suffix=\"}\"\nconst $bc7831423112e56a$var$VERTEX_TRANSFORM = `\nvec4 bounds = aTroikaGlyphBounds;\nbounds.xz += uTroikaPositionOffset.x;\nbounds.yw -= uTroikaPositionOffset.y;\n\nvec4 outlineBounds = vec4(\n bounds.xy - uTroikaDistanceOffset - uTroikaBlurRadius,\n bounds.zw + uTroikaDistanceOffset + uTroikaBlurRadius\n);\nvec4 clippedBounds = vec4(\n clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw),\n clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw)\n);\n\nvec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy);\n\nposition.xy = mix(bounds.xy, bounds.zw, clippedXY);\n\nuv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy);\n\nfloat rad = uTroikaCurveRadius;\nif (rad != 0.0) {\n float angle = position.x / rad;\n position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad);\n normal.xz = vec2(sin(angle), cos(angle));\n}\n \nposition = uTroikaOrient * position;\nnormal = uTroikaOrient * normal;\n\nvTroikaGlyphUV = clippedXY.xy;\nvTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]);\n\n${\"\" /* NOTE: it seems important to calculate the glyph's bounding texture UVs here in the\n vertex shader, rather than in the fragment shader, as the latter gives strange artifacts\n on some glyphs (those in the leftmost texture column) on some systems. The exact reason\n isn't understood but doing this here, then mix()-ing in the fragment shader, seems to work. */ }\nfloat txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize;\nvec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize;\nvec2 txStartUV = txUvPerSquare * vec2(\n mod(floor(aTroikaGlyphIndex / 4.0), txCols),\n floor(floor(aTroikaGlyphIndex / 4.0) / txCols)\n);\nvTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare);\nvTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0);\n`;\n// language=GLSL\nconst $bc7831423112e56a$var$FRAGMENT_DEFS = `\nuniform sampler2D uTroikaSDFTexture;\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform float uTroikaSDFExponent;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaFillOpacity;\nuniform float uTroikaOutlineOpacity;\nuniform float uTroikaBlurRadius;\nuniform vec3 uTroikaStrokeColor;\nuniform float uTroikaStrokeWidth;\nuniform float uTroikaStrokeOpacity;\nuniform bool uTroikaSDFDebug;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec2 vTroikaGlyphDimensions;\n\nfloat troikaSdfValueToSignedDistance(float alpha) {\n // Inverse of exponential encoding in webgl-sdf-generator\n ${\"\" /* TODO - there's some slight inaccuracy here when dealing with interpolated alpha values; those\n are linearly interpolated where the encoding is exponential. Look into improving this by rounding\n to nearest 2 whole texels, decoding those exponential values, and linearly interpolating the result.\n */ }\n float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y);\n float absDist = (1.0 - pow(2.0 * (alpha > 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension;\n float signedDist = absDist * (alpha > 0.5 ? -1.0 : 1.0);\n return signedDist;\n}\n\nfloat troikaGlyphUvToSdfValue(vec2 glyphUV) {\n vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV);\n vec4 rgba = texture2D(uTroikaSDFTexture, textureUV);\n float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1\n return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a;\n}\n\nfloat troikaGlyphUvToDistance(vec2 uv) {\n return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv));\n}\n\nfloat troikaGetAADist() {\n ${\"\" /*\n When the standard derivatives extension is available, we choose an antialiasing alpha threshold based\n on the potential change in the SDF's alpha from this fragment to its neighbor. This strategy maximizes \n readability and edge crispness at all sizes and screen resolutions.\n */ }\n #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300\n return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5;\n #else\n return vTroikaGlyphDimensions.x / 64.0;\n #endif\n}\n\nfloat troikaGetFragDistValue() {\n vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize);\n float distance = troikaGlyphUvToDistance(clampedGlyphUV);\n \n // Extrapolate distance when outside bounds:\n distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : \n length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n\n ${\"\" /* \n // TODO more refined extrapolated distance by adjusting for angle of gradient at edge...\n // This has potential but currently gives very jagged extensions, maybe due to precision issues?\n float uvStep = 1.0 / uTroikaSDFGlyphSize;\n vec2 neighbor1UV = clampedGlyphUV + (\n vTroikaGlyphUV.x != clampedGlyphUV.x ? vec2(0.0, uvStep * sign(0.5 - vTroikaGlyphUV.y)) :\n vTroikaGlyphUV.y != clampedGlyphUV.y ? vec2(uvStep * sign(0.5 - vTroikaGlyphUV.x), 0.0) :\n vec2(0.0)\n );\n vec2 neighbor2UV = clampedGlyphUV + (\n vTroikaGlyphUV.x != clampedGlyphUV.x ? vec2(0.0, uvStep * -sign(0.5 - vTroikaGlyphUV.y)) :\n vTroikaGlyphUV.y != clampedGlyphUV.y ? vec2(uvStep * -sign(0.5 - vTroikaGlyphUV.x), 0.0) :\n vec2(0.0)\n );\n float neighbor1Distance = troikaGlyphUvToDistance(neighbor1UV);\n float neighbor2Distance = troikaGlyphUvToDistance(neighbor2UV);\n float distToUnclamped = length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n float distToNeighbor = length((clampedGlyphUV - neighbor1UV) * vTroikaGlyphDimensions);\n float gradientAngle1 = min(asin(abs(neighbor1Distance - distance) / distToNeighbor), PI / 2.0);\n float gradientAngle2 = min(asin(abs(neighbor2Distance - distance) / distToNeighbor), PI / 2.0);\n distance += (cos(gradientAngle1) + cos(gradientAngle2)) / 2.0 * distToUnclamped;\n */ }\n\n return distance;\n}\n\nfloat troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) {\n #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL)\n float alpha = step(-distanceOffset, -distance);\n #else\n\n float alpha = smoothstep(\n distanceOffset + aaDist,\n distanceOffset - aaDist,\n distance\n );\n #endif\n\n return alpha;\n}\n`;\n// language=GLSL prefix=\"void main() {\" suffix=\"}\"\nconst $bc7831423112e56a$var$FRAGMENT_TRANSFORM = `\nfloat aaDist = troikaGetAADist();\nfloat fragDistance = troikaGetFragDistValue();\nfloat edgeAlpha = uTroikaSDFDebug ?\n troikaGlyphUvToSdfValue(vTroikaGlyphUV) :\n troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius));\n\n#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL)\nvec4 fillRGBA = gl_FragColor;\nfillRGBA.a *= uTroikaFillOpacity;\nvec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity);\nif (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb;\ngl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep(\n -uTroikaStrokeWidth - aaDist,\n -uTroikaStrokeWidth + aaDist,\n fragDistance\n));\ngl_FragColor.a *= edgeAlpha;\n#endif\n\nif (edgeAlpha == 0.0) {\n discard;\n}\n`;\n/**\n * Create a material for rendering text, derived from a baseMaterial\n */ function $bc7831423112e56a$export$ec8c2d2c0fe50886(baseMaterial) {\n const textMaterial = (0, $4kOkh.createDerivedMaterial)(baseMaterial, {\n chained: true,\n extensions: {\n derivatives: true\n },\n uniforms: {\n uTroikaSDFTexture: {\n value: null\n },\n uTroikaSDFTextureSize: {\n value: new (0, $ilwiq.Vector2)()\n },\n uTroikaSDFGlyphSize: {\n value: 0\n },\n uTroikaSDFExponent: {\n value: 0\n },\n uTroikaTotalBounds: {\n value: new (0, $ilwiq.Vector4)(0, 0, 0, 0)\n },\n uTroikaClipRect: {\n value: new (0, $ilwiq.Vector4)(0, 0, 0, 0)\n },\n uTroikaDistanceOffset: {\n value: 0\n },\n uTroikaOutlineOpacity: {\n value: 0\n },\n uTroikaFillOpacity: {\n value: 1\n },\n uTroikaPositionOffset: {\n value: new (0, $ilwiq.Vector2)()\n },\n uTroikaCurveRadius: {\n value: 0\n },\n uTroikaBlurRadius: {\n value: 0\n },\n uTroikaStrokeWidth: {\n value: 0\n },\n uTroikaStrokeColor: {\n value: new (0, $ilwiq.Color)()\n },\n uTroikaStrokeOpacity: {\n value: 1\n },\n uTroikaOrient: {\n value: new (0, $ilwiq.Matrix3)()\n },\n uTroikaUseGlyphColors: {\n value: true\n },\n uTroikaSDFDebug: {\n value: false\n }\n },\n vertexDefs: $bc7831423112e56a$var$VERTEX_DEFS,\n vertexTransform: $bc7831423112e56a$var$VERTEX_TRANSFORM,\n fragmentDefs: $bc7831423112e56a$var$FRAGMENT_DEFS,\n fragmentColorTransform: $bc7831423112e56a$var$FRAGMENT_TRANSFORM,\n customRewriter ({ vertexShader: vertexShader, fragmentShader: fragmentShader }) {\n let uDiffuseRE = /\\buniform\\s+vec3\\s+diffuse\\b/;\n if (uDiffuseRE.test(fragmentShader)) {\n // Replace all instances of `diffuse` with our varying\n fragmentShader = fragmentShader.replace(uDiffuseRE, \"varying vec3 vTroikaGlyphColor\").replace(/\\bdiffuse\\b/g, \"vTroikaGlyphColor\");\n // Make sure the vertex shader declares the uniform so we can grab it as a fallback\n if (!uDiffuseRE.test(vertexShader)) vertexShader = vertexShader.replace((0, $4kOkh.voidMainRegExp), \"uniform vec3 diffuse;\\n$&\\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\\n\");\n }\n return {\n vertexShader: vertexShader,\n fragmentShader: fragmentShader\n };\n }\n });\n // Force transparency - TODO is this reasonable?\n textMaterial.transparent = true;\n Object.defineProperties(textMaterial, {\n isTroikaTextMaterial: {\n value: true\n },\n // WebGLShadowMap reverses the side of the shadow material by default, which fails\n // for planes, so here we force the `shadowSide` to always match the main side.\n shadowSide: {\n get () {\n return this.side;\n },\n set () {\n //no-op\n }\n }\n });\n return textMaterial;\n}\nconst $bc7831423112e56a$var$defaultMaterial = /*#__PURE__*/ new (0, $ilwiq.MeshBasicMaterial)({\n color: 0xffffff,\n side: (0, $ilwiq.DoubleSide),\n transparent: true\n});\nconst $bc7831423112e56a$var$defaultStrokeColor = 0x808080;\nconst $bc7831423112e56a$var$tempMat4 = /*#__PURE__*/ new (0, $ilwiq.Matrix4)();\nconst $bc7831423112e56a$var$tempVec3a = /*#__PURE__*/ new (0, $ilwiq.Vector3)();\nconst $bc7831423112e56a$var$tempVec3b = /*#__PURE__*/ new (0, $ilwiq.Vector3)();\nconst $bc7831423112e56a$var$tempArray = [];\nconst $bc7831423112e56a$var$origin = /*#__PURE__*/ new (0, $ilwiq.Vector3)();\nconst $bc7831423112e56a$var$defaultOrient = \"+x+y\";\nfunction $bc7831423112e56a$var$first(o) {\n return Array.isArray(o) ? o[0] : o;\n}\nlet $bc7831423112e56a$var$getFlatRaycastMesh = ()=>{\n const mesh = new (0, $ilwiq.Mesh)(new (0, $ilwiq.PlaneGeometry)(1, 1), $bc7831423112e56a$var$defaultMaterial);\n $bc7831423112e56a$var$getFlatRaycastMesh = ()=>mesh;\n return mesh;\n};\nlet $bc7831423112e56a$var$getCurvedRaycastMesh = ()=>{\n const mesh = new (0, $ilwiq.Mesh)(new (0, $ilwiq.PlaneGeometry)(1, 1, 32, 1), $bc7831423112e56a$var$defaultMaterial);\n $bc7831423112e56a$var$getCurvedRaycastMesh = ()=>mesh;\n return mesh;\n};\nconst $bc7831423112e56a$var$syncStartEvent = {\n type: \"syncstart\"\n};\nconst $bc7831423112e56a$var$syncCompleteEvent = {\n type: \"synccomplete\"\n};\nconst $bc7831423112e56a$var$SYNCABLE_PROPS = [\n \"font\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"lang\",\n \"letterSpacing\",\n \"lineHeight\",\n \"maxWidth\",\n \"overflowWrap\",\n \"text\",\n \"direction\",\n \"textAlign\",\n \"textIndent\",\n \"whiteSpace\",\n \"anchorX\",\n \"anchorY\",\n \"colorRanges\",\n \"sdfGlyphSize\"\n];\nconst $bc7831423112e56a$var$COPYABLE_PROPS = $bc7831423112e56a$var$SYNCABLE_PROPS.concat(\"material\", \"color\", \"depthOffset\", \"clipRect\", \"curveRadius\", \"orientation\", \"glyphGeometryDetail\");\n/**\n * @class Text\n *\n * A ThreeJS Mesh that renders a string of text on a plane in 3D space using signed distance\n * fields (SDF).\n */ class $bc7831423112e56a$export$5f1af8db9871e1d6 extends (0, $ilwiq.Mesh) {\n constructor(){\n const geometry = new $bc7831423112e56a$export$16fe3b8f85ab6e35();\n super(geometry, null);\n // === Text layout properties: === //\n /**\n * @member {string} text\n * The string of text to be rendered.\n */ this.text = \"\";\n /**\n * @member {number|string} anchorX\n * Defines the horizontal position in the text block that should line up with the local origin.\n * Can be specified as a numeric x position in local units, a string percentage of the total\n * text block width e.g. `'25%'`, or one of the following keyword strings: 'left', 'center',\n * or 'right'.\n */ this.anchorX = 0;\n /**\n * @member {number|string} anchorY\n * Defines the vertical position in the text block that should line up with the local origin.\n * Can be specified as a numeric y position in local units (note: down is negative y), a string\n * percentage of the total text block height e.g. `'25%'`, or one of the following keyword strings:\n * 'top', 'top-baseline', 'top-cap', 'top-ex', 'middle', 'bottom-baseline', or 'bottom'.\n */ this.anchorY = 0;\n /**\n * @member {number} curveRadius\n * Defines a cylindrical radius along which the text's plane will be curved. Positive numbers put\n * the cylinder's centerline (oriented vertically) that distance in front of the text, for a concave\n * curvature, while negative numbers put it behind the text for a convex curvature. The centerline\n * will be aligned with the text's local origin; you can use `anchorX` to offset it.\n *\n * Since each glyph is by default rendered with a simple quad, each glyph remains a flat plane\n * internally. You can use `glyphGeometryDetail` to add more vertices for curvature inside glyphs.\n */ this.curveRadius = 0;\n /**\n * @member {string} direction\n * Sets the base direction for the text. The default value of \"auto\" will choose a direction based\n * on the text's content according to the bidi spec. A value of \"ltr\" or \"rtl\" will force the direction.\n */ this.direction = \"auto\";\n /**\n * @member {string|null} font\n * URL of a custom font to be used. Font files can be in .ttf, .otf, or .woff (not .woff2) formats.\n * Defaults to Noto Sans.\n */ this.font = null; //will use default from TextBuilder\n this.unicodeFontsURL = null; //defaults to CDN\n /**\n * @member {number} fontSize\n * The size at which to render the font in local units; corresponds to the em-box height\n * of the chosen `font`.\n */ this.fontSize = 0.1;\n /**\n * @member {number|'normal'|'bold'}\n * The weight of the font. Currently only used for fallback Noto fonts.\n */ this.fontWeight = \"normal\";\n /**\n * @member {'normal'|'italic'}\n * The style of the font. Currently only used for fallback Noto fonts.\n */ this.fontStyle = \"normal\";\n /**\n * @member {string|null} lang\n * The language code of this text; can be used for explicitly selecting certain CJK fonts.\n */ this.lang = null;\n /**\n * @member {number} letterSpacing\n * Sets a uniform adjustment to spacing between letters after kerning is applied. Positive\n * numbers increase spacing and negative numbers decrease it.\n */ this.letterSpacing = 0;\n /**\n * @member {number|string} lineHeight\n * Sets the height of each line of text, as a multiple of the `fontSize`. Defaults to 'normal'\n * which chooses a reasonable height based on the chosen font's ascender/descender metrics.\n */ this.lineHeight = \"normal\";\n /**\n * @member {number} maxWidth\n * The maximum width of the text block, above which text may start wrapping according to the\n * `whiteSpace` and `overflowWrap` properties.\n */ this.maxWidth = Infinity;\n /**\n * @member {string} overflowWrap\n * Defines how text wraps if the `whiteSpace` property is `normal`. Can be either `'normal'`\n * to break at whitespace characters, or `'break-word'` to allow breaking within words.\n * Defaults to `'normal'`.\n */ this.overflowWrap = \"normal\";\n /**\n * @member {string} textAlign\n * The horizontal alignment of each line of text within the overall text bounding box.\n */ this.textAlign = \"left\";\n /**\n * @member {number} textIndent\n * Indentation for the first character of a line; see CSS `text-indent`.\n */ this.textIndent = 0;\n /**\n * @member {string} whiteSpace\n * Defines whether text should wrap when a line reaches the `maxWidth`. Can\n * be either `'normal'` (the default), to allow wrapping according to the `overflowWrap` property,\n * or `'nowrap'` to prevent wrapping. Note that `'normal'` here honors newline characters to\n * manually break lines, making it behave more like `'pre-wrap'` does in CSS.\n */ this.whiteSpace = \"normal\";\n // === Presentation properties: === //\n /**\n * @member {THREE.Material} material\n * Defines a _base_ material to be used when rendering the text. This material will be\n * automatically replaced with a material derived from it, that adds shader code to\n * decrease the alpha for each fragment (pixel) outside the text glyphs, with antialiasing.\n * By default it will derive from a simple white MeshBasicMaterial, but you can use any\n * of the other mesh materials to gain other features like lighting, texture maps, etc.\n *\n * Also see the `color` shortcut property.\n */ this.material = null;\n /**\n * @member {string|number|THREE.Color} color\n * This is a shortcut for setting the `color` of the text's material. You can use this\n * if you don't want to specify a whole custom `material`. Also, if you do use a custom\n * `material`, this color will only be used for this particuar Text instance, even if\n * that same material instance is shared across multiple Text objects.\n */ this.color = null;\n /**\n * @member {object|null} colorRanges\n * WARNING: This API is experimental and may change.\n * This allows more fine-grained control of colors for individual or ranges of characters,\n * taking precedence over the material's `color`. Its format is an Object whose keys each\n * define a starting character index for a range, and whose values are the color for each\n * range. The color value can be a numeric hex color value, a `THREE.Color` object, or\n * any of the strings accepted by `THREE.Color`.\n */ this.colorRanges = null;\n /**\n * @member {number|string} outlineWidth\n * WARNING: This API is experimental and may change.\n * The width of an outline/halo to be drawn around each text glyph using the `outlineColor` and `outlineOpacity`.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g.\n * `\"12%\"` which is treated as a percentage of the `fontSize`. Defaults to `0`, which means\n * no outline will be drawn unless an `outlineOffsetX/Y` or `outlineBlur` is set.\n */ this.outlineWidth = 0;\n /**\n * @member {string|number|THREE.Color} outlineColor\n * WARNING: This API is experimental and may change.\n * The color of the text outline, if `outlineWidth`/`outlineBlur`/`outlineOffsetX/Y` are set.\n * Defaults to black.\n */ this.outlineColor = 0x000000;\n /**\n * @member {number} outlineOpacity\n * WARNING: This API is experimental and may change.\n * The opacity of the outline, if `outlineWidth`/`outlineBlur`/`outlineOffsetX/Y` are set.\n * Defaults to `1`.\n */ this.outlineOpacity = 1;\n /**\n * @member {number|string} outlineBlur\n * WARNING: This API is experimental and may change.\n * A blur radius applied to the outer edge of the text's outline. If the `outlineWidth` is\n * zero, the blur will be applied at the glyph edge, like CSS's `text-shadow` blur radius.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g.\n * `\"12%\"` which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */ this.outlineBlur = 0;\n /**\n * @member {number|string} outlineOffsetX\n * WARNING: This API is experimental and may change.\n * A horizontal offset for the text outline.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g. `\"12%\"`\n * which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */ this.outlineOffsetX = 0;\n /**\n * @member {number|string} outlineOffsetY\n * WARNING: This API is experimental and may change.\n * A vertical offset for the text outline.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g. `\"12%\"`\n * which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */ this.outlineOffsetY = 0;\n /**\n * @member {number|string} strokeWidth\n * WARNING: This API is experimental and may change.\n * The width of an inner stroke drawn inside each text glyph using the `strokeColor` and `strokeOpacity`.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g. `\"12%\"`\n * which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */ this.strokeWidth = 0;\n /**\n * @member {string|number|THREE.Color} strokeColor\n * WARNING: This API is experimental and may change.\n * The color of the text stroke, if `strokeWidth` is greater than zero. Defaults to gray.\n */ this.strokeColor = $bc7831423112e56a$var$defaultStrokeColor;\n /**\n * @member {number} strokeOpacity\n * WARNING: This API is experimental and may change.\n * The opacity of the stroke, if `strokeWidth` is greater than zero. Defaults to `1`.\n */ this.strokeOpacity = 1;\n /**\n * @member {number} fillOpacity\n * WARNING: This API is experimental and may change.\n * The opacity of the glyph's fill from 0 to 1. This behaves like the material's `opacity` but allows\n * giving the fill a different opacity than the `strokeOpacity`. A fillOpacity of `0` makes the\n * interior of the glyph invisible, leaving just the `strokeWidth`. Defaults to `1`.\n */ this.fillOpacity = 1;\n /**\n * @member {number} depthOffset\n * This is a shortcut for setting the material's `polygonOffset` and related properties,\n * which can be useful in preventing z-fighting when this text is laid on top of another\n * plane in the scene. Positive numbers are further from the camera, negatives closer.\n */ this.depthOffset = 0;\n /**\n * @member {Array} clipRect\n * If specified, defines a `[minX, minY, maxX, maxY]` of a rectangle outside of which all\n * pixels will be discarded. This can be used for example to clip overflowing text when\n * `whiteSpace='nowrap'`.\n */ this.clipRect = null;\n /**\n * @member {string} orientation\n * Defines the axis plane on which the text should be laid out when the mesh has no extra\n * rotation transform. It is specified as a string with two axes: the horizontal axis with\n * positive pointing right, and the vertical axis with positive pointing up. By default this\n * is '+x+y', meaning the text sits on the xy plane with the text's top toward positive y\n * and facing positive z. A value of '+x-z' would place it on the xz plane with the text's\n * top toward negative z and facing positive y.\n */ this.orientation = $bc7831423112e56a$var$defaultOrient;\n /**\n * @member {number} glyphGeometryDetail\n * Controls number of vertical/horizontal segments that make up each glyph's rectangular\n * plane. Defaults to 1. This can be increased to provide more geometrical detail for custom\n * vertex shader effects, for example.\n */ this.glyphGeometryDetail = 1;\n /**\n * @member {number|null} sdfGlyphSize\n * The size of each glyph's SDF (signed distance field) used for rendering. This must be a\n * power-of-two number. Defaults to 64 which is generally a good balance of size and quality\n * for most fonts. Larger sizes can improve the quality of glyph rendering by increasing\n * the sharpness of corners and preventing loss of very thin lines, at the expense of\n * increased memory footprint and longer SDF generation time.\n */ this.sdfGlyphSize = null;\n /**\n * @member {boolean} gpuAccelerateSDF\n * When `true`, the SDF generation process will be GPU-accelerated with WebGL when possible,\n * making it much faster especially for complex glyphs, and falling back to a JavaScript version\n * executed in web workers when support isn't available. It should automatically detect support,\n * but it's still somewhat experimental, so you can set it to `false` to force it to use the JS\n * version if you encounter issues with it.\n */ this.gpuAccelerateSDF = true;\n this.debugSDF = false;\n }\n /**\n * Updates the text rendering according to the current text-related configuration properties.\n * This is an async process, so you can pass in a callback function to be executed when it\n * finishes.\n * @param {function} [callback]\n */ sync(callback) {\n if (this._needsSync) {\n this._needsSync = false;\n // If there's another sync still in progress, queue\n if (this._isSyncing) (this._queuedSyncs || (this._queuedSyncs = [])).push(callback);\n else {\n this._isSyncing = true;\n this.dispatchEvent($bc7831423112e56a$var$syncStartEvent);\n $bc7831423112e56a$export$8a83a1532cd0ce42({\n text: this.text,\n font: this.font,\n lang: this.lang,\n fontSize: this.fontSize || 0.1,\n fontWeight: this.fontWeight || \"normal\",\n fontStyle: this.fontStyle || \"normal\",\n letterSpacing: this.letterSpacing || 0,\n lineHeight: this.lineHeight || \"normal\",\n maxWidth: this.maxWidth,\n direction: this.direction || \"auto\",\n textAlign: this.textAlign,\n textIndent: this.textIndent,\n whiteSpace: this.whiteSpace,\n overflowWrap: this.overflowWrap,\n anchorX: this.anchorX,\n anchorY: this.anchorY,\n colorRanges: this.colorRanges,\n includeCaretPositions: true,\n sdfGlyphSize: this.sdfGlyphSize,\n gpuAccelerateSDF: this.gpuAccelerateSDF,\n unicodeFontsURL: this.unicodeFontsURL\n }, (textRenderInfo)=>{\n this._isSyncing = false;\n // Save result for later use in onBeforeRender\n this._textRenderInfo = textRenderInfo;\n // Update the geometry attributes\n this.geometry.updateGlyphs(textRenderInfo.glyphBounds, textRenderInfo.glyphAtlasIndices, textRenderInfo.blockBounds, textRenderInfo.chunkedBounds, textRenderInfo.glyphColors);\n // If we had extra sync requests queued up, kick it off\n const queued = this._queuedSyncs;\n if (queued) {\n this._queuedSyncs = null;\n this._needsSync = true;\n this.sync(()=>{\n queued.forEach((fn)=>fn && fn());\n });\n }\n this.dispatchEvent($bc7831423112e56a$var$syncCompleteEvent);\n if (callback) callback();\n });\n }\n }\n }\n /**\n * Initiate a sync if needed - note it won't complete until next frame at the\n * earliest so if possible it's a good idea to call sync() manually as soon as\n * all the properties have been set.\n * @override\n */ onBeforeRender(renderer, scene, camera, geometry, material, group) {\n this.sync();\n // This may not always be a text material, e.g. if there's a scene.overrideMaterial present\n if (material.isTroikaTextMaterial) this._prepareForRender(material);\n // We need to force the material to FrontSide to avoid the double-draw-call performance hit\n // introduced in Three.js r130: https://github.com/mrdoob/three.js/pull/21967 - The sidedness\n // is instead applied via drawRange in the GlyphsGeometry.\n material._hadOwnSide = material.hasOwnProperty(\"side\");\n this.geometry.setSide(material._actualSide = material.side);\n material.side = (0, $ilwiq.FrontSide);\n }\n onAfterRender(renderer, scene, camera, geometry, material, group) {\n // Restore original material side\n if (material._hadOwnSide) material.side = material._actualSide;\n else delete material.side; // back to inheriting from base material\n }\n /**\n * Shortcut to dispose the geometry specific to this instance.\n * Note: we don't also dispose the derived material here because if anything else is\n * sharing the same base material it will result in a pause next frame as the program\n * is recompiled. Instead users can dispose the base material manually, like normal,\n * and we'll also dispose the derived material at that time.\n */ dispose() {\n this.geometry.dispose();\n }\n /**\n * @property {TroikaTextRenderInfo|null} textRenderInfo\n * @readonly\n * The current processed rendering data for this TextMesh, returned by the TextBuilder after\n * a `sync()` call. This will be `null` initially, and may be stale for a short period until\n * the asynchrous `sync()` process completes.\n */ get textRenderInfo() {\n return this._textRenderInfo || null;\n }\n // Handler for automatically wrapping the base material with our upgrades. We do the wrapping\n // lazily on _read_ rather than write to avoid unnecessary wrapping on transient values.\n get material() {\n let derivedMaterial = this._derivedMaterial;\n const baseMaterial = this._baseMaterial || this._defaultMaterial || (this._defaultMaterial = $bc7831423112e56a$var$defaultMaterial.clone());\n if (!derivedMaterial || derivedMaterial.baseMaterial !== baseMaterial) {\n derivedMaterial = this._derivedMaterial = $bc7831423112e56a$export$ec8c2d2c0fe50886(baseMaterial);\n // dispose the derived material when its base material is disposed:\n baseMaterial.addEventListener(\"dispose\", function onDispose() {\n baseMaterial.removeEventListener(\"dispose\", onDispose);\n derivedMaterial.dispose();\n });\n }\n // If text outline is configured, render it as a preliminary draw using Three's multi-material\n // feature (see GlyphsGeometry which sets up `groups` for this purpose) Doing it with multi\n // materials ensures the layers are always rendered consecutively in a consistent order.\n // Each layer will trigger onBeforeRender with the appropriate material.\n if (this.outlineWidth || this.outlineBlur || this.outlineOffsetX || this.outlineOffsetY) {\n let outlineMaterial = derivedMaterial._outlineMtl;\n if (!outlineMaterial) {\n outlineMaterial = derivedMaterial._outlineMtl = Object.create(derivedMaterial, {\n id: {\n value: derivedMaterial.id + 0.1\n }\n });\n outlineMaterial.isTextOutlineMaterial = true;\n outlineMaterial.depthWrite = false;\n outlineMaterial.map = null; //???\n derivedMaterial.addEventListener(\"dispose\", function onDispose() {\n derivedMaterial.removeEventListener(\"dispose\", onDispose);\n outlineMaterial.dispose();\n });\n }\n return [\n outlineMaterial,\n derivedMaterial\n ];\n } else return derivedMaterial;\n }\n set material(baseMaterial) {\n if (baseMaterial && baseMaterial.isTroikaTextMaterial) {\n this._derivedMaterial = baseMaterial;\n this._baseMaterial = baseMaterial.baseMaterial;\n } else this._baseMaterial = baseMaterial;\n }\n get glyphGeometryDetail() {\n return this.geometry.detail;\n }\n set glyphGeometryDetail(detail) {\n this.geometry.detail = detail;\n }\n get curveRadius() {\n return this.geometry.curveRadius;\n }\n set curveRadius(r) {\n this.geometry.curveRadius = r;\n }\n // Create and update material for shadows upon request:\n get customDepthMaterial() {\n return $bc7831423112e56a$var$first(this.material).getDepthMaterial();\n }\n get customDistanceMaterial() {\n return $bc7831423112e56a$var$first(this.material).getDistanceMaterial();\n }\n _prepareForRender(material) {\n const isOutline = material.isTextOutlineMaterial;\n const uniforms = material.uniforms;\n const textInfo = this.textRenderInfo;\n if (textInfo) {\n const { sdfTexture: sdfTexture, blockBounds: blockBounds } = textInfo;\n uniforms.uTroikaSDFTexture.value = sdfTexture;\n uniforms.uTroikaSDFTextureSize.value.set(sdfTexture.image.width, sdfTexture.image.height);\n uniforms.uTroikaSDFGlyphSize.value = textInfo.sdfGlyphSize;\n uniforms.uTroikaSDFExponent.value = textInfo.sdfExponent;\n uniforms.uTroikaTotalBounds.value.fromArray(blockBounds);\n uniforms.uTroikaUseGlyphColors.value = !isOutline && !!textInfo.glyphColors;\n let distanceOffset = 0;\n let blurRadius = 0;\n let strokeWidth = 0;\n let fillOpacity;\n let strokeOpacity;\n let strokeColor;\n let offsetX = 0;\n let offsetY = 0;\n if (isOutline) {\n let { outlineWidth: outlineWidth, outlineOffsetX: outlineOffsetX, outlineOffsetY: outlineOffsetY, outlineBlur: outlineBlur, outlineOpacity: outlineOpacity } = this;\n distanceOffset = this._parsePercent(outlineWidth) || 0;\n blurRadius = Math.max(0, this._parsePercent(outlineBlur) || 0);\n fillOpacity = outlineOpacity;\n offsetX = this._parsePercent(outlineOffsetX) || 0;\n offsetY = this._parsePercent(outlineOffsetY) || 0;\n } else {\n strokeWidth = Math.max(0, this._parsePercent(this.strokeWidth) || 0);\n if (strokeWidth) {\n strokeColor = this.strokeColor;\n uniforms.uTroikaStrokeColor.value.set(strokeColor == null ? $bc7831423112e56a$var$defaultStrokeColor : strokeColor);\n strokeOpacity = this.strokeOpacity;\n if (strokeOpacity == null) strokeOpacity = 1;\n }\n fillOpacity = this.fillOpacity;\n }\n uniforms.uTroikaDistanceOffset.value = distanceOffset;\n uniforms.uTroikaPositionOffset.value.set(offsetX, offsetY);\n uniforms.uTroikaBlurRadius.value = blurRadius;\n uniforms.uTroikaStrokeWidth.value = strokeWidth;\n uniforms.uTroikaStrokeOpacity.value = strokeOpacity;\n uniforms.uTroikaFillOpacity.value = fillOpacity == null ? 1 : fillOpacity;\n uniforms.uTroikaCurveRadius.value = this.curveRadius || 0;\n let clipRect = this.clipRect;\n if (clipRect && Array.isArray(clipRect) && clipRect.length === 4) uniforms.uTroikaClipRect.value.fromArray(clipRect);\n else {\n // no clipping - choose a finite rect that shouldn't ever be reached by overflowing glyphs or outlines\n const pad = (this.fontSize || 0.1) * 100;\n uniforms.uTroikaClipRect.value.set(blockBounds[0] - pad, blockBounds[1] - pad, blockBounds[2] + pad, blockBounds[3] + pad);\n }\n this.geometry.applyClipRect(uniforms.uTroikaClipRect.value);\n }\n uniforms.uTroikaSDFDebug.value = !!this.debugSDF;\n material.polygonOffset = !!this.depthOffset;\n material.polygonOffsetFactor = material.polygonOffsetUnits = this.depthOffset || 0;\n // Shortcut for setting material color via `color` prop on the mesh; this is\n // applied only to the derived material to avoid mutating a shared base material.\n const color = isOutline ? this.outlineColor || 0 : this.color;\n if (color == null) delete material.color; //inherit from base\n else {\n const colorObj = material.hasOwnProperty(\"color\") ? material.color : material.color = new (0, $ilwiq.Color)();\n if (color !== colorObj._input || typeof color === \"object\") colorObj.set(colorObj._input = color);\n }\n // base orientation\n let orient = this.orientation || $bc7831423112e56a$var$defaultOrient;\n if (orient !== material._orientation) {\n let rotMat = uniforms.uTroikaOrient.value;\n orient = orient.replace(/[^-+xyz]/g, \"\");\n let match = orient !== $bc7831423112e56a$var$defaultOrient && orient.match(/^([-+])([xyz])([-+])([xyz])$/);\n if (match) {\n let [, hSign, hAxis, vSign, vAxis] = match;\n $bc7831423112e56a$var$tempVec3a.set(0, 0, 0)[hAxis] = hSign === \"-\" ? 1 : -1;\n $bc7831423112e56a$var$tempVec3b.set(0, 0, 0)[vAxis] = vSign === \"-\" ? -1 : 1;\n $bc7831423112e56a$var$tempMat4.lookAt($bc7831423112e56a$var$origin, $bc7831423112e56a$var$tempVec3a.cross($bc7831423112e56a$var$tempVec3b), $bc7831423112e56a$var$tempVec3b);\n rotMat.setFromMatrix4($bc7831423112e56a$var$tempMat4);\n } else rotMat.identity();\n material._orientation = orient;\n }\n }\n _parsePercent(value) {\n if (typeof value === \"string\") {\n let match = value.match(/^(-?[\\d.]+)%$/);\n let pct = match ? parseFloat(match[1]) : NaN;\n value = (isNaN(pct) ? 0 : pct / 100) * this.fontSize;\n }\n return value;\n }\n /**\n * Translate a point in local space to an x/y in the text plane.\n */ localPositionToTextCoords(position, target = new (0, $ilwiq.Vector2)()) {\n target.copy(position); //simple non-curved case is 1:1\n const r = this.curveRadius;\n if (r) target.x = Math.atan2(position.x, Math.abs(r) - Math.abs(position.z)) * Math.abs(r);\n return target;\n }\n /**\n * Translate a point in world space to an x/y in the text plane.\n */ worldPositionToTextCoords(position, target = new (0, $ilwiq.Vector2)()) {\n $bc7831423112e56a$var$tempVec3a.copy(position);\n return this.localPositionToTextCoords(this.worldToLocal($bc7831423112e56a$var$tempVec3a), target);\n }\n /**\n * @override Custom raycasting to test against the whole text block's max rectangular bounds\n * TODO is there any reason to make this more granular, like within individual line or glyph rects?\n */ raycast(raycaster, intersects) {\n const { textRenderInfo: textRenderInfo, curveRadius: curveRadius } = this;\n if (textRenderInfo) {\n const bounds = textRenderInfo.blockBounds;\n const raycastMesh = curveRadius ? $bc7831423112e56a$var$getCurvedRaycastMesh() : $bc7831423112e56a$var$getFlatRaycastMesh();\n const geom = raycastMesh.geometry;\n const { position: position, uv: uv } = geom.attributes;\n for(let i = 0; i < uv.count; i++){\n let x = bounds[0] + uv.getX(i) * (bounds[2] - bounds[0]);\n const y = bounds[1] + uv.getY(i) * (bounds[3] - bounds[1]);\n let z = 0;\n if (curveRadius) {\n z = curveRadius - Math.cos(x / curveRadius) * curveRadius;\n x = Math.sin(x / curveRadius) * curveRadius;\n }\n position.setXYZ(i, x, y, z);\n }\n geom.boundingSphere = this.geometry.boundingSphere;\n geom.boundingBox = this.geometry.boundingBox;\n raycastMesh.matrixWorld = this.matrixWorld;\n raycastMesh.material.side = this.material.side;\n $bc7831423112e56a$var$tempArray.length = 0;\n raycastMesh.raycast(raycaster, $bc7831423112e56a$var$tempArray);\n for(let i = 0; i < $bc7831423112e56a$var$tempArray.length; i++){\n $bc7831423112e56a$var$tempArray[i].object = this;\n intersects.push($bc7831423112e56a$var$tempArray[i]);\n }\n }\n }\n copy(source) {\n // Prevent copying the geometry reference so we don't end up sharing attributes between instances\n const geom = this.geometry;\n super.copy(source);\n this.geometry = geom;\n $bc7831423112e56a$var$COPYABLE_PROPS.forEach((prop)=>{\n this[prop] = source[prop];\n });\n return this;\n }\n clone() {\n return new this.constructor().copy(this);\n }\n}\n// Create setters for properties that affect text layout:\n$bc7831423112e56a$var$SYNCABLE_PROPS.forEach((prop)=>{\n const privateKey = \"_private_\" + prop;\n Object.defineProperty($bc7831423112e56a$export$5f1af8db9871e1d6.prototype, prop, {\n get () {\n return this[privateKey];\n },\n set (value) {\n if (value !== this[privateKey]) {\n this[privateKey] = value;\n this._needsSync = true;\n }\n }\n });\n});\n//=== Utility functions for dealing with carets and selection ranges ===//\n/**\n * @typedef {object} TextCaret\n * @property {number} x - x position of the caret\n * @property {number} y - y position of the caret's bottom\n * @property {number} height - height of the caret\n * @property {number} charIndex - the index in the original input string of this caret's target\n * character; the caret will be for the position _before_ that character.\n */ /**\n * Given a local x/y coordinate in the text block plane, find the nearest caret position.\n * @param {TroikaTextRenderInfo} textRenderInfo - a result object from TextBuilder#getTextRenderInfo\n * @param {number} x\n * @param {number} y\n * @return {TextCaret | null}\n */ function $bc7831423112e56a$export$c92621821fde77a5(textRenderInfo, x, y) {\n let closestCaret = null;\n const rows = $bc7831423112e56a$var$groupCaretsByRow(textRenderInfo);\n // Find nearest row by y first\n let closestRow = null;\n rows.forEach((row)=>{\n if (!closestRow || Math.abs(y - (row.top + row.bottom) / 2) < Math.abs(y - (closestRow.top + closestRow.bottom) / 2)) closestRow = row;\n });\n // Then find closest caret by x within that row\n closestRow.carets.forEach((caret)=>{\n if (!closestCaret || Math.abs(x - caret.x) < Math.abs(x - closestCaret.x)) closestCaret = caret;\n });\n return closestCaret;\n}\nconst $bc7831423112e56a$var$_rectsCache = new WeakMap();\n/**\n * Given start and end character indexes, return a list of rectangles covering all the\n * characters within that selection.\n * @param {TroikaTextRenderInfo} textRenderInfo\n * @param {number} start - index of the first char in the selection\n * @param {number} end - index of the first char after the selection\n * @return {Array<{left, top, right, bottom}> | null}\n */ function $bc7831423112e56a$export$2b95125f38323093(textRenderInfo, start, end) {\n let rects;\n if (textRenderInfo) {\n // Check cache - textRenderInfo is frozen so it's safe to cache based on it\n let prevResult = $bc7831423112e56a$var$_rectsCache.get(textRenderInfo);\n if (prevResult && prevResult.start === start && prevResult.end === end) return prevResult.rects;\n const { caretPositions: caretPositions } = textRenderInfo;\n // Normalize\n if (end < start) {\n const s = start;\n start = end;\n end = s;\n }\n start = Math.max(start, 0);\n end = Math.min(end, caretPositions.length + 1);\n // Build list of rects, expanding the current rect for all characters in a run and starting\n // a new rect whenever reaching a new line or a new bidi direction\n rects = [];\n let currentRect = null;\n for(let i = start; i < end; i++){\n const x1 = caretPositions[i * 4];\n const x2 = caretPositions[i * 4 + 1];\n const left = Math.min(x1, x2);\n const right = Math.max(x1, x2);\n const bottom = caretPositions[i * 4 + 2];\n const top = caretPositions[i * 4 + 3];\n if (!currentRect || bottom !== currentRect.bottom || top !== currentRect.top || left > currentRect.right || right < currentRect.left) {\n currentRect = {\n left: Infinity,\n right: -Infinity,\n bottom: bottom,\n top: top\n };\n rects.push(currentRect);\n }\n currentRect.left = Math.min(left, currentRect.left);\n currentRect.right = Math.max(right, currentRect.right);\n }\n // Merge any overlapping rects, e.g. those formed by adjacent bidi runs\n rects.sort((a, b)=>b.bottom - a.bottom || a.left - b.left);\n for(let i = rects.length - 1; i-- > 0;){\n const rectA = rects[i];\n const rectB = rects[i + 1];\n if (rectA.bottom === rectB.bottom && rectA.top === rectB.top && rectA.left <= rectB.right && rectA.right >= rectB.left) {\n rectB.left = Math.min(rectB.left, rectA.left);\n rectB.right = Math.max(rectB.right, rectA.right);\n rects.splice(i, 1);\n }\n }\n $bc7831423112e56a$var$_rectsCache.set(textRenderInfo, {\n start: start,\n end: end,\n rects: rects\n });\n }\n return rects;\n}\nconst $bc7831423112e56a$var$_caretsByRowCache = new WeakMap();\n/**\n * Group a set of carets by row of text, caching the result. A single row of text may contain carets of\n * differing positions/heights if it has multiple fonts, and they may overlap slightly across rows, so this\n * uses an assumption of \"at least overlapping by half\" to put them in the same row.\n * @return Array<{bottom: number, top: number, carets: TextCaret[]}>\n */ function $bc7831423112e56a$var$groupCaretsByRow(textRenderInfo) {\n // textRenderInfo is frozen so it's safe to cache based on it\n let rows = $bc7831423112e56a$var$_caretsByRowCache.get(textRenderInfo);\n if (!rows) {\n rows = [];\n const { caretPositions: caretPositions } = textRenderInfo;\n let curRow;\n const visitCaret = (x, bottom, top, charIndex)=>{\n // new row if not overlapping by at least half\n if (!curRow || top < (curRow.top + curRow.bottom) / 2) rows.push(curRow = {\n bottom: bottom,\n top: top,\n carets: []\n });\n // expand vertical limits if necessary\n if (top > curRow.top) curRow.top = top;\n if (bottom < curRow.bottom) curRow.bottom = bottom;\n curRow.carets.push({\n x: x,\n y: bottom,\n height: top - bottom,\n charIndex: charIndex\n });\n };\n let i = 0;\n for(; i < caretPositions.length; i += 4)visitCaret(caretPositions[i], caretPositions[i + 2], caretPositions[i + 3], i / 4);\n // Add one more caret after the final char\n visitCaret(caretPositions[i - 3], caretPositions[i - 2], caretPositions[i - 1], i / 4);\n }\n $bc7831423112e56a$var$_caretsByRowCache.set(textRenderInfo, rows);\n return rows;\n}\n\n});\nparcelRegister(\"8ue7g\", function(module, exports) {\n\n$parcel$export(module.exports, \"defineWorkerModule\", () => $62dc134116dcb5c9$export$e2063b0a5e3f6023);\n$parcel$export(module.exports, \"terminateWorker\", () => $62dc134116dcb5c9$export$a61a973ac243a75e);\n/**\n * Main content for the worker that handles the loading and execution of\n * modules within it.\n */ \nvar $hPtJY = parcelRequire(\"hPtJY\");\nfunction $62dc134116dcb5c9$var$workerBootstrap() {\n var modules = Object.create(null);\n // Handle messages for registering a module\n function registerModule(ref, callback) {\n var id = ref.id;\n var name = ref.name;\n var dependencies = ref.dependencies;\n if (dependencies === void 0) dependencies = [];\n var init = ref.init;\n if (init === void 0) init = function() {};\n var getTransferables = ref.getTransferables;\n if (getTransferables === void 0) getTransferables = null;\n // Only register once\n if (modules[id]) return;\n try {\n // If any dependencies are modules, ensure they're registered and grab their value\n dependencies = dependencies.map(function(dep) {\n if (dep && dep.isWorkerModule) {\n registerModule(dep, function(depResult) {\n if (depResult instanceof Error) throw depResult;\n });\n dep = modules[dep.id].value;\n }\n return dep;\n });\n // Rehydrate functions\n init = rehydrate(\"<\" + name + \">.init\", init);\n if (getTransferables) getTransferables = rehydrate(\"<\" + name + \">.getTransferables\", getTransferables);\n // Initialize the module and store its value\n var value = null;\n if (typeof init === \"function\") value = init.apply(void 0, dependencies);\n else console.error(\"worker module init function failed to rehydrate\");\n modules[id] = {\n id: id,\n value: value,\n getTransferables: getTransferables\n };\n callback(value);\n } catch (err) {\n if (!(err && err.noLog)) console.error(err);\n callback(err);\n }\n }\n // Handle messages for calling a registered module's result function\n function callModule(ref, callback) {\n var ref$1;\n var id = ref.id;\n var args = ref.args;\n if (!modules[id] || typeof modules[id].value !== \"function\") callback(new Error(\"Worker module \" + id + \": not found or its 'init' did not return a function\"));\n try {\n var result = (ref$1 = modules[id]).value.apply(ref$1, args);\n if (result && typeof result.then === \"function\") result.then(handleResult, function(rej) {\n return callback(rej instanceof Error ? rej : new Error(\"\" + rej));\n });\n else handleResult(result);\n } catch (err) {\n callback(err);\n }\n function handleResult(result) {\n try {\n var tx = modules[id].getTransferables && modules[id].getTransferables(result);\n if (!tx || !Array.isArray(tx) || !tx.length) tx = undefined; //postMessage is very picky about not passing null or empty transferables\n callback(result, tx);\n } catch (err) {\n console.error(err);\n callback(err);\n }\n }\n }\n function rehydrate(name, str) {\n var result = void 0;\n self.troikaDefine = function(r) {\n return result = r;\n };\n var url = URL.createObjectURL(new Blob([\n \"/** \" + name.replace(/\\*/g, \"\") + \" **/\\n\\ntroikaDefine(\\n\" + str + \"\\n)\"\n ], {\n type: \"application/javascript\"\n }));\n try {\n importScripts(url);\n } catch (err) {\n console.error(err);\n }\n URL.revokeObjectURL(url);\n delete self.troikaDefine;\n return result;\n }\n // Handler for all messages within the worker\n self.addEventListener(\"message\", function(e) {\n var ref = e.data;\n var messageId = ref.messageId;\n var action = ref.action;\n var data = ref.data;\n try {\n // Module registration\n if (action === \"registerModule\") registerModule(data, function(result) {\n if (result instanceof Error) postMessage({\n messageId: messageId,\n success: false,\n error: result.message\n });\n else postMessage({\n messageId: messageId,\n success: true,\n result: {\n isCallable: typeof result === \"function\"\n }\n });\n });\n // Invocation\n if (action === \"callModule\") callModule(data, function(result, transferables) {\n if (result instanceof Error) postMessage({\n messageId: messageId,\n success: false,\n error: result.message\n });\n else postMessage({\n messageId: messageId,\n success: true,\n result: result\n }, transferables || undefined);\n });\n } catch (err) {\n postMessage({\n messageId: messageId,\n success: false,\n error: err.stack\n });\n }\n });\n}\n/**\n * Fallback for `defineWorkerModule` that behaves identically but runs in the main\n * thread, for when the execution environment doesn't support web workers or they\n * are disallowed due to e.g. CSP security restrictions.\n */ function $62dc134116dcb5c9$var$defineMainThreadModule(options) {\n var moduleFunc = function() {\n var args = [], len = arguments.length;\n while(len--)args[len] = arguments[len];\n return moduleFunc._getInitResult().then(function(initResult) {\n if (typeof initResult === \"function\") return initResult.apply(void 0, args);\n else throw new Error(\"Worker module function was called but `init` did not return a callable function\");\n });\n };\n moduleFunc._getInitResult = function() {\n // We can ignore getTransferables in main thread. TODO workerId?\n var dependencies = options.dependencies;\n var init = options.init;\n // Resolve dependencies\n dependencies = Array.isArray(dependencies) ? dependencies.map(function(dep) {\n return dep && dep._getInitResult ? dep._getInitResult() : dep;\n }) : [];\n // Invoke init with the resolved dependencies\n var initPromise = Promise.all(dependencies).then(function(deps) {\n return init.apply(null, deps);\n });\n // Cache the resolved promise for subsequent calls\n moduleFunc._getInitResult = function() {\n return initPromise;\n };\n return initPromise;\n };\n return moduleFunc;\n}\nvar $62dc134116dcb5c9$var$supportsWorkers = function() {\n var supported = false;\n // Only attempt worker initialization in browsers; elsewhere it would just be\n // noise e.g. loading into a Node environment for SSR.\n if (typeof window !== \"undefined\" && typeof window.document !== \"undefined\") try {\n // TODO additional checks for things like importScripts within the worker?\n // Would need to be an async check.\n var worker = new Worker(URL.createObjectURL(new Blob([\n \"\"\n ], {\n type: \"application/javascript\"\n })));\n worker.terminate();\n supported = true;\n } catch (err) {\n typeof $hPtJY;\n console.log(\"Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: [\" + err.message + \"]\");\n }\n // Cached result\n $62dc134116dcb5c9$var$supportsWorkers = function() {\n return supported;\n };\n return supported;\n};\nvar $62dc134116dcb5c9$var$_workerModuleId = 0;\nvar $62dc134116dcb5c9$var$_messageId = 0;\nvar $62dc134116dcb5c9$var$_allowInitAsString = false;\nvar $62dc134116dcb5c9$var$workers = Object.create(null);\nvar $62dc134116dcb5c9$var$registeredModules = Object.create(null); //workerId -> Set\nvar $62dc134116dcb5c9$var$openRequests = Object.create(null);\n/**\n * Define a module of code that will be executed with a web worker. This provides a simple\n * interface for moving chunks of logic off the main thread, and managing their dependencies\n * among one another.\n *\n * @param {object} options\n * @param {function} options.init\n * @param {array} [options.dependencies]\n * @param {function} [options.getTransferables]\n * @param {string} [options.name]\n * @param {string} [options.workerId]\n * @return {function(...[*]): {then}}\n */ function $62dc134116dcb5c9$export$e2063b0a5e3f6023(options) {\n if ((!options || typeof options.init !== \"function\") && !$62dc134116dcb5c9$var$_allowInitAsString) throw new Error(\"requires `options.init` function\");\n var dependencies = options.dependencies;\n var init = options.init;\n var getTransferables = options.getTransferables;\n var workerId = options.workerId;\n if (!$62dc134116dcb5c9$var$supportsWorkers()) return $62dc134116dcb5c9$var$defineMainThreadModule(options);\n if (workerId == null) workerId = \"#default\";\n var id = \"workerModule\" + ++$62dc134116dcb5c9$var$_workerModuleId;\n var name = options.name || id;\n var registrationPromise = null;\n dependencies = dependencies && dependencies.map(function(dep) {\n // Wrap raw functions as worker modules with no dependencies\n if (typeof dep === \"function\" && !dep.workerModuleData) {\n $62dc134116dcb5c9$var$_allowInitAsString = true;\n dep = $62dc134116dcb5c9$export$e2063b0a5e3f6023({\n workerId: workerId,\n name: \"<\" + name + \"> function dependency: \" + dep.name,\n init: \"function(){return (\\n\" + $62dc134116dcb5c9$export$d62b0b738687b4b2(dep) + \"\\n)}\"\n });\n $62dc134116dcb5c9$var$_allowInitAsString = false;\n }\n // Grab postable data for worker modules\n if (dep && dep.workerModuleData) dep = dep.workerModuleData;\n return dep;\n });\n function moduleFunc() {\n var args = [], len = arguments.length;\n while(len--)args[len] = arguments[len];\n // Register this module if needed\n if (!registrationPromise) {\n registrationPromise = $62dc134116dcb5c9$var$callWorker(workerId, \"registerModule\", moduleFunc.workerModuleData);\n var unregister = function() {\n registrationPromise = null;\n $62dc134116dcb5c9$var$registeredModules[workerId].delete(unregister);\n };\n ($62dc134116dcb5c9$var$registeredModules[workerId] || ($62dc134116dcb5c9$var$registeredModules[workerId] = new Set())).add(unregister);\n }\n // Invoke the module, returning a promise\n return registrationPromise.then(function(ref) {\n var isCallable = ref.isCallable;\n if (isCallable) return $62dc134116dcb5c9$var$callWorker(workerId, \"callModule\", {\n id: id,\n args: args\n });\n else throw new Error(\"Worker module function was called but `init` did not return a callable function\");\n });\n }\n moduleFunc.workerModuleData = {\n isWorkerModule: true,\n id: id,\n name: name,\n dependencies: dependencies,\n init: $62dc134116dcb5c9$export$d62b0b738687b4b2(init),\n getTransferables: getTransferables && $62dc134116dcb5c9$export$d62b0b738687b4b2(getTransferables)\n };\n return moduleFunc;\n}\n/**\n * Terminate an active Worker by a workerId that was passed to defineWorkerModule.\n * This only terminates the Worker itself; the worker module will remain available\n * and if you call it again its Worker will be respawned.\n * @param {string} workerId\n */ function $62dc134116dcb5c9$export$a61a973ac243a75e(workerId) {\n // Unregister all modules that were registered in that worker\n if ($62dc134116dcb5c9$var$registeredModules[workerId]) $62dc134116dcb5c9$var$registeredModules[workerId].forEach(function(unregister) {\n unregister();\n });\n // Terminate the Worker object\n if ($62dc134116dcb5c9$var$workers[workerId]) {\n $62dc134116dcb5c9$var$workers[workerId].terminate();\n delete $62dc134116dcb5c9$var$workers[workerId];\n }\n}\n/**\n * Stringifies a function into a form that can be deserialized in the worker\n * @param fn\n */ function $62dc134116dcb5c9$export$d62b0b738687b4b2(fn) {\n var str = fn.toString();\n // If it was defined in object method/property format, it needs to be modified\n if (!/^function/.test(str) && /^\\w+\\s*\\(/.test(str)) str = \"function \" + str;\n return str;\n}\nfunction $62dc134116dcb5c9$var$getWorker(workerId) {\n var worker = $62dc134116dcb5c9$var$workers[workerId];\n if (!worker) {\n // Bootstrap the worker's content\n var bootstrap = $62dc134116dcb5c9$export$d62b0b738687b4b2($62dc134116dcb5c9$var$workerBootstrap);\n // Create the worker from the bootstrap function content\n worker = $62dc134116dcb5c9$var$workers[workerId] = new Worker(URL.createObjectURL(new Blob([\n \"/** Worker Module Bootstrap: \" + workerId.replace(/\\*/g, \"\") + \" **/\\n\\n;(\" + bootstrap + \")()\"\n ], {\n type: \"application/javascript\"\n })));\n // Single handler for response messages from the worker\n worker.onmessage = function(e) {\n var response = e.data;\n var msgId = response.messageId;\n var callback = $62dc134116dcb5c9$var$openRequests[msgId];\n if (!callback) throw new Error(\"WorkerModule response with empty or unknown messageId\");\n delete $62dc134116dcb5c9$var$openRequests[msgId];\n callback(response);\n };\n }\n return worker;\n}\n// Issue a call to the worker with a callback to handle the response\nfunction $62dc134116dcb5c9$var$callWorker(workerId, action, data) {\n return new Promise(function(resolve, reject) {\n var messageId = ++$62dc134116dcb5c9$var$_messageId;\n $62dc134116dcb5c9$var$openRequests[messageId] = function(response) {\n if (response.success) resolve(response.result);\n else reject(new Error(\"Error in worker \" + action + \" call: \" + response.error));\n };\n $62dc134116dcb5c9$var$getWorker(workerId).postMessage({\n messageId: messageId,\n action: action,\n data: data\n });\n });\n}\n\n});\nparcelRegister(\"hPtJY\", function(module, exports) {\n// shim for using process in browser\nvar $cfae44f0dfdf62c0$var$process = module.exports = {};\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\nvar $cfae44f0dfdf62c0$var$cachedSetTimeout;\nvar $cfae44f0dfdf62c0$var$cachedClearTimeout;\nfunction $cfae44f0dfdf62c0$var$defaultSetTimout() {\n throw new Error(\"setTimeout has not been defined\");\n}\nfunction $cfae44f0dfdf62c0$var$defaultClearTimeout() {\n throw new Error(\"clearTimeout has not been defined\");\n}\n(function() {\n try {\n if (typeof setTimeout === \"function\") $cfae44f0dfdf62c0$var$cachedSetTimeout = setTimeout;\n else $cfae44f0dfdf62c0$var$cachedSetTimeout = $cfae44f0dfdf62c0$var$defaultSetTimout;\n } catch (e) {\n $cfae44f0dfdf62c0$var$cachedSetTimeout = $cfae44f0dfdf62c0$var$defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === \"function\") $cfae44f0dfdf62c0$var$cachedClearTimeout = clearTimeout;\n else $cfae44f0dfdf62c0$var$cachedClearTimeout = $cfae44f0dfdf62c0$var$defaultClearTimeout;\n } catch (e) {\n $cfae44f0dfdf62c0$var$cachedClearTimeout = $cfae44f0dfdf62c0$var$defaultClearTimeout;\n }\n})();\nfunction $cfae44f0dfdf62c0$var$runTimeout(fun) {\n if ($cfae44f0dfdf62c0$var$cachedSetTimeout === setTimeout) //normal enviroments in sane situations\n return setTimeout(fun, 0);\n // if setTimeout wasn't available but was latter defined\n if (($cfae44f0dfdf62c0$var$cachedSetTimeout === $cfae44f0dfdf62c0$var$defaultSetTimout || !$cfae44f0dfdf62c0$var$cachedSetTimeout) && setTimeout) {\n $cfae44f0dfdf62c0$var$cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return $cfae44f0dfdf62c0$var$cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return $cfae44f0dfdf62c0$var$cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return $cfae44f0dfdf62c0$var$cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction $cfae44f0dfdf62c0$var$runClearTimeout(marker) {\n if ($cfae44f0dfdf62c0$var$cachedClearTimeout === clearTimeout) //normal enviroments in sane situations\n return clearTimeout(marker);\n // if clearTimeout wasn't available but was latter defined\n if (($cfae44f0dfdf62c0$var$cachedClearTimeout === $cfae44f0dfdf62c0$var$defaultClearTimeout || !$cfae44f0dfdf62c0$var$cachedClearTimeout) && clearTimeout) {\n $cfae44f0dfdf62c0$var$cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return $cfae44f0dfdf62c0$var$cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return $cfae44f0dfdf62c0$var$cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return $cfae44f0dfdf62c0$var$cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar $cfae44f0dfdf62c0$var$queue = [];\nvar $cfae44f0dfdf62c0$var$draining = false;\nvar $cfae44f0dfdf62c0$var$currentQueue;\nvar $cfae44f0dfdf62c0$var$queueIndex = -1;\nfunction $cfae44f0dfdf62c0$var$cleanUpNextTick() {\n if (!$cfae44f0dfdf62c0$var$draining || !$cfae44f0dfdf62c0$var$currentQueue) return;\n $cfae44f0dfdf62c0$var$draining = false;\n if ($cfae44f0dfdf62c0$var$currentQueue.length) $cfae44f0dfdf62c0$var$queue = $cfae44f0dfdf62c0$var$currentQueue.concat($cfae44f0dfdf62c0$var$queue);\n else $cfae44f0dfdf62c0$var$queueIndex = -1;\n if ($cfae44f0dfdf62c0$var$queue.length) $cfae44f0dfdf62c0$var$drainQueue();\n}\nfunction $cfae44f0dfdf62c0$var$drainQueue() {\n if ($cfae44f0dfdf62c0$var$draining) return;\n var timeout = $cfae44f0dfdf62c0$var$runTimeout($cfae44f0dfdf62c0$var$cleanUpNextTick);\n $cfae44f0dfdf62c0$var$draining = true;\n var len = $cfae44f0dfdf62c0$var$queue.length;\n while(len){\n $cfae44f0dfdf62c0$var$currentQueue = $cfae44f0dfdf62c0$var$queue;\n $cfae44f0dfdf62c0$var$queue = [];\n while(++$cfae44f0dfdf62c0$var$queueIndex < len)if ($cfae44f0dfdf62c0$var$currentQueue) $cfae44f0dfdf62c0$var$currentQueue[$cfae44f0dfdf62c0$var$queueIndex].run();\n $cfae44f0dfdf62c0$var$queueIndex = -1;\n len = $cfae44f0dfdf62c0$var$queue.length;\n }\n $cfae44f0dfdf62c0$var$currentQueue = null;\n $cfae44f0dfdf62c0$var$draining = false;\n $cfae44f0dfdf62c0$var$runClearTimeout(timeout);\n}\n$cfae44f0dfdf62c0$var$process.nextTick = function(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) for(var i = 1; i < arguments.length; i++)args[i - 1] = arguments[i];\n $cfae44f0dfdf62c0$var$queue.push(new $cfae44f0dfdf62c0$var$Item(fun, args));\n if ($cfae44f0dfdf62c0$var$queue.length === 1 && !$cfae44f0dfdf62c0$var$draining) $cfae44f0dfdf62c0$var$runTimeout($cfae44f0dfdf62c0$var$drainQueue);\n};\n// v8 likes predictible objects\nfunction $cfae44f0dfdf62c0$var$Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\n$cfae44f0dfdf62c0$var$Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n};\n$cfae44f0dfdf62c0$var$process.title = \"browser\";\n$cfae44f0dfdf62c0$var$process.browser = true;\n$cfae44f0dfdf62c0$var$process.env = {};\n$cfae44f0dfdf62c0$var$process.argv = [];\n$cfae44f0dfdf62c0$var$process.version = \"\"; // empty string to avoid regexp issues\n$cfae44f0dfdf62c0$var$process.versions = {};\nfunction $cfae44f0dfdf62c0$var$noop() {}\n$cfae44f0dfdf62c0$var$process.on = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.addListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.once = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.off = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.removeListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.removeAllListeners = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.emit = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.prependListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.prependOnceListener = $cfae44f0dfdf62c0$var$noop;\n$cfae44f0dfdf62c0$var$process.listeners = function(name) {\n return [];\n};\n$cfae44f0dfdf62c0$var$process.binding = function(name) {\n throw new Error(\"process.binding is not supported\");\n};\n$cfae44f0dfdf62c0$var$process.cwd = function() {\n return \"/\";\n};\n$cfae44f0dfdf62c0$var$process.chdir = function(dir) {\n throw new Error(\"process.chdir is not supported\");\n};\n$cfae44f0dfdf62c0$var$process.umask = function() {\n return 0;\n};\n\n});\n\n\nparcelRegister(\"ix9ca\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $a7b056c205977ae3$export$2e2bcd8739ae039);\nfunction $a7b056c205977ae3$export$2e2bcd8739ae039() {\n var exports = function(exports) {\n /**\n * Find the point on a quadratic bezier curve at t where t is in the range [0, 1]\n */ function pointOnQuadraticBezier(x0, y0, x1, y1, x2, y2, t, pointOut) {\n var t2 = 1 - t;\n pointOut.x = t2 * t2 * x0 + 2 * t2 * t * x1 + t * t * x2;\n pointOut.y = t2 * t2 * y0 + 2 * t2 * t * y1 + t * t * y2;\n }\n /**\n * Find the point on a cubic bezier curve at t where t is in the range [0, 1]\n */ function pointOnCubicBezier(x0, y0, x1, y1, x2, y2, x3, y3, t, pointOut) {\n var t2 = 1 - t;\n pointOut.x = t2 * t2 * t2 * x0 + 3 * t2 * t2 * t * x1 + 3 * t2 * t * t * x2 + t * t * t * x3;\n pointOut.y = t2 * t2 * t2 * y0 + 3 * t2 * t2 * t * y1 + 3 * t2 * t * t * y2 + t * t * t * y3;\n }\n /**\n * Parse a path string into its constituent line/curve commands, invoking a callback for each.\n * @param {string} pathString - An SVG-like path string to parse; should only contain commands: M/L/Q/C/Z\n * @param {function(\n * command: 'L'|'Q'|'C',\n * startX: number,\n * startY: number,\n * endX: number,\n * endY: number,\n * ctrl1X?: number,\n * ctrl1Y?: number,\n * ctrl2X?: number,\n * ctrl2Y?: number\n * )} commandCallback - A callback function that will be called once for each parsed path command, passing the\n * command identifier (only L/Q/C commands) and its numeric arguments.\n */ function forEachPathCommand(pathString, commandCallback) {\n var segmentRE = /([MLQCZ])([^MLQCZ]*)/g;\n var match, firstX, firstY, prevX, prevY;\n while(match = segmentRE.exec(pathString)){\n var args = match[2].replace(/^\\s*|\\s*$/g, \"\").split(/[,\\s]+/).map(function(v) {\n return parseFloat(v);\n });\n switch(match[1]){\n case \"M\":\n prevX = firstX = args[0];\n prevY = firstY = args[1];\n break;\n case \"L\":\n if (args[0] !== prevX || args[1] !== prevY) commandCallback(\"L\", prevX, prevY, prevX = args[0], prevY = args[1]);\n break;\n case \"Q\":\n commandCallback(\"Q\", prevX, prevY, prevX = args[2], prevY = args[3], args[0], args[1]);\n break;\n case \"C\":\n commandCallback(\"C\", prevX, prevY, prevX = args[4], prevY = args[5], args[0], args[1], args[2], args[3]);\n break;\n case \"Z\":\n if (prevX !== firstX || prevY !== firstY) commandCallback(\"L\", prevX, prevY, firstX, firstY);\n break;\n }\n }\n }\n /**\n * Convert a path string to a series of straight line segments\n * @param {string} pathString - An SVG-like path string to parse; should only contain commands: M/L/Q/C/Z\n * @param {function(x1:number, y1:number, x2:number, y2:number)} segmentCallback - A callback\n * function that will be called once for every line segment\n * @param {number} [curvePoints] - How many straight line segments to use when approximating a\n * bezier curve in the path. Defaults to 16.\n */ function pathToLineSegments(pathString, segmentCallback, curvePoints) {\n if (curvePoints === void 0) curvePoints = 16;\n var tempPoint = {\n x: 0,\n y: 0\n };\n forEachPathCommand(pathString, function(command, startX, startY, endX, endY, ctrl1X, ctrl1Y, ctrl2X, ctrl2Y) {\n switch(command){\n case \"L\":\n segmentCallback(startX, startY, endX, endY);\n break;\n case \"Q\":\n var prevCurveX = startX;\n var prevCurveY = startY;\n for(var i = 1; i < curvePoints; i++){\n pointOnQuadraticBezier(startX, startY, ctrl1X, ctrl1Y, endX, endY, i / (curvePoints - 1), tempPoint);\n segmentCallback(prevCurveX, prevCurveY, tempPoint.x, tempPoint.y);\n prevCurveX = tempPoint.x;\n prevCurveY = tempPoint.y;\n }\n break;\n case \"C\":\n var prevCurveX$1 = startX;\n var prevCurveY$1 = startY;\n for(var i$1 = 1; i$1 < curvePoints; i$1++){\n pointOnCubicBezier(startX, startY, ctrl1X, ctrl1Y, ctrl2X, ctrl2Y, endX, endY, i$1 / (curvePoints - 1), tempPoint);\n segmentCallback(prevCurveX$1, prevCurveY$1, tempPoint.x, tempPoint.y);\n prevCurveX$1 = tempPoint.x;\n prevCurveY$1 = tempPoint.y;\n }\n break;\n }\n });\n }\n var viewportQuadVertex = \"precision highp float;attribute vec2 aUV;varying vec2 vUV;void main(){vUV=aUV;gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}\";\n var copyTexFragment = \"precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){gl_FragColor=texture2D(tex,vUV);}\";\n var cache = new WeakMap();\n var glContextParams = {\n premultipliedAlpha: false,\n preserveDrawingBuffer: true,\n antialias: false,\n depth: false\n };\n /**\n * This is a little helper library for WebGL. It assists with state management for a GL context.\n * It's pretty tightly wrapped to the needs of this package, not very general-purpose.\n *\n * @param { WebGLRenderingContext | HTMLCanvasElement | OffscreenCanvas } glOrCanvas - the GL context to wrap\n * @param { ({gl, getExtension, withProgram, withTexture, withTextureFramebuffer, handleContextLoss}) => void } callback\n */ function withWebGLContext(glOrCanvas, callback) {\n var gl = glOrCanvas.getContext ? glOrCanvas.getContext(\"webgl\", glContextParams) : glOrCanvas;\n var wrapper = cache.get(gl);\n if (!wrapper) {\n var isWebGL2 = typeof WebGL2RenderingContext !== \"undefined\" && gl instanceof WebGL2RenderingContext;\n var extensions = {};\n var programs = {};\n var textures = {};\n var textureUnit = -1;\n var framebufferStack = [];\n gl.canvas.addEventListener(\"webglcontextlost\", function(e) {\n handleContextLoss();\n e.preventDefault();\n }, false);\n function getExtension(name) {\n var ext = extensions[name];\n if (!ext) {\n ext = extensions[name] = gl.getExtension(name);\n if (!ext) throw new Error(name + \" not supported\");\n }\n return ext;\n }\n function compileShader(src, type) {\n var shader = gl.createShader(type);\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n // const status = gl.getShaderParameter(shader, gl.COMPILE_STATUS)\n // if (!status && !gl.isContextLost()) {\n // throw new Error(gl.getShaderInfoLog(shader).trim())\n // }\n return shader;\n }\n function withProgram(name, vert, frag, func) {\n if (!programs[name]) {\n var attributes = {};\n var uniforms = {};\n var program = gl.createProgram();\n gl.attachShader(program, compileShader(vert, gl.VERTEX_SHADER));\n gl.attachShader(program, compileShader(frag, gl.FRAGMENT_SHADER));\n gl.linkProgram(program);\n programs[name] = {\n program: program,\n transaction: function transaction(func) {\n gl.useProgram(program);\n func({\n setUniform: function setUniform(type, name) {\n var values = [], len = arguments.length - 2;\n while(len-- > 0)values[len] = arguments[len + 2];\n var uniformLoc = uniforms[name] || (uniforms[name] = gl.getUniformLocation(program, name));\n gl[\"uniform\" + type].apply(gl, [\n uniformLoc\n ].concat(values));\n },\n setAttribute: function setAttribute(name, size, usage, instancingDivisor, data) {\n var attr = attributes[name];\n if (!attr) attr = attributes[name] = {\n buf: gl.createBuffer(),\n loc: gl.getAttribLocation(program, name),\n data: null\n };\n gl.bindBuffer(gl.ARRAY_BUFFER, attr.buf);\n gl.vertexAttribPointer(attr.loc, size, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(attr.loc);\n if (isWebGL2) gl.vertexAttribDivisor(attr.loc, instancingDivisor);\n else getExtension(\"ANGLE_instanced_arrays\").vertexAttribDivisorANGLE(attr.loc, instancingDivisor);\n if (data !== attr.data) {\n gl.bufferData(gl.ARRAY_BUFFER, data, usage);\n attr.data = data;\n }\n }\n });\n }\n };\n }\n programs[name].transaction(func);\n }\n function withTexture(name, func) {\n textureUnit++;\n try {\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\n var texture = textures[name];\n if (!texture) {\n texture = textures[name] = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n func(texture, textureUnit);\n } finally{\n textureUnit--;\n }\n }\n function withTextureFramebuffer(texture, textureUnit, func) {\n var framebuffer = gl.createFramebuffer();\n framebufferStack.push(framebuffer);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n try {\n func(framebuffer);\n } finally{\n gl.deleteFramebuffer(framebuffer);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebufferStack[--framebufferStack.length - 1] || null);\n }\n }\n function handleContextLoss() {\n extensions = {};\n programs = {};\n textures = {};\n textureUnit = -1;\n framebufferStack.length = 0;\n }\n cache.set(gl, wrapper = {\n gl: gl,\n isWebGL2: isWebGL2,\n getExtension: getExtension,\n withProgram: withProgram,\n withTexture: withTexture,\n withTextureFramebuffer: withTextureFramebuffer,\n handleContextLoss: handleContextLoss\n });\n }\n callback(wrapper);\n }\n function renderImageData(glOrCanvas, imageData, x, y, width, height, channels, framebuffer) {\n if (channels === void 0) channels = 15;\n if (framebuffer === void 0) framebuffer = null;\n withWebGLContext(glOrCanvas, function(ref) {\n var gl = ref.gl;\n var withProgram = ref.withProgram;\n var withTexture = ref.withTexture;\n withTexture(\"copy\", function(tex, texUnit) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n withProgram(\"copy\", viewportQuadVertex, copyTexFragment, function(ref) {\n var setUniform = ref.setUniform;\n var setAttribute = ref.setAttribute;\n setAttribute(\"aUV\", 2, gl.STATIC_DRAW, 0, new Float32Array([\n 0,\n 0,\n 2,\n 0,\n 0,\n 2\n ]));\n setUniform(\"1i\", \"image\", texUnit);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer || null);\n gl.disable(gl.BLEND);\n gl.colorMask(channels & 8, channels & 4, channels & 2, channels & 1);\n gl.viewport(x, y, width, height);\n gl.scissor(x, y, width, height);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n });\n });\n });\n }\n /**\n * Resizing a canvas clears its contents; this utility copies the previous contents over.\n * @param canvas\n * @param newWidth\n * @param newHeight\n */ function resizeWebGLCanvasWithoutClearing(canvas, newWidth, newHeight) {\n var width = canvas.width;\n var height = canvas.height;\n withWebGLContext(canvas, function(ref) {\n var gl = ref.gl;\n var data = new Uint8Array(width * height * 4);\n gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, data);\n canvas.width = newWidth;\n canvas.height = newHeight;\n renderImageData(gl, data, 0, 0, width, height);\n });\n }\n var webglUtils = /*#__PURE__*/ Object.freeze({\n __proto__: null,\n withWebGLContext: withWebGLContext,\n renderImageData: renderImageData,\n resizeWebGLCanvasWithoutClearing: resizeWebGLCanvasWithoutClearing\n });\n function generate$2(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent) {\n if (sdfExponent === void 0) sdfExponent = 1;\n var textureData = new Uint8Array(sdfWidth * sdfHeight);\n var viewBoxWidth = viewBox[2] - viewBox[0];\n var viewBoxHeight = viewBox[3] - viewBox[1];\n // Decompose all paths into straight line segments and add them to an index\n var segments = [];\n pathToLineSegments(path, function(x1, y1, x2, y2) {\n segments.push({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n minX: Math.min(x1, x2),\n minY: Math.min(y1, y2),\n maxX: Math.max(x1, x2),\n maxY: Math.max(y1, y2)\n });\n });\n // Sort segments by maxX, this will let us short-circuit some loops below\n segments.sort(function(a, b) {\n return a.maxX - b.maxX;\n });\n // For each target SDF texel, find the distance from its center to its nearest line segment,\n // map that distance to an alpha value, and write that alpha to the texel\n for(var sdfX = 0; sdfX < sdfWidth; sdfX++)for(var sdfY = 0; sdfY < sdfHeight; sdfY++){\n var signedDist = findNearestSignedDistance(viewBox[0] + viewBoxWidth * (sdfX + 0.5) / sdfWidth, viewBox[1] + viewBoxHeight * (sdfY + 0.5) / sdfHeight);\n // Use an exponential scale to ensure the texels very near the glyph path have adequate\n // precision, while allowing the distance field to cover the entire texture, given that\n // there are only 8 bits available. Formula visualized: https://www.desmos.com/calculator/uiaq5aqiam\n var alpha = Math.pow(1 - Math.abs(signedDist) / maxDistance, sdfExponent) / 2;\n if (signedDist < 0) alpha = 1 - alpha;\n alpha = Math.max(0, Math.min(255, Math.round(alpha * 255))); //clamp\n textureData[sdfY * sdfWidth + sdfX] = alpha;\n }\n return textureData;\n /**\n * For a given x/y, search the index for the closest line segment and return\n * its signed distance. Negative = inside, positive = outside, zero = on edge\n * @param x\n * @param y\n * @returns {number}\n */ function findNearestSignedDistance(x, y) {\n var closestDistSq = Infinity;\n var closestDist = Infinity;\n for(var i = segments.length; i--;){\n var seg = segments[i];\n if (seg.maxX + closestDist <= x) break;\n //sorting by maxX means no more can be closer, so we can short-circuit\n if (x + closestDist > seg.minX && y - closestDist < seg.maxY && y + closestDist > seg.minY) {\n var distSq = absSquareDistanceToLineSegment(x, y, seg.x1, seg.y1, seg.x2, seg.y2);\n if (distSq < closestDistSq) {\n closestDistSq = distSq;\n closestDist = Math.sqrt(closestDistSq);\n }\n }\n }\n // Flip to negative distance if inside the poly\n if (isPointInPoly(x, y)) closestDist = -closestDist;\n return closestDist;\n }\n /**\n * Determine whether the given point lies inside or outside the glyph. Uses a simple\n * winding-number ray casting algorithm using a ray pointing east from the point.\n */ function isPointInPoly(x, y) {\n var winding = 0;\n for(var i = segments.length; i--;){\n var seg = segments[i];\n if (seg.maxX <= x) break;\n //sorting by maxX means no more can cross, so we can short-circuit\n var intersects = seg.y1 > y !== seg.y2 > y && x < (seg.x2 - seg.x1) * (y - seg.y1) / (seg.y2 - seg.y1) + seg.x1;\n if (intersects) winding += seg.y1 < seg.y2 ? 1 : -1;\n }\n return winding !== 0;\n }\n }\n function generateIntoCanvas$2(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, x, y, channel) {\n if (sdfExponent === void 0) sdfExponent = 1;\n if (x === void 0) x = 0;\n if (y === void 0) y = 0;\n if (channel === void 0) channel = 0;\n generateIntoFramebuffer$1(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, null, x, y, channel);\n }\n function generateIntoFramebuffer$1(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, glOrCanvas, framebuffer, x, y, channel) {\n if (sdfExponent === void 0) sdfExponent = 1;\n if (x === void 0) x = 0;\n if (y === void 0) y = 0;\n if (channel === void 0) channel = 0;\n var data = generate$2(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent);\n // Expand single-channel data to rbga\n var rgbaData = new Uint8Array(data.length * 4);\n for(var i = 0; i < data.length; i++)rgbaData[i * 4 + channel] = data[i];\n renderImageData(glOrCanvas, rgbaData, x, y, sdfWidth, sdfHeight, 1 << 3 - channel, framebuffer);\n }\n /**\n * Find the absolute distance from a point to a line segment at closest approach\n */ function absSquareDistanceToLineSegment(x, y, lineX0, lineY0, lineX1, lineY1) {\n var ldx = lineX1 - lineX0;\n var ldy = lineY1 - lineY0;\n var lengthSq = ldx * ldx + ldy * ldy;\n var t = lengthSq ? Math.max(0, Math.min(1, ((x - lineX0) * ldx + (y - lineY0) * ldy) / lengthSq)) : 0;\n var dx = x - (lineX0 + t * ldx);\n var dy = y - (lineY0 + t * ldy);\n return dx * dx + dy * dy;\n }\n var javascript = /*#__PURE__*/ Object.freeze({\n __proto__: null,\n generate: generate$2,\n generateIntoCanvas: generateIntoCanvas$2,\n generateIntoFramebuffer: generateIntoFramebuffer$1\n });\n var mainVertex = \"precision highp float;uniform vec4 uGlyphBounds;attribute vec2 aUV;attribute vec4 aLineSegment;varying vec4 vLineSegment;varying vec2 vGlyphXY;void main(){vLineSegment=aLineSegment;vGlyphXY=mix(uGlyphBounds.xy,uGlyphBounds.zw,aUV);gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}\";\n var mainFragment = \"precision highp float;uniform vec4 uGlyphBounds;uniform float uMaxDistance;uniform float uExponent;varying vec4 vLineSegment;varying vec2 vGlyphXY;float absDistToSegment(vec2 point,vec2 lineA,vec2 lineB){vec2 lineDir=lineB-lineA;float lenSq=dot(lineDir,lineDir);float t=lenSq==0.0 ? 0.0 : clamp(dot(point-lineA,lineDir)/lenSq,0.0,1.0);vec2 linePt=lineA+t*lineDir;return distance(point,linePt);}void main(){vec4 seg=vLineSegment;vec2 p=vGlyphXY;float dist=absDistToSegment(p,seg.xy,seg.zw);float val=pow(1.0-clamp(dist/uMaxDistance,0.0,1.0),uExponent)*0.5;bool crossing=(seg.y>p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y bool\n function validateSupport(glOrCanvas) {\n if (!isTestingSupport && !isSupported(glOrCanvas)) throw new Error(\"WebGL generation not supported\");\n }\n function generate$1(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, glOrCanvas) {\n if (sdfExponent === void 0) sdfExponent = 1;\n if (glOrCanvas === void 0) glOrCanvas = null;\n if (!glOrCanvas) {\n glOrCanvas = implicitContext;\n if (!glOrCanvas) {\n var canvas = typeof OffscreenCanvas === \"function\" ? new OffscreenCanvas(1, 1) : typeof document !== \"undefined\" ? document.createElement(\"canvas\") : null;\n if (!canvas) throw new Error(\"OffscreenCanvas or DOM canvas not supported\");\n glOrCanvas = implicitContext = canvas.getContext(\"webgl\", {\n depth: false\n });\n }\n }\n validateSupport(glOrCanvas);\n var rgbaData = new Uint8Array(sdfWidth * sdfHeight * 4); //not Uint8ClampedArray, cuz Safari\n // Render into a background texture framebuffer\n withWebGLContext(glOrCanvas, function(ref) {\n var gl = ref.gl;\n var withTexture = ref.withTexture;\n var withTextureFramebuffer = ref.withTextureFramebuffer;\n withTexture(\"readable\", function(texture, textureUnit) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, sdfWidth, sdfHeight, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n withTextureFramebuffer(texture, textureUnit, function(framebuffer) {\n generateIntoFramebuffer(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, gl, framebuffer, 0, 0, 0 // red channel\n );\n gl.readPixels(0, 0, sdfWidth, sdfHeight, gl.RGBA, gl.UNSIGNED_BYTE, rgbaData);\n });\n });\n });\n // Throw away all but the red channel\n var data = new Uint8Array(sdfWidth * sdfHeight);\n for(var i = 0, j = 0; i < rgbaData.length; i += 4)data[j++] = rgbaData[i];\n return data;\n }\n function generateIntoCanvas$1(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, x, y, channel) {\n if (sdfExponent === void 0) sdfExponent = 1;\n if (x === void 0) x = 0;\n if (y === void 0) y = 0;\n if (channel === void 0) channel = 0;\n generateIntoFramebuffer(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, null, x, y, channel);\n }\n function generateIntoFramebuffer(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, glOrCanvas, framebuffer, x, y, channel) {\n if (sdfExponent === void 0) sdfExponent = 1;\n if (x === void 0) x = 0;\n if (y === void 0) y = 0;\n if (channel === void 0) channel = 0;\n // Verify support\n validateSupport(glOrCanvas);\n // Compute path segments\n var lineSegmentCoords = [];\n pathToLineSegments(path, function(x1, y1, x2, y2) {\n lineSegmentCoords.push(x1, y1, x2, y2);\n });\n lineSegmentCoords = new Float32Array(lineSegmentCoords);\n withWebGLContext(glOrCanvas, function(ref) {\n var gl = ref.gl;\n var isWebGL2 = ref.isWebGL2;\n var getExtension = ref.getExtension;\n var withProgram = ref.withProgram;\n var withTexture = ref.withTexture;\n var withTextureFramebuffer = ref.withTextureFramebuffer;\n var handleContextLoss = ref.handleContextLoss;\n withTexture(\"rawDistances\", function(intermediateTexture, intermediateTextureUnit) {\n if (sdfWidth !== intermediateTexture._lastWidth || sdfHeight !== intermediateTexture._lastHeight) gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, intermediateTexture._lastWidth = sdfWidth, intermediateTexture._lastHeight = sdfHeight, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n // Unsigned distance pass\n withProgram(\"main\", mainVertex, mainFragment, function(ref) {\n var setAttribute = ref.setAttribute;\n var setUniform = ref.setUniform;\n // Init extensions\n var instancingExtension = !isWebGL2 && getExtension(\"ANGLE_instanced_arrays\");\n var blendMinMaxExtension = !isWebGL2 && getExtension(\"EXT_blend_minmax\");\n // Init/update attributes\n setAttribute(\"aUV\", 2, gl.STATIC_DRAW, 0, viewportUVs);\n setAttribute(\"aLineSegment\", 4, gl.DYNAMIC_DRAW, 1, lineSegmentCoords);\n // Init/update uniforms\n setUniform.apply(void 0, [\n \"4f\",\n \"uGlyphBounds\"\n ].concat(viewBox));\n setUniform(\"1f\", \"uMaxDistance\", maxDistance);\n setUniform(\"1f\", \"uExponent\", sdfExponent);\n // Render initial unsigned distance / winding number info to a texture\n withTextureFramebuffer(intermediateTexture, intermediateTextureUnit, function(framebuffer) {\n gl.enable(gl.BLEND);\n gl.colorMask(true, true, true, true);\n gl.viewport(0, 0, sdfWidth, sdfHeight);\n gl.scissor(0, 0, sdfWidth, sdfHeight);\n gl.blendFunc(gl.ONE, gl.ONE);\n // Red+Green channels are incremented (FUNC_ADD) for segment-ray crossings to give a \"winding number\".\n // Alpha holds the closest (MAX) unsigned distance.\n gl.blendEquationSeparate(gl.FUNC_ADD, isWebGL2 ? gl.MAX : blendMinMaxExtension.MAX_EXT);\n gl.clear(gl.COLOR_BUFFER_BIT);\n if (isWebGL2) gl.drawArraysInstanced(gl.TRIANGLES, 0, 3, lineSegmentCoords.length / 4);\n else instancingExtension.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 3, lineSegmentCoords.length / 4);\n // Debug\n // const debug = new Uint8Array(sdfWidth * sdfHeight * 4)\n // gl.readPixels(0, 0, sdfWidth, sdfHeight, gl.RGBA, gl.UNSIGNED_BYTE, debug)\n // console.log('intermediate texture data: ', debug)\n });\n });\n // Use the data stored in the texture to apply inside/outside and write to the output framebuffer rect+channel.\n withProgram(\"post\", viewportQuadVertex, postFragment, function(program) {\n program.setAttribute(\"aUV\", 2, gl.STATIC_DRAW, 0, viewportUVs);\n program.setUniform(\"1i\", \"tex\", intermediateTextureUnit);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n gl.disable(gl.BLEND);\n gl.colorMask(channel === 0, channel === 1, channel === 2, channel === 3);\n gl.viewport(x, y, sdfWidth, sdfHeight);\n gl.scissor(x, y, sdfWidth, sdfHeight);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n });\n });\n // Handle context loss occurring during any of the above calls\n if (gl.isContextLost()) {\n handleContextLoss();\n throw new Error(\"webgl context lost\");\n }\n });\n }\n function isSupported(glOrCanvas) {\n var key = !glOrCanvas || glOrCanvas === implicitContext ? NULL_OBJECT : glOrCanvas.canvas || glOrCanvas;\n var supported = supportByCanvas.get(key);\n if (supported === undefined) {\n isTestingSupport = true;\n var failReason = null;\n try {\n // Since we can't detect all failure modes up front, let's just do a trial run of a\n // simple path and compare what we get back to the correct expected result. This will\n // also serve to prime the shader compilation.\n var expectedResult = [\n 97,\n 106,\n 97,\n 61,\n 99,\n 137,\n 118,\n 80,\n 80,\n 118,\n 137,\n 99,\n 61,\n 97,\n 106,\n 97\n ];\n var testResult = generate$1(4, 4, \"M8,8L16,8L24,24L16,24Z\", [\n 0,\n 0,\n 32,\n 32\n ], 24, 1, glOrCanvas);\n supported = testResult && expectedResult.length === testResult.length && testResult.every(function(val, i) {\n return val === expectedResult[i];\n });\n if (!supported) {\n failReason = \"bad trial run results\";\n console.info(expectedResult, testResult);\n }\n } catch (err) {\n // TODO if it threw due to webgl context loss, should we maybe leave isSupported as null and try again later?\n supported = false;\n failReason = err.message;\n }\n if (failReason) console.warn(\"WebGL SDF generation not supported:\", failReason);\n isTestingSupport = false;\n supportByCanvas.set(key, supported);\n }\n return supported;\n }\n var webgl = /*#__PURE__*/ Object.freeze({\n __proto__: null,\n generate: generate$1,\n generateIntoCanvas: generateIntoCanvas$1,\n generateIntoFramebuffer: generateIntoFramebuffer,\n isSupported: isSupported\n });\n /**\n * Generate an SDF texture image for a 2D path.\n *\n * @param {number} sdfWidth - width of the SDF output image in pixels.\n * @param {number} sdfHeight - height of the SDF output image in pixels.\n * @param {string} path - an SVG-like path string describing the glyph; should only contain commands: M/L/Q/C/Z.\n * @param {number[]} viewBox - [minX, minY, maxX, maxY] in font units aligning with the texture's edges.\n * @param {number} maxDistance - the maximum distance from the glyph path in font units that will be encoded; defaults\n * to half the maximum viewBox dimension.\n * @param {number} [sdfExponent] - specifies an exponent for encoding the SDF's distance values; higher exponents\n * will give greater precision nearer the glyph's path.\n * @return {Uint8Array}\n */ function generate(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent) {\n if (maxDistance === void 0) maxDistance = Math.max(viewBox[2] - viewBox[0], viewBox[3] - viewBox[1]) / 2;\n if (sdfExponent === void 0) sdfExponent = 1;\n try {\n return generate$1.apply(webgl, arguments);\n } catch (e) {\n console.info(\"WebGL SDF generation failed, falling back to JS\", e);\n return generate$2.apply(javascript, arguments);\n }\n }\n /**\n * Generate an SDF texture image for a 2D path, inserting the result into a WebGL `canvas` at a given x/y position\n * and color channel. This is generally much faster than calling `generate` because it does not require reading pixels\n * back from the GPU->CPU -- the `canvas` can be used directly as a WebGL texture image, so it all stays on the GPU.\n *\n * @param {number} sdfWidth - width of the SDF output image in pixels.\n * @param {number} sdfHeight - height of the SDF output image in pixels.\n * @param {string} path - an SVG-like path string describing the glyph; should only contain commands: M/L/Q/C/Z.\n * @param {number[]} viewBox - [minX, minY, maxX, maxY] in font units aligning with the texture's edges.\n * @param {number} maxDistance - the maximum distance from the glyph path in font units that will be encoded; defaults\n * to half the maximum viewBox dimension.\n * @param {number} [sdfExponent] - specifies an exponent for encoding the SDF's distance values; higher exponents\n * will give greater precision nearer the glyph's path.\n * @param {HTMLCanvasElement|OffscreenCanvas} canvas - a WebGL-enabled canvas into which the SDF will be rendered.\n * Only the relevant rect/channel will be modified, the rest will be preserved. To avoid unpredictable results\n * due to shared GL context state, this canvas should be dedicated to use by this library alone.\n * @param {number} x - the x position at which to render the SDF.\n * @param {number} y - the y position at which to render the SDF.\n * @param {number} channel - the color channel index (0-4) into which the SDF will be rendered.\n * @return {Uint8Array}\n */ function generateIntoCanvas(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, x, y, channel) {\n if (maxDistance === void 0) maxDistance = Math.max(viewBox[2] - viewBox[0], viewBox[3] - viewBox[1]) / 2;\n if (sdfExponent === void 0) sdfExponent = 1;\n if (x === void 0) x = 0;\n if (y === void 0) y = 0;\n if (channel === void 0) channel = 0;\n try {\n return generateIntoCanvas$1.apply(webgl, arguments);\n } catch (e) {\n console.info(\"WebGL SDF generation failed, falling back to JS\", e);\n return generateIntoCanvas$2.apply(javascript, arguments);\n }\n }\n exports.forEachPathCommand = forEachPathCommand;\n exports.generate = generate;\n exports.generateIntoCanvas = generateIntoCanvas;\n exports.javascript = javascript;\n exports.pathToLineSegments = pathToLineSegments;\n exports.webgl = webgl;\n exports.webglUtils = webglUtils;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n return exports;\n }({});\n return exports;\n}\n\n});\n\nparcelRegister(\"2y8EL\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $39f838faf692eed9$export$2e2bcd8739ae039);\nfunction $39f838faf692eed9$var$bidiFactory() {\n var bidi = function(exports) {\n // Bidi character types data, auto generated\n var DATA = {\n \"R\": \"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73\",\n \"EN\": \"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9\",\n \"ES\": \"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2\",\n \"ET\": \"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj\",\n \"AN\": \"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u\",\n \"CS\": \"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b\",\n \"B\": \"a,3,f+2,2v,690\",\n \"S\": \"9,2,k\",\n \"WS\": \"c,k,4f4,1vk+a,u,1j,335\",\n \"ON\": \"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i\",\n \"BN\": \"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1\",\n \"NSM\": \"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n\",\n \"AL\": \"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d\",\n \"LRO\": \"6ct\",\n \"RLO\": \"6cu\",\n \"LRE\": \"6cq\",\n \"RLE\": \"6cr\",\n \"PDF\": \"6cs\",\n \"LRI\": \"6ee\",\n \"RLI\": \"6ef\",\n \"FSI\": \"6eg\",\n \"PDI\": \"6eh\"\n };\n var TYPES = {};\n var TYPES_TO_NAMES = {};\n TYPES.L = 1; //L is the default\n TYPES_TO_NAMES[1] = \"L\";\n Object.keys(DATA).forEach(function(type, i) {\n TYPES[type] = 1 << i + 1;\n TYPES_TO_NAMES[TYPES[type]] = type;\n });\n Object.freeze(TYPES);\n var ISOLATE_INIT_TYPES = TYPES.LRI | TYPES.RLI | TYPES.FSI;\n var STRONG_TYPES = TYPES.L | TYPES.R | TYPES.AL;\n var NEUTRAL_ISOLATE_TYPES = TYPES.B | TYPES.S | TYPES.WS | TYPES.ON | TYPES.FSI | TYPES.LRI | TYPES.RLI | TYPES.PDI;\n var BN_LIKE_TYPES = TYPES.BN | TYPES.RLE | TYPES.LRE | TYPES.RLO | TYPES.LRO | TYPES.PDF;\n var TRAILING_TYPES = TYPES.S | TYPES.WS | TYPES.B | ISOLATE_INIT_TYPES | TYPES.PDI | BN_LIKE_TYPES;\n var map = null;\n function parseData() {\n if (!map) {\n //const start = performance.now()\n map = new Map();\n var loop = function(type) {\n if (DATA.hasOwnProperty(type)) {\n var lastCode = 0;\n DATA[type].split(\",\").forEach(function(range) {\n var ref = range.split(\"+\");\n var skip = ref[0];\n var step = ref[1];\n skip = parseInt(skip, 36);\n step = step ? parseInt(step, 36) : 0;\n map.set(lastCode += skip, TYPES[type]);\n for(var i = 0; i < step; i++)map.set(++lastCode, TYPES[type]);\n });\n }\n };\n for(var type in DATA)loop(type);\n //console.log(`char types parsed in ${performance.now() - start}ms`)\n }\n }\n /**\n * @param {string} char\n * @return {number}\n */ function getBidiCharType(char) {\n parseData();\n return map.get(char.codePointAt(0)) || TYPES.L;\n }\n function getBidiCharTypeName(char) {\n return TYPES_TO_NAMES[getBidiCharType(char)];\n }\n // Bidi bracket pairs data, auto generated\n var data$1 = {\n \"pairs\": \"14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1\",\n \"canonical\": \"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye\"\n };\n /**\n * Parses an string that holds encoded codepoint mappings, e.g. for bracket pairs or\n * mirroring characters, as encoded by scripts/generateBidiData.js. Returns an object\n * holding the `map`, and optionally a `reverseMap` if `includeReverse:true`.\n * @param {string} encodedString\n * @param {boolean} includeReverse - true if you want reverseMap in the output\n * @return {{map: Map, reverseMap?: Map}}\n */ function parseCharacterMap(encodedString, includeReverse) {\n var radix = 36;\n var lastCode = 0;\n var map = new Map();\n var reverseMap = includeReverse && new Map();\n var prevPair;\n encodedString.split(\",\").forEach(function visit(entry) {\n if (entry.indexOf(\"+\") !== -1) for(var i = +entry; i--;)visit(prevPair);\n else {\n prevPair = entry;\n var ref = entry.split(\">\");\n var a = ref[0];\n var b = ref[1];\n a = String.fromCodePoint(lastCode += parseInt(a, radix));\n b = String.fromCodePoint(lastCode += parseInt(b, radix));\n map.set(a, b);\n includeReverse && reverseMap.set(b, a);\n }\n });\n return {\n map: map,\n reverseMap: reverseMap\n };\n }\n var openToClose, closeToOpen, canonical;\n function parse$1() {\n if (!openToClose) {\n //const start = performance.now()\n var ref = parseCharacterMap(data$1.pairs, true);\n var map = ref.map;\n var reverseMap = ref.reverseMap;\n openToClose = map;\n closeToOpen = reverseMap;\n canonical = parseCharacterMap(data$1.canonical, false).map;\n //console.log(`brackets parsed in ${performance.now() - start}ms`)\n }\n }\n function openingToClosingBracket(char) {\n parse$1();\n return openToClose.get(char) || null;\n }\n function closingToOpeningBracket(char) {\n parse$1();\n return closeToOpen.get(char) || null;\n }\n function getCanonicalBracket(char) {\n parse$1();\n return canonical.get(char) || null;\n }\n // Local type aliases\n var TYPE_L = TYPES.L;\n var TYPE_R = TYPES.R;\n var TYPE_EN = TYPES.EN;\n var TYPE_ES = TYPES.ES;\n var TYPE_ET = TYPES.ET;\n var TYPE_AN = TYPES.AN;\n var TYPE_CS = TYPES.CS;\n var TYPE_B = TYPES.B;\n var TYPE_S = TYPES.S;\n var TYPE_ON = TYPES.ON;\n var TYPE_BN = TYPES.BN;\n var TYPE_NSM = TYPES.NSM;\n var TYPE_AL = TYPES.AL;\n var TYPE_LRO = TYPES.LRO;\n var TYPE_RLO = TYPES.RLO;\n var TYPE_LRE = TYPES.LRE;\n var TYPE_RLE = TYPES.RLE;\n var TYPE_PDF = TYPES.PDF;\n var TYPE_LRI = TYPES.LRI;\n var TYPE_RLI = TYPES.RLI;\n var TYPE_FSI = TYPES.FSI;\n var TYPE_PDI = TYPES.PDI;\n /**\n * @typedef {object} GetEmbeddingLevelsResult\n * @property {{start, end, level}[]} paragraphs\n * @property {Uint8Array} levels\n */ /**\n * This function applies the Bidirectional Algorithm to a string, returning the resolved embedding levels\n * in a single Uint8Array plus a list of objects holding each paragraph's start and end indices and resolved\n * base embedding level.\n *\n * @param {string} string - The input string\n * @param {\"ltr\"|\"rtl\"|\"auto\"} [baseDirection] - Use \"ltr\" or \"rtl\" to force a base paragraph direction,\n * otherwise a direction will be chosen automatically from each paragraph's contents.\n * @return {GetEmbeddingLevelsResult}\n */ function getEmbeddingLevels(string, baseDirection) {\n var MAX_DEPTH = 125;\n // Start by mapping all characters to their unicode type, as a bitmask integer\n var charTypes = new Uint32Array(string.length);\n for(var i = 0; i < string.length; i++)charTypes[i] = getBidiCharType(string[i]);\n var charTypeCounts = new Map(); //will be cleared at start of each paragraph\n function changeCharType(i, type) {\n var oldType = charTypes[i];\n charTypes[i] = type;\n charTypeCounts.set(oldType, charTypeCounts.get(oldType) - 1);\n if (oldType & NEUTRAL_ISOLATE_TYPES) charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) - 1);\n charTypeCounts.set(type, (charTypeCounts.get(type) || 0) + 1);\n if (type & NEUTRAL_ISOLATE_TYPES) charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);\n }\n var embedLevels = new Uint8Array(string.length);\n var isolationPairs = new Map(); //init->pdi and pdi->init\n // === 3.3.1 The Paragraph Level ===\n // 3.3.1 P1: Split the text into paragraphs\n var paragraphs = []; // [{start, end, level}, ...]\n var paragraph = null;\n for(var i$1 = 0; i$1 < string.length; i$1++){\n if (!paragraph) paragraphs.push(paragraph = {\n start: i$1,\n end: string.length - 1,\n // 3.3.1 P2-P3: Determine the paragraph level\n level: baseDirection === \"rtl\" ? 1 : baseDirection === \"ltr\" ? 0 : determineAutoEmbedLevel(i$1, false)\n });\n if (charTypes[i$1] & TYPE_B) {\n paragraph.end = i$1;\n paragraph = null;\n }\n }\n var FORMATTING_TYPES = TYPE_RLE | TYPE_LRE | TYPE_RLO | TYPE_LRO | ISOLATE_INIT_TYPES | TYPE_PDI | TYPE_PDF | TYPE_B;\n var nextEven = function(n) {\n return n + (n & 1 ? 1 : 2);\n };\n var nextOdd = function(n) {\n return n + (n & 1 ? 2 : 1);\n };\n // Everything from here on will operate per paragraph.\n for(var paraIdx = 0; paraIdx < paragraphs.length; paraIdx++){\n paragraph = paragraphs[paraIdx];\n var statusStack = [\n {\n _level: paragraph.level,\n _override: 0,\n _isolate: 0 //bool\n }\n ];\n var stackTop = void 0;\n var overflowIsolateCount = 0;\n var overflowEmbeddingCount = 0;\n var validIsolateCount = 0;\n charTypeCounts.clear();\n // === 3.3.2 Explicit Levels and Directions ===\n for(var i$2 = paragraph.start; i$2 <= paragraph.end; i$2++){\n var charType = charTypes[i$2];\n stackTop = statusStack[statusStack.length - 1];\n // Set initial counts\n charTypeCounts.set(charType, (charTypeCounts.get(charType) || 0) + 1);\n if (charType & NEUTRAL_ISOLATE_TYPES) charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);\n // Explicit Embeddings: 3.3.2 X2 - X3\n if (charType & FORMATTING_TYPES) {\n if (charType & (TYPE_RLE | TYPE_LRE)) {\n embedLevels[i$2] = stackTop._level; // 5.2\n var level = (charType === TYPE_RLE ? nextOdd : nextEven)(stackTop._level);\n if (level <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) statusStack.push({\n _level: level,\n _override: 0,\n _isolate: 0\n });\n else if (!overflowIsolateCount) overflowEmbeddingCount++;\n } else if (charType & (TYPE_RLO | TYPE_LRO)) {\n embedLevels[i$2] = stackTop._level; // 5.2\n var level$1 = (charType === TYPE_RLO ? nextOdd : nextEven)(stackTop._level);\n if (level$1 <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) statusStack.push({\n _level: level$1,\n _override: charType & TYPE_RLO ? TYPE_R : TYPE_L,\n _isolate: 0\n });\n else if (!overflowIsolateCount) overflowEmbeddingCount++;\n } else if (charType & ISOLATE_INIT_TYPES) {\n // X5c - FSI becomes either RLI or LRI\n if (charType & TYPE_FSI) charType = determineAutoEmbedLevel(i$2 + 1, true) === 1 ? TYPE_RLI : TYPE_LRI;\n embedLevels[i$2] = stackTop._level;\n if (stackTop._override) changeCharType(i$2, stackTop._override);\n var level$2 = (charType === TYPE_RLI ? nextOdd : nextEven)(stackTop._level);\n if (level$2 <= MAX_DEPTH && overflowIsolateCount === 0 && overflowEmbeddingCount === 0) {\n validIsolateCount++;\n statusStack.push({\n _level: level$2,\n _override: 0,\n _isolate: 1,\n _isolInitIndex: i$2\n });\n } else overflowIsolateCount++;\n } else if (charType & TYPE_PDI) {\n if (overflowIsolateCount > 0) overflowIsolateCount--;\n else if (validIsolateCount > 0) {\n overflowEmbeddingCount = 0;\n while(!statusStack[statusStack.length - 1]._isolate)statusStack.pop();\n // Add to isolation pairs bidirectional mapping:\n var isolInitIndex = statusStack[statusStack.length - 1]._isolInitIndex;\n if (isolInitIndex != null) {\n isolationPairs.set(isolInitIndex, i$2);\n isolationPairs.set(i$2, isolInitIndex);\n }\n statusStack.pop();\n validIsolateCount--;\n }\n stackTop = statusStack[statusStack.length - 1];\n embedLevels[i$2] = stackTop._level;\n if (stackTop._override) changeCharType(i$2, stackTop._override);\n } else if (charType & TYPE_PDF) {\n if (overflowIsolateCount === 0) {\n if (overflowEmbeddingCount > 0) overflowEmbeddingCount--;\n else if (!stackTop._isolate && statusStack.length > 1) {\n statusStack.pop();\n stackTop = statusStack[statusStack.length - 1];\n }\n }\n embedLevels[i$2] = stackTop._level; // 5.2\n } else if (charType & TYPE_B) embedLevels[i$2] = paragraph.level;\n } else {\n embedLevels[i$2] = stackTop._level;\n // NOTE: This exclusion of BN seems to go against what section 5.2 says, but is required for test passage\n if (stackTop._override && charType !== TYPE_BN) changeCharType(i$2, stackTop._override);\n }\n }\n // === 3.3.3 Preparations for Implicit Processing ===\n // Remove all RLE, LRE, RLO, LRO, PDF, and BN characters: 3.3.3 X9\n // Note: Due to section 5.2, we won't remove them, but we'll use the BN_LIKE_TYPES bitset to\n // easily ignore them all from here on out.\n // 3.3.3 X10\n // Compute the set of isolating run sequences as specified by BD13\n var levelRuns = [];\n var currentRun = null;\n for(var i$3 = paragraph.start; i$3 <= paragraph.end; i$3++){\n var charType$1 = charTypes[i$3];\n if (!(charType$1 & BN_LIKE_TYPES)) {\n var lvl = embedLevels[i$3];\n var isIsolInit = charType$1 & ISOLATE_INIT_TYPES;\n var isPDI = charType$1 === TYPE_PDI;\n if (currentRun && lvl === currentRun._level) {\n currentRun._end = i$3;\n currentRun._endsWithIsolInit = isIsolInit;\n } else levelRuns.push(currentRun = {\n _start: i$3,\n _end: i$3,\n _level: lvl,\n _startsWithPDI: isPDI,\n _endsWithIsolInit: isIsolInit\n });\n }\n }\n var isolatingRunSeqs = []; // [{seqIndices: [], sosType: L|R, eosType: L|R}]\n for(var runIdx = 0; runIdx < levelRuns.length; runIdx++){\n var run = levelRuns[runIdx];\n if (!run._startsWithPDI || run._startsWithPDI && !isolationPairs.has(run._start)) {\n var seqRuns = [\n currentRun = run\n ];\n for(var pdiIndex = void 0; currentRun && currentRun._endsWithIsolInit && (pdiIndex = isolationPairs.get(currentRun._end)) != null;){\n for(var i$4 = runIdx + 1; i$4 < levelRuns.length; i$4++)if (levelRuns[i$4]._start === pdiIndex) {\n seqRuns.push(currentRun = levelRuns[i$4]);\n break;\n }\n }\n // build flat list of indices across all runs:\n var seqIndices = [];\n for(var i$5 = 0; i$5 < seqRuns.length; i$5++){\n var run$1 = seqRuns[i$5];\n for(var j = run$1._start; j <= run$1._end; j++)seqIndices.push(j);\n }\n // determine the sos/eos types:\n var firstLevel = embedLevels[seqIndices[0]];\n var prevLevel = paragraph.level;\n for(var i$6 = seqIndices[0] - 1; i$6 >= 0; i$6--)if (!(charTypes[i$6] & BN_LIKE_TYPES)) {\n prevLevel = embedLevels[i$6];\n break;\n }\n var lastIndex = seqIndices[seqIndices.length - 1];\n var lastLevel = embedLevels[lastIndex];\n var nextLevel = paragraph.level;\n if (!(charTypes[lastIndex] & ISOLATE_INIT_TYPES)) {\n for(var i$7 = lastIndex + 1; i$7 <= paragraph.end; i$7++)if (!(charTypes[i$7] & BN_LIKE_TYPES)) {\n nextLevel = embedLevels[i$7];\n break;\n }\n }\n isolatingRunSeqs.push({\n _seqIndices: seqIndices,\n _sosType: Math.max(prevLevel, firstLevel) % 2 ? TYPE_R : TYPE_L,\n _eosType: Math.max(nextLevel, lastLevel) % 2 ? TYPE_R : TYPE_L\n });\n }\n }\n // The next steps are done per isolating run sequence\n for(var seqIdx = 0; seqIdx < isolatingRunSeqs.length; seqIdx++){\n var ref = isolatingRunSeqs[seqIdx];\n var seqIndices$1 = ref._seqIndices;\n var sosType = ref._sosType;\n var eosType = ref._eosType;\n /**\n * All the level runs in an isolating run sequence have the same embedding level.\n * \n * DO NOT change any `embedLevels[i]` within the current scope.\n */ var embedDirection = embedLevels[seqIndices$1[0]] & 1 ? TYPE_R : TYPE_L;\n // === 3.3.4 Resolving Weak Types ===\n // W1 + 5.2. Search backward from each NSM to the first character in the isolating run sequence whose\n // bidirectional type is not BN, and set the NSM to ON if it is an isolate initiator or PDI, and to its\n // type otherwise. If the NSM is the first non-BN character, change the NSM to the type of sos.\n if (charTypeCounts.get(TYPE_NSM)) for(var si = 0; si < seqIndices$1.length; si++){\n var i$8 = seqIndices$1[si];\n if (charTypes[i$8] & TYPE_NSM) {\n var prevType = sosType;\n for(var sj = si - 1; sj >= 0; sj--)if (!(charTypes[seqIndices$1[sj]] & BN_LIKE_TYPES)) {\n prevType = charTypes[seqIndices$1[sj]];\n break;\n }\n changeCharType(i$8, prevType & (ISOLATE_INIT_TYPES | TYPE_PDI) ? TYPE_ON : prevType);\n }\n }\n // W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sos)\n // is found. If an AL is found, change the type of the European number to Arabic number.\n if (charTypeCounts.get(TYPE_EN)) for(var si$1 = 0; si$1 < seqIndices$1.length; si$1++){\n var i$9 = seqIndices$1[si$1];\n if (charTypes[i$9] & TYPE_EN) for(var sj$1 = si$1 - 1; sj$1 >= -1; sj$1--){\n var prevCharType = sj$1 === -1 ? sosType : charTypes[seqIndices$1[sj$1]];\n if (prevCharType & STRONG_TYPES) {\n if (prevCharType === TYPE_AL) changeCharType(i$9, TYPE_AN);\n break;\n }\n }\n }\n // W3. Change all ALs to R\n if (charTypeCounts.get(TYPE_AL)) for(var si$2 = 0; si$2 < seqIndices$1.length; si$2++){\n var i$10 = seqIndices$1[si$2];\n if (charTypes[i$10] & TYPE_AL) changeCharType(i$10, TYPE_R);\n }\n // W4. A single European separator between two European numbers changes to a European number. A single common\n // separator between two numbers of the same type changes to that type.\n if (charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) for(var si$3 = 1; si$3 < seqIndices$1.length - 1; si$3++){\n var i$11 = seqIndices$1[si$3];\n if (charTypes[i$11] & (TYPE_ES | TYPE_CS)) {\n var prevType$1 = 0, nextType = 0;\n for(var sj$2 = si$3 - 1; sj$2 >= 0; sj$2--){\n prevType$1 = charTypes[seqIndices$1[sj$2]];\n if (!(prevType$1 & BN_LIKE_TYPES)) break;\n }\n for(var sj$3 = si$3 + 1; sj$3 < seqIndices$1.length; sj$3++){\n nextType = charTypes[seqIndices$1[sj$3]];\n if (!(nextType & BN_LIKE_TYPES)) break;\n }\n if (prevType$1 === nextType && (charTypes[i$11] === TYPE_ES ? prevType$1 === TYPE_EN : prevType$1 & (TYPE_EN | TYPE_AN))) changeCharType(i$11, prevType$1);\n }\n }\n // W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.\n if (charTypeCounts.get(TYPE_EN)) for(var si$4 = 0; si$4 < seqIndices$1.length; si$4++){\n var i$12 = seqIndices$1[si$4];\n if (charTypes[i$12] & TYPE_EN) {\n for(var sj$4 = si$4 - 1; sj$4 >= 0 && charTypes[seqIndices$1[sj$4]] & (TYPE_ET | BN_LIKE_TYPES); sj$4--)changeCharType(seqIndices$1[sj$4], TYPE_EN);\n for(si$4++; si$4 < seqIndices$1.length && charTypes[seqIndices$1[si$4]] & (TYPE_ET | BN_LIKE_TYPES | TYPE_EN); si$4++)if (charTypes[seqIndices$1[si$4]] !== TYPE_EN) changeCharType(seqIndices$1[si$4], TYPE_EN);\n }\n }\n // W6. Otherwise, separators and terminators change to Other Neutral.\n if (charTypeCounts.get(TYPE_ET) || charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) for(var si$5 = 0; si$5 < seqIndices$1.length; si$5++){\n var i$13 = seqIndices$1[si$5];\n if (charTypes[i$13] & (TYPE_ET | TYPE_ES | TYPE_CS)) {\n changeCharType(i$13, TYPE_ON);\n // 5.2 transform adjacent BNs too:\n for(var sj$5 = si$5 - 1; sj$5 >= 0 && charTypes[seqIndices$1[sj$5]] & BN_LIKE_TYPES; sj$5--)changeCharType(seqIndices$1[sj$5], TYPE_ON);\n for(var sj$6 = si$5 + 1; sj$6 < seqIndices$1.length && charTypes[seqIndices$1[sj$6]] & BN_LIKE_TYPES; sj$6++)changeCharType(seqIndices$1[sj$6], TYPE_ON);\n }\n }\n // W7. Search backward from each instance of a European number until the first strong type (R, L, or sos)\n // is found. If an L is found, then change the type of the European number to L.\n // NOTE: implemented in single forward pass for efficiency\n if (charTypeCounts.get(TYPE_EN)) for(var si$6 = 0, prevStrongType = sosType; si$6 < seqIndices$1.length; si$6++){\n var i$14 = seqIndices$1[si$6];\n var type = charTypes[i$14];\n if (type & TYPE_EN) {\n if (prevStrongType === TYPE_L) changeCharType(i$14, TYPE_L);\n } else if (type & STRONG_TYPES) prevStrongType = type;\n }\n // === 3.3.5 Resolving Neutral and Isolate Formatting Types ===\n if (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES)) {\n // N0. Process bracket pairs in an isolating run sequence sequentially in the logical order of the text\n // positions of the opening paired brackets using the logic given below. Within this scope, bidirectional\n // types EN and AN are treated as R.\n var R_TYPES_FOR_N_STEPS = TYPE_R | TYPE_EN | TYPE_AN;\n var STRONG_TYPES_FOR_N_STEPS = R_TYPES_FOR_N_STEPS | TYPE_L;\n // * Identify the bracket pairs in the current isolating run sequence according to BD16.\n var bracketPairs = [];\n var openerStack = [];\n for(var si$7 = 0; si$7 < seqIndices$1.length; si$7++)// NOTE: for any potential bracket character we also test that it still carries a NI\n // type, as that may have been changed earlier. This doesn't seem to be explicitly\n // called out in the spec, but is required for passage of certain tests.\n if (charTypes[seqIndices$1[si$7]] & NEUTRAL_ISOLATE_TYPES) {\n var char = string[seqIndices$1[si$7]];\n var oppositeBracket = void 0;\n // Opening bracket\n if (openingToClosingBracket(char) !== null) {\n if (openerStack.length < 63) openerStack.push({\n char: char,\n seqIndex: si$7\n });\n else break;\n } else if ((oppositeBracket = closingToOpeningBracket(char)) !== null) for(var stackIdx = openerStack.length - 1; stackIdx >= 0; stackIdx--){\n var stackChar = openerStack[stackIdx].char;\n if (stackChar === oppositeBracket || stackChar === closingToOpeningBracket(getCanonicalBracket(char)) || openingToClosingBracket(getCanonicalBracket(stackChar)) === char) {\n bracketPairs.push([\n openerStack[stackIdx].seqIndex,\n si$7\n ]);\n openerStack.length = stackIdx; //pop the matching bracket and all following\n break;\n }\n }\n }\n bracketPairs.sort(function(a, b) {\n return a[0] - b[0];\n });\n // * For each bracket-pair element in the list of pairs of text positions\n for(var pairIdx = 0; pairIdx < bracketPairs.length; pairIdx++){\n var ref$1 = bracketPairs[pairIdx];\n var openSeqIdx = ref$1[0];\n var closeSeqIdx = ref$1[1];\n // a. Inspect the bidirectional types of the characters enclosed within the bracket pair.\n // b. If any strong type (either L or R) matching the embedding direction is found, set the type for both\n // brackets in the pair to match the embedding direction.\n var foundStrongType = false;\n var useStrongType = 0;\n for(var si$8 = openSeqIdx + 1; si$8 < closeSeqIdx; si$8++){\n var i$15 = seqIndices$1[si$8];\n if (charTypes[i$15] & STRONG_TYPES_FOR_N_STEPS) {\n foundStrongType = true;\n var lr = charTypes[i$15] & R_TYPES_FOR_N_STEPS ? TYPE_R : TYPE_L;\n if (lr === embedDirection) {\n useStrongType = lr;\n break;\n }\n }\n }\n // c. Otherwise, if there is a strong type it must be opposite the embedding direction. Therefore, test\n // for an established context with a preceding strong type by checking backwards before the opening paired\n // bracket until the first strong type (L, R, or sos) is found.\n // 1. If the preceding strong type is also opposite the embedding direction, context is established, so\n // set the type for both brackets in the pair to that direction.\n // 2. Otherwise set the type for both brackets in the pair to the embedding direction.\n if (foundStrongType && !useStrongType) {\n useStrongType = sosType;\n for(var si$9 = openSeqIdx - 1; si$9 >= 0; si$9--){\n var i$16 = seqIndices$1[si$9];\n if (charTypes[i$16] & STRONG_TYPES_FOR_N_STEPS) {\n var lr$1 = charTypes[i$16] & R_TYPES_FOR_N_STEPS ? TYPE_R : TYPE_L;\n if (lr$1 !== embedDirection) useStrongType = lr$1;\n else useStrongType = embedDirection;\n break;\n }\n }\n }\n if (useStrongType) {\n charTypes[seqIndices$1[openSeqIdx]] = charTypes[seqIndices$1[closeSeqIdx]] = useStrongType;\n // * Any number of characters that had original bidirectional character type NSM prior to the application\n // of W1 that immediately follow a paired bracket which changed to L or R under N0 should change to match\n // the type of their preceding bracket.\n if (useStrongType !== embedDirection) {\n for(var si$10 = openSeqIdx + 1; si$10 < seqIndices$1.length; si$10++)if (!(charTypes[seqIndices$1[si$10]] & BN_LIKE_TYPES)) {\n if (getBidiCharType(string[seqIndices$1[si$10]]) & TYPE_NSM) charTypes[seqIndices$1[si$10]] = useStrongType;\n break;\n }\n }\n if (useStrongType !== embedDirection) {\n for(var si$11 = closeSeqIdx + 1; si$11 < seqIndices$1.length; si$11++)if (!(charTypes[seqIndices$1[si$11]] & BN_LIKE_TYPES)) {\n if (getBidiCharType(string[seqIndices$1[si$11]]) & TYPE_NSM) charTypes[seqIndices$1[si$11]] = useStrongType;\n break;\n }\n }\n }\n }\n // N1. A sequence of NIs takes the direction of the surrounding strong text if the text on both sides has the\n // same direction.\n // N2. Any remaining NIs take the embedding direction.\n for(var si$12 = 0; si$12 < seqIndices$1.length; si$12++)if (charTypes[seqIndices$1[si$12]] & NEUTRAL_ISOLATE_TYPES) {\n var niRunStart = si$12, niRunEnd = si$12;\n var prevType$2 = sosType; //si === 0 ? sosType : (charTypes[seqIndices[si - 1]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L\n for(var si2 = si$12 - 1; si2 >= 0; si2--)if (charTypes[seqIndices$1[si2]] & BN_LIKE_TYPES) niRunStart = si2; //5.2 treat BNs adjacent to NIs as NIs\n else {\n prevType$2 = charTypes[seqIndices$1[si2]] & R_TYPES_FOR_N_STEPS ? TYPE_R : TYPE_L;\n break;\n }\n var nextType$1 = eosType;\n for(var si2$1 = si$12 + 1; si2$1 < seqIndices$1.length; si2$1++)if (charTypes[seqIndices$1[si2$1]] & (NEUTRAL_ISOLATE_TYPES | BN_LIKE_TYPES)) niRunEnd = si2$1;\n else {\n nextType$1 = charTypes[seqIndices$1[si2$1]] & R_TYPES_FOR_N_STEPS ? TYPE_R : TYPE_L;\n break;\n }\n for(var sj$7 = niRunStart; sj$7 <= niRunEnd; sj$7++)charTypes[seqIndices$1[sj$7]] = prevType$2 === nextType$1 ? prevType$2 : embedDirection;\n si$12 = niRunEnd;\n }\n }\n }\n // === 3.3.6 Resolving Implicit Levels ===\n for(var i$17 = paragraph.start; i$17 <= paragraph.end; i$17++){\n var level$3 = embedLevels[i$17];\n var type$1 = charTypes[i$17];\n // I2. For all characters with an odd (right-to-left) embedding level, those of type L, EN or AN go up one level.\n if (level$3 & 1) {\n if (type$1 & (TYPE_L | TYPE_EN | TYPE_AN)) embedLevels[i$17]++;\n } else {\n if (type$1 & TYPE_R) embedLevels[i$17]++;\n else if (type$1 & (TYPE_AN | TYPE_EN)) embedLevels[i$17] += 2;\n }\n // 5.2: Resolve any LRE, RLE, LRO, RLO, PDF, or BN to the level of the preceding character if there is one,\n // and otherwise to the base level.\n if (type$1 & BN_LIKE_TYPES) embedLevels[i$17] = i$17 === 0 ? paragraph.level : embedLevels[i$17 - 1];\n // 3.4 L1.1-4: Reset the embedding level of segment/paragraph separators, and any sequence of whitespace or\n // isolate formatting characters preceding them or the end of the paragraph, to the paragraph level.\n // NOTE: this will also need to be applied to each individual line ending after line wrapping occurs.\n if (i$17 === paragraph.end || getBidiCharType(string[i$17]) & (TYPE_S | TYPE_B)) for(var j$1 = i$17; j$1 >= 0 && getBidiCharType(string[j$1]) & TRAILING_TYPES; j$1--)embedLevels[j$1] = paragraph.level;\n }\n }\n // DONE! The resolved levels can then be used, after line wrapping, to flip runs of characters\n // according to section 3.4 Reordering Resolved Levels\n return {\n levels: embedLevels,\n paragraphs: paragraphs\n };\n function determineAutoEmbedLevel(start, isFSI) {\n // 3.3.1 P2 - P3\n for(var i = start; i < string.length; i++){\n var charType = charTypes[i];\n if (charType & (TYPE_R | TYPE_AL)) return 1;\n if (charType & (TYPE_B | TYPE_L) || isFSI && charType === TYPE_PDI) return 0;\n if (charType & ISOLATE_INIT_TYPES) {\n var pdi = indexOfMatchingPDI(i);\n i = pdi === -1 ? string.length : pdi;\n }\n }\n return 0;\n }\n function indexOfMatchingPDI(isolateStart) {\n // 3.1.2 BD9\n var isolationLevel = 1;\n for(var i = isolateStart + 1; i < string.length; i++){\n var charType = charTypes[i];\n if (charType & TYPE_B) break;\n if (charType & TYPE_PDI) {\n if (--isolationLevel === 0) return i;\n } else if (charType & ISOLATE_INIT_TYPES) isolationLevel++;\n }\n return -1;\n }\n }\n // Bidi mirrored chars data, auto generated\n var data = \"14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1\";\n var mirrorMap;\n function parse() {\n if (!mirrorMap) {\n //const start = performance.now()\n var ref = parseCharacterMap(data, true);\n var map = ref.map;\n var reverseMap = ref.reverseMap;\n // Combine both maps into one\n reverseMap.forEach(function(value, key) {\n map.set(key, value);\n });\n mirrorMap = map;\n //console.log(`mirrored chars parsed in ${performance.now() - start}ms`)\n }\n }\n function getMirroredCharacter(char) {\n parse();\n return mirrorMap.get(char) || null;\n }\n /**\n * Given a string and its resolved embedding levels, build a map of indices to replacement chars\n * for any characters in right-to-left segments that have defined mirrored characters.\n * @param string\n * @param embeddingLevels\n * @param [start]\n * @param [end]\n * @return {Map}\n */ function getMirroredCharactersMap(string, embeddingLevels, start, end) {\n var strLen = string.length;\n start = Math.max(0, start == null ? 0 : +start);\n end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);\n var map = new Map();\n for(var i = start; i <= end; i++)if (embeddingLevels[i] & 1) {\n var mirror = getMirroredCharacter(string[i]);\n if (mirror !== null) map.set(i, mirror);\n }\n return map;\n }\n /**\n * Given a start and end denoting a single line within a string, and a set of precalculated\n * bidi embedding levels, produce a list of segments whose ordering should be flipped, in sequence.\n * @param {string} string - the full input string\n * @param {GetEmbeddingLevelsResult} embeddingLevelsResult - the result object from getEmbeddingLevels\n * @param {number} [start] - first character in a subset of the full string\n * @param {number} [end] - last character in a subset of the full string\n * @return {number[][]} - the list of start/end segments that should be flipped, in order.\n */ function getReorderSegments(string, embeddingLevelsResult, start, end) {\n var strLen = string.length;\n start = Math.max(0, start == null ? 0 : +start);\n end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);\n var segments = [];\n embeddingLevelsResult.paragraphs.forEach(function(paragraph) {\n var lineStart = Math.max(start, paragraph.start);\n var lineEnd = Math.min(end, paragraph.end);\n if (lineStart < lineEnd) {\n // Local slice for mutation\n var lineLevels = embeddingLevelsResult.levels.slice(lineStart, lineEnd + 1);\n // 3.4 L1.4: Reset any sequence of whitespace characters and/or isolate formatting characters at the\n // end of the line to the paragraph level.\n for(var i = lineEnd; i >= lineStart && getBidiCharType(string[i]) & TRAILING_TYPES; i--)lineLevels[i] = paragraph.level;\n // L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels\n // not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher.\n var maxLevel = paragraph.level;\n var minOddLevel = Infinity;\n for(var i$1 = 0; i$1 < lineLevels.length; i$1++){\n var level = lineLevels[i$1];\n if (level > maxLevel) maxLevel = level;\n if (level < minOddLevel) minOddLevel = level | 1;\n }\n for(var lvl = maxLevel; lvl >= minOddLevel; lvl--){\n for(var i$2 = 0; i$2 < lineLevels.length; i$2++)if (lineLevels[i$2] >= lvl) {\n var segStart = i$2;\n while(i$2 + 1 < lineLevels.length && lineLevels[i$2 + 1] >= lvl)i$2++;\n if (i$2 > segStart) segments.push([\n segStart + lineStart,\n i$2 + lineStart\n ]);\n }\n }\n }\n });\n return segments;\n }\n /**\n * @param {string} string\n * @param {GetEmbeddingLevelsResult} embedLevelsResult\n * @param {number} [start]\n * @param {number} [end]\n * @return {string} the new string with bidi segments reordered\n */ function getReorderedString(string, embedLevelsResult, start, end) {\n var indices = getReorderedIndices(string, embedLevelsResult, start, end);\n var chars = [].concat(string);\n indices.forEach(function(charIndex, i) {\n chars[i] = (embedLevelsResult.levels[charIndex] & 1 ? getMirroredCharacter(string[charIndex]) : null) || string[charIndex];\n });\n return chars.join(\"\");\n }\n /**\n * @param {string} string\n * @param {GetEmbeddingLevelsResult} embedLevelsResult\n * @param {number} [start]\n * @param {number} [end]\n * @return {number[]} an array with character indices in their new bidi order\n */ function getReorderedIndices(string, embedLevelsResult, start, end) {\n var segments = getReorderSegments(string, embedLevelsResult, start, end);\n // Fill an array with indices\n var indices = [];\n for(var i = 0; i < string.length; i++)indices[i] = i;\n // Reverse each segment in order\n segments.forEach(function(ref) {\n var start = ref[0];\n var end = ref[1];\n var slice = indices.slice(start, end + 1);\n for(var i = slice.length; i--;)indices[end - i] = slice[i];\n });\n return indices;\n }\n exports.closingToOpeningBracket = closingToOpeningBracket;\n exports.getBidiCharType = getBidiCharType;\n exports.getBidiCharTypeName = getBidiCharTypeName;\n exports.getCanonicalBracket = getCanonicalBracket;\n exports.getEmbeddingLevels = getEmbeddingLevels;\n exports.getMirroredCharacter = getMirroredCharacter;\n exports.getMirroredCharactersMap = getMirroredCharactersMap;\n exports.getReorderSegments = getReorderSegments;\n exports.getReorderedIndices = getReorderedIndices;\n exports.getReorderedString = getReorderedString;\n exports.openingToClosingBracket = openingToClosingBracket;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n return exports;\n }({});\n return bidi;\n}\nvar $39f838faf692eed9$export$2e2bcd8739ae039 = $39f838faf692eed9$var$bidiFactory;\n\n});\n\nparcelRegister(\"4kOkh\", function(module, exports) {\n\n$parcel$export(module.exports, \"voidMainRegExp\", () => $3280116647888dc9$export$f402b5c74ecf5e1e);\n$parcel$export(module.exports, \"createDerivedMaterial\", () => $3280116647888dc9$export$9251ec91c7de57b5);\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n/**\n * Regular expression for matching the `void main() {` opener line in GLSL.\n * @type {RegExp}\n */ const $3280116647888dc9$export$f402b5c74ecf5e1e = /\\bvoid\\s+main\\s*\\(\\s*\\)\\s*{/g;\n/**\n * Recursively expands all `#include ` statements within string of shader code.\n * Copied from three's WebGLProgram#parseIncludes for external use.\n *\n * @param {string} source - The GLSL source code to evaluate\n * @return {string} The GLSL code with all includes expanded\n */ function $3280116647888dc9$export$bec7143e67d6a2ef(source) {\n const pattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n function replace(match, include) {\n let chunk = (0, $ilwiq.ShaderChunk)[include];\n return chunk ? $3280116647888dc9$export$bec7143e67d6a2ef(chunk) : match;\n }\n return source.replace(pattern, replace);\n}\n/*\n * This is a direct copy of MathUtils.generateUUID from Three.js, to preserve compatibility with three\n * versions before 0.113.0 as it was changed from Math to MathUtils in that version.\n * https://github.com/mrdoob/three.js/blob/dd8b5aa3b270c17096b90945cd2d6d1b13aaec53/src/math/MathUtils.js#L16\n */ const $3280116647888dc9$var$_lut = [];\nfor(let i = 0; i < 256; i++)$3280116647888dc9$var$_lut[i] = (i < 16 ? \"0\" : \"\") + i.toString(16);\nfunction $3280116647888dc9$var$generateUUID() {\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\n const d0 = Math.random() * 0xffffffff | 0;\n const d1 = Math.random() * 0xffffffff | 0;\n const d2 = Math.random() * 0xffffffff | 0;\n const d3 = Math.random() * 0xffffffff | 0;\n const uuid = $3280116647888dc9$var$_lut[d0 & 0xff] + $3280116647888dc9$var$_lut[d0 >> 8 & 0xff] + $3280116647888dc9$var$_lut[d0 >> 16 & 0xff] + $3280116647888dc9$var$_lut[d0 >> 24 & 0xff] + \"-\" + $3280116647888dc9$var$_lut[d1 & 0xff] + $3280116647888dc9$var$_lut[d1 >> 8 & 0xff] + \"-\" + $3280116647888dc9$var$_lut[d1 >> 16 & 0x0f | 0x40] + $3280116647888dc9$var$_lut[d1 >> 24 & 0xff] + \"-\" + $3280116647888dc9$var$_lut[d2 & 0x3f | 0x80] + $3280116647888dc9$var$_lut[d2 >> 8 & 0xff] + \"-\" + $3280116647888dc9$var$_lut[d2 >> 16 & 0xff] + $3280116647888dc9$var$_lut[d2 >> 24 & 0xff] + $3280116647888dc9$var$_lut[d3 & 0xff] + $3280116647888dc9$var$_lut[d3 >> 8 & 0xff] + $3280116647888dc9$var$_lut[d3 >> 16 & 0xff] + $3280116647888dc9$var$_lut[d3 >> 24 & 0xff];\n // .toUpperCase() here flattens concatenated strings to save heap memory space.\n return uuid.toUpperCase();\n}\n// Local assign polyfill to avoid importing troika-core\nconst $3280116647888dc9$var$assign = Object.assign || function() {\n let target = arguments[0];\n for(let i = 1, len = arguments.length; i < len; i++){\n let source = arguments[i];\n if (source) {\n for(let prop in source)if (Object.prototype.hasOwnProperty.call(source, prop)) target[prop] = source[prop];\n }\n }\n return target;\n};\nconst $3280116647888dc9$var$epoch = Date.now();\nconst $3280116647888dc9$var$CONSTRUCTOR_CACHE = new WeakMap();\nconst $3280116647888dc9$var$SHADER_UPGRADE_CACHE = new Map();\n// Material ids must be integers, but we can't access the increment from Three's `Material` module,\n// so let's choose a sufficiently large starting value that should theoretically never collide.\nlet $3280116647888dc9$var$materialInstanceId = 1e10;\n/**\n * A utility for creating a custom shader material derived from another material's\n * shaders. This allows you to inject custom shader logic and transforms into the\n * builtin ThreeJS materials without having to recreate them from scratch.\n *\n * @param {THREE.Material} baseMaterial - the original material to derive from\n *\n * @param {Object} options - How the base material should be modified.\n * @param {Object} options.defines - Custom `defines` for the material\n * @param {Object} options.extensions - Custom `extensions` for the material, e.g. `{derivatives: true}`\n * @param {Object} options.uniforms - Custom `uniforms` for use in the modified shader. These can\n * be accessed and manipulated via the resulting material's `uniforms` property, just like\n * in a ShaderMaterial. You do not need to repeat the base material's own uniforms here.\n * @param {String} options.timeUniform - If specified, a uniform of this name will be injected into\n * both shaders, and it will automatically be updated on each render frame with a number of\n * elapsed milliseconds. The \"zero\" epoch time is not significant so don't rely on this as a\n * true calendar time.\n * @param {String} options.vertexDefs - Custom GLSL code to inject into the vertex shader's top-level\n * definitions, above the `void main()` function.\n * @param {String} options.vertexMainIntro - Custom GLSL code to inject at the top of the vertex\n * shader's `void main` function.\n * @param {String} options.vertexMainOutro - Custom GLSL code to inject at the end of the vertex\n * shader's `void main` function.\n * @param {String} options.vertexTransform - Custom GLSL code to manipulate the `position`, `normal`,\n * and/or `uv` vertex attributes. This code will be wrapped within a standalone function with\n * those attributes exposed by their normal names as read/write values.\n * @param {String} options.fragmentDefs - Custom GLSL code to inject into the fragment shader's top-level\n * definitions, above the `void main()` function.\n * @param {String} options.fragmentMainIntro - Custom GLSL code to inject at the top of the fragment\n * shader's `void main` function.\n * @param {String} options.fragmentMainOutro - Custom GLSL code to inject at the end of the fragment\n * shader's `void main` function. You can manipulate `gl_FragColor` here but keep in mind it goes\n * after any of ThreeJS's color postprocessing shader chunks (tonemapping, fog, etc.), so if you\n * want those to apply to your changes use `fragmentColorTransform` instead.\n * @param {String} options.fragmentColorTransform - Custom GLSL code to manipulate the `gl_FragColor`\n * output value. Will be injected near the end of the `void main` function, but before any\n * of ThreeJS's color postprocessing shader chunks (tonemapping, fog, etc.), and before the\n * `fragmentMainOutro`.\n * @param {function<{vertexShader,fragmentShader}>:{vertexShader,fragmentShader}} options.customRewriter - A function\n * for performing custom rewrites of the full shader code. Useful if you need to do something\n * special that's not covered by the other builtin options. This function will be executed before\n * any other transforms are applied.\n * @param {boolean} options.chained - Set to `true` to prototype-chain the derived material to the base\n * material, rather than the default behavior of copying it. This allows the derived material to\n * automatically pick up changes made to the base material and its properties. This can be useful\n * where the derived material is hidden from the user as an implementation detail, allowing them\n * to work with the original material like normal. But it can result in unexpected behavior if not\n * handled carefully.\n *\n * @return {THREE.Material}\n *\n * The returned material will also have two new methods, `getDepthMaterial()` and `getDistanceMaterial()`,\n * which can be called to get a variant of the derived material for use in shadow casting. If the\n * target mesh is expected to cast shadows, then you can assign these to the mesh's `customDepthMaterial`\n * (for directional and spot lights) and/or `customDistanceMaterial` (for point lights) properties to\n * allow the cast shadow to honor your derived shader's vertex transforms and discarded fragments. These\n * will also set a custom `#define IS_DEPTH_MATERIAL` or `#define IS_DISTANCE_MATERIAL` that you can look\n * for in your derived shaders with `#ifdef` to customize their behavior for the depth or distance\n * scenarios, e.g. skipping antialiasing or expensive shader logic.\n */ function $3280116647888dc9$export$9251ec91c7de57b5(baseMaterial, options) {\n // Generate a key that is unique to the content of these `options`. We'll use this\n // throughout for caching and for generating the upgraded shader code. This increases\n // the likelihood that the resulting shaders will line up across multiple calls so\n // their GL programs can be shared and cached.\n const optionsKey = $3280116647888dc9$var$getKeyForOptions(options);\n // First check to see if we've already derived from this baseMaterial using this\n // unique set of options, and if so reuse the constructor to avoid some allocations.\n let ctorsByDerivation = $3280116647888dc9$var$CONSTRUCTOR_CACHE.get(baseMaterial);\n if (!ctorsByDerivation) $3280116647888dc9$var$CONSTRUCTOR_CACHE.set(baseMaterial, ctorsByDerivation = Object.create(null));\n if (ctorsByDerivation[optionsKey]) return new ctorsByDerivation[optionsKey]();\n const privateBeforeCompileProp = `_onBeforeCompile${optionsKey}`;\n // Private onBeforeCompile handler that injects the modified shaders and uniforms when\n // the renderer switches to this material's program\n const onBeforeCompile = function(shaderInfo, renderer) {\n baseMaterial.onBeforeCompile.call(this, shaderInfo, renderer);\n // Upgrade the shaders, caching the result by incoming source code\n const cacheKey = this.customProgramCacheKey() + \"|\" + shaderInfo.vertexShader + \"|\" + shaderInfo.fragmentShader;\n let upgradedShaders = $3280116647888dc9$var$SHADER_UPGRADE_CACHE[cacheKey];\n if (!upgradedShaders) {\n const upgraded = $3280116647888dc9$var$upgradeShaders(this, shaderInfo, options, optionsKey);\n upgradedShaders = $3280116647888dc9$var$SHADER_UPGRADE_CACHE[cacheKey] = upgraded;\n }\n // Inject upgraded shaders and uniforms into the program\n shaderInfo.vertexShader = upgradedShaders.vertexShader;\n shaderInfo.fragmentShader = upgradedShaders.fragmentShader;\n $3280116647888dc9$var$assign(shaderInfo.uniforms, this.uniforms);\n // Inject auto-updating time uniform if requested\n if (options.timeUniform) shaderInfo.uniforms[options.timeUniform] = {\n get value () {\n return Date.now() - $3280116647888dc9$var$epoch;\n }\n };\n // Users can still add their own handlers on top of ours\n if (this[privateBeforeCompileProp]) this[privateBeforeCompileProp](shaderInfo);\n };\n const DerivedMaterial = function DerivedMaterial() {\n return derive(options.chained ? baseMaterial : baseMaterial.clone());\n };\n const derive = function(base) {\n // Prototype chain to the base material\n const derived = Object.create(base, descriptor);\n // Store the baseMaterial for reference; this is always the original even when cloning\n Object.defineProperty(derived, \"baseMaterial\", {\n value: baseMaterial\n });\n // Needs its own ids\n Object.defineProperty(derived, \"id\", {\n value: $3280116647888dc9$var$materialInstanceId++\n });\n derived.uuid = $3280116647888dc9$var$generateUUID();\n // Merge uniforms, defines, and extensions\n derived.uniforms = $3280116647888dc9$var$assign({}, base.uniforms, options.uniforms);\n derived.defines = $3280116647888dc9$var$assign({}, base.defines, options.defines);\n derived.defines[`TROIKA_DERIVED_MATERIAL_${optionsKey}`] = \"\"; //force a program change from the base material\n derived.extensions = $3280116647888dc9$var$assign({}, base.extensions, options.extensions);\n // Don't inherit EventDispatcher listeners\n derived._listeners = undefined;\n return derived;\n };\n const descriptor = {\n constructor: {\n value: DerivedMaterial\n },\n isDerivedMaterial: {\n value: true\n },\n customProgramCacheKey: {\n writable: true,\n configurable: true,\n value: function() {\n return baseMaterial.customProgramCacheKey() + \"|\" + optionsKey;\n }\n },\n onBeforeCompile: {\n get () {\n return onBeforeCompile;\n },\n set (fn) {\n this[privateBeforeCompileProp] = fn;\n }\n },\n copy: {\n writable: true,\n configurable: true,\n value: function(source) {\n baseMaterial.copy.call(this, source);\n if (!baseMaterial.isShaderMaterial && !baseMaterial.isDerivedMaterial) {\n $3280116647888dc9$var$assign(this.extensions, source.extensions);\n $3280116647888dc9$var$assign(this.defines, source.defines);\n $3280116647888dc9$var$assign(this.uniforms, (0, $ilwiq.UniformsUtils).clone(source.uniforms));\n }\n return this;\n }\n },\n clone: {\n writable: true,\n configurable: true,\n value: function() {\n const newBase = new baseMaterial.constructor();\n return derive(newBase).copy(this);\n }\n },\n /**\n * Utility to get a MeshDepthMaterial that will honor this derived material's vertex\n * transformations and discarded fragments.\n */ getDepthMaterial: {\n writable: true,\n configurable: true,\n value: function() {\n let depthMaterial = this._depthMaterial;\n if (!depthMaterial) {\n depthMaterial = this._depthMaterial = $3280116647888dc9$export$9251ec91c7de57b5(baseMaterial.isDerivedMaterial ? baseMaterial.getDepthMaterial() : new (0, $ilwiq.MeshDepthMaterial)({\n depthPacking: (0, $ilwiq.RGBADepthPacking)\n }), options);\n depthMaterial.defines.IS_DEPTH_MATERIAL = \"\";\n depthMaterial.uniforms = this.uniforms; //automatically recieve same uniform values\n }\n return depthMaterial;\n }\n },\n /**\n * Utility to get a MeshDistanceMaterial that will honor this derived material's vertex\n * transformations and discarded fragments.\n */ getDistanceMaterial: {\n writable: true,\n configurable: true,\n value: function() {\n let distanceMaterial = this._distanceMaterial;\n if (!distanceMaterial) {\n distanceMaterial = this._distanceMaterial = $3280116647888dc9$export$9251ec91c7de57b5(baseMaterial.isDerivedMaterial ? baseMaterial.getDistanceMaterial() : new (0, $ilwiq.MeshDistanceMaterial)(), options);\n distanceMaterial.defines.IS_DISTANCE_MATERIAL = \"\";\n distanceMaterial.uniforms = this.uniforms; //automatically recieve same uniform values\n }\n return distanceMaterial;\n }\n },\n dispose: {\n writable: true,\n configurable: true,\n value () {\n const { _depthMaterial: _depthMaterial, _distanceMaterial: _distanceMaterial } = this;\n if (_depthMaterial) _depthMaterial.dispose();\n if (_distanceMaterial) _distanceMaterial.dispose();\n baseMaterial.dispose.call(this);\n }\n }\n };\n ctorsByDerivation[optionsKey] = DerivedMaterial;\n return new DerivedMaterial();\n}\nfunction $3280116647888dc9$var$upgradeShaders(material, { vertexShader: vertexShader, fragmentShader: fragmentShader }, options, key) {\n let { vertexDefs: vertexDefs, vertexMainIntro: vertexMainIntro, vertexMainOutro: vertexMainOutro, vertexTransform: vertexTransform, fragmentDefs: fragmentDefs, fragmentMainIntro: fragmentMainIntro, fragmentMainOutro: fragmentMainOutro, fragmentColorTransform: fragmentColorTransform, customRewriter: customRewriter, timeUniform: timeUniform } = options;\n vertexDefs = vertexDefs || \"\";\n vertexMainIntro = vertexMainIntro || \"\";\n vertexMainOutro = vertexMainOutro || \"\";\n fragmentDefs = fragmentDefs || \"\";\n fragmentMainIntro = fragmentMainIntro || \"\";\n fragmentMainOutro = fragmentMainOutro || \"\";\n // Expand includes if needed\n if (vertexTransform || customRewriter) vertexShader = $3280116647888dc9$export$bec7143e67d6a2ef(vertexShader);\n if (fragmentColorTransform || customRewriter) {\n // We need to be able to find postprocessing chunks after include expansion in order to\n // put them after the fragmentColorTransform, so mark them with comments first. Even if\n // this particular derivation doesn't have a fragmentColorTransform, other derivations may,\n // so we still mark them.\n fragmentShader = fragmentShader.replace(/^[ \\t]*#include <((?:tonemapping|encodings|fog|premultiplied_alpha|dithering)_fragment)>/gm, \"\\n//!BEGIN_POST_CHUNK $1\\n$&\\n//!END_POST_CHUNK\\n\");\n fragmentShader = $3280116647888dc9$export$bec7143e67d6a2ef(fragmentShader);\n }\n // Apply custom rewriter function\n if (customRewriter) {\n let res = customRewriter({\n vertexShader: vertexShader,\n fragmentShader: fragmentShader\n });\n vertexShader = res.vertexShader;\n fragmentShader = res.fragmentShader;\n }\n // The fragmentColorTransform needs to go before any postprocessing chunks, so extract\n // those and re-insert them into the outro in the correct place:\n if (fragmentColorTransform) {\n let postChunks = [];\n fragmentShader = fragmentShader.replace(/^\\/\\/!BEGIN_POST_CHUNK[^]+?^\\/\\/!END_POST_CHUNK/gm, (match)=>{\n postChunks.push(match);\n return \"\";\n });\n fragmentMainOutro = `${fragmentColorTransform}\\n${postChunks.join(\"\\n\")}\\n${fragmentMainOutro}`;\n }\n // Inject auto-updating time uniform if requested\n if (timeUniform) {\n const code = `\\nuniform float ${timeUniform};\\n`;\n vertexDefs = code + vertexDefs;\n fragmentDefs = code + fragmentDefs;\n }\n // Inject a function for the vertexTransform and rename all usages of position/normal/uv\n if (vertexTransform) {\n // Hoist these defs to the very top so they work in other function defs\n vertexShader = `vec3 troika_position_${key};\nvec3 troika_normal_${key};\nvec2 troika_uv_${key};\n${vertexShader}\n`;\n vertexDefs = `${vertexDefs}\nvoid troikaVertexTransform${key}(inout vec3 position, inout vec3 normal, inout vec2 uv) {\n ${vertexTransform}\n}\n`;\n vertexMainIntro = `\ntroika_position_${key} = vec3(position);\ntroika_normal_${key} = vec3(normal);\ntroika_uv_${key} = vec2(uv);\ntroikaVertexTransform${key}(troika_position_${key}, troika_normal_${key}, troika_uv_${key});\n${vertexMainIntro}\n`;\n vertexShader = vertexShader.replace(/\\b(position|normal|uv)\\b/g, (match, match1, index, fullStr)=>{\n return /\\battribute\\s+vec[23]\\s+$/.test(fullStr.substr(0, index)) ? match1 : `troika_${match1}_${key}`;\n });\n // Three r152 introduced the MAP_UV token, replace it too if it's pointing to the main 'uv'\n // Perhaps the other textures too going forward?\n if (!(material.map && material.map.channel > 0)) vertexShader = vertexShader.replace(/\\bMAP_UV\\b/g, `troika_uv_${key}`);\n }\n // Inject defs and intro/outro snippets\n vertexShader = $3280116647888dc9$var$injectIntoShaderCode(vertexShader, key, vertexDefs, vertexMainIntro, vertexMainOutro);\n fragmentShader = $3280116647888dc9$var$injectIntoShaderCode(fragmentShader, key, fragmentDefs, fragmentMainIntro, fragmentMainOutro);\n return {\n vertexShader: vertexShader,\n fragmentShader: fragmentShader\n };\n}\nfunction $3280116647888dc9$var$injectIntoShaderCode(shaderCode, id, defs, intro, outro) {\n if (intro || outro || defs) {\n shaderCode = shaderCode.replace($3280116647888dc9$export$f402b5c74ecf5e1e, `\n${defs}\nvoid troikaOrigMain${id}() {`);\n shaderCode += `\nvoid main() {\n ${intro}\n troikaOrigMain${id}();\n ${outro}\n}`;\n }\n return shaderCode;\n}\nfunction $3280116647888dc9$var$optionsJsonReplacer(key, value) {\n return key === \"uniforms\" ? undefined : typeof value === \"function\" ? value.toString() : value;\n}\nlet $3280116647888dc9$var$_idCtr = 0;\nconst $3280116647888dc9$var$optionsHashesToIds = new Map();\nfunction $3280116647888dc9$var$getKeyForOptions(options) {\n const optionsHash = JSON.stringify(options, $3280116647888dc9$var$optionsJsonReplacer);\n let id = $3280116647888dc9$var$optionsHashesToIds.get(optionsHash);\n if (id == null) $3280116647888dc9$var$optionsHashesToIds.set(optionsHash, id = ++$3280116647888dc9$var$_idCtr);\n return id;\n}\n// Copied from threejs WebGLPrograms.js so we can resolve builtin materials to their shaders\n// TODO how can we keep this from getting stale?\nconst $3280116647888dc9$var$MATERIAL_TYPES_TO_SHADERS = {\n MeshDepthMaterial: \"depth\",\n MeshDistanceMaterial: \"distanceRGBA\",\n MeshNormalMaterial: \"normal\",\n MeshBasicMaterial: \"basic\",\n MeshLambertMaterial: \"lambert\",\n MeshPhongMaterial: \"phong\",\n MeshToonMaterial: \"toon\",\n MeshStandardMaterial: \"physical\",\n MeshPhysicalMaterial: \"physical\",\n MeshMatcapMaterial: \"matcap\",\n LineBasicMaterial: \"basic\",\n LineDashedMaterial: \"dashed\",\n PointsMaterial: \"points\",\n ShadowMaterial: \"shadow\",\n SpriteMaterial: \"sprite\"\n};\n/**\n * Given a Three.js `Material` instance, find the shaders/uniforms that will be\n * used to render that material.\n *\n * @param material - the Material instance\n * @return {object} - the material's shader info: `{uniforms:{}, fragmentShader:'', vertexShader:''}`\n */ function $3280116647888dc9$export$45b4115c5d90bd21(material) {\n let builtinType = $3280116647888dc9$var$MATERIAL_TYPES_TO_SHADERS[material.type];\n return builtinType ? (0, $ilwiq.ShaderLib)[builtinType] : material //TODO fallback for unknown type?\n ;\n}\n/**\n * Find all uniforms and their types within a shader code string.\n *\n * @param {string} shader - The shader code to parse\n * @return {object} mapping of uniform names to their glsl type\n */ function $3280116647888dc9$export$c7d2dd72fdbc2421(shader) {\n let uniformRE = /\\buniform\\s+(int|float|vec[234]|mat[34])\\s+([A-Za-z_][\\w]*)/g;\n let uniforms = Object.create(null);\n let match;\n while((match = uniformRE.exec(shader)) !== null)uniforms[match[2]] = match[1];\n return uniforms;\n}\n/**\n * Helper for smoothing out the `m.getInverse(x)` --> `m.copy(x).invert()` conversion\n * that happened in ThreeJS r123.\n * @param {Matrix4} srcMatrix\n * @param {Matrix4} [tgtMatrix]\n */ function $3280116647888dc9$export$3425937be2407bfa(srcMatrix, tgtMatrix = new (0, $ilwiq.Matrix4)()) {\n if (typeof tgtMatrix.invert === \"function\") tgtMatrix.copy(srcMatrix).invert();\n else tgtMatrix.getInverse(srcMatrix);\n return tgtMatrix;\n}\n/*\nInput geometry is a cylinder with r=1, height in y dimension from 0 to 1,\ndivided into a reasonable number of height segments.\n*/ const $3280116647888dc9$var$vertexDefs = `\nuniform vec3 pointA;\nuniform vec3 controlA;\nuniform vec3 controlB;\nuniform vec3 pointB;\nuniform float radius;\nvarying float bezierT;\n\nvec3 cubicBezier(vec3 p1, vec3 c1, vec3 c2, vec3 p2, float t) {\n float t2 = 1.0 - t;\n float b0 = t2 * t2 * t2;\n float b1 = 3.0 * t * t2 * t2;\n float b2 = 3.0 * t * t * t2;\n float b3 = t * t * t;\n return b0 * p1 + b1 * c1 + b2 * c2 + b3 * p2;\n}\n\nvec3 cubicBezierDerivative(vec3 p1, vec3 c1, vec3 c2, vec3 p2, float t) {\n float t2 = 1.0 - t;\n return -3.0 * p1 * t2 * t2 +\n c1 * (3.0 * t2 * t2 - 6.0 * t2 * t) +\n c2 * (6.0 * t2 * t - 3.0 * t * t) +\n 3.0 * p2 * t * t;\n}\n`;\nconst $3280116647888dc9$var$vertexTransform = `\nfloat t = position.y;\nbezierT = t;\nvec3 bezierCenterPos = cubicBezier(pointA, controlA, controlB, pointB, t);\nvec3 bezierDir = normalize(cubicBezierDerivative(pointA, controlA, controlB, pointB, t));\n\n// Make \"sideways\" always perpendicular to the camera ray; this ensures that any twists\n// in the cylinder occur where you won't see them: \nvec3 viewDirection = normalMatrix * vec3(0.0, 0.0, 1.0);\nif (bezierDir == viewDirection) {\n bezierDir = normalize(cubicBezierDerivative(pointA, controlA, controlB, pointB, t == 1.0 ? t - 0.0001 : t + 0.0001));\n}\nvec3 sideways = normalize(cross(bezierDir, viewDirection));\nvec3 upish = normalize(cross(sideways, bezierDir));\n\n// Build a matrix for transforming this disc in the cylinder:\nmat4 discTx;\ndiscTx[0].xyz = sideways * radius;\ndiscTx[1].xyz = bezierDir * radius;\ndiscTx[2].xyz = upish * radius;\ndiscTx[3].xyz = bezierCenterPos;\ndiscTx[3][3] = 1.0;\n\n// Apply transform, ignoring original y\nposition = (discTx * vec4(position.x, 0.0, position.z, 1.0)).xyz;\nnormal = normalize(mat3(discTx) * normal);\n`;\nconst $3280116647888dc9$var$fragmentDefs = `\nuniform vec3 dashing;\nvarying float bezierT;\n`;\nconst $3280116647888dc9$var$fragmentMainIntro = `\nif (dashing.x + dashing.y > 0.0) {\n float dashFrac = mod(bezierT - dashing.z, dashing.x + dashing.y);\n if (dashFrac > dashing.x) {\n discard;\n }\n}\n`;\n// Debugging: separate color for each of the 6 sides:\n// const fragmentColorTransform = `\n// float sideNum = floor(vUV.x * 6.0);\n// vec3 mixColor = sideNum < 1.0 ? vec3(1.0, 0.0, 0.0) :\n// sideNum < 2.0 ? vec3(0.0, 1.0, 1.0) :\n// sideNum < 3.0 ? vec3(1.0, 1.0, 0.0) :\n// sideNum < 4.0 ? vec3(0.0, 0.0, 1.0) :\n// sideNum < 5.0 ? vec3(0.0, 1.0, 0.0) :\n// vec3(1.0, 0.0, 1.0);\n// gl_FragColor.xyz = mix(gl_FragColor.xyz, mixColor, 0.5);\n// `\nfunction $3280116647888dc9$var$createBezierMeshMaterial(baseMaterial) {\n return $3280116647888dc9$export$9251ec91c7de57b5(baseMaterial, {\n chained: true,\n uniforms: {\n pointA: {\n value: new (0, $ilwiq.Vector3)()\n },\n controlA: {\n value: new (0, $ilwiq.Vector3)()\n },\n controlB: {\n value: new (0, $ilwiq.Vector3)()\n },\n pointB: {\n value: new (0, $ilwiq.Vector3)()\n },\n radius: {\n value: 0.01\n },\n dashing: {\n value: new (0, $ilwiq.Vector3)()\n } //on, off, offset\n },\n vertexDefs: $3280116647888dc9$var$vertexDefs,\n vertexTransform: $3280116647888dc9$var$vertexTransform,\n fragmentDefs: $3280116647888dc9$var$fragmentDefs,\n fragmentMainIntro: $3280116647888dc9$var$fragmentMainIntro\n });\n}\nlet $3280116647888dc9$var$geometry = null;\nconst $3280116647888dc9$var$defaultBaseMaterial = /*#__PURE__*/ new (0, $ilwiq.MeshStandardMaterial)({\n color: 0xffffff,\n side: (0, $ilwiq.DoubleSide)\n});\n/**\n * A ThreeJS `Mesh` that bends a tube shape along a 3D cubic bezier path. The bending is done\n * by deforming a straight cylindrical geometry in the vertex shader based on a set of four\n * control point uniforms. It patches the necessary GLSL into the mesh's assigned `material`\n * automatically.\n *\n * The cubiz bezier path is determined by its four `Vector3` properties:\n * - `pointA`\n * - `controlA`\n * - `controlB`\n * - `pointB`\n *\n * The tube's radius is controlled by its `radius` property, which defaults to `0.01`.\n *\n * You can also give the tube a dashed appearance with two properties:\n *\n * - `dashArray` - an array of two numbers, defining the length of \"on\" and \"off\" parts of\n * the dash. Each is a 0-1 ratio of the entire path's length. (Actually this is the `t` length\n * used as input to the cubic bezier function, not its visible length.)\n * - `dashOffset` - offset of where the dash starts. You can animate this to make the dashes move.\n *\n * Note that the dashes will appear like a hollow tube, not solid. This will be more apparent on\n * thicker tubes.\n *\n * TODO: proper geometry bounding sphere and raycasting\n * TODO: allow control of the geometry's segment counts\n */ class $3280116647888dc9$export$5f27619f2db8836e extends (0, $ilwiq.Mesh) {\n static getGeometry() {\n return $3280116647888dc9$var$geometry || ($3280116647888dc9$var$geometry = new (0, $ilwiq.CylinderGeometry)(1, 1, 1, 6, 64).translate(0, 0.5, 0));\n }\n constructor(){\n super($3280116647888dc9$export$5f27619f2db8836e.getGeometry(), $3280116647888dc9$var$defaultBaseMaterial);\n this.pointA = new (0, $ilwiq.Vector3)();\n this.controlA = new (0, $ilwiq.Vector3)();\n this.controlB = new (0, $ilwiq.Vector3)();\n this.pointB = new (0, $ilwiq.Vector3)();\n this.radius = 0.01;\n this.dashArray = new (0, $ilwiq.Vector2)();\n this.dashOffset = 0;\n // TODO - disabling frustum culling until I figure out how to customize the\n // geometry's bounding sphere that gets used\n this.frustumCulled = false;\n }\n // Handler for automatically wrapping the base material with our upgrades. We do the wrapping\n // lazily on _read_ rather than write to avoid unnecessary wrapping on transient values.\n get material() {\n let derivedMaterial = this._derivedMaterial;\n const baseMaterial = this._baseMaterial || this._defaultMaterial || (this._defaultMaterial = $3280116647888dc9$var$defaultBaseMaterial.clone());\n if (!derivedMaterial || derivedMaterial.baseMaterial !== baseMaterial) {\n derivedMaterial = this._derivedMaterial = $3280116647888dc9$var$createBezierMeshMaterial(baseMaterial);\n // dispose the derived material when its base material is disposed:\n baseMaterial.addEventListener(\"dispose\", function onDispose() {\n baseMaterial.removeEventListener(\"dispose\", onDispose);\n derivedMaterial.dispose();\n });\n }\n return derivedMaterial;\n }\n set material(baseMaterial) {\n this._baseMaterial = baseMaterial;\n }\n // Create and update material for shadows upon request:\n get customDepthMaterial() {\n return this.material.getDepthMaterial();\n }\n get customDistanceMaterial() {\n return this.material.getDistanceMaterial();\n }\n onBeforeRender() {\n const { uniforms: uniforms } = this.material;\n const { pointA: pointA, controlA: controlA, controlB: controlB, pointB: pointB, radius: radius, dashArray: dashArray, dashOffset: dashOffset } = this;\n uniforms.pointA.value.copy(pointA);\n uniforms.controlA.value.copy(controlA);\n uniforms.controlB.value.copy(controlB);\n uniforms.pointB.value.copy(pointB);\n uniforms.radius.value = radius;\n uniforms.dashing.value.set(dashArray.x, dashArray.y, dashOffset || 0);\n }\n raycast() {\n // TODO - just fail for now\n }\n}\n\n});\n\n\nparcelRegister(\"eT66s\", function(module, exports) {\n\n$parcel$export(module.exports, \"Font\", () => $ad6aefaf36d08024$export$89abf52a030e56ee);\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nclass $ad6aefaf36d08024$export$812303d6cad736b3 extends (0, $ilwiq.Loader) {\n constructor(manager){\n super(manager);\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n const loader = new (0, $ilwiq.FileLoader)(this.manager);\n loader.setPath(this.path);\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function(text) {\n const font = scope.parse(JSON.parse(text));\n if (onLoad) onLoad(font);\n }, onProgress, onError);\n }\n parse(json) {\n return new $ad6aefaf36d08024$export$89abf52a030e56ee(json);\n }\n}\n//\nclass $ad6aefaf36d08024$export$89abf52a030e56ee {\n constructor(data){\n this.isFont = true;\n this.type = \"Font\";\n this.data = data;\n }\n generateShapes(text, size = 100) {\n const shapes = [];\n const paths = $ad6aefaf36d08024$var$createPaths(text, size, this.data);\n for(let p = 0, pl = paths.length; p < pl; p++)shapes.push(...paths[p].toShapes());\n return shapes;\n }\n}\nfunction $ad6aefaf36d08024$var$createPaths(text, size, data) {\n const chars = Array.from(text);\n const scale = size / data.resolution;\n const line_height = (data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness) * scale;\n const paths = [];\n let offsetX = 0, offsetY = 0;\n for(let i = 0; i < chars.length; i++){\n const char = chars[i];\n if (char === \"\\n\") {\n offsetX = 0;\n offsetY -= line_height;\n } else {\n const ret = $ad6aefaf36d08024$var$createPath(char, scale, offsetX, offsetY, data);\n offsetX += ret.offsetX;\n paths.push(ret.path);\n }\n }\n return paths;\n}\nfunction $ad6aefaf36d08024$var$createPath(char, scale, offsetX, offsetY, data) {\n const glyph = data.glyphs[char] || data.glyphs[\"?\"];\n if (!glyph) {\n console.error('THREE.Font: character \"' + char + '\" does not exists in font family ' + data.familyName + \".\");\n return;\n }\n const path = new (0, $ilwiq.ShapePath)();\n let x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2;\n if (glyph.o) {\n const outline = glyph._cachedOutline || (glyph._cachedOutline = glyph.o.split(\" \"));\n for(let i = 0, l = outline.length; i < l;){\n const action = outline[i++];\n switch(action){\n case \"m\":\n x = outline[i++] * scale + offsetX;\n y = outline[i++] * scale + offsetY;\n path.moveTo(x, y);\n break;\n case \"l\":\n x = outline[i++] * scale + offsetX;\n y = outline[i++] * scale + offsetY;\n path.lineTo(x, y);\n break;\n case \"q\":\n cpx = outline[i++] * scale + offsetX;\n cpy = outline[i++] * scale + offsetY;\n cpx1 = outline[i++] * scale + offsetX;\n cpy1 = outline[i++] * scale + offsetY;\n path.quadraticCurveTo(cpx1, cpy1, cpx, cpy);\n break;\n case \"b\":\n cpx = outline[i++] * scale + offsetX;\n cpy = outline[i++] * scale + offsetY;\n cpx1 = outline[i++] * scale + offsetX;\n cpy1 = outline[i++] * scale + offsetY;\n cpx2 = outline[i++] * scale + offsetX;\n cpy2 = outline[i++] * scale + offsetY;\n path.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, cpx, cpy);\n break;\n }\n }\n }\n return {\n offsetX: glyph.ha * scale,\n path: path\n };\n}\n\n});\n\nparcelRegister(\"8NFZ6\", function(module, exports) {\n\n$parcel$export(module.exports, \"TextGeometry\", () => $66837798a125d1c7$export$684b774b4473ba5f);\n/**\n * Text = 3D Text\n *\n * parameters = {\n * font: , // font\n *\n * size: , // size of the text\n * height: , // thickness to extrude text\n * curveSegments: , // number of points on the curves\n *\n * bevelEnabled: , // turn on bevel\n * bevelThickness: , // how deep into text bevel goes\n * bevelSize: , // how far from text outline (including bevelOffset) is bevel\n * bevelOffset: // how far from text outline does bevel start\n * }\n */ \nvar $ilwiq = parcelRequire(\"ilwiq\");\nclass $66837798a125d1c7$export$684b774b4473ba5f extends (0, $ilwiq.ExtrudeGeometry) {\n constructor(text, parameters = {}){\n const font = parameters.font;\n if (font === undefined) super(); // generate default extrude geometry\n else {\n const shapes = font.generateShapes(text, parameters.size);\n // translate parameters to ExtrudeGeometry API\n parameters.depth = parameters.height !== undefined ? parameters.height : 50;\n // defaults\n if (parameters.bevelThickness === undefined) parameters.bevelThickness = 10;\n if (parameters.bevelSize === undefined) parameters.bevelSize = 8;\n if (parameters.bevelEnabled === undefined) parameters.bevelEnabled = false;\n super(shapes, parameters);\n }\n this.type = \"TextGeometry\";\n }\n}\n\n});\n\nparcelRegister(\"bYSYW\", function(module, exports) {\nmodule.exports = JSON.parse('{\"glyphs\":{\"0\":{\"x_min\":73,\"x_max\":715,\"ha\":792,\"o\":\"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 \"},\"1\":{\"x_min\":215.671875,\"x_max\":574,\"ha\":792,\"o\":\"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 \"},\"2\":{\"x_min\":59,\"x_max\":731,\"ha\":792,\"o\":\"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 \"},\"3\":{\"x_min\":54,\"x_max\":737,\"ha\":792,\"o\":\"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 \"},\"4\":{\"x_min\":48,\"x_max\":742.453125,\"ha\":792,\"o\":\"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 \"},\"5\":{\"x_min\":54.171875,\"x_max\":738,\"ha\":792,\"o\":\"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 \"},\"6\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 \"},\"7\":{\"x_min\":58.71875,\"x_max\":730.953125,\"ha\":792,\"o\":\"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 \"},\"8\":{\"x_min\":55,\"x_max\":736,\"ha\":792,\"o\":\"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 \"},\"9\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 \"},\"\\u03BF\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 \"},\"S\":{\"x_min\":0,\"x_max\":788,\"ha\":890,\"o\":\"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 \"},\"\\xa6\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"/\":{\"x_min\":183.25,\"x_max\":608.328125,\"ha\":792,\"o\":\"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 \"},\"\\u03A4\":{\"x_min\":-0.4375,\"x_max\":777.453125,\"ha\":839,\"o\":\"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 \"},\"y\":{\"x_min\":0,\"x_max\":684.78125,\"ha\":771,\"o\":\"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 \"},\"\\u03A0\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 \"},\"\\u0390\":{\"x_min\":-111,\"x_max\":339,\"ha\":361,\"o\":\"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 \"},\"g\":{\"x_min\":0,\"x_max\":686,\"ha\":838,\"o\":\"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 \"},\"\\xb2\":{\"x_min\":0,\"x_max\":442,\"ha\":539,\"o\":\"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 \"},\"\\u2013\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\"\\u039A\":{\"x_min\":0,\"x_max\":819.5625,\"ha\":893,\"o\":\"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\"\\u0192\":{\"x_min\":-46.265625,\"x_max\":392,\"ha\":513,\"o\":\"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 \"},\"e\":{\"x_min\":0,\"x_max\":714,\"ha\":813,\"o\":\"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 \"},\"\\u03CC\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 \"},\"J\":{\"x_min\":0,\"x_max\":588,\"ha\":699,\"o\":\"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 \"},\"\\xbb\":{\"x_min\":-1,\"x_max\":503,\"ha\":601,\"o\":\"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 \"},\"\\xa9\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 \"},\"\\u03CE\":{\"x_min\":0,\"x_max\":922,\"ha\":1030,\"o\":\"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 \"},\"^\":{\"x_min\":193.0625,\"x_max\":598.609375,\"ha\":792,\"o\":\"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 \"},\"\\xab\":{\"x_min\":0,\"x_max\":507.203125,\"ha\":604,\"o\":\"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 \"},\"D\":{\"x_min\":0,\"x_max\":828,\"ha\":935,\"o\":\"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 \"},\"\\u2219\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"\\xff\":{\"x_min\":0,\"x_max\":47,\"ha\":125,\"o\":\"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 \"},\"w\":{\"x_min\":0,\"x_max\":1009.71875,\"ha\":1100,\"o\":\"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 \"},\"$\":{\"x_min\":0,\"x_max\":700,\"ha\":793,\"o\":\"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 \"},\"\\\\\\\\\":{\"x_min\":-0.015625,\"x_max\":425.0625,\"ha\":522,\"o\":\"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 \"},\"\\xb5\":{\"x_min\":0,\"x_max\":697.21875,\"ha\":747,\"o\":\"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 \"},\"\\u0399\":{\"x_min\":42,\"x_max\":181,\"ha\":297,\"o\":\"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 \"},\"\\u038E\":{\"x_min\":0,\"x_max\":1144.5,\"ha\":1214,\"o\":\"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u2019\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"\\u039D\":{\"x_min\":0,\"x_max\":801,\"ha\":915,\"o\":\"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 \"},\"-\":{\"x_min\":8.71875,\"x_max\":350.390625,\"ha\":478,\"o\":\"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 \"},\"Q\":{\"x_min\":0,\"x_max\":968,\"ha\":1072,\"o\":\"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 \"},\"\\u03C2\":{\"x_min\":1,\"x_max\":676.28125,\"ha\":740,\"o\":\"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 \"},\"M\":{\"x_min\":0,\"x_max\":954,\"ha\":1067,\"o\":\"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 \"},\"\\u03A8\":{\"x_min\":0,\"x_max\":1006,\"ha\":1094,\"o\":\"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 \"},\"C\":{\"x_min\":0,\"x_max\":886,\"ha\":944,\"o\":\"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 \"},\"!\":{\"x_min\":0,\"x_max\":138,\"ha\":236,\"o\":\"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 \"},\"{\":{\"x_min\":0,\"x_max\":480.5625,\"ha\":578,\"o\":\"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 \"},\"X\":{\"x_min\":-0.015625,\"x_max\":854.15625,\"ha\":940,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 \"},\"#\":{\"x_min\":0,\"x_max\":963.890625,\"ha\":1061,\"o\":\"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 \"},\"\\u03B9\":{\"x_min\":42,\"x_max\":284,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 \"},\"\\u0386\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":982,\"o\":\"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\")\":{\"x_min\":0,\"x_max\":318,\"ha\":415,\"o\":\"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 \"},\"\\u03B5\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 \"},\"\\u0394\":{\"x_min\":0,\"x_max\":952.78125,\"ha\":1028,\"o\":\"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 \"},\"}\":{\"x_min\":0,\"x_max\":481,\"ha\":578,\"o\":\"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 \"},\"\\u2030\":{\"x_min\":-3,\"x_max\":1672,\"ha\":1821,\"o\":\"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 \"},\"a\":{\"x_min\":0,\"x_max\":698.609375,\"ha\":794,\"o\":\"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 \"},\"\\u2014\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":1039,\"o\":\"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 \"},\"=\":{\"x_min\":8.71875,\"x_max\":780.953125,\"ha\":792,\"o\":\"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 \"},\"N\":{\"x_min\":0,\"x_max\":801,\"ha\":914,\"o\":\"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 \"},\"\\u03C1\":{\"x_min\":0,\"x_max\":712,\"ha\":797,\"o\":\"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 \"},\"\\xaf\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":938,\"o\":\"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 \"},\"Z\":{\"x_min\":0,\"x_max\":779,\"ha\":849,\"o\":\"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 \"},\"u\":{\"x_min\":0,\"x_max\":617,\"ha\":729,\"o\":\"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 \"},\"k\":{\"x_min\":0,\"x_max\":612.484375,\"ha\":697,\"o\":\"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 \"},\"\\u0397\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"\\u0391\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":985,\"o\":\"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\"s\":{\"x_min\":0,\"x_max\":604,\"ha\":697,\"o\":\"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 \"},\"B\":{\"x_min\":0,\"x_max\":778,\"ha\":876,\"o\":\"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 \"},\"\\u2026\":{\"x_min\":0,\"x_max\":614,\"ha\":708,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 \"},\"?\":{\"x_min\":0,\"x_max\":607,\"ha\":704,\"o\":\"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 \"},\"H\":{\"x_min\":0,\"x_max\":803,\"ha\":915,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"\\u03BD\":{\"x_min\":0,\"x_max\":675,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 \"},\"c\":{\"x_min\":1,\"x_max\":701.390625,\"ha\":775,\"o\":\"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 \"},\"\\xb6\":{\"x_min\":0,\"x_max\":566.671875,\"ha\":678,\"o\":\"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 \"},\"\\u03B2\":{\"x_min\":0,\"x_max\":660,\"ha\":745,\"o\":\"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 \"},\"\\u039C\":{\"x_min\":0,\"x_max\":954,\"ha\":1068,\"o\":\"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 \"},\"\\u038C\":{\"x_min\":0.109375,\"x_max\":1120,\"ha\":1217,\"o\":\"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u0389\":{\"x_min\":0,\"x_max\":1158,\"ha\":1275,\"o\":\"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u2022\":{\"x_min\":0,\"x_max\":663.890625,\"ha\":775,\"o\":\"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 \"},\"\\xa5\":{\"x_min\":0.1875,\"x_max\":819.546875,\"ha\":886,\"o\":\"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 \"},\"(\":{\"x_min\":0,\"x_max\":318.0625,\"ha\":415,\"o\":\"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 \"},\"U\":{\"x_min\":0,\"x_max\":796,\"ha\":904,\"o\":\"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 \"},\"\\u03B3\":{\"x_min\":0.5,\"x_max\":744.953125,\"ha\":822,\"o\":\"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 \"},\"\\u03B1\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 \"},\"F\":{\"x_min\":0,\"x_max\":683.328125,\"ha\":717,\"o\":\"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 \"},\"\\xad\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\":\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"\\u03A7\":{\"x_min\":0,\"x_max\":854.171875,\"ha\":935,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 \"},\"*\":{\"x_min\":116,\"x_max\":674,\"ha\":792,\"o\":\"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 \"},\"\\u2020\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 \"},\"\\xb0\":{\"x_min\":0,\"x_max\":347,\"ha\":444,\"o\":\"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 \"},\"V\":{\"x_min\":0,\"x_max\":862.71875,\"ha\":940,\"o\":\"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 \"},\"\\u039E\":{\"x_min\":0,\"x_max\":734.71875,\"ha\":763,\"o\":\"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 \"},\"\\xa0\":{\"x_min\":0,\"x_max\":0,\"ha\":853},\"\\u03AB\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 \"},\"\\u201D\":{\"x_min\":0,\"x_max\":347,\"ha\":454,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 \"},\"@\":{\"x_min\":0,\"x_max\":1260,\"ha\":1357,\"o\":\"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 \"},\"\\u038A\":{\"x_min\":0,\"x_max\":499,\"ha\":613,\"o\":\"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 \"},\"i\":{\"x_min\":14,\"x_max\":136,\"ha\":275,\"o\":\"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 \"},\"\\u0392\":{\"x_min\":0,\"x_max\":778,\"ha\":877,\"o\":\"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 \"},\"\\u03C5\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 \"},\"]\":{\"x_min\":0,\"x_max\":275,\"ha\":372,\"o\":\"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 \"},\"m\":{\"x_min\":0,\"x_max\":1019,\"ha\":1128,\"o\":\"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 \"},\"\\u03C7\":{\"x_min\":8.328125,\"x_max\":780.5625,\"ha\":815,\"o\":\"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 \"},\"\\u03AF\":{\"x_min\":42,\"x_max\":326.71875,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 \"},\"\\u0396\":{\"x_min\":0,\"x_max\":779.171875,\"ha\":850,\"o\":\"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 \"},\"R\":{\"x_min\":0,\"x_max\":781.953125,\"ha\":907,\"o\":\"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 \"},\"o\":{\"x_min\":0,\"x_max\":713,\"ha\":821,\"o\":\"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 \"},\"K\":{\"x_min\":0,\"x_max\":819.46875,\"ha\":906,\"o\":\"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\",\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"d\":{\"x_min\":0,\"x_max\":683,\"ha\":796,\"o\":\"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 \"},\"\\xa8\":{\"x_min\":-109,\"x_max\":247,\"ha\":232,\"o\":\"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 \"},\"E\":{\"x_min\":0,\"x_max\":736.109375,\"ha\":789,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"Y\":{\"x_min\":0,\"x_max\":820,\"ha\":886,\"o\":\"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 \"},\"\\\\\"\":{\"x_min\":0,\"x_max\":299,\"ha\":396,\"o\":\"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"\\u2039\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"\\u201E\":{\"x_min\":0,\"x_max\":364,\"ha\":467,\"o\":\"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 \"},\"\\u03B4\":{\"x_min\":1,\"x_max\":710,\"ha\":810,\"o\":\"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 \"},\"\\u03AD\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 \"},\"\\u03C9\":{\"x_min\":0,\"x_max\":922,\"ha\":1031,\"o\":\"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 \"},\"\\xb4\":{\"x_min\":0,\"x_max\":96,\"ha\":251,\"o\":\"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"\\xb1\":{\"x_min\":11,\"x_max\":781,\"ha\":792,\"o\":\"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 \"},\"|\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"\\u03CB\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 \"},\"\\xa7\":{\"x_min\":0,\"x_max\":593,\"ha\":690,\"o\":\"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 \"},\"b\":{\"x_min\":0,\"x_max\":685,\"ha\":783,\"o\":\"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 \"},\"q\":{\"x_min\":0,\"x_max\":683,\"ha\":876,\"o\":\"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 \"},\"\\u03A9\":{\"x_min\":-0.171875,\"x_max\":969.5625,\"ha\":1068,\"o\":\"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 \"},\"\\u03CD\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 \"},\"z\":{\"x_min\":-0.015625,\"x_max\":613.890625,\"ha\":697,\"o\":\"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 \"},\"\\u2122\":{\"x_min\":0,\"x_max\":894,\"ha\":1000,\"o\":\"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 \"},\"\\u03AE\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 \"},\"\\u0398\":{\"x_min\":0,\"x_max\":960,\"ha\":1056,\"o\":\"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 \"},\"\\xae\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 \"},\"~\":{\"x_min\":0,\"x_max\":833,\"ha\":931,\"o\":\"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 \"},\"\\u0395\":{\"x_min\":0,\"x_max\":736.21875,\"ha\":778,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"\\xb3\":{\"x_min\":0,\"x_max\":450,\"ha\":547,\"o\":\"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 \"},\"[\":{\"x_min\":0,\"x_max\":273.609375,\"ha\":371,\"o\":\"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 \"},\"L\":{\"x_min\":0,\"x_max\":645.828125,\"ha\":696,\"o\":\"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 \"},\"\\u03C3\":{\"x_min\":0,\"x_max\":803.390625,\"ha\":894,\"o\":\"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 \"},\"\\u03B6\":{\"x_min\":0,\"x_max\":573,\"ha\":642,\"o\":\"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 \"},\"\\u03B8\":{\"x_min\":0,\"x_max\":674,\"ha\":778,\"o\":\"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 \"},\"\\u039F\":{\"x_min\":0,\"x_max\":958,\"ha\":1054,\"o\":\"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 \"},\"\\u0393\":{\"x_min\":0,\"x_max\":705.28125,\"ha\":749,\"o\":\"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 \"},\" \":{\"x_min\":0,\"x_max\":0,\"ha\":375},\"%\":{\"x_min\":-3,\"x_max\":1089,\"ha\":1186,\"o\":\"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 \"},\"P\":{\"x_min\":0,\"x_max\":726,\"ha\":806,\"o\":\"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 \"},\"\\u0388\":{\"x_min\":0,\"x_max\":1078.21875,\"ha\":1118,\"o\":\"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u038F\":{\"x_min\":0.125,\"x_max\":1136.546875,\"ha\":1235,\"o\":\"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 \"},\"_\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 \"},\"\\u03AA\":{\"x_min\":-110,\"x_max\":246,\"ha\":275,\"o\":\"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 \"},\"+\":{\"x_min\":23,\"x_max\":768,\"ha\":792,\"o\":\"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 \"},\"\\xbd\":{\"x_min\":0,\"x_max\":1050,\"ha\":1149,\"o\":\"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 \"},\"\\u03A1\":{\"x_min\":0,\"x_max\":720,\"ha\":783,\"o\":\"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 \"},\"\\'\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"\\xaa\":{\"x_min\":0,\"x_max\":350,\"ha\":397,\"o\":\"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 \"},\"\\u0385\":{\"x_min\":0,\"x_max\":450,\"ha\":553,\"o\":\"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 \"},\"T\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 \"},\"\\u03A6\":{\"x_min\":0,\"x_max\":915,\"ha\":997,\"o\":\"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 \"},\"\\u204B\":{\"x_min\":0,\"x_max\":0,\"ha\":694},\"j\":{\"x_min\":-77.78125,\"x_max\":167,\"ha\":349,\"o\":\"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 \"},\"\\u03A3\":{\"x_min\":0,\"x_max\":756.953125,\"ha\":819,\"o\":\"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 \"},\"\\u203A\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"<\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"\\xa3\":{\"x_min\":0,\"x_max\":704.484375,\"ha\":801,\"o\":\"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 \"},\"t\":{\"x_min\":0,\"x_max\":367,\"ha\":458,\"o\":\"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 \"},\"\\xac\":{\"x_min\":0,\"x_max\":706,\"ha\":803,\"o\":\"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 \"},\"\\u03BB\":{\"x_min\":0,\"x_max\":750,\"ha\":803,\"o\":\"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 \"},\"W\":{\"x_min\":0,\"x_max\":1263.890625,\"ha\":1351,\"o\":\"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 \"},\">\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"v\":{\"x_min\":0,\"x_max\":675.15625,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 \"},\"\\u03C4\":{\"x_min\":0.28125,\"x_max\":644.5,\"ha\":703,\"o\":\"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 \"},\"\\u03BE\":{\"x_min\":0,\"x_max\":624.9375,\"ha\":699,\"o\":\"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 \"},\"&\":{\"x_min\":-3,\"x_max\":894.25,\"ha\":992,\"o\":\"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 \"},\"\\u039B\":{\"x_min\":0,\"x_max\":862.5,\"ha\":942,\"o\":\"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 \"},\"I\":{\"x_min\":41,\"x_max\":180,\"ha\":293,\"o\":\"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 \"},\"G\":{\"x_min\":0,\"x_max\":921,\"ha\":1011,\"o\":\"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 \"},\"\\u03B0\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 \"},\"`\":{\"x_min\":0,\"x_max\":138.890625,\"ha\":236,\"o\":\"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 \"},\"\\xb7\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"\\u03A5\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 \"},\"r\":{\"x_min\":0,\"x_max\":355.5625,\"ha\":432,\"o\":\"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 \"},\"x\":{\"x_min\":0,\"x_max\":675,\"ha\":764,\"o\":\"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 \"},\"\\u03BC\":{\"x_min\":0,\"x_max\":696.609375,\"ha\":747,\"o\":\"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 \"},\"h\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 \"},\".\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"\\u03C6\":{\"x_min\":-2,\"x_max\":878,\"ha\":974,\"o\":\"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 \"},\";\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"f\":{\"x_min\":0,\"x_max\":378,\"ha\":472,\"o\":\"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 \"},\"\\u201C\":{\"x_min\":1,\"x_max\":348.21875,\"ha\":454,\"o\":\"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 \"},\"A\":{\"x_min\":0.03125,\"x_max\":906.953125,\"ha\":1008,\"o\":\"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 \"},\"\\u2018\":{\"x_min\":1,\"x_max\":139.890625,\"ha\":236,\"o\":\"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 \"},\"\\u03CA\":{\"x_min\":-70,\"x_max\":283,\"ha\":361,\"o\":\"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 \"},\"\\u03C0\":{\"x_min\":-0.21875,\"x_max\":773.21875,\"ha\":857,\"o\":\"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 \"},\"\\u03AC\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 \"},\"O\":{\"x_min\":0,\"x_max\":958,\"ha\":1057,\"o\":\"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 \"},\"n\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 \"},\"l\":{\"x_min\":41,\"x_max\":166,\"ha\":279,\"o\":\"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 \"},\"\\xa4\":{\"x_min\":40.09375,\"x_max\":728.796875,\"ha\":825,\"o\":\"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 \"},\"\\u03BA\":{\"x_min\":0,\"x_max\":632.328125,\"ha\":679,\"o\":\"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 \"},\"p\":{\"x_min\":0,\"x_max\":685,\"ha\":786,\"o\":\"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 \"},\"\\u2021\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 \"},\"\\u03C8\":{\"x_min\":0,\"x_max\":808,\"ha\":907,\"o\":\"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 \"},\"\\u03B7\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 \"}},\"cssFontWeight\":\"normal\",\"ascender\":1189,\"underlinePosition\":-100,\"cssFontStyle\":\"normal\",\"boundingBox\":{\"yMin\":-334,\"xMin\":-111,\"yMax\":1189,\"xMax\":1672},\"resolution\":1000,\"original_font_information\":{\"postscript_name\":\"Helvetiker-Regular\",\"version_string\":\"Version 1.00 2004 initial release\",\"vendor_url\":\"http://www.magenta.gr/\",\"full_font_name\":\"Helvetiker\",\"font_family_name\":\"Helvetiker\",\"copyright\":\"Copyright (c) \\u039Cagenta ltd, 2004\",\"description\":\"\",\"trademark\":\"\",\"designer\":\"\",\"designer_url\":\"\",\"unique_font_identifier\":\"\\u039Cagenta ltd:Helvetiker:22-10-104\",\"license_url\":\"http://www.ellak.gr/fonts/MgOpen/license.html\",\"license_description\":\"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\\\\r\\\\n\\\\r\\\\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\\\\\"Fonts\\\\\") and associated documentation files (the \\\\\"Font Software\\\\\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \\\\r\\\\n\\\\r\\\\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\\\\r\\\\n\\\\r\\\\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \\\\\"MgOpen\\\\\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\\\\r\\\\n\\\\r\\\\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \\\\\"MgOpen\\\\\" name.\\\\r\\\\n\\\\r\\\\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \\\\r\\\\n\\\\r\\\\nTHE FONT SOFTWARE IS PROVIDED \\\\\"AS IS\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.\",\"manufacturer_name\":\"\\u039Cagenta ltd\",\"font_sub_family_name\":\"Regular\"},\"descender\":-334,\"familyName\":\"Helvetiker\",\"lineHeight\":1522,\"underlineThickness\":50}');\n\n});\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nvar $44f51f21f2de7984$exports = {};\n\"use strict\";\nObject.defineProperty($44f51f21f2de7984$exports, \"__esModule\", {\n value: true\n});\n$44f51f21f2de7984$exports.getRandomPoints = $44f51f21f2de7984$exports.Greek = $44f51f21f2de7984$exports.Label = $44f51f21f2de7984$exports.VectorPlot = $44f51f21f2de7984$exports.ScatterPlot = $44f51f21f2de7984$exports.Frame = void 0;\nvar $534535ea6fa02995$exports = {};\n\"use strict\";\nObject.defineProperty($534535ea6fa02995$exports, \"__esModule\", {\n value: true\n});\n$534535ea6fa02995$exports.Frame = void 0;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\nvar $5Rd1x = parcelRequire(\"5Rd1x\");\nvar $95aa5a476424c24a$exports = {};\n\"use strict\";\nObject.defineProperty($95aa5a476424c24a$exports, \"__esModule\", {\n value: true\n});\n$95aa5a476424c24a$exports.Axes = $95aa5a476424c24a$exports.PlaneAxes = $95aa5a476424c24a$exports.UnitVector = void 0;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n$95aa5a476424c24a$exports.UnitVector = {\n i: new $ilwiq.Vector3(1, 0, 0),\n j: new $ilwiq.Vector3(0, 1, 0),\n k: new $ilwiq.Vector3(0, 0, 1)\n};\n$95aa5a476424c24a$exports.PlaneAxes = {\n xy: {\n normal: $95aa5a476424c24a$exports.UnitVector.k,\n unit: {\n x: $95aa5a476424c24a$exports.UnitVector.i,\n y: $95aa5a476424c24a$exports.UnitVector.j\n }\n },\n xz: {\n normal: $95aa5a476424c24a$exports.UnitVector.j,\n unit: {\n x: $95aa5a476424c24a$exports.UnitVector.i,\n z: $95aa5a476424c24a$exports.UnitVector.k\n }\n },\n yz: {\n normal: $95aa5a476424c24a$exports.UnitVector.i,\n unit: {\n y: $95aa5a476424c24a$exports.UnitVector.j,\n z: $95aa5a476424c24a$exports.UnitVector.k\n }\n }\n};\nclass $95aa5a476424c24a$var$Axis extends $ilwiq.ArrowHelper {\n constructor(direction, length){\n super(direction, new $ilwiq.Vector3(0, 0, 0), length);\n }\n}\nclass $95aa5a476424c24a$var$Axes {\n constructor(lengthX, lengthY, lengthZ){\n this.lengthX = lengthX;\n this.lengthY = lengthY;\n this.lengthZ = lengthZ;\n this.x = new $95aa5a476424c24a$var$Axis(new $ilwiq.Vector3(1, 0, 0), this.lengthX * 1.1);\n this.y = new $95aa5a476424c24a$var$Axis(new $ilwiq.Vector3(0, 1, 0), this.lengthY * 1.1);\n this.z = new $95aa5a476424c24a$var$Axis(new $ilwiq.Vector3(0, 0, 1), this.lengthZ * 1.1);\n this.setGrids();\n }\n setGrids() {\n this.gridXZ = new $ilwiq.GridHelper(Math.max(this.lengthX, this.lengthZ));\n this.gridXZ.position.setX(this.lengthX / 2);\n this.gridXZ.position.setZ(this.lengthZ / 2);\n this.gridXY = new $ilwiq.GridHelper(Math.max(this.lengthX, this.lengthY));\n this.gridXY.position.setX(this.lengthX / 2);\n this.gridXY.position.setY(this.lengthY / 2);\n this.gridXY.rotateOnAxis(new $ilwiq.Vector3(1, 0, 0), Math.PI / 2);\n this.gridYZ = new $ilwiq.GridHelper(Math.max(this.lengthY, this.lengthZ));\n this.gridYZ.position.setY(this.lengthY / 2);\n this.gridYZ.position.setZ(this.lengthZ / 2);\n this.gridYZ.rotateOnAxis(new $ilwiq.Vector3(0, 0, 1), Math.PI / 2);\n }\n}\n$95aa5a476424c24a$exports.Axes = $95aa5a476424c24a$var$Axes;\n\n\nclass $534535ea6fa02995$var$Frame extends $ilwiq.Scene {\n // TODO: at the moment only one size bc grid can only be squared\n // look into this for solution https://discourse.threejs.org/t/rectangular-gridhelper-possibility/37812\n constructor(canvas, size = 10){\n super();\n this.canvas = canvas;\n this.size = size;\n this.observer = new ResizeObserver(()=>this.update());\n this.scene = new $ilwiq.Scene();\n this.scene.background = new $ilwiq.Color(0xffffff);\n const { clientWidth: clientWidth, clientHeight: clientHeight } = canvas;\n this.renderer = new $ilwiq.WebGLRenderer({\n canvas: canvas\n });\n this.renderer.setSize(clientWidth, clientHeight);\n this.setCamera(clientWidth, clientHeight);\n this.setControls();\n this.setAxes();\n this.updateOnChanges();\n this.update();\n }\n setCamera(width, height) {\n this.camera = new $ilwiq.PerspectiveCamera(45, width / height, 0.1, 1000);\n this.camera.position.set(this.size * 2, this.size * 2, this.size * 2);\n this.scene.add(this.camera);\n }\n setControls() {\n this.controls = new $5Rd1x.OrbitControls(this.camera, this.canvas);\n this.controls.target.set(0, 0, 0);\n }\n setAxes() {\n this.axes = new $95aa5a476424c24a$exports.Axes(this.size, this.size, this.size);\n this.scene.add(this.axes.x);\n this.scene.add(this.axes.y);\n this.scene.add(this.axes.z);\n this.scene.add(this.axes.gridXY);\n this.scene.add(this.axes.gridXZ);\n this.scene.add(this.axes.gridYZ);\n }\n updateOnChanges() {\n this.controls.addEventListener(\"change\", ()=>this.update());\n this.observer.observe(this.canvas);\n }\n update() {\n this.renderer.render(this.scene, this.camera);\n }\n capture() {\n const base64 = this.canvas.toDataURL(\"img/png\");\n }\n addPlot(plot) {\n this.scene.add(...plot.getFrameable());\n this.update();\n }\n async addFallbackLabel(text) {\n this.scene.add(...text.getFrameable());\n this.update();\n }\n async addLabel(text) {\n this.scene.add(...text.getFrameable());\n text.text.addEventListener(\"synccomplete\", ()=>{\n this.update();\n });\n }\n}\n$534535ea6fa02995$exports.Frame = $534535ea6fa02995$var$Frame;\n\n\nObject.defineProperty($44f51f21f2de7984$exports, \"Frame\", {\n enumerable: true,\n get: function() {\n return $534535ea6fa02995$exports.Frame;\n }\n});\nvar $7ca493bb23e24892$exports = {};\n\"use strict\";\nObject.defineProperty($7ca493bb23e24892$exports, \"__esModule\", {\n value: true\n});\n$7ca493bb23e24892$exports.ScatterPlot = void 0;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nvar $046ae06aacf9449d$exports = {};\n\"use strict\";\nObject.defineProperty($046ae06aacf9449d$exports, \"__esModule\", {\n value: true\n});\n$046ae06aacf9449d$exports.Plot = void 0;\nclass $046ae06aacf9449d$var$Plot {\n}\n$046ae06aacf9449d$exports.Plot = $046ae06aacf9449d$var$Plot;\n\n\nclass $7ca493bb23e24892$var$ScatterPlot extends $046ae06aacf9449d$exports.Plot {\n constructor(points, pointRadius = 0.2){\n super();\n this.points = points.map((v)=>{\n const geometry = new $ilwiq.SphereGeometry(pointRadius);\n const material = new $ilwiq.MeshBasicMaterial({\n color: 0x00ff00\n });\n const obj = new $ilwiq.Mesh(geometry, material);\n obj.position.set(v.x, v.y, v.z);\n return obj;\n });\n }\n getFrameable() {\n return this.points;\n }\n}\n$7ca493bb23e24892$exports.ScatterPlot = $7ca493bb23e24892$var$ScatterPlot;\n\n\nObject.defineProperty($44f51f21f2de7984$exports, \"ScatterPlot\", {\n enumerable: true,\n get: function() {\n return $7ca493bb23e24892$exports.ScatterPlot;\n }\n});\nvar $4240c9e1ae051d71$exports = {};\n\"use strict\";\nObject.defineProperty($4240c9e1ae051d71$exports, \"__esModule\", {\n value: true\n});\n$4240c9e1ae051d71$exports.VectorPlot = void 0;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\n\nvar $65606e7fd6491b22$exports = {};\n\"use strict\";\nObject.defineProperty($65606e7fd6491b22$exports, \"__esModule\", {\n value: true\n});\n$65606e7fd6491b22$exports.VectorPlotPlaneConfigParams = $65606e7fd6491b22$exports.VectorPlotConfigurationParams = void 0;\nclass $65606e7fd6491b22$var$VectorPlotConfigurationParams {\n constructor(config){\n const { angle: angle, color: color, xy: xy, xz: xz, yz: yz } = config;\n this.setColorOrDefault(color);\n if (angle) this.setAngle(angle);\n if (xy) this.xy = new $65606e7fd6491b22$var$VectorPlotPlaneConfigParams(xy);\n if (xz) this.xz = new $65606e7fd6491b22$var$VectorPlotPlaneConfigParams(xz);\n if (yz) this.xz = new $65606e7fd6491b22$var$VectorPlotPlaneConfigParams(yz);\n }\n setColorOrDefault(colorHex) {\n colorHex = colorHex || 0x000000;\n this.color = colorHex;\n }\n setAngle(angle) {\n this.angle = angle === true ? {\n color: 0x000000\n } : angle;\n }\n}\n$65606e7fd6491b22$exports.VectorPlotConfigurationParams = $65606e7fd6491b22$var$VectorPlotConfigurationParams;\nclass $65606e7fd6491b22$var$VectorPlotPlaneConfigParams {\n constructor(plane){\n plane = plane === true ? {\n projection: true,\n component: true,\n projectionAngle: true\n } : plane;\n const { component: component, projection: projection, projectionAngle: projectionAngle } = plane;\n if (projection) this.setProjection(projection);\n if (component) this.setComponent(component);\n if (projectionAngle) this.setProjectionAngle(projectionAngle);\n }\n setProjection(projection) {\n this.projection = projection === true ? $65606e7fd6491b22$var$defaultDashedLine : projection;\n }\n setComponent(component) {\n this.component = component === true ? $65606e7fd6491b22$var$defaultDashedLine : component;\n }\n setProjectionAngle(projectionAngle) {\n this.projectionAngle = projectionAngle === true ? $65606e7fd6491b22$var$defaultDashedLine : projectionAngle;\n }\n}\n$65606e7fd6491b22$exports.VectorPlotPlaneConfigParams = $65606e7fd6491b22$var$VectorPlotPlaneConfigParams;\nconst $65606e7fd6491b22$var$defaultDashedLine = {\n linetype: \"dashed\",\n linestyle: {\n color: 0x000000,\n linewidth: 1,\n scale: 1,\n dashSize: 0.25,\n gapSize: 0.1\n }\n};\n\n\nclass $4240c9e1ae051d71$var$VectorPlot extends $046ae06aacf9449d$exports.Plot {\n constructor(origin, target, config){\n super();\n this.origin = origin;\n this.target = target;\n this.config = new $65606e7fd6491b22$exports.VectorPlotConfigurationParams(config);\n this.drawables = [];\n this.drawables.push(this.createVector(origin, target));\n for(const p in $95aa5a476424c24a$exports.PlaneAxes){\n const plane = p;\n const conf = this.config[plane];\n if (conf === null || conf === void 0 ? void 0 : conf.projection) this.drawables.push(this.createProjection(plane));\n if (conf === null || conf === void 0 ? void 0 : conf.component) this.drawables.push(this.createComponent(plane));\n if (conf === null || conf === void 0 ? void 0 : conf.projectionAngle) this.drawables.push(this.createAngleToProjection(plane));\n }\n if (this.config.angle) this.drawables.push(this.createAngleToTarget(\"y\"));\n }\n createVector(origin, target) {\n const length = Math.abs(origin.distanceTo(target));\n return new $ilwiq.ArrowHelper(target.clone().normalize(), origin, length, this.config.color, length * 0.2, length * 0.1);\n }\n createAngleToProjection(planeIdx) {\n const plane = $95aa5a476424c24a$exports.PlaneAxes[planeIdx];\n const planeNormal = plane.normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const radius = projectedVector.distanceTo(this.origin) * 0.5;\n let initialRotation = 0;\n let angleToProjection = projectedVector.angleTo($95aa5a476424c24a$exports.UnitVector.i);\n if (planeIdx === \"xz\") {\n initialRotation = -Math.PI / 2;\n angleToProjection = projectedVector.angleTo($95aa5a476424c24a$exports.UnitVector.k);\n }\n if (planeIdx === \"yz\") {\n initialRotation = Math.PI / 2;\n angleToProjection = projectedVector.angleTo($95aa5a476424c24a$exports.UnitVector.j);\n }\n const curve = new $ilwiq.EllipseCurve(this.origin.x, this.origin.y, radius, radius, 0, angleToProjection, false, initialRotation);\n const material = new $ilwiq.LineBasicMaterial({\n color: 0x000000\n });\n const geometry = new $ilwiq.BufferGeometry().setFromPoints(curve.getPoints(50));\n const rotation = new $ilwiq.Quaternion().setFromUnitVectors($95aa5a476424c24a$exports.UnitVector.k, plane.normal);\n geometry.applyQuaternion(rotation);\n return new $ilwiq.Line(geometry, material);\n }\n createAngleToTarget(axis) {\n const radius = this.target.clone().distanceTo(this.origin);\n const projectedVector = this.target.clone().projectOnPlane($95aa5a476424c24a$exports.UnitVector.j);\n const curve = new $ilwiq.EllipseCurve(this.origin.x, this.origin.y, radius, radius, 0, this.target.angleTo(projectedVector), false, 0);\n const material = new $ilwiq.LineBasicMaterial(this.config.angle);\n const geometry = new $ilwiq.BufferGeometry().setFromPoints(curve.getPoints(50));\n geometry.applyQuaternion(new $ilwiq.Quaternion().setFromAxisAngle($95aa5a476424c24a$exports.UnitVector.j, -$95aa5a476424c24a$exports.UnitVector.i.angleTo(projectedVector)));\n return new $ilwiq.Line(geometry, material);\n }\n createProjection(plane) {\n const { linetype: linetype, linestyle: linestyle } = this.config[plane].projection;\n const lineMaterialType = linetype === \"dashed\" ? $ilwiq.LineDashedMaterial : $ilwiq.LineBasicMaterial;\n const lineMaterial = new lineMaterialType(linestyle);\n const planeNormal = $95aa5a476424c24a$exports.PlaneAxes[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const projectionGeometry = new $ilwiq.BufferGeometry().setFromPoints([\n projectedVector,\n this.origin\n ]);\n return new $ilwiq.Line(projectionGeometry, lineMaterial).computeLineDistances();\n }\n createComponent(plane) {\n const { linetype: linetype, linestyle: linestyle } = this.config[plane].component;\n const lineMaterialType = linetype === \"dashed\" ? $ilwiq.LineDashedMaterial : $ilwiq.LineBasicMaterial;\n const lineMaterial = new lineMaterialType(linestyle);\n const planeNormal = $95aa5a476424c24a$exports.PlaneAxes[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const connectionGeometry = new $ilwiq.BufferGeometry().setFromPoints([\n projectedVector,\n this.target\n ]);\n return new $ilwiq.Line(connectionGeometry, lineMaterial).computeLineDistances();\n }\n getFrameable() {\n return this.drawables;\n }\n}\n$4240c9e1ae051d71$exports.VectorPlot = $4240c9e1ae051d71$var$VectorPlot;\n\n\nObject.defineProperty($44f51f21f2de7984$exports, \"VectorPlot\", {\n enumerable: true,\n get: function() {\n return $4240c9e1ae051d71$exports.VectorPlot;\n }\n});\nvar $ced6b895e1dcd19b$exports = {};\n\"use strict\";\nvar $ced6b895e1dcd19b$var$__importDefault = $ced6b895e1dcd19b$exports && $ced6b895e1dcd19b$exports.__importDefault || function(mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty($ced6b895e1dcd19b$exports, \"__esModule\", {\n value: true\n});\n$ced6b895e1dcd19b$exports.FallbackLabel = $ced6b895e1dcd19b$exports.Label = void 0;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\nvar $gbdyO = parcelRequire(\"gbdyO\");\n\nvar $eT66s = parcelRequire(\"eT66s\");\n\nvar $8NFZ6 = parcelRequire(\"8NFZ6\");\n\nconst $ced6b895e1dcd19b$var$helvetiker_regular_typeface_json_1 = $ced6b895e1dcd19b$var$__importDefault((parcelRequire(\"bYSYW\")));\nclass $ced6b895e1dcd19b$var$Label {\n constructor(position, text, size = 0.2, color = 0x000000){\n this.text = new $gbdyO.Text();\n this.text.text = text;\n this.text.position.x = position.x;\n this.text.position.y = position.y;\n this.text.position.z = position.z;\n this.text.anchorX = \"center\";\n this.text.anchorY = \"middle\";\n this.text.fontSize = size;\n this.text.color = color;\n }\n getFrameable() {\n this.text.sync();\n return [\n this.text\n ];\n }\n}\n$ced6b895e1dcd19b$exports.Label = $ced6b895e1dcd19b$var$Label;\nclass $ced6b895e1dcd19b$var$FallbackLabel {\n constructor(position, text, size = 1, color = 0x000000){\n this.position = position;\n this.text = text;\n this.size = size;\n this.color = color;\n const geometry = new $8NFZ6.TextGeometry(this.text, {\n font: new $eT66s.Font($ced6b895e1dcd19b$var$helvetiker_regular_typeface_json_1.default),\n size: this.size,\n height: 0.01,\n curveSegments: 25,\n bevelEnabled: false\n });\n const material = new $ilwiq.MeshBasicMaterial({\n color: this.color\n });\n this.drawable = new $ilwiq.Mesh(geometry, material);\n this.drawable.position.set(...this.position.toArray());\n }\n getFrameable() {\n return [\n this.drawable\n ];\n }\n}\n$ced6b895e1dcd19b$exports.FallbackLabel = $ced6b895e1dcd19b$var$FallbackLabel;\n\n\nObject.defineProperty($44f51f21f2de7984$exports, \"Label\", {\n enumerable: true,\n get: function() {\n return $ced6b895e1dcd19b$exports.Label;\n }\n});\nvar $fccd514c3b000f9a$exports = {};\n\"use strict\";\nObject.defineProperty($fccd514c3b000f9a$exports, \"__esModule\", {\n value: true\n});\n$fccd514c3b000f9a$exports.Greek = void 0;\nclass $fccd514c3b000f9a$var$Greek {\n}\n$fccd514c3b000f9a$exports.Greek = $fccd514c3b000f9a$var$Greek;\n$fccd514c3b000f9a$var$Greek.uppercaseHeta = \"\\u0370\";\n$fccd514c3b000f9a$var$Greek.lowercaseHeta = \"\\u0371\";\n$fccd514c3b000f9a$var$Greek.uppercaseArchaicSampi = \"\\u0372\";\n$fccd514c3b000f9a$var$Greek.lowercaseArchaicSampi = \"\\u0373\";\n$fccd514c3b000f9a$var$Greek.numeralSign = \"\\u0374\";\n$fccd514c3b000f9a$var$Greek.lowerNumeralSign = \"\\u0375\";\n$fccd514c3b000f9a$var$Greek.uppercasePamphylianDigamma = \"\\u0376\";\n$fccd514c3b000f9a$var$Greek.lowercasePamphylianDigamma = \"\\u0377\";\n$fccd514c3b000f9a$var$Greek.ypogegrammeni = \"\\u037A\";\n$fccd514c3b000f9a$var$Greek.smallReversedLunateSigmaSymbol = \"\\u037B\";\n$fccd514c3b000f9a$var$Greek.smallDottedLunateSigmaSymbol = \"\\u037C\";\n$fccd514c3b000f9a$var$Greek.smallReversedDottedLunateSigmaSymbol = \"\\u037D\";\n$fccd514c3b000f9a$var$Greek.questionMark = \"\\u037E\";\n$fccd514c3b000f9a$var$Greek.uppercaseYot = \"\\u037F\";\n$fccd514c3b000f9a$var$Greek.acuteaccent = \"\\u0384\";\n$fccd514c3b000f9a$var$Greek.diaeresiswithacuteaccent = \"\\u0385\";\n$fccd514c3b000f9a$var$Greek.uppercaseAwithacuteaccent = \"\\u0386\";\n$fccd514c3b000f9a$var$Greek.anoTeleia = \"\\u0387\";\n$fccd514c3b000f9a$var$Greek.uppercaseEpsilonwithacuteaccent = \"\\u0388\";\n$fccd514c3b000f9a$var$Greek.uppercaseEtawithacuteaccent = \"\\u0389\";\n$fccd514c3b000f9a$var$Greek.uppercaseIotawithacuteaccent = \"\\u038A\";\n$fccd514c3b000f9a$var$Greek.uppercaseOmicronwithacuteaccent = \"\\u038C\";\n$fccd514c3b000f9a$var$Greek.uppercaseUpsilonwithacuteaccent = \"\\u038E\";\n$fccd514c3b000f9a$var$Greek.uppercaseOmegawithacuteaccent = \"\\u038F\";\n$fccd514c3b000f9a$var$Greek.lowercaseIotawithdiaeresisandacuteaccent = \"\\u0390\";\n$fccd514c3b000f9a$var$Greek.uppercaseAlpha = \"\\u0391\";\n$fccd514c3b000f9a$var$Greek.uppercaseBeta = \"\\u0392\";\n$fccd514c3b000f9a$var$Greek.uppercaseGamma = \"\\u0393\";\n$fccd514c3b000f9a$var$Greek.uppercaseDelta = \"\\u0394\";\n$fccd514c3b000f9a$var$Greek.uppercaseEpsilon = \"\\u0395\";\n$fccd514c3b000f9a$var$Greek.uppercaseZeta = \"\\u0396\";\n$fccd514c3b000f9a$var$Greek.uppercaseEta = \"\\u0397\";\n$fccd514c3b000f9a$var$Greek.uppercaseTheta = \"\\u0398\";\n$fccd514c3b000f9a$var$Greek.uppercaseIota = \"\\u0399\";\n$fccd514c3b000f9a$var$Greek.uppercaseKappa = \"\\u039A\";\n$fccd514c3b000f9a$var$Greek.uppercaseLambda = \"\\u039B\";\n$fccd514c3b000f9a$var$Greek.uppercaseMu = \"\\u039C\";\n$fccd514c3b000f9a$var$Greek.uppercaseNu = \"\\u039D\";\n$fccd514c3b000f9a$var$Greek.uppercaseXi = \"\\u039E\";\n$fccd514c3b000f9a$var$Greek.uppercaseOmicron = \"\\u039F\";\n$fccd514c3b000f9a$var$Greek.uppercasePi = \"\\u03A0\";\n$fccd514c3b000f9a$var$Greek.uppercaseRho = \"\\u03A1\";\n$fccd514c3b000f9a$var$Greek.uppercaseSigma = \"\\u03A3\";\n$fccd514c3b000f9a$var$Greek.uppercaseTau = \"\\u03A4\";\n$fccd514c3b000f9a$var$Greek.uppercaseUpsilon = \"\\u03A5\";\n$fccd514c3b000f9a$var$Greek.uppercasePhi = \"\\u03A6\";\n$fccd514c3b000f9a$var$Greek.uppercaseChi = \"\\u03A7\";\n$fccd514c3b000f9a$var$Greek.uppercasePsi = \"\\u03A8\";\n$fccd514c3b000f9a$var$Greek.uppercaseOmega = \"\\u03A9\";\n$fccd514c3b000f9a$var$Greek.uppercaseIotawithdiaeresis = \"\\u03AA\";\n$fccd514c3b000f9a$var$Greek.uppercaseUpsilonwithdiaeresis = \"\\u03AB\";\n$fccd514c3b000f9a$var$Greek.lowercaseAlphawithacuteaccent = \"\\u03AC\";\n$fccd514c3b000f9a$var$Greek.lowercaseEpsilonwithacuteaccent = \"\\u03AD\";\n$fccd514c3b000f9a$var$Greek.lowercaseEtawithacuteaccent = \"\\u03AE\";\n$fccd514c3b000f9a$var$Greek.lowercaseIotawithacuteaccent = \"\\u03AF\";\n$fccd514c3b000f9a$var$Greek.lowercaseUpsilonwithdiaeresisandacuteaccent = \"\\u03B0\";\n$fccd514c3b000f9a$var$Greek.lowercaseAlpha = \"\\u03B1\";\n$fccd514c3b000f9a$var$Greek.lowercaseBeta = \"\\u03B2\";\n$fccd514c3b000f9a$var$Greek.lowercaseGamma = \"\\u03B3\";\n$fccd514c3b000f9a$var$Greek.lowercaseDelta = \"\\u03B4\";\n$fccd514c3b000f9a$var$Greek.lowercaseEpsilon = \"\\u03B5\";\n$fccd514c3b000f9a$var$Greek.lowercaseZeta = \"\\u03B6\";\n$fccd514c3b000f9a$var$Greek.lowercaseEta = \"\\u03B7\";\n$fccd514c3b000f9a$var$Greek.lowercaseTheta = \"\\u03B8\";\n$fccd514c3b000f9a$var$Greek.lowercaseIota = \"\\u03B9\";\n$fccd514c3b000f9a$var$Greek.lowercaseKappa = \"\\u03BA\";\n$fccd514c3b000f9a$var$Greek.lowercaseLambda = \"\\u03BB\";\n$fccd514c3b000f9a$var$Greek.lowercaseMu = \"\\u03BC\";\n$fccd514c3b000f9a$var$Greek.lowercaseNu = \"\\u03BD\";\n$fccd514c3b000f9a$var$Greek.lowercaseXi = \"\\u03BE\";\n$fccd514c3b000f9a$var$Greek.lowercaseOmicron = \"\\u03BF\";\n$fccd514c3b000f9a$var$Greek.lowercasePi = \"\\u03C0\";\n$fccd514c3b000f9a$var$Greek.lowercaseRho = \"\\u03C1\";\n$fccd514c3b000f9a$var$Greek.lowercaseFinalSigma = \"\\u03C2\";\n$fccd514c3b000f9a$var$Greek.lowercaseSigma = \"\\u03C3\";\n$fccd514c3b000f9a$var$Greek.lowercaseTau = \"\\u03C4\";\n$fccd514c3b000f9a$var$Greek.lowercaseUpsilon = \"\\u03C5\";\n$fccd514c3b000f9a$var$Greek.lowercasePhi = \"\\u03C6\";\n$fccd514c3b000f9a$var$Greek.lowercaseChi = \"\\u03C7\";\n$fccd514c3b000f9a$var$Greek.lowercasePsi = \"\\u03C8\";\n$fccd514c3b000f9a$var$Greek.lowercaseOmega = \"\\u03C9\";\n$fccd514c3b000f9a$var$Greek.lowercaseIotawithdiaeresis = \"\\u03CA\";\n$fccd514c3b000f9a$var$Greek.lowercaseUpsilonwithdiaeresis = \"\\u03CB\";\n$fccd514c3b000f9a$var$Greek.lowercaseOmicronwithacuteaccent = \"\\u03CC\";\n$fccd514c3b000f9a$var$Greek.lowercaseUpsilonwithacuteaccent = \"\\u03CD\";\n$fccd514c3b000f9a$var$Greek.lowercaseOmegawithacuteaccent = \"\\u03CE\";\n$fccd514c3b000f9a$var$Greek.uppercaseKaiSymbol = \"\\u03CF\";\n$fccd514c3b000f9a$var$Greek.betaSymbol = \"\\u03D0\";\n$fccd514c3b000f9a$var$Greek.thetaSymbol = \"\\u03D1\";\n$fccd514c3b000f9a$var$Greek.upsilonwithhookSymbol = \"\\u03D2\";\n$fccd514c3b000f9a$var$Greek.upsilonwithacuteandhookSymbol = \"\\u03D3\";\n$fccd514c3b000f9a$var$Greek.upsilonwithdiaeresisandhookSymbol = \"\\u03D4\";\n$fccd514c3b000f9a$var$Greek.phiSymbol = \"\\u03D5\";\n$fccd514c3b000f9a$var$Greek.piSymbol = \"\\u03D6\";\n$fccd514c3b000f9a$var$Greek.kaiSymbol = \"\\u03D7\";\n$fccd514c3b000f9a$var$Greek.letterQoppa = \"\\u03D8\";\n$fccd514c3b000f9a$var$Greek.lowercaseQoppa = \"\\u03D9\";\n$fccd514c3b000f9a$var$Greek.letterStigma = \"\\u03DA\";\n$fccd514c3b000f9a$var$Greek.lowercaseStigma = \"\\u03DB\";\n$fccd514c3b000f9a$var$Greek.letterDigamma = \"\\u03DC\";\n$fccd514c3b000f9a$var$Greek.lowercaseDigamma = \"\\u03DD\";\n$fccd514c3b000f9a$var$Greek.letterKoppa = \"\\u03DE\";\n$fccd514c3b000f9a$var$Greek.lowercaseKoppa = \"\\u03DF\";\n$fccd514c3b000f9a$var$Greek.letterSampi = \"\\u03E0\";\n$fccd514c3b000f9a$var$Greek.lowercaseSampi = \"\\u03E1\";\n$fccd514c3b000f9a$var$Greek.copticuppercaseShei = \"\\u03E2\";\n$fccd514c3b000f9a$var$Greek.copticlowercaseShei = \"\\u03E3\";\n$fccd514c3b000f9a$var$Greek.copticuppercaseFei = \"\\u03E4\";\n$fccd514c3b000f9a$var$Greek.copticlowercaseFei = \"\\u03E5\";\n$fccd514c3b000f9a$var$Greek.copticuppercaseKhei = \"\\u03E6\";\n$fccd514c3b000f9a$var$Greek.copticlowercaseKhei = \"\\u03E7\";\n$fccd514c3b000f9a$var$Greek.copticuppercaseHori = \"\\u03E8\";\n$fccd514c3b000f9a$var$Greek.copticlowercaseHori = \"\\u03E9\";\n$fccd514c3b000f9a$var$Greek.copticuppercaseGangia = \"\\u03EA\";\n$fccd514c3b000f9a$var$Greek.copticlowercaseGangia = \"\\u03EB\";\n$fccd514c3b000f9a$var$Greek.copticuppercaseShima = \"\\u03EC\";\n$fccd514c3b000f9a$var$Greek.copticlowercaseShima = \"\\u03ED\";\n$fccd514c3b000f9a$var$Greek.copticuppercaseDei = \"\\u03EE\";\n$fccd514c3b000f9a$var$Greek.copticlowercaseDei = \"\\u03EF\";\n$fccd514c3b000f9a$var$Greek.kappaSymbol = \"\\u03F0\";\n$fccd514c3b000f9a$var$Greek.rhoSymbol = \"\\u03F1\";\n$fccd514c3b000f9a$var$Greek.lunateSigmaSymbol = \"\\u03F2\";\n$fccd514c3b000f9a$var$Greek.letterYot = \"\\u03F3\";\n$fccd514c3b000f9a$var$Greek.uppercaseThetaSymbol = \"\\u03F4\";\n$fccd514c3b000f9a$var$Greek.lunateEpsilonSymbol = \"\\u03F5\";\n$fccd514c3b000f9a$var$Greek.reversedLunateEpsilonSymbol = \"\\u03F6\";\n$fccd514c3b000f9a$var$Greek.uppercaseSho = \"\\u03F7\";\n$fccd514c3b000f9a$var$Greek.lowercaseSho = \"\\u03F8\";\n$fccd514c3b000f9a$var$Greek.uppercaseLunateSigmaSymbol = \"\\u03F9\";\n$fccd514c3b000f9a$var$Greek.uppercaseSan = \"\\u03FA\";\n$fccd514c3b000f9a$var$Greek.lowercaseSan = \"\\u03FB\";\n$fccd514c3b000f9a$var$Greek.rhowithstrokeSymbol = \"\\u03FC\";\n$fccd514c3b000f9a$var$Greek.uppercaseReversedLunateSigmaSymbol = \"\\u03FD\";\n$fccd514c3b000f9a$var$Greek.uppercaseDottedLunateSigmaSymbol = \"\\u03FE\";\n$fccd514c3b000f9a$var$Greek.uppercaseReversedDottedLunateSigmaSymbol = \"\\u03FF\";\n\n\nObject.defineProperty($44f51f21f2de7984$exports, \"Greek\", {\n enumerable: true,\n get: function() {\n return $fccd514c3b000f9a$exports.Greek;\n }\n});\nvar $b98b910d088d419a$exports = {};\n\"use strict\";\nObject.defineProperty($b98b910d088d419a$exports, \"__esModule\", {\n value: true\n});\n$b98b910d088d419a$exports.getRandomPoints = void 0;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nconst $b98b910d088d419a$var$getRandomPoints = (n = 100, scale = 10)=>{\n const points = [];\n for(let index = 0; index < n; index++){\n const x = Math.random() * scale;\n const y = Math.random() * scale;\n const z = Math.random() * scale;\n points.push(new $ilwiq.Vector3(x, y, z));\n }\n return points;\n};\n$b98b910d088d419a$exports.getRandomPoints = $b98b910d088d419a$var$getRandomPoints;\n\n\nObject.defineProperty($44f51f21f2de7984$exports, \"getRandomPoints\", {\n enumerable: true,\n get: function() {\n return $b98b910d088d419a$exports.getRandomPoints;\n }\n});\n\n\nconst $b5fd02dc7fc08a57$var$canvas1 = document.getElementById(\"canvas1\");\nconst $b5fd02dc7fc08a57$var$canvas2 = document.getElementById(\"canvas2\");\nconst $b5fd02dc7fc08a57$var$canvas3 = document.getElementById(\"canvas3\");\nconst $b5fd02dc7fc08a57$var$points = (0, $44f51f21f2de7984$exports.getRandomPoints)(200);\nconst $b5fd02dc7fc08a57$var$scatterPlot = new (0, $44f51f21f2de7984$exports.ScatterPlot)($b5fd02dc7fc08a57$var$points);\nconst $b5fd02dc7fc08a57$var$frame1 = new (0, $44f51f21f2de7984$exports.Frame)($b5fd02dc7fc08a57$var$canvas1, 10);\n$b5fd02dc7fc08a57$var$frame1.addPlot($b5fd02dc7fc08a57$var$scatterPlot);\nconst $b5fd02dc7fc08a57$var$frame2 = new (0, $44f51f21f2de7984$exports.Frame)($b5fd02dc7fc08a57$var$canvas2, 10);\n$b5fd02dc7fc08a57$var$frame2.addLabel(new (0, $44f51f21f2de7984$exports.Label)(new (0, $ilwiq.Vector3)(3, 3, 3), (0, $44f51f21f2de7984$exports.Greek).lowercaseAlpha, 1));\nconst $b5fd02dc7fc08a57$var$frame3 = new (0, $44f51f21f2de7984$exports.Frame)($b5fd02dc7fc08a57$var$canvas3, 10);\n$b5fd02dc7fc08a57$var$frame3.addPlot(new (0, $44f51f21f2de7984$exports.VectorPlot)(new (0, $ilwiq.Vector3)(0, 0, 0), new (0, $ilwiq.Vector3)(2.3, 3.2, 4.1), {\n angle: true,\n xy: true\n}));\n\n\n//# sourceMappingURL=index.41dfc637.js.map\n","/**\n * @license\n * Copyright 2010-2023 Three.js Authors\n * SPDX-License-Identifier: MIT\n */\nconst REVISION = '158';\n\nconst MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };\nconst TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };\nconst CullFaceNone = 0;\nconst CullFaceBack = 1;\nconst CullFaceFront = 2;\nconst CullFaceFrontBack = 3;\nconst BasicShadowMap = 0;\nconst PCFShadowMap = 1;\nconst PCFSoftShadowMap = 2;\nconst VSMShadowMap = 3;\nconst FrontSide = 0;\nconst BackSide = 1;\nconst DoubleSide = 2;\nconst TwoPassDoubleSide = 2; // r149\nconst NoBlending = 0;\nconst NormalBlending = 1;\nconst AdditiveBlending = 2;\nconst SubtractiveBlending = 3;\nconst MultiplyBlending = 4;\nconst CustomBlending = 5;\nconst AddEquation = 100;\nconst SubtractEquation = 101;\nconst ReverseSubtractEquation = 102;\nconst MinEquation = 103;\nconst MaxEquation = 104;\nconst ZeroFactor = 200;\nconst OneFactor = 201;\nconst SrcColorFactor = 202;\nconst OneMinusSrcColorFactor = 203;\nconst SrcAlphaFactor = 204;\nconst OneMinusSrcAlphaFactor = 205;\nconst DstAlphaFactor = 206;\nconst OneMinusDstAlphaFactor = 207;\nconst DstColorFactor = 208;\nconst OneMinusDstColorFactor = 209;\nconst SrcAlphaSaturateFactor = 210;\nconst ConstantColorFactor = 211;\nconst OneMinusConstantColorFactor = 212;\nconst ConstantAlphaFactor = 213;\nconst OneMinusConstantAlphaFactor = 214;\nconst NeverDepth = 0;\nconst AlwaysDepth = 1;\nconst LessDepth = 2;\nconst LessEqualDepth = 3;\nconst EqualDepth = 4;\nconst GreaterEqualDepth = 5;\nconst GreaterDepth = 6;\nconst NotEqualDepth = 7;\nconst MultiplyOperation = 0;\nconst MixOperation = 1;\nconst AddOperation = 2;\nconst NoToneMapping = 0;\nconst LinearToneMapping = 1;\nconst ReinhardToneMapping = 2;\nconst CineonToneMapping = 3;\nconst ACESFilmicToneMapping = 4;\nconst CustomToneMapping = 5;\nconst AttachedBindMode = 'attached';\nconst DetachedBindMode = 'detached';\n\nconst UVMapping = 300;\nconst CubeReflectionMapping = 301;\nconst CubeRefractionMapping = 302;\nconst EquirectangularReflectionMapping = 303;\nconst EquirectangularRefractionMapping = 304;\nconst CubeUVReflectionMapping = 306;\nconst RepeatWrapping = 1000;\nconst ClampToEdgeWrapping = 1001;\nconst MirroredRepeatWrapping = 1002;\nconst NearestFilter = 1003;\nconst NearestMipmapNearestFilter = 1004;\nconst NearestMipMapNearestFilter = 1004;\nconst NearestMipmapLinearFilter = 1005;\nconst NearestMipMapLinearFilter = 1005;\nconst LinearFilter = 1006;\nconst LinearMipmapNearestFilter = 1007;\nconst LinearMipMapNearestFilter = 1007;\nconst LinearMipmapLinearFilter = 1008;\nconst LinearMipMapLinearFilter = 1008;\nconst UnsignedByteType = 1009;\nconst ByteType = 1010;\nconst ShortType = 1011;\nconst UnsignedShortType = 1012;\nconst IntType = 1013;\nconst UnsignedIntType = 1014;\nconst FloatType = 1015;\nconst HalfFloatType = 1016;\nconst UnsignedShort4444Type = 1017;\nconst UnsignedShort5551Type = 1018;\nconst UnsignedInt248Type = 1020;\nconst AlphaFormat = 1021;\nconst RGBAFormat = 1023;\nconst LuminanceFormat = 1024;\nconst LuminanceAlphaFormat = 1025;\nconst DepthFormat = 1026;\nconst DepthStencilFormat = 1027;\nconst RedFormat = 1028;\nconst RedIntegerFormat = 1029;\nconst RGFormat = 1030;\nconst RGIntegerFormat = 1031;\nconst RGBAIntegerFormat = 1033;\n\nconst RGB_S3TC_DXT1_Format = 33776;\nconst RGBA_S3TC_DXT1_Format = 33777;\nconst RGBA_S3TC_DXT3_Format = 33778;\nconst RGBA_S3TC_DXT5_Format = 33779;\nconst RGB_PVRTC_4BPPV1_Format = 35840;\nconst RGB_PVRTC_2BPPV1_Format = 35841;\nconst RGBA_PVRTC_4BPPV1_Format = 35842;\nconst RGBA_PVRTC_2BPPV1_Format = 35843;\nconst RGB_ETC1_Format = 36196;\nconst RGB_ETC2_Format = 37492;\nconst RGBA_ETC2_EAC_Format = 37496;\nconst RGBA_ASTC_4x4_Format = 37808;\nconst RGBA_ASTC_5x4_Format = 37809;\nconst RGBA_ASTC_5x5_Format = 37810;\nconst RGBA_ASTC_6x5_Format = 37811;\nconst RGBA_ASTC_6x6_Format = 37812;\nconst RGBA_ASTC_8x5_Format = 37813;\nconst RGBA_ASTC_8x6_Format = 37814;\nconst RGBA_ASTC_8x8_Format = 37815;\nconst RGBA_ASTC_10x5_Format = 37816;\nconst RGBA_ASTC_10x6_Format = 37817;\nconst RGBA_ASTC_10x8_Format = 37818;\nconst RGBA_ASTC_10x10_Format = 37819;\nconst RGBA_ASTC_12x10_Format = 37820;\nconst RGBA_ASTC_12x12_Format = 37821;\nconst RGBA_BPTC_Format = 36492;\nconst RGB_BPTC_SIGNED_Format = 36494;\nconst RGB_BPTC_UNSIGNED_Format = 36495;\nconst RED_RGTC1_Format = 36283;\nconst SIGNED_RED_RGTC1_Format = 36284;\nconst RED_GREEN_RGTC2_Format = 36285;\nconst SIGNED_RED_GREEN_RGTC2_Format = 36286;\nconst LoopOnce = 2200;\nconst LoopRepeat = 2201;\nconst LoopPingPong = 2202;\nconst InterpolateDiscrete = 2300;\nconst InterpolateLinear = 2301;\nconst InterpolateSmooth = 2302;\nconst ZeroCurvatureEnding = 2400;\nconst ZeroSlopeEnding = 2401;\nconst WrapAroundEnding = 2402;\nconst NormalAnimationBlendMode = 2500;\nconst AdditiveAnimationBlendMode = 2501;\nconst TrianglesDrawMode = 0;\nconst TriangleStripDrawMode = 1;\nconst TriangleFanDrawMode = 2;\n/** @deprecated Use LinearSRGBColorSpace or NoColorSpace in three.js r152+. */\nconst LinearEncoding = 3000;\n/** @deprecated Use SRGBColorSpace in three.js r152+. */\nconst sRGBEncoding = 3001;\nconst BasicDepthPacking = 3200;\nconst RGBADepthPacking = 3201;\nconst TangentSpaceNormalMap = 0;\nconst ObjectSpaceNormalMap = 1;\n\n// Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available.\nconst NoColorSpace = '';\nconst SRGBColorSpace = 'srgb';\nconst LinearSRGBColorSpace = 'srgb-linear';\nconst DisplayP3ColorSpace = 'display-p3';\nconst LinearDisplayP3ColorSpace = 'display-p3-linear';\n\nconst LinearTransfer = 'linear';\nconst SRGBTransfer = 'srgb';\n\nconst Rec709Primaries = 'rec709';\nconst P3Primaries = 'p3';\n\nconst ZeroStencilOp = 0;\nconst KeepStencilOp = 7680;\nconst ReplaceStencilOp = 7681;\nconst IncrementStencilOp = 7682;\nconst DecrementStencilOp = 7683;\nconst IncrementWrapStencilOp = 34055;\nconst DecrementWrapStencilOp = 34056;\nconst InvertStencilOp = 5386;\n\nconst NeverStencilFunc = 512;\nconst LessStencilFunc = 513;\nconst EqualStencilFunc = 514;\nconst LessEqualStencilFunc = 515;\nconst GreaterStencilFunc = 516;\nconst NotEqualStencilFunc = 517;\nconst GreaterEqualStencilFunc = 518;\nconst AlwaysStencilFunc = 519;\n\nconst NeverCompare = 512;\nconst LessCompare = 513;\nconst EqualCompare = 514;\nconst LessEqualCompare = 515;\nconst GreaterCompare = 516;\nconst NotEqualCompare = 517;\nconst GreaterEqualCompare = 518;\nconst AlwaysCompare = 519;\n\nconst StaticDrawUsage = 35044;\nconst DynamicDrawUsage = 35048;\nconst StreamDrawUsage = 35040;\nconst StaticReadUsage = 35045;\nconst DynamicReadUsage = 35049;\nconst StreamReadUsage = 35041;\nconst StaticCopyUsage = 35046;\nconst DynamicCopyUsage = 35050;\nconst StreamCopyUsage = 35042;\n\nconst GLSL1 = '100';\nconst GLSL3 = '300 es';\n\nconst _SRGBAFormat = 1035; // fallback for WebGL 1\n\nconst WebGLCoordinateSystem = 2000;\nconst WebGPUCoordinateSystem = 2001;\n\n/**\n * https://github.com/mrdoob/eventdispatcher.js/\n */\n\nclass EventDispatcher {\n\n\taddEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) this._listeners = {};\n\n\t\tconst listeners = this._listeners;\n\n\t\tif ( listeners[ type ] === undefined ) {\n\n\t\t\tlisteners[ type ] = [];\n\n\t\t}\n\n\t\tif ( listeners[ type ].indexOf( listener ) === - 1 ) {\n\n\t\t\tlisteners[ type ].push( listener );\n\n\t\t}\n\n\t}\n\n\thasEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return false;\n\n\t\tconst listeners = this._listeners;\n\n\t\treturn listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;\n\n\t}\n\n\tremoveEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tconst index = listenerArray.indexOf( listener );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\tlistenerArray.splice( index, 1 );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ event.type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tevent.target = this;\n\n\t\t\t// Make a copy, in case listeners are removed while iterating.\n\t\t\tconst array = listenerArray.slice( 0 );\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tarray[ i ].call( this, event );\n\n\t\t\t}\n\n\t\t\tevent.target = null;\n\n\t\t}\n\n\t}\n\n}\n\nconst _lut = [ '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '0a', '0b', '0c', '0d', '0e', '0f', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '1a', '1b', '1c', '1d', '1e', '1f', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '2a', '2b', '2c', '2d', '2e', '2f', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '3a', '3b', '3c', '3d', '3e', '3f', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '4a', '4b', '4c', '4d', '4e', '4f', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '5a', '5b', '5c', '5d', '5e', '5f', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '6a', '6b', '6c', '6d', '6e', '6f', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '7a', '7b', '7c', '7d', '7e', '7f', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '8a', '8b', '8c', '8d', '8e', '8f', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '9a', '9b', '9c', '9d', '9e', '9f', 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'aa', 'ab', 'ac', 'ad', 'ae', 'af', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'ba', 'bb', 'bc', 'bd', 'be', 'bf', 'c0', 'c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'ca', 'cb', 'cc', 'cd', 'ce', 'cf', 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'da', 'db', 'dc', 'dd', 'de', 'df', 'e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6', 'e7', 'e8', 'e9', 'ea', 'eb', 'ec', 'ed', 'ee', 'ef', 'f0', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'fa', 'fb', 'fc', 'fd', 'fe', 'ff' ];\n\nlet _seed = 1234567;\n\n\nconst DEG2RAD = Math.PI / 180;\nconst RAD2DEG = 180 / Math.PI;\n\n// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\nfunction generateUUID() {\n\n\tconst d0 = Math.random() * 0xffffffff | 0;\n\tconst d1 = Math.random() * 0xffffffff | 0;\n\tconst d2 = Math.random() * 0xffffffff | 0;\n\tconst d3 = Math.random() * 0xffffffff | 0;\n\tconst uuid = _lut[ d0 & 0xff ] + _lut[ d0 >> 8 & 0xff ] + _lut[ d0 >> 16 & 0xff ] + _lut[ d0 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d1 & 0xff ] + _lut[ d1 >> 8 & 0xff ] + '-' + _lut[ d1 >> 16 & 0x0f | 0x40 ] + _lut[ d1 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d2 & 0x3f | 0x80 ] + _lut[ d2 >> 8 & 0xff ] + '-' + _lut[ d2 >> 16 & 0xff ] + _lut[ d2 >> 24 & 0xff ] +\n\t\t\t_lut[ d3 & 0xff ] + _lut[ d3 >> 8 & 0xff ] + _lut[ d3 >> 16 & 0xff ] + _lut[ d3 >> 24 & 0xff ];\n\n\t// .toLowerCase() here flattens concatenated strings to save heap memory space.\n\treturn uuid.toLowerCase();\n\n}\n\nfunction clamp( value, min, max ) {\n\n\treturn Math.max( min, Math.min( max, value ) );\n\n}\n\n// compute euclidean modulo of m % n\n// https://en.wikipedia.org/wiki/Modulo_operation\nfunction euclideanModulo( n, m ) {\n\n\treturn ( ( n % m ) + m ) % m;\n\n}\n\n// Linear mapping from range to range \nfunction mapLinear( x, a1, a2, b1, b2 ) {\n\n\treturn b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );\n\n}\n\n// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/\nfunction inverseLerp( x, y, value ) {\n\n\tif ( x !== y ) {\n\n\t\treturn ( value - x ) / ( y - x );\n\n\t} else {\n\n\t\treturn 0;\n\n\t}\n\n}\n\n// https://en.wikipedia.org/wiki/Linear_interpolation\nfunction lerp( x, y, t ) {\n\n\treturn ( 1 - t ) * x + t * y;\n\n}\n\n// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\nfunction damp( x, y, lambda, dt ) {\n\n\treturn lerp( x, y, 1 - Math.exp( - lambda * dt ) );\n\n}\n\n// https://www.desmos.com/calculator/vcsjnyz7x4\nfunction pingpong( x, length = 1 ) {\n\n\treturn length - Math.abs( euclideanModulo( x, length * 2 ) - length );\n\n}\n\n// http://en.wikipedia.org/wiki/Smoothstep\nfunction smoothstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * ( 3 - 2 * x );\n\n}\n\nfunction smootherstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * x * ( x * ( x * 6 - 15 ) + 10 );\n\n}\n\n// Random integer from interval\nfunction randInt( low, high ) {\n\n\treturn low + Math.floor( Math.random() * ( high - low + 1 ) );\n\n}\n\n// Random float from interval\nfunction randFloat( low, high ) {\n\n\treturn low + Math.random() * ( high - low );\n\n}\n\n// Random float from <-range/2, range/2> interval\nfunction randFloatSpread( range ) {\n\n\treturn range * ( 0.5 - Math.random() );\n\n}\n\n// Deterministic pseudo-random float in the interval [ 0, 1 ]\nfunction seededRandom( s ) {\n\n\tif ( s !== undefined ) _seed = s;\n\n\t// Mulberry32 generator\n\n\tlet t = _seed += 0x6D2B79F5;\n\n\tt = Math.imul( t ^ t >>> 15, t | 1 );\n\n\tt ^= t + Math.imul( t ^ t >>> 7, t | 61 );\n\n\treturn ( ( t ^ t >>> 14 ) >>> 0 ) / 4294967296;\n\n}\n\nfunction degToRad( degrees ) {\n\n\treturn degrees * DEG2RAD;\n\n}\n\nfunction radToDeg( radians ) {\n\n\treturn radians * RAD2DEG;\n\n}\n\nfunction isPowerOfTwo( value ) {\n\n\treturn ( value & ( value - 1 ) ) === 0 && value !== 0;\n\n}\n\nfunction ceilPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.ceil( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction floorPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.floor( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction setQuaternionFromProperEuler( q, a, b, c, order ) {\n\n\t// Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n\n\t// rotations are applied to the axes in the order specified by 'order'\n\t// rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n\t// angles are in radians\n\n\tconst cos = Math.cos;\n\tconst sin = Math.sin;\n\n\tconst c2 = cos( b / 2 );\n\tconst s2 = sin( b / 2 );\n\n\tconst c13 = cos( ( a + c ) / 2 );\n\tconst s13 = sin( ( a + c ) / 2 );\n\n\tconst c1_3 = cos( ( a - c ) / 2 );\n\tconst s1_3 = sin( ( a - c ) / 2 );\n\n\tconst c3_1 = cos( ( c - a ) / 2 );\n\tconst s3_1 = sin( ( c - a ) / 2 );\n\n\tswitch ( order ) {\n\n\t\tcase 'XYX':\n\t\t\tq.set( c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YZY':\n\t\t\tq.set( s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZXZ':\n\t\t\tq.set( s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'XZX':\n\t\t\tq.set( c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YXY':\n\t\t\tq.set( s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZYZ':\n\t\t\tq.set( s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order );\n\n\t}\n\n}\n\nfunction denormalize( value, array ) {\n\n\tswitch ( array.constructor ) {\n\n\t\tcase Float32Array:\n\n\t\t\treturn value;\n\n\t\tcase Uint32Array:\n\n\t\t\treturn value / 4294967295.0;\n\n\t\tcase Uint16Array:\n\n\t\t\treturn value / 65535.0;\n\n\t\tcase Uint8Array:\n\n\t\t\treturn value / 255.0;\n\n\t\tcase Int32Array:\n\n\t\t\treturn Math.max( value / 2147483647.0, - 1.0 );\n\n\t\tcase Int16Array:\n\n\t\t\treturn Math.max( value / 32767.0, - 1.0 );\n\n\t\tcase Int8Array:\n\n\t\t\treturn Math.max( value / 127.0, - 1.0 );\n\n\t\tdefault:\n\n\t\t\tthrow new Error( 'Invalid component type.' );\n\n\t}\n\n}\n\nfunction normalize( value, array ) {\n\n\tswitch ( array.constructor ) {\n\n\t\tcase Float32Array:\n\n\t\t\treturn value;\n\n\t\tcase Uint32Array:\n\n\t\t\treturn Math.round( value * 4294967295.0 );\n\n\t\tcase Uint16Array:\n\n\t\t\treturn Math.round( value * 65535.0 );\n\n\t\tcase Uint8Array:\n\n\t\t\treturn Math.round( value * 255.0 );\n\n\t\tcase Int32Array:\n\n\t\t\treturn Math.round( value * 2147483647.0 );\n\n\t\tcase Int16Array:\n\n\t\t\treturn Math.round( value * 32767.0 );\n\n\t\tcase Int8Array:\n\n\t\t\treturn Math.round( value * 127.0 );\n\n\t\tdefault:\n\n\t\t\tthrow new Error( 'Invalid component type.' );\n\n\t}\n\n}\n\nconst MathUtils = {\n\tDEG2RAD: DEG2RAD,\n\tRAD2DEG: RAD2DEG,\n\tgenerateUUID: generateUUID,\n\tclamp: clamp,\n\teuclideanModulo: euclideanModulo,\n\tmapLinear: mapLinear,\n\tinverseLerp: inverseLerp,\n\tlerp: lerp,\n\tdamp: damp,\n\tpingpong: pingpong,\n\tsmoothstep: smoothstep,\n\tsmootherstep: smootherstep,\n\trandInt: randInt,\n\trandFloat: randFloat,\n\trandFloatSpread: randFloatSpread,\n\tseededRandom: seededRandom,\n\tdegToRad: degToRad,\n\tradToDeg: radToDeg,\n\tisPowerOfTwo: isPowerOfTwo,\n\tceilPowerOfTwo: ceilPowerOfTwo,\n\tfloorPowerOfTwo: floorPowerOfTwo,\n\tsetQuaternionFromProperEuler: setQuaternionFromProperEuler,\n\tnormalize: normalize,\n\tdenormalize: denormalize\n};\n\nclass Vector2 {\n\n\tconstructor( x = 0, y = 0 ) {\n\n\t\tVector2.prototype.isVector2 = true;\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.x;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.x = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.y;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.y = value;\n\n\t}\n\n\tset( x, y ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v ) {\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v ) {\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ];\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ];\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = Math.trunc( this.x );\n\t\tthis.y = Math.trunc( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y;\n\n\t}\n\n\tcross( v ) {\n\n\t\treturn this.x * v.y - this.y * v.x;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tangle() {\n\n\t\t// computes the angle in radians with respect to the positive x-axis\n\n\t\tconst angle = Math.atan2( - this.y, - this.x ) + Math.PI;\n\n\t\treturn angle;\n\n\t}\n\n\tangleTo( v ) {\n\n\t\tconst denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );\n\n\t\tif ( denominator === 0 ) return Math.PI / 2;\n\n\t\tconst theta = this.dot( v ) / denominator;\n\n\t\t// clamp, to handle numerical problems\n\n\t\treturn Math.acos( clamp( theta, - 1, 1 ) );\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y;\n\t\treturn dx * dx + dy * dy;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\n\t\treturn this;\n\n\t}\n\n\trotateAround( center, angle ) {\n\n\t\tconst c = Math.cos( angle ), s = Math.sin( angle );\n\n\t\tconst x = this.x - center.x;\n\t\tconst y = this.y - center.y;\n\n\t\tthis.x = x * c - y * s + center.x;\n\t\tthis.y = x * s + y * c + center.y;\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\n\t\treturn this;\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.x;\n\t\tyield this.y;\n\n\t}\n\n}\n\nclass Matrix3 {\n\n\tconstructor( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {\n\n\t\tMatrix3.prototype.isMatrix3 = true;\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t];\n\n\t\tif ( n11 !== undefined ) {\n\n\t\t\tthis.set( n11, n12, n13, n21, n22, n23, n31, n32, n33 );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 1 ] = n21; te[ 2 ] = n31;\n\t\tte[ 3 ] = n12; te[ 4 ] = n22; te[ 5 ] = n32;\n\t\tte[ 6 ] = n13; te[ 7 ] = n23; te[ 8 ] = n33;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ];\n\t\tte[ 3 ] = me[ 3 ]; te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ];\n\t\tte[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; te[ 8 ] = me[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrix3Column( this, 0 );\n\t\tyAxis.setFromMatrix3Column( this, 1 );\n\t\tzAxis.setFromMatrix3Column( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix4( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 4 ], me[ 8 ],\n\t\t\tme[ 1 ], me[ 5 ], me[ 9 ],\n\t\t\tme[ 2 ], me[ 6 ], me[ 10 ]\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m ) {\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 3 ], a13 = ae[ 6 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 4 ], a23 = ae[ 7 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 5 ], a33 = ae[ 8 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 3 ], b13 = be[ 6 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 4 ], b23 = be[ 7 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 5 ], b33 = be[ 8 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31;\n\t\tte[ 3 ] = a11 * b12 + a12 * b22 + a13 * b32;\n\t\tte[ 6 ] = a11 * b13 + a12 * b23 + a13 * b33;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31;\n\t\tte[ 4 ] = a21 * b12 + a22 * b22 + a23 * b32;\n\t\tte[ 7 ] = a21 * b13 + a22 * b23 + a23 * b33;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31;\n\t\tte[ 5 ] = a31 * b12 + a32 * b22 + a33 * b32;\n\t\tte[ 8 ] = a31 * b13 + a32 * b23 + a33 * b33;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 3 ] *= s; te[ 6 ] *= s;\n\t\tte[ 1 ] *= s; te[ 4 ] *= s; te[ 7 ] *= s;\n\t\tte[ 2 ] *= s; te[ 5 ] *= s; te[ 8 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst a = te[ 0 ], b = te[ 1 ], c = te[ 2 ],\n\t\t\td = te[ 3 ], e = te[ 4 ], f = te[ 5 ],\n\t\t\tg = te[ 6 ], h = te[ 7 ], i = te[ 8 ];\n\n\t\treturn a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n\n\t}\n\n\tinvert() {\n\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ],\n\t\t\tn12 = te[ 3 ], n22 = te[ 4 ], n32 = te[ 5 ],\n\t\t\tn13 = te[ 6 ], n23 = te[ 7 ], n33 = te[ 8 ],\n\n\t\t\tt11 = n33 * n22 - n32 * n23,\n\t\t\tt12 = n32 * n13 - n33 * n12,\n\t\t\tt13 = n23 * n12 - n22 * n13,\n\n\t\t\tdet = n11 * t11 + n21 * t12 + n31 * t13;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n31 * n23 - n33 * n21 ) * detInv;\n\t\tte[ 2 ] = ( n32 * n21 - n31 * n22 ) * detInv;\n\n\t\tte[ 3 ] = t12 * detInv;\n\t\tte[ 4 ] = ( n33 * n11 - n31 * n13 ) * detInv;\n\t\tte[ 5 ] = ( n31 * n12 - n32 * n11 ) * detInv;\n\n\t\tte[ 6 ] = t13 * detInv;\n\t\tte[ 7 ] = ( n21 * n13 - n23 * n11 ) * detInv;\n\t\tte[ 8 ] = ( n22 * n11 - n21 * n12 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\ttranspose() {\n\n\t\tlet tmp;\n\t\tconst m = this.elements;\n\n\t\ttmp = m[ 1 ]; m[ 1 ] = m[ 3 ]; m[ 3 ] = tmp;\n\t\ttmp = m[ 2 ]; m[ 2 ] = m[ 6 ]; m[ 6 ] = tmp;\n\t\ttmp = m[ 5 ]; m[ 5 ] = m[ 7 ]; m[ 7 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tgetNormalMatrix( matrix4 ) {\n\n\t\treturn this.setFromMatrix4( matrix4 ).invert().transpose();\n\n\t}\n\n\ttransposeIntoArray( r ) {\n\n\t\tconst m = this.elements;\n\n\t\tr[ 0 ] = m[ 0 ];\n\t\tr[ 1 ] = m[ 3 ];\n\t\tr[ 2 ] = m[ 6 ];\n\t\tr[ 3 ] = m[ 1 ];\n\t\tr[ 4 ] = m[ 4 ];\n\t\tr[ 5 ] = m[ 7 ];\n\t\tr[ 6 ] = m[ 2 ];\n\t\tr[ 7 ] = m[ 5 ];\n\t\tr[ 8 ] = m[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetUvTransform( tx, ty, sx, sy, rotation, cx, cy ) {\n\n\t\tconst c = Math.cos( rotation );\n\t\tconst s = Math.sin( rotation );\n\n\t\tthis.set(\n\t\t\tsx * c, sx * s, - sx * ( c * cx + s * cy ) + cx + tx,\n\t\t\t- sy * s, sy * c, - sy * ( - s * cx + c * cy ) + cy + ty,\n\t\t\t0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\t//\n\n\tscale( sx, sy ) {\n\n\t\tthis.premultiply( _m3.makeScale( sx, sy ) );\n\n\t\treturn this;\n\n\t}\n\n\trotate( theta ) {\n\n\t\tthis.premultiply( _m3.makeRotation( - theta ) );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( tx, ty ) {\n\n\t\tthis.premultiply( _m3.makeTranslation( tx, ty ) );\n\n\t\treturn this;\n\n\t}\n\n\t// for 2D Transforms\n\n\tmakeTranslation( x, y ) {\n\n\t\tif ( x.isVector2 ) {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, x.x,\n\t\t\t\t0, 1, x.y,\n\t\t\t\t0, 0, 1\n\n\t\t\t);\n\n\t\t} else {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, x,\n\t\t\t\t0, 1, y,\n\t\t\t\t0, 0, 1\n\n\t\t\t);\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotation( theta ) {\n\n\t\t// counterclockwise\n\n\t\tconst c = Math.cos( theta );\n\t\tconst s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\tc, - s, 0,\n\t\t\ts, c, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeScale( x, y ) {\n\n\t\tthis.set(\n\n\t\t\tx, 0, 0,\n\t\t\t0, y, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\t//\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\n\t\treturn array;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().fromArray( this.elements );\n\n\t}\n\n}\n\nconst _m3 = /*@__PURE__*/ new Matrix3();\n\nfunction arrayNeedsUint32( array ) {\n\n\t// assumes larger values usually on last\n\n\tfor ( let i = array.length - 1; i >= 0; -- i ) {\n\n\t\tif ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565\n\n\t}\n\n\treturn false;\n\n}\n\nconst TYPED_ARRAYS = {\n\tInt8Array: Int8Array,\n\tUint8Array: Uint8Array,\n\tUint8ClampedArray: Uint8ClampedArray,\n\tInt16Array: Int16Array,\n\tUint16Array: Uint16Array,\n\tInt32Array: Int32Array,\n\tUint32Array: Uint32Array,\n\tFloat32Array: Float32Array,\n\tFloat64Array: Float64Array\n};\n\nfunction getTypedArray( type, buffer ) {\n\n\treturn new TYPED_ARRAYS[ type ]( buffer );\n\n}\n\nfunction createElementNS( name ) {\n\n\treturn document.createElementNS( 'http://www.w3.org/1999/xhtml', name );\n\n}\n\nfunction createCanvasElement() {\n\n\tconst canvas = createElementNS( 'canvas' );\n\tcanvas.style.display = 'block';\n\treturn canvas;\n\n}\n\nconst _cache = {};\n\nfunction warnOnce( message ) {\n\n\tif ( message in _cache ) return;\n\n\t_cache[ message ] = true;\n\n\tconsole.warn( message );\n\n}\n\n/**\n * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping\n * or clipping. Based on W3C specifications for sRGB and Display P3,\n * and ICC specifications for the D50 connection space. Values in/out\n * are _linear_ sRGB and _linear_ Display P3.\n *\n * Note that both sRGB and Display P3 use the sRGB transfer functions.\n *\n * Reference:\n * - http://www.russellcottrell.com/photo/matrixCalculator.htm\n */\n\nconst LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new Matrix3().set(\n\t0.8224621, 0.177538, 0.0,\n\t0.0331941, 0.9668058, 0.0,\n\t0.0170827, 0.0723974, 0.9105199,\n);\n\nconst LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new Matrix3().set(\n\t1.2249401, - 0.2249404, 0.0,\n\t- 0.0420569, 1.0420571, 0.0,\n\t- 0.0196376, - 0.0786361, 1.0982735\n);\n\n/**\n * Defines supported color spaces by transfer function and primaries,\n * and provides conversions to/from the Linear-sRGB reference space.\n */\nconst COLOR_SPACES = {\n\t[ LinearSRGBColorSpace ]: {\n\t\ttransfer: LinearTransfer,\n\t\tprimaries: Rec709Primaries,\n\t\ttoReference: ( color ) => color,\n\t\tfromReference: ( color ) => color,\n\t},\n\t[ SRGBColorSpace ]: {\n\t\ttransfer: SRGBTransfer,\n\t\tprimaries: Rec709Primaries,\n\t\ttoReference: ( color ) => color.convertSRGBToLinear(),\n\t\tfromReference: ( color ) => color.convertLinearToSRGB(),\n\t},\n\t[ LinearDisplayP3ColorSpace ]: {\n\t\ttransfer: LinearTransfer,\n\t\tprimaries: P3Primaries,\n\t\ttoReference: ( color ) => color.applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB ),\n\t\tfromReference: ( color ) => color.applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 ),\n\t},\n\t[ DisplayP3ColorSpace ]: {\n\t\ttransfer: SRGBTransfer,\n\t\tprimaries: P3Primaries,\n\t\ttoReference: ( color ) => color.convertSRGBToLinear().applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB ),\n\t\tfromReference: ( color ) => color.applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 ).convertLinearToSRGB(),\n\t},\n};\n\nconst SUPPORTED_WORKING_COLOR_SPACES = new Set( [ LinearSRGBColorSpace, LinearDisplayP3ColorSpace ] );\n\nconst ColorManagement = {\n\n\tenabled: true,\n\n\t_workingColorSpace: LinearSRGBColorSpace,\n\n\tget legacyMode() {\n\n\t\tconsole.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.' );\n\n\t\treturn ! this.enabled;\n\n\t},\n\n\tset legacyMode( legacyMode ) {\n\n\t\tconsole.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.' );\n\n\t\tthis.enabled = ! legacyMode;\n\n\t},\n\n\tget workingColorSpace() {\n\n\t\treturn this._workingColorSpace;\n\n\t},\n\n\tset workingColorSpace( colorSpace ) {\n\n\t\tif ( ! SUPPORTED_WORKING_COLOR_SPACES.has( colorSpace ) ) {\n\n\t\t\tthrow new Error( `Unsupported working color space, \"${ colorSpace }\".` );\n\n\t\t}\n\n\t\tthis._workingColorSpace = colorSpace;\n\n\t},\n\n\tconvert: function ( color, sourceColorSpace, targetColorSpace ) {\n\n\t\tif ( this.enabled === false || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) {\n\n\t\t\treturn color;\n\n\t\t}\n\n\t\tconst sourceToReference = COLOR_SPACES[ sourceColorSpace ].toReference;\n\t\tconst targetFromReference = COLOR_SPACES[ targetColorSpace ].fromReference;\n\n\t\treturn targetFromReference( sourceToReference( color ) );\n\n\t},\n\n\tfromWorkingColorSpace: function ( color, targetColorSpace ) {\n\n\t\treturn this.convert( color, this._workingColorSpace, targetColorSpace );\n\n\t},\n\n\ttoWorkingColorSpace: function ( color, sourceColorSpace ) {\n\n\t\treturn this.convert( color, sourceColorSpace, this._workingColorSpace );\n\n\t},\n\n\tgetPrimaries: function ( colorSpace ) {\n\n\t\treturn COLOR_SPACES[ colorSpace ].primaries;\n\n\t},\n\n\tgetTransfer: function ( colorSpace ) {\n\n\t\tif ( colorSpace === NoColorSpace ) return LinearTransfer;\n\n\t\treturn COLOR_SPACES[ colorSpace ].transfer;\n\n\t},\n\n};\n\n\nfunction SRGBToLinear( c ) {\n\n\treturn ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );\n\n}\n\nfunction LinearToSRGB( c ) {\n\n\treturn ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055;\n\n}\n\nlet _canvas;\n\nclass ImageUtils {\n\n\tstatic getDataURL( image ) {\n\n\t\tif ( /^data:/i.test( image.src ) ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tif ( typeof HTMLCanvasElement === 'undefined' ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tlet canvas;\n\n\t\tif ( image instanceof HTMLCanvasElement ) {\n\n\t\t\tcanvas = image;\n\n\t\t} else {\n\n\t\t\tif ( _canvas === undefined ) _canvas = createElementNS( 'canvas' );\n\n\t\t\t_canvas.width = image.width;\n\t\t\t_canvas.height = image.height;\n\n\t\t\tconst context = _canvas.getContext( '2d' );\n\n\t\t\tif ( image instanceof ImageData ) {\n\n\t\t\t\tcontext.putImageData( image, 0, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcontext.drawImage( image, 0, 0, image.width, image.height );\n\n\t\t\t}\n\n\t\t\tcanvas = _canvas;\n\n\t\t}\n\n\t\tif ( canvas.width > 2048 || canvas.height > 2048 ) {\n\n\t\t\tconsole.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image );\n\n\t\t\treturn canvas.toDataURL( 'image/jpeg', 0.6 );\n\n\t\t} else {\n\n\t\t\treturn canvas.toDataURL( 'image/png' );\n\n\t\t}\n\n\t}\n\n\tstatic sRGBToLinear( image ) {\n\n\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\tconst canvas = createElementNS( 'canvas' );\n\n\t\t\tcanvas.width = image.width;\n\t\t\tcanvas.height = image.height;\n\n\t\t\tconst context = canvas.getContext( '2d' );\n\t\t\tcontext.drawImage( image, 0, 0, image.width, image.height );\n\n\t\t\tconst imageData = context.getImageData( 0, 0, image.width, image.height );\n\t\t\tconst data = imageData.data;\n\n\t\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\t\tdata[ i ] = SRGBToLinear( data[ i ] / 255 ) * 255;\n\n\t\t\t}\n\n\t\t\tcontext.putImageData( imageData, 0, 0 );\n\n\t\t\treturn canvas;\n\n\t\t} else if ( image.data ) {\n\n\t\t\tconst data = image.data.slice( 0 );\n\n\t\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\t\tif ( data instanceof Uint8Array || data instanceof Uint8ClampedArray ) {\n\n\t\t\t\t\tdata[ i ] = Math.floor( SRGBToLinear( data[ i ] / 255 ) * 255 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// assuming float\n\n\t\t\t\t\tdata[ i ] = SRGBToLinear( data[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdata: data,\n\t\t\t\twidth: image.width,\n\t\t\t\theight: image.height\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.' );\n\t\t\treturn image;\n\n\t\t}\n\n\t}\n\n}\n\nlet _sourceId = 0;\n\nclass Source {\n\n\tconstructor( data = null ) {\n\n\t\tthis.isSource = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _sourceId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.data = data;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( ! isRootObject && meta.images[ this.uuid ] !== undefined ) {\n\n\t\t\treturn meta.images[ this.uuid ];\n\n\t\t}\n\n\t\tconst output = {\n\t\t\tuuid: this.uuid,\n\t\t\turl: ''\n\t\t};\n\n\t\tconst data = this.data;\n\n\t\tif ( data !== null ) {\n\n\t\t\tlet url;\n\n\t\t\tif ( Array.isArray( data ) ) {\n\n\t\t\t\t// cube texture\n\n\t\t\t\turl = [];\n\n\t\t\t\tfor ( let i = 0, l = data.length; i < l; i ++ ) {\n\n\t\t\t\t\tif ( data[ i ].isDataTexture ) {\n\n\t\t\t\t\t\turl.push( serializeImage( data[ i ].image ) );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\turl.push( serializeImage( data[ i ] ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// texture\n\n\t\t\t\turl = serializeImage( data );\n\n\t\t\t}\n\n\t\t\toutput.url = url;\n\n\t\t}\n\n\t\tif ( ! isRootObject ) {\n\n\t\t\tmeta.images[ this.uuid ] = output;\n\n\t\t}\n\n\t\treturn output;\n\n\t}\n\n}\n\nfunction serializeImage( image ) {\n\n\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t// default images\n\n\t\treturn ImageUtils.getDataURL( image );\n\n\t} else {\n\n\t\tif ( image.data ) {\n\n\t\t\t// images of DataTexture\n\n\t\t\treturn {\n\t\t\t\tdata: Array.from( image.data ),\n\t\t\t\twidth: image.width,\n\t\t\t\theight: image.height,\n\t\t\t\ttype: image.data.constructor.name\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.Texture: Unable to serialize Texture.' );\n\t\t\treturn {};\n\n\t\t}\n\n\t}\n\n}\n\nlet _textureId = 0;\n\nclass Texture extends EventDispatcher {\n\n\tconstructor( image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = Texture.DEFAULT_ANISOTROPY, colorSpace = NoColorSpace ) {\n\n\t\tsuper();\n\n\t\tthis.isTexture = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _textureId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\n\t\tthis.source = new Source( image );\n\t\tthis.mipmaps = [];\n\n\t\tthis.mapping = mapping;\n\t\tthis.channel = 0;\n\n\t\tthis.wrapS = wrapS;\n\t\tthis.wrapT = wrapT;\n\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\n\t\tthis.anisotropy = anisotropy;\n\n\t\tthis.format = format;\n\t\tthis.internalFormat = null;\n\t\tthis.type = type;\n\n\t\tthis.offset = new Vector2( 0, 0 );\n\t\tthis.repeat = new Vector2( 1, 1 );\n\t\tthis.center = new Vector2( 0, 0 );\n\t\tthis.rotation = 0;\n\n\t\tthis.matrixAutoUpdate = true;\n\t\tthis.matrix = new Matrix3();\n\n\t\tthis.generateMipmaps = true;\n\t\tthis.premultiplyAlpha = false;\n\t\tthis.flipY = true;\n\t\tthis.unpackAlignment = 4;\t// valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n\n\t\tif ( typeof colorSpace === 'string' ) {\n\n\t\t\tthis.colorSpace = colorSpace;\n\n\t\t} else { // @deprecated, r152\n\n\t\t\twarnOnce( 'THREE.Texture: Property .encoding has been replaced by .colorSpace.' );\n\t\t\tthis.colorSpace = colorSpace === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t\t}\n\n\n\t\tthis.userData = {};\n\n\t\tthis.version = 0;\n\t\tthis.onUpdate = null;\n\n\t\tthis.isRenderTargetTexture = false; // indicates whether a texture belongs to a render target or not\n\t\tthis.needsPMREMUpdate = false; // indicates whether this texture should be processed by PMREMGenerator or not (only relevant for render target textures)\n\n\t}\n\n\tget image() {\n\n\t\treturn this.source.data;\n\n\t}\n\n\tset image( value = null ) {\n\n\t\tthis.source.data = value;\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.setUvTransform( this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.source = source.source;\n\t\tthis.mipmaps = source.mipmaps.slice( 0 );\n\n\t\tthis.mapping = source.mapping;\n\t\tthis.channel = source.channel;\n\n\t\tthis.wrapS = source.wrapS;\n\t\tthis.wrapT = source.wrapT;\n\n\t\tthis.magFilter = source.magFilter;\n\t\tthis.minFilter = source.minFilter;\n\n\t\tthis.anisotropy = source.anisotropy;\n\n\t\tthis.format = source.format;\n\t\tthis.internalFormat = source.internalFormat;\n\t\tthis.type = source.type;\n\n\t\tthis.offset.copy( source.offset );\n\t\tthis.repeat.copy( source.repeat );\n\t\tthis.center.copy( source.center );\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrix.copy( source.matrix );\n\n\t\tthis.generateMipmaps = source.generateMipmaps;\n\t\tthis.premultiplyAlpha = source.premultiplyAlpha;\n\t\tthis.flipY = source.flipY;\n\t\tthis.unpackAlignment = source.unpackAlignment;\n\t\tthis.colorSpace = source.colorSpace;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\tthis.needsUpdate = true;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( ! isRootObject && meta.textures[ this.uuid ] !== undefined ) {\n\n\t\t\treturn meta.textures[ this.uuid ];\n\n\t\t}\n\n\t\tconst output = {\n\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Texture',\n\t\t\t\tgenerator: 'Texture.toJSON'\n\t\t\t},\n\n\t\t\tuuid: this.uuid,\n\t\t\tname: this.name,\n\n\t\t\timage: this.source.toJSON( meta ).uuid,\n\n\t\t\tmapping: this.mapping,\n\t\t\tchannel: this.channel,\n\n\t\t\trepeat: [ this.repeat.x, this.repeat.y ],\n\t\t\toffset: [ this.offset.x, this.offset.y ],\n\t\t\tcenter: [ this.center.x, this.center.y ],\n\t\t\trotation: this.rotation,\n\n\t\t\twrap: [ this.wrapS, this.wrapT ],\n\n\t\t\tformat: this.format,\n\t\t\tinternalFormat: this.internalFormat,\n\t\t\ttype: this.type,\n\t\t\tcolorSpace: this.colorSpace,\n\n\t\t\tminFilter: this.minFilter,\n\t\t\tmagFilter: this.magFilter,\n\t\t\tanisotropy: this.anisotropy,\n\n\t\t\tflipY: this.flipY,\n\n\t\t\tgenerateMipmaps: this.generateMipmaps,\n\t\t\tpremultiplyAlpha: this.premultiplyAlpha,\n\t\t\tunpackAlignment: this.unpackAlignment\n\n\t\t};\n\n\t\tif ( Object.keys( this.userData ).length > 0 ) output.userData = this.userData;\n\n\t\tif ( ! isRootObject ) {\n\n\t\t\tmeta.textures[ this.uuid ] = output;\n\n\t\t}\n\n\t\treturn output;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\ttransformUv( uv ) {\n\n\t\tif ( this.mapping !== UVMapping ) return uv;\n\n\t\tuv.applyMatrix3( this.matrix );\n\n\t\tif ( uv.x < 0 || uv.x > 1 ) {\n\n\t\t\tswitch ( this.wrapS ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.x = uv.x < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.x ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.x = Math.ceil( uv.x ) - uv.x;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( uv.y < 0 || uv.y > 1 ) {\n\n\t\t\tswitch ( this.wrapT ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.y = uv.y < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.y ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.y = Math.ceil( uv.y ) - uv.y;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.flipY ) {\n\n\t\t\tuv.y = 1 - uv.y;\n\n\t\t}\n\n\t\treturn uv;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) {\n\n\t\t\tthis.version ++;\n\t\t\tthis.source.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tget encoding() { // @deprecated, r152\n\n\t\twarnOnce( 'THREE.Texture: Property .encoding has been replaced by .colorSpace.' );\n\t\treturn this.colorSpace === SRGBColorSpace ? sRGBEncoding : LinearEncoding;\n\n\t}\n\n\tset encoding( encoding ) { // @deprecated, r152\n\n\t\twarnOnce( 'THREE.Texture: Property .encoding has been replaced by .colorSpace.' );\n\t\tthis.colorSpace = encoding === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t}\n\n}\n\nTexture.DEFAULT_IMAGE = null;\nTexture.DEFAULT_MAPPING = UVMapping;\nTexture.DEFAULT_ANISOTROPY = 1;\n\nclass Vector4 {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tVector4.prototype.isVector4 = true;\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.z;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.z = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.w;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.w = value;\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\t\tthis.w = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( w ) {\n\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tcase 3: this.w = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tcase 3: return this.w;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z, this.w );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\t\tthis.w = ( v.w !== undefined ) ? v.w : 1;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v ) {\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\t\tthis.w += v.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\t\tthis.w += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\t\tthis.w = a.w + b.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\t\tthis.w += v.w * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v ) {\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\t\tthis.w -= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\t\tthis.w -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\t\tthis.w = a.w - b.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\t\tthis.w *= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\t\tthis.w *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z, w = this.w;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] * w;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] * w;\n\t\tthis.w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] * w;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tsetAxisAngleFromQuaternion( q ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n\n\t\t// q is assumed to be normalized\n\n\t\tthis.w = 2 * Math.acos( q.w );\n\n\t\tconst s = Math.sqrt( 1 - q.w * q.w );\n\n\t\tif ( s < 0.0001 ) {\n\n\t\t\tthis.x = 1;\n\t\t\tthis.y = 0;\n\t\t\tthis.z = 0;\n\n\t\t} else {\n\n\t\t\tthis.x = q.x / s;\n\t\t\tthis.y = q.y / s;\n\t\t\tthis.z = q.z / s;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetAxisAngleFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tlet angle, x, y, z; // variables for result\n\t\tconst epsilon = 0.01,\t\t// margin to allow for rounding errors\n\t\t\tepsilon2 = 0.1,\t\t// margin to distinguish between 0 and 180 degrees\n\n\t\t\tte = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tif ( ( Math.abs( m12 - m21 ) < epsilon ) &&\n\t\t ( Math.abs( m13 - m31 ) < epsilon ) &&\n\t\t ( Math.abs( m23 - m32 ) < epsilon ) ) {\n\n\t\t\t// singularity found\n\t\t\t// first check for identity matrix which must have +1 for all terms\n\t\t\t// in leading diagonal and zero in other terms\n\n\t\t\tif ( ( Math.abs( m12 + m21 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m13 + m31 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m23 + m32 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) {\n\n\t\t\t\t// this singularity is identity matrix so angle = 0\n\n\t\t\t\tthis.set( 1, 0, 0, 0 );\n\n\t\t\t\treturn this; // zero angle, arbitrary axis\n\n\t\t\t}\n\n\t\t\t// otherwise this singularity is angle = 180\n\n\t\t\tangle = Math.PI;\n\n\t\t\tconst xx = ( m11 + 1 ) / 2;\n\t\t\tconst yy = ( m22 + 1 ) / 2;\n\t\t\tconst zz = ( m33 + 1 ) / 2;\n\t\t\tconst xy = ( m12 + m21 ) / 4;\n\t\t\tconst xz = ( m13 + m31 ) / 4;\n\t\t\tconst yz = ( m23 + m32 ) / 4;\n\n\t\t\tif ( ( xx > yy ) && ( xx > zz ) ) {\n\n\t\t\t\t// m11 is the largest diagonal term\n\n\t\t\t\tif ( xx < epsilon ) {\n\n\t\t\t\t\tx = 0;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tx = Math.sqrt( xx );\n\t\t\t\t\ty = xy / x;\n\t\t\t\t\tz = xz / x;\n\n\t\t\t\t}\n\n\t\t\t} else if ( yy > zz ) {\n\n\t\t\t\t// m22 is the largest diagonal term\n\n\t\t\t\tif ( yy < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ty = Math.sqrt( yy );\n\t\t\t\t\tx = xy / y;\n\t\t\t\t\tz = yz / y;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// m33 is the largest diagonal term so base result on this\n\n\t\t\t\tif ( zz < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tz = Math.sqrt( zz );\n\t\t\t\t\tx = xz / z;\n\t\t\t\t\ty = yz / z;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.set( x, y, z, angle );\n\n\t\t\treturn this; // return 180 deg rotation\n\n\t\t}\n\n\t\t// as we have reached here there are no singularities so we can handle normally\n\n\t\tlet s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) +\n\t\t\t( m13 - m31 ) * ( m13 - m31 ) +\n\t\t\t( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize\n\n\t\tif ( Math.abs( s ) < 0.001 ) s = 1;\n\n\t\t// prevent divide by zero, should not happen if matrix is orthogonal and should be\n\t\t// caught by singularity test above, but I've left it in just in case\n\n\t\tthis.x = ( m32 - m23 ) / s;\n\t\tthis.y = ( m13 - m31 ) / s;\n\t\tthis.z = ( m21 - m12 ) / s;\n\t\tthis.w = Math.acos( ( m11 + m22 + m33 - 1 ) / 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\t\tthis.w = Math.min( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\t\tthis.w = Math.max( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\t\tthis.w = Math.max( min.w, Math.min( max.w, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\t\tthis.w = Math.max( minVal, Math.min( maxVal, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\t\tthis.w = Math.floor( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\t\tthis.w = Math.ceil( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\t\tthis.w = Math.round( this.w );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = Math.trunc( this.x );\n\t\tthis.y = Math.trunc( this.y );\n\t\tthis.z = Math.trunc( this.z );\n\t\tthis.w = Math.trunc( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\t\tthis.w = - this.w;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ) + Math.abs( this.w );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\t\tthis.w += ( v.w - this.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\t\tthis.w = v1.w + ( v2.w - v1.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) && ( v.w === this.w ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\t\tthis.w = array[ offset + 3 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\t\tarray[ offset + 3 ] = this.w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\t\tthis.w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\t\tthis.w = Math.random();\n\n\t\treturn this;\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.x;\n\t\tyield this.y;\n\t\tyield this.z;\n\t\tyield this.w;\n\n\t}\n\n}\n\n/*\n In options, we can specify:\n * Texture parameters for an auto-generated target texture\n * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n*/\nclass RenderTarget extends EventDispatcher {\n\n\tconstructor( width = 1, height = 1, options = {} ) {\n\n\t\tsuper();\n\n\t\tthis.isRenderTarget = true;\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.depth = 1;\n\n\t\tthis.scissor = new Vector4( 0, 0, width, height );\n\t\tthis.scissorTest = false;\n\n\t\tthis.viewport = new Vector4( 0, 0, width, height );\n\n\t\tconst image = { width: width, height: height, depth: 1 };\n\n\t\tif ( options.encoding !== undefined ) {\n\n\t\t\t// @deprecated, r152\n\t\t\twarnOnce( 'THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace.' );\n\t\t\toptions.colorSpace = options.encoding === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t\t}\n\n\t\toptions = Object.assign( {\n\t\t\tgenerateMipmaps: false,\n\t\t\tinternalFormat: null,\n\t\t\tminFilter: LinearFilter,\n\t\t\tdepthBuffer: true,\n\t\t\tstencilBuffer: false,\n\t\t\tdepthTexture: null,\n\t\t\tsamples: 0\n\t\t}, options );\n\n\t\tthis.texture = new Texture( image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace );\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t\tthis.texture.flipY = false;\n\t\tthis.texture.generateMipmaps = options.generateMipmaps;\n\t\tthis.texture.internalFormat = options.internalFormat;\n\n\t\tthis.depthBuffer = options.depthBuffer;\n\t\tthis.stencilBuffer = options.stencilBuffer;\n\n\t\tthis.depthTexture = options.depthTexture;\n\n\t\tthis.samples = options.samples;\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tthis.texture.image.width = width;\n\t\t\tthis.texture.image.height = height;\n\t\t\tthis.texture.image.depth = depth;\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.scissor.copy( source.scissor );\n\t\tthis.scissorTest = source.scissorTest;\n\n\t\tthis.viewport.copy( source.viewport );\n\n\t\tthis.texture = source.texture.clone();\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t\t// ensure image object is not shared, see #20328\n\n\t\tconst image = Object.assign( {}, source.texture.image );\n\t\tthis.texture.source = new Source( image );\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\n\t\tif ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone();\n\n\t\tthis.samples = source.samples;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nclass WebGLRenderTarget extends RenderTarget {\n\n\tconstructor( width = 1, height = 1, options = {} ) {\n\n\t\tsuper( width, height, options );\n\n\t\tthis.isWebGLRenderTarget = true;\n\n\t}\n\n}\n\nclass DataArrayTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( null );\n\n\t\tthis.isDataArrayTexture = true;\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t}\n\n}\n\nclass WebGLArrayRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( width, height );\n\n\t\tthis.isWebGLArrayRenderTarget = true;\n\n\t\tthis.depth = depth;\n\n\t\tthis.texture = new DataArrayTexture( null, width, height, depth );\n\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t}\n\n}\n\nclass Data3DTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\t// We're going to add .setXXX() methods for setting properties later.\n\t\t// Users can still set in DataTexture3D directly.\n\t\t//\n\t\t//\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n\t\t// \ttexture.anisotropy = 16;\n\t\t//\n\t\t// See #14839\n\n\t\tsuper( null );\n\n\t\tthis.isData3DTexture = true;\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t}\n\n}\n\nclass WebGL3DRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( width, height );\n\n\t\tthis.isWebGL3DRenderTarget = true;\n\n\t\tthis.depth = depth;\n\n\t\tthis.texture = new Data3DTexture( null, width, height, depth );\n\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t}\n\n}\n\nclass WebGLMultipleRenderTargets extends WebGLRenderTarget {\n\n\tconstructor( width = 1, height = 1, count = 1, options = {} ) {\n\n\t\tsuper( width, height, options );\n\n\t\tthis.isWebGLMultipleRenderTargets = true;\n\n\t\tconst texture = this.texture;\n\n\t\tthis.texture = [];\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.texture[ i ] = texture.clone();\n\t\t\tthis.texture[ i ].isRenderTargetTexture = true;\n\n\t\t}\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tfor ( let i = 0, il = this.texture.length; i < il; i ++ ) {\n\n\t\t\t\tthis.texture[ i ].image.width = width;\n\t\t\t\tthis.texture[ i ].image.height = height;\n\t\t\t\tthis.texture[ i ].image.depth = depth;\n\n\t\t\t}\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.dispose();\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.scissor.copy( source.scissor );\n\t\tthis.scissorTest = source.scissorTest;\n\n\t\tthis.viewport.copy( source.viewport );\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\n\t\tif ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone();\n\n\t\tthis.texture.length = 0;\n\n\t\tfor ( let i = 0, il = source.texture.length; i < il; i ++ ) {\n\n\t\t\tthis.texture[ i ] = source.texture[ i ].clone();\n\t\t\tthis.texture[ i ].isRenderTargetTexture = true;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Quaternion {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tthis.isQuaternion = true;\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t}\n\n\tstatic slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {\n\n\t\t// fuzz-free, array-based Quaternion SLERP operation\n\n\t\tlet x0 = src0[ srcOffset0 + 0 ],\n\t\t\ty0 = src0[ srcOffset0 + 1 ],\n\t\t\tz0 = src0[ srcOffset0 + 2 ],\n\t\t\tw0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 + 0 ],\n\t\t\ty1 = src1[ srcOffset1 + 1 ],\n\t\t\tz1 = src1[ srcOffset1 + 2 ],\n\t\t\tw1 = src1[ srcOffset1 + 3 ];\n\n\t\tif ( t === 0 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x0;\n\t\t\tdst[ dstOffset + 1 ] = y0;\n\t\t\tdst[ dstOffset + 2 ] = z0;\n\t\t\tdst[ dstOffset + 3 ] = w0;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( t === 1 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x1;\n\t\t\tdst[ dstOffset + 1 ] = y1;\n\t\t\tdst[ dstOffset + 2 ] = z1;\n\t\t\tdst[ dstOffset + 3 ] = w1;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {\n\n\t\t\tlet s = 1 - t;\n\t\t\tconst cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,\n\t\t\t\tdir = ( cos >= 0 ? 1 : - 1 ),\n\t\t\t\tsqrSin = 1 - cos * cos;\n\n\t\t\t// Skip the Slerp for tiny steps to avoid numeric problems:\n\t\t\tif ( sqrSin > Number.EPSILON ) {\n\n\t\t\t\tconst sin = Math.sqrt( sqrSin ),\n\t\t\t\t\tlen = Math.atan2( sin, cos * dir );\n\n\t\t\t\ts = Math.sin( s * len ) / sin;\n\t\t\t\tt = Math.sin( t * len ) / sin;\n\n\t\t\t}\n\n\t\t\tconst tDir = t * dir;\n\n\t\t\tx0 = x0 * s + x1 * tDir;\n\t\t\ty0 = y0 * s + y1 * tDir;\n\t\t\tz0 = z0 * s + z1 * tDir;\n\t\t\tw0 = w0 * s + w1 * tDir;\n\n\t\t\t// Normalize in case we just did a lerp:\n\t\t\tif ( s === 1 - t ) {\n\n\t\t\t\tconst f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 );\n\n\t\t\t\tx0 *= f;\n\t\t\t\ty0 *= f;\n\t\t\t\tz0 *= f;\n\t\t\t\tw0 *= f;\n\n\t\t\t}\n\n\t\t}\n\n\t\tdst[ dstOffset ] = x0;\n\t\tdst[ dstOffset + 1 ] = y0;\n\t\tdst[ dstOffset + 2 ] = z0;\n\t\tdst[ dstOffset + 3 ] = w0;\n\n\t}\n\n\tstatic multiplyQuaternionsFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1 ) {\n\n\t\tconst x0 = src0[ srcOffset0 ];\n\t\tconst y0 = src0[ srcOffset0 + 1 ];\n\t\tconst z0 = src0[ srcOffset0 + 2 ];\n\t\tconst w0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 ];\n\t\tconst y1 = src1[ srcOffset1 + 1 ];\n\t\tconst z1 = src1[ srcOffset1 + 2 ];\n\t\tconst w1 = src1[ srcOffset1 + 3 ];\n\n\t\tdst[ dstOffset ] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n\t\tdst[ dstOffset + 1 ] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n\t\tdst[ dstOffset + 2 ] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n\t\tdst[ dstOffset + 3 ] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n\n\t\treturn dst;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget w() {\n\n\t\treturn this._w;\n\n\t}\n\n\tset w( value ) {\n\n\t\tthis._w = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._w );\n\n\t}\n\n\tcopy( quaternion ) {\n\n\t\tthis._x = quaternion.x;\n\t\tthis._y = quaternion.y;\n\t\tthis._z = quaternion.z;\n\t\tthis._w = quaternion.w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromEuler( euler, update ) {\n\n\t\tconst x = euler._x, y = euler._y, z = euler._z, order = euler._order;\n\n\t\t// http://www.mathworks.com/matlabcentral/fileexchange/\n\t\t// \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n\t\t//\tcontent/SpinCalc.m\n\n\t\tconst cos = Math.cos;\n\t\tconst sin = Math.sin;\n\n\t\tconst c1 = cos( x / 2 );\n\t\tconst c2 = cos( y / 2 );\n\t\tconst c3 = cos( z / 2 );\n\n\t\tconst s1 = sin( x / 2 );\n\t\tconst s2 = sin( y / 2 );\n\t\tconst s3 = sin( z / 2 );\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tif ( update !== false ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromAxisAngle( axis, angle ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n\n\t\t// assumes axis is normalized\n\n\t\tconst halfAngle = angle / 2, s = Math.sin( halfAngle );\n\n\t\tthis._x = axis.x * s;\n\t\tthis._y = axis.y * s;\n\t\tthis._z = axis.z * s;\n\t\tthis._w = Math.cos( halfAngle );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ],\n\n\t\t\ttrace = m11 + m22 + m33;\n\n\t\tif ( trace > 0 ) {\n\n\t\t\tconst s = 0.5 / Math.sqrt( trace + 1.0 );\n\n\t\t\tthis._w = 0.25 / s;\n\t\t\tthis._x = ( m32 - m23 ) * s;\n\t\t\tthis._y = ( m13 - m31 ) * s;\n\t\t\tthis._z = ( m21 - m12 ) * s;\n\n\t\t} else if ( m11 > m22 && m11 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m11 - m22 - m33 );\n\n\t\t\tthis._w = ( m32 - m23 ) / s;\n\t\t\tthis._x = 0.25 * s;\n\t\t\tthis._y = ( m12 + m21 ) / s;\n\t\t\tthis._z = ( m13 + m31 ) / s;\n\n\t\t} else if ( m22 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m22 - m11 - m33 );\n\n\t\t\tthis._w = ( m13 - m31 ) / s;\n\t\t\tthis._x = ( m12 + m21 ) / s;\n\t\t\tthis._y = 0.25 * s;\n\t\t\tthis._z = ( m23 + m32 ) / s;\n\n\t\t} else {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m33 - m11 - m22 );\n\n\t\t\tthis._w = ( m21 - m12 ) / s;\n\t\t\tthis._x = ( m13 + m31 ) / s;\n\t\t\tthis._y = ( m23 + m32 ) / s;\n\t\t\tthis._z = 0.25 * s;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromUnitVectors( vFrom, vTo ) {\n\n\t\t// assumes direction vectors vFrom and vTo are normalized\n\n\t\tlet r = vFrom.dot( vTo ) + 1;\n\n\t\tif ( r < Number.EPSILON ) {\n\n\t\t\t// vFrom and vTo point in opposite directions\n\n\t\t\tr = 0;\n\n\t\t\tif ( Math.abs( vFrom.x ) > Math.abs( vFrom.z ) ) {\n\n\t\t\t\tthis._x = - vFrom.y;\n\t\t\t\tthis._y = vFrom.x;\n\t\t\t\tthis._z = 0;\n\t\t\t\tthis._w = r;\n\n\t\t\t} else {\n\n\t\t\t\tthis._x = 0;\n\t\t\t\tthis._y = - vFrom.z;\n\t\t\t\tthis._z = vFrom.y;\n\t\t\t\tthis._w = r;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n\n\t\t\tthis._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n\t\t\tthis._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n\t\t\tthis._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n\t\t\tthis._w = r;\n\n\t\t}\n\n\t\treturn this.normalize();\n\n\t}\n\n\tangleTo( q ) {\n\n\t\treturn 2 * Math.acos( Math.abs( clamp( this.dot( q ), - 1, 1 ) ) );\n\n\t}\n\n\trotateTowards( q, step ) {\n\n\t\tconst angle = this.angleTo( q );\n\n\t\tif ( angle === 0 ) return this;\n\n\t\tconst t = Math.min( 1, step / angle );\n\n\t\tthis.slerp( q, t );\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\treturn this.set( 0, 0, 0, 1 );\n\n\t}\n\n\tinvert() {\n\n\t\t// quaternion is assumed to have unit length\n\n\t\treturn this.conjugate();\n\n\t}\n\n\tconjugate() {\n\n\t\tthis._x *= - 1;\n\t\tthis._y *= - 1;\n\t\tthis._z *= - 1;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w );\n\n\t}\n\n\tnormalize() {\n\n\t\tlet l = this.length();\n\n\t\tif ( l === 0 ) {\n\n\t\t\tthis._x = 0;\n\t\t\tthis._y = 0;\n\t\t\tthis._z = 0;\n\t\t\tthis._w = 1;\n\n\t\t} else {\n\n\t\t\tl = 1 / l;\n\n\t\t\tthis._x = this._x * l;\n\t\t\tthis._y = this._y * l;\n\t\t\tthis._z = this._z * l;\n\t\t\tthis._w = this._w * l;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( q ) {\n\n\t\treturn this.multiplyQuaternions( this, q );\n\n\t}\n\n\tpremultiply( q ) {\n\n\t\treturn this.multiplyQuaternions( q, this );\n\n\t}\n\n\tmultiplyQuaternions( a, b ) {\n\n\t\t// from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n\n\t\tconst qax = a._x, qay = a._y, qaz = a._z, qaw = a._w;\n\t\tconst qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w;\n\n\t\tthis._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n\t\tthis._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n\t\tthis._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n\t\tthis._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerp( qb, t ) {\n\n\t\tif ( t === 0 ) return this;\n\t\tif ( t === 1 ) return this.copy( qb );\n\n\t\tconst x = this._x, y = this._y, z = this._z, w = this._w;\n\n\t\t// http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n\n\t\tlet cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n\n\t\tif ( cosHalfTheta < 0 ) {\n\n\t\t\tthis._w = - qb._w;\n\t\t\tthis._x = - qb._x;\n\t\t\tthis._y = - qb._y;\n\t\t\tthis._z = - qb._z;\n\n\t\t\tcosHalfTheta = - cosHalfTheta;\n\n\t\t} else {\n\n\t\t\tthis.copy( qb );\n\n\t\t}\n\n\t\tif ( cosHalfTheta >= 1.0 ) {\n\n\t\t\tthis._w = w;\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n\n\t\tif ( sqrSinHalfTheta <= Number.EPSILON ) {\n\n\t\t\tconst s = 1 - t;\n\t\t\tthis._w = s * w + t * this._w;\n\t\t\tthis._x = s * x + t * this._x;\n\t\t\tthis._y = s * y + t * this._y;\n\t\t\tthis._z = s * z + t * this._z;\n\n\t\t\tthis.normalize();\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sinHalfTheta = Math.sqrt( sqrSinHalfTheta );\n\t\tconst halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta );\n\t\tconst ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta,\n\t\t\tratioB = Math.sin( t * halfTheta ) / sinHalfTheta;\n\n\t\tthis._w = ( w * ratioA + this._w * ratioB );\n\t\tthis._x = ( x * ratioA + this._x * ratioB );\n\t\tthis._y = ( y * ratioA + this._y * ratioB );\n\t\tthis._z = ( z * ratioA + this._z * ratioB );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerpQuaternions( qa, qb, t ) {\n\n\t\treturn this.copy( qa ).slerp( qb, t );\n\n\t}\n\n\trandom() {\n\n\t\t// Derived from http://planning.cs.uiuc.edu/node198.html\n\t\t// Note, this source uses w, x, y, z ordering,\n\t\t// so we swap the order below.\n\n\t\tconst u1 = Math.random();\n\t\tconst sqrt1u1 = Math.sqrt( 1 - u1 );\n\t\tconst sqrtu1 = Math.sqrt( u1 );\n\n\t\tconst u2 = 2 * Math.PI * Math.random();\n\n\t\tconst u3 = 2 * Math.PI * Math.random();\n\n\t\treturn this.set(\n\t\t\tsqrt1u1 * Math.cos( u2 ),\n\t\t\tsqrtu1 * Math.sin( u3 ),\n\t\t\tsqrtu1 * Math.cos( u3 ),\n\t\t\tsqrt1u1 * Math.sin( u2 ),\n\t\t);\n\n\t}\n\n\tequals( quaternion ) {\n\n\t\treturn ( quaternion._x === this._x ) && ( quaternion._y === this._y ) && ( quaternion._z === this._z ) && ( quaternion._w === this._w );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis._x = array[ offset ];\n\t\tthis._y = array[ offset + 1 ];\n\t\tthis._z = array[ offset + 2 ];\n\t\tthis._w = array[ offset + 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis._x = attribute.getX( index );\n\t\tthis._y = attribute.getY( index );\n\t\tthis._z = attribute.getZ( index );\n\t\tthis._w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.toArray();\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this._x;\n\t\tyield this._y;\n\t\tyield this._z;\n\t\tyield this._w;\n\n\t}\n\n}\n\nclass Vector3 {\n\n\tconstructor( x = 0, y = 0, z = 0 ) {\n\n\t\tVector3.prototype.isVector3 = true;\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t}\n\n\tset( x, y, z ) {\n\n\t\tif ( z === undefined ) z = this.z; // sprite.scale.set(x,y)\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v ) {\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v ) {\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyVectors( a, b ) {\n\n\t\tthis.x = a.x * b.x;\n\t\tthis.y = a.y * b.y;\n\t\tthis.z = a.z * b.z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyEuler( euler ) {\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromEuler( euler ) );\n\n\t}\n\n\tapplyAxisAngle( axis, angle ) {\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromAxisAngle( axis, angle ) );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\treturn this.applyMatrix3( m ).normalize();\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tconst w = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] );\n\n\t\tthis.x = ( e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] ) * w;\n\t\tthis.y = ( e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] ) * w;\n\t\tthis.z = ( e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] ) * w;\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\t// quaternion q is assumed to have unit length\n\n\t\tconst vx = this.x, vy = this.y, vz = this.z;\n\t\tconst qx = q.x, qy = q.y, qz = q.z, qw = q.w;\n\n\t\t// t = 2 * cross( q.xyz, v );\n\t\tconst tx = 2 * ( qy * vz - qz * vy );\n\t\tconst ty = 2 * ( qz * vx - qx * vz );\n\t\tconst tz = 2 * ( qx * vy - qy * vx );\n\n\t\t// v + q.w * t + cross( q.xyz, t );\n\t\tthis.x = vx + qw * tx + qy * tz - qz * ty;\n\t\tthis.y = vy + qw * ty + qz * tx - qx * tz;\n\t\tthis.z = vz + qw * tz + qx * ty - qy * tx;\n\n\t\treturn this;\n\n\t}\n\n\tproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.matrixWorldInverse ).applyMatrix4( camera.projectionMatrix );\n\n\t}\n\n\tunproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld );\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\t// input: THREE.Matrix4 affine matrix\n\t\t// vector interpreted as a direction\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z;\n\n\t\treturn this.normalize();\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\t\tthis.z /= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = Math.trunc( this.x );\n\t\tthis.y = Math.trunc( this.y );\n\t\tthis.z = Math.trunc( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z;\n\n\t}\n\n\t// TODO lengthSquared?\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tcross( v ) {\n\n\t\treturn this.crossVectors( this, v );\n\n\t}\n\n\tcrossVectors( a, b ) {\n\n\t\tconst ax = a.x, ay = a.y, az = a.z;\n\t\tconst bx = b.x, by = b.y, bz = b.z;\n\n\t\tthis.x = ay * bz - az * by;\n\t\tthis.y = az * bx - ax * bz;\n\t\tthis.z = ax * by - ay * bx;\n\n\t\treturn this;\n\n\t}\n\n\tprojectOnVector( v ) {\n\n\t\tconst denominator = v.lengthSq();\n\n\t\tif ( denominator === 0 ) return this.set( 0, 0, 0 );\n\n\t\tconst scalar = v.dot( this ) / denominator;\n\n\t\treturn this.copy( v ).multiplyScalar( scalar );\n\n\t}\n\n\tprojectOnPlane( planeNormal ) {\n\n\t\t_vector$b.copy( this ).projectOnVector( planeNormal );\n\n\t\treturn this.sub( _vector$b );\n\n\t}\n\n\treflect( normal ) {\n\n\t\t// reflect incident vector off plane orthogonal to normal\n\t\t// normal is assumed to have unit length\n\n\t\treturn this.sub( _vector$b.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) );\n\n\t}\n\n\tangleTo( v ) {\n\n\t\tconst denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );\n\n\t\tif ( denominator === 0 ) return Math.PI / 2;\n\n\t\tconst theta = this.dot( v ) / denominator;\n\n\t\t// clamp, to handle numerical problems\n\n\t\treturn Math.acos( clamp( theta, - 1, 1 ) );\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;\n\n\t\treturn dx * dx + dy * dy + dz * dz;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z );\n\n\t}\n\n\tsetFromSpherical( s ) {\n\n\t\treturn this.setFromSphericalCoords( s.radius, s.phi, s.theta );\n\n\t}\n\n\tsetFromSphericalCoords( radius, phi, theta ) {\n\n\t\tconst sinPhiRadius = Math.sin( phi ) * radius;\n\n\t\tthis.x = sinPhiRadius * Math.sin( theta );\n\t\tthis.y = Math.cos( phi ) * radius;\n\t\tthis.z = sinPhiRadius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCylindrical( c ) {\n\n\t\treturn this.setFromCylindricalCoords( c.radius, c.theta, c.y );\n\n\t}\n\n\tsetFromCylindricalCoords( radius, theta, y ) {\n\n\t\tthis.x = radius * Math.sin( theta );\n\t\tthis.y = y;\n\t\tthis.z = radius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixPosition( m ) {\n\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 12 ];\n\t\tthis.y = e[ 13 ];\n\t\tthis.z = e[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixScale( m ) {\n\n\t\tconst sx = this.setFromMatrixColumn( m, 0 ).length();\n\t\tconst sy = this.setFromMatrixColumn( m, 1 ).length();\n\t\tconst sz = this.setFromMatrixColumn( m, 2 ).length();\n\n\t\tthis.x = sx;\n\t\tthis.y = sy;\n\t\tthis.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixColumn( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 4 );\n\n\t}\n\n\tsetFromMatrix3Column( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 3 );\n\n\t}\n\n\tsetFromEuler( e ) {\n\n\t\tthis.x = e._x;\n\t\tthis.y = e._y;\n\t\tthis.z = e._z;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromColor( c ) {\n\n\t\tthis.x = c.r;\n\t\tthis.y = c.g;\n\t\tthis.z = c.b;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\n\t\treturn this;\n\n\t}\n\n\trandomDirection() {\n\n\t\t// Derived from https://mathworld.wolfram.com/SpherePointPicking.html\n\n\t\tconst u = ( Math.random() - 0.5 ) * 2;\n\t\tconst t = Math.random() * Math.PI * 2;\n\t\tconst f = Math.sqrt( 1 - u ** 2 );\n\n\t\tthis.x = f * Math.cos( t );\n\t\tthis.y = f * Math.sin( t );\n\t\tthis.z = u;\n\n\t\treturn this;\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.x;\n\t\tyield this.y;\n\t\tyield this.z;\n\n\t}\n\n}\n\nconst _vector$b = /*@__PURE__*/ new Vector3();\nconst _quaternion$4 = /*@__PURE__*/ new Quaternion();\n\nclass Box3 {\n\n\tconstructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) {\n\n\t\tthis.isBox3 = true;\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromArray( array ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = array.length; i < il; i += 3 ) {\n\n\t\t\tthis.expandByPoint( _vector$a.fromArray( array, i ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromBufferAttribute( attribute ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = attribute.count; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( _vector$a.fromBufferAttribute( attribute, i ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$a.copy( size ).multiplyScalar( 0.5 );\n\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromObject( object, precise = false ) {\n\n\t\tthis.makeEmpty();\n\n\t\treturn this.expandByObject( object, precise );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = this.min.z = + Infinity;\n\t\tthis.max.x = this.max.y = this.max.z = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ) || ( this.max.z < this.min.z );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\texpandByObject( object, precise = false ) {\n\n\t\t// Computes the world-axis-aligned bounding box of an object (including its children),\n\t\t// accounting for both the object's, and children's, world transforms\n\n\t\tobject.updateWorldMatrix( false, false );\n\n\t\tconst geometry = object.geometry;\n\n\t\tif ( geometry !== undefined ) {\n\n\t\t\tconst positionAttribute = geometry.getAttribute( 'position' );\n\n\t\t\t// precise AABB computation based on vertex data requires at least a position attribute.\n\t\t\t// instancing isn't supported so far and uses the normal (conservative) code path.\n\n\t\t\tif ( precise === true && positionAttribute !== undefined && object.isInstancedMesh !== true ) {\n\n\t\t\t\tfor ( let i = 0, l = positionAttribute.count; i < l; i ++ ) {\n\n\t\t\t\t\tif ( object.isMesh === true ) {\n\n\t\t\t\t\t\tobject.getVertexPosition( i, _vector$a );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_vector$a.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t_vector$a.applyMatrix4( object.matrixWorld );\n\t\t\t\t\tthis.expandByPoint( _vector$a );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( object.boundingBox !== undefined ) {\n\n\t\t\t\t\t// object-level bounding box\n\n\t\t\t\t\tif ( object.boundingBox === null ) {\n\n\t\t\t\t\t\tobject.computeBoundingBox();\n\n\t\t\t\t\t}\n\n\t\t\t\t\t_box$3.copy( object.boundingBox );\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// geometry-level bounding box\n\n\t\t\t\t\tif ( geometry.boundingBox === null ) {\n\n\t\t\t\t\t\tgeometry.computeBoundingBox();\n\n\t\t\t\t\t}\n\n\t\t\t\t\t_box$3.copy( geometry.boundingBox );\n\n\t\t\t\t}\n\n\t\t\t\t_box$3.applyMatrix4( object.matrixWorld );\n\n\t\t\t\tthis.union( _box$3 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tthis.expandByObject( children[ i ], precise );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ||\n\t\t\tpoint.z < this.min.z || point.z > this.max.z ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y &&\n\t\t\tthis.min.z <= box.min.z && box.max.z <= this.max.z;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y ),\n\t\t\t( point.z - this.min.z ) / ( this.max.z - this.min.z )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 6 splitting planes to rule out intersections.\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ||\n\t\t\tbox.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\t// Find the point on the AABB closest to the sphere center.\n\t\tthis.clampPoint( sphere.center, _vector$a );\n\n\t\t// If that point is inside the sphere, the AABB and sphere intersect.\n\t\treturn _vector$a.distanceToSquared( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// We compute the minimum and maximum dot product values. If those values\n\t\t// are on the same side (back or front) of the plane, then there is no intersection.\n\n\t\tlet min, max;\n\n\t\tif ( plane.normal.x > 0 ) {\n\n\t\t\tmin = plane.normal.x * this.min.x;\n\t\t\tmax = plane.normal.x * this.max.x;\n\n\t\t} else {\n\n\t\t\tmin = plane.normal.x * this.max.x;\n\t\t\tmax = plane.normal.x * this.min.x;\n\n\t\t}\n\n\t\tif ( plane.normal.y > 0 ) {\n\n\t\t\tmin += plane.normal.y * this.min.y;\n\t\t\tmax += plane.normal.y * this.max.y;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.y * this.max.y;\n\t\t\tmax += plane.normal.y * this.min.y;\n\n\t\t}\n\n\t\tif ( plane.normal.z > 0 ) {\n\n\t\t\tmin += plane.normal.z * this.min.z;\n\t\t\tmax += plane.normal.z * this.max.z;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.z * this.max.z;\n\t\t\tmax += plane.normal.z * this.min.z;\n\n\t\t}\n\n\t\treturn ( min <= - plane.constant && max >= - plane.constant );\n\n\t}\n\n\tintersectsTriangle( triangle ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// compute box center and extents\n\t\tthis.getCenter( _center );\n\t\t_extents.subVectors( this.max, _center );\n\n\t\t// translate triangle to aabb origin\n\t\t_v0$2.subVectors( triangle.a, _center );\n\t\t_v1$7.subVectors( triangle.b, _center );\n\t\t_v2$4.subVectors( triangle.c, _center );\n\n\t\t// compute edge vectors for triangle\n\t\t_f0.subVectors( _v1$7, _v0$2 );\n\t\t_f1.subVectors( _v2$4, _v1$7 );\n\t\t_f2.subVectors( _v0$2, _v2$4 );\n\n\t\t// test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n\t\t// make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n\t\t// axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n\t\tlet axes = [\n\t\t\t0, - _f0.z, _f0.y, 0, - _f1.z, _f1.y, 0, - _f2.z, _f2.y,\n\t\t\t_f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x,\n\t\t\t- _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0\n\t\t];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// test 3 face normals from the aabb\n\t\taxes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// finally testing the face normal of the triangle\n\t\t// use already existing triangle edge vectors here\n\t\t_triangleNormal.crossVectors( _f0, _f1 );\n\t\taxes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ];\n\n\t\treturn satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents );\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.clampPoint( point, _vector$a ).distanceTo( point );\n\n\t}\n\n\tgetBoundingSphere( target ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\ttarget.makeEmpty();\n\n\t\t} else {\n\n\t\t\tthis.getCenter( target.center );\n\n\t\t\ttarget.radius = this.getSize( _vector$a ).length() * 0.5;\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\t// ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n\t\tif ( this.isEmpty() ) this.makeEmpty();\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\t// transform of empty box is an empty box.\n\t\tif ( this.isEmpty() ) return this;\n\n\t\t// NOTE: I am using a binary pattern to specify all 2^3 combinations below\n\t\t_points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000\n\t\t_points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001\n\t\t_points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010\n\t\t_points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011\n\t\t_points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100\n\t\t_points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101\n\t\t_points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110\n\t\t_points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111\n\n\t\tthis.setFromPoints( _points );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nconst _points = [\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3()\n];\n\nconst _vector$a = /*@__PURE__*/ new Vector3();\n\nconst _box$3 = /*@__PURE__*/ new Box3();\n\n// triangle centered vertices\n\nconst _v0$2 = /*@__PURE__*/ new Vector3();\nconst _v1$7 = /*@__PURE__*/ new Vector3();\nconst _v2$4 = /*@__PURE__*/ new Vector3();\n\n// triangle edge vectors\n\nconst _f0 = /*@__PURE__*/ new Vector3();\nconst _f1 = /*@__PURE__*/ new Vector3();\nconst _f2 = /*@__PURE__*/ new Vector3();\n\nconst _center = /*@__PURE__*/ new Vector3();\nconst _extents = /*@__PURE__*/ new Vector3();\nconst _triangleNormal = /*@__PURE__*/ new Vector3();\nconst _testAxis = /*@__PURE__*/ new Vector3();\n\nfunction satForAxes( axes, v0, v1, v2, extents ) {\n\n\tfor ( let i = 0, j = axes.length - 3; i <= j; i += 3 ) {\n\n\t\t_testAxis.fromArray( axes, i );\n\t\t// project the aabb onto the separating axis\n\t\tconst r = extents.x * Math.abs( _testAxis.x ) + extents.y * Math.abs( _testAxis.y ) + extents.z * Math.abs( _testAxis.z );\n\t\t// project all 3 vertices of the triangle onto the separating axis\n\t\tconst p0 = v0.dot( _testAxis );\n\t\tconst p1 = v1.dot( _testAxis );\n\t\tconst p2 = v2.dot( _testAxis );\n\t\t// actual test, basically see if either of the most extreme of the triangle points intersects r\n\t\tif ( Math.max( - Math.max( p0, p1, p2 ), Math.min( p0, p1, p2 ) ) > r ) {\n\n\t\t\t// points of the projected triangle are outside the projected half-length of the aabb\n\t\t\t// the axis is separating and we can exit\n\t\t\treturn false;\n\n\t\t}\n\n\t}\n\n\treturn true;\n\n}\n\nconst _box$2 = /*@__PURE__*/ new Box3();\nconst _v1$6 = /*@__PURE__*/ new Vector3();\nconst _v2$3 = /*@__PURE__*/ new Vector3();\n\nclass Sphere {\n\n\tconstructor( center = new Vector3(), radius = - 1 ) {\n\n\t\tthis.center = center;\n\t\tthis.radius = radius;\n\n\t}\n\n\tset( center, radius ) {\n\n\t\tthis.center.copy( center );\n\t\tthis.radius = radius;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points, optionalCenter ) {\n\n\t\tconst center = this.center;\n\n\t\tif ( optionalCenter !== undefined ) {\n\n\t\t\tcenter.copy( optionalCenter );\n\n\t\t} else {\n\n\t\t\t_box$2.setFromPoints( points ).getCenter( center );\n\n\t\t}\n\n\t\tlet maxRadiusSq = 0;\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) );\n\n\t\t}\n\n\t\tthis.radius = Math.sqrt( maxRadiusSq );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( sphere ) {\n\n\t\tthis.center.copy( sphere.center );\n\t\tthis.radius = sphere.radius;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\treturn ( this.radius < 0 );\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.center.set( 0, 0, 0 );\n\t\tthis.radius = - 1;\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn ( point.distanceTo( this.center ) - this.radius );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst radiusSum = this.radius + sphere.radius;\n\n\t\treturn sphere.center.distanceToSquared( this.center ) <= ( radiusSum * radiusSum );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsSphere( this );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\treturn Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\tconst deltaLengthSq = this.center.distanceToSquared( point );\n\n\t\ttarget.copy( point );\n\n\t\tif ( deltaLengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\ttarget.sub( this.center ).normalize();\n\t\t\ttarget.multiplyScalar( this.radius ).add( this.center );\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\tgetBoundingBox( target ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\t// Empty sphere produces empty bounding box\n\t\t\ttarget.makeEmpty();\n\t\t\treturn target;\n\n\t\t}\n\n\t\ttarget.set( this.center, this.center );\n\t\ttarget.expandByScalar( this.radius );\n\n\t\treturn target;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.center.applyMatrix4( matrix );\n\t\tthis.radius = this.radius * matrix.getMaxScaleOnAxis();\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.center.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\tthis.center.copy( point );\n\n\t\t\tthis.radius = 0;\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\t_v1$6.subVectors( point, this.center );\n\n\t\tconst lengthSq = _v1$6.lengthSq();\n\n\t\tif ( lengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\t// calculate the minimal sphere\n\n\t\t\tconst length = Math.sqrt( lengthSq );\n\n\t\t\tconst delta = ( length - this.radius ) * 0.5;\n\n\t\t\tthis.center.addScaledVector( _v1$6, delta / length );\n\n\t\t\tthis.radius += delta;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tunion( sphere ) {\n\n\t\tif ( sphere.isEmpty() ) {\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\tthis.copy( sphere );\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( this.center.equals( sphere.center ) === true ) {\n\n\t\t\t this.radius = Math.max( this.radius, sphere.radius );\n\n\t\t} else {\n\n\t\t\t_v2$3.subVectors( sphere.center, this.center ).setLength( sphere.radius );\n\n\t\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).add( _v2$3 ) );\n\n\t\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).sub( _v2$3 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tequals( sphere ) {\n\n\t\treturn sphere.center.equals( this.center ) && ( sphere.radius === this.radius );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$9 = /*@__PURE__*/ new Vector3();\nconst _segCenter = /*@__PURE__*/ new Vector3();\nconst _segDir = /*@__PURE__*/ new Vector3();\nconst _diff = /*@__PURE__*/ new Vector3();\n\nconst _edge1 = /*@__PURE__*/ new Vector3();\nconst _edge2 = /*@__PURE__*/ new Vector3();\nconst _normal$1 = /*@__PURE__*/ new Vector3();\n\nclass Ray {\n\n\tconstructor( origin = new Vector3(), direction = new Vector3( 0, 0, - 1 ) ) {\n\n\t\tthis.origin = origin;\n\t\tthis.direction = direction;\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\tthis.origin.copy( origin );\n\t\tthis.direction.copy( direction );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( ray ) {\n\n\t\tthis.origin.copy( ray.origin );\n\t\tthis.direction.copy( ray.direction );\n\n\t\treturn this;\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn target.copy( this.origin ).addScaledVector( this.direction, t );\n\n\t}\n\n\tlookAt( v ) {\n\n\t\tthis.direction.copy( v ).sub( this.origin ).normalize();\n\n\t\treturn this;\n\n\t}\n\n\trecast( t ) {\n\n\t\tthis.origin.copy( this.at( t, _vector$9 ) );\n\n\t\treturn this;\n\n\t}\n\n\tclosestPointToPoint( point, target ) {\n\n\t\ttarget.subVectors( point, this.origin );\n\n\t\tconst directionDistance = target.dot( this.direction );\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn target.copy( this.origin );\n\n\t\t}\n\n\t\treturn target.copy( this.origin ).addScaledVector( this.direction, directionDistance );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn Math.sqrt( this.distanceSqToPoint( point ) );\n\n\t}\n\n\tdistanceSqToPoint( point ) {\n\n\t\tconst directionDistance = _vector$9.subVectors( point, this.origin ).dot( this.direction );\n\n\t\t// point behind the ray\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn this.origin.distanceToSquared( point );\n\n\t\t}\n\n\t\t_vector$9.copy( this.origin ).addScaledVector( this.direction, directionDistance );\n\n\t\treturn _vector$9.distanceToSquared( point );\n\n\t}\n\n\tdistanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) {\n\n\t\t// from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteDistRaySegment.h\n\t\t// It returns the min distance between the ray and the segment\n\t\t// defined by v0 and v1\n\t\t// It can also set two optional targets :\n\t\t// - The closest point on the ray\n\t\t// - The closest point on the segment\n\n\t\t_segCenter.copy( v0 ).add( v1 ).multiplyScalar( 0.5 );\n\t\t_segDir.copy( v1 ).sub( v0 ).normalize();\n\t\t_diff.copy( this.origin ).sub( _segCenter );\n\n\t\tconst segExtent = v0.distanceTo( v1 ) * 0.5;\n\t\tconst a01 = - this.direction.dot( _segDir );\n\t\tconst b0 = _diff.dot( this.direction );\n\t\tconst b1 = - _diff.dot( _segDir );\n\t\tconst c = _diff.lengthSq();\n\t\tconst det = Math.abs( 1 - a01 * a01 );\n\t\tlet s0, s1, sqrDist, extDet;\n\n\t\tif ( det > 0 ) {\n\n\t\t\t// The ray and segment are not parallel.\n\n\t\t\ts0 = a01 * b1 - b0;\n\t\t\ts1 = a01 * b0 - b1;\n\t\t\textDet = segExtent * det;\n\n\t\t\tif ( s0 >= 0 ) {\n\n\t\t\t\tif ( s1 >= - extDet ) {\n\n\t\t\t\t\tif ( s1 <= extDet ) {\n\n\t\t\t\t\t\t// region 0\n\t\t\t\t\t\t// Minimum at interior points of ray and segment.\n\n\t\t\t\t\t\tconst invDet = 1 / det;\n\t\t\t\t\t\ts0 *= invDet;\n\t\t\t\t\t\ts1 *= invDet;\n\t\t\t\t\t\tsqrDist = s0 * ( s0 + a01 * s1 + 2 * b0 ) + s1 * ( a01 * s0 + s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// region 1\n\n\t\t\t\t\t\ts1 = segExtent;\n\t\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 5\n\n\t\t\t\t\ts1 = - segExtent;\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( s1 <= - extDet ) {\n\n\t\t\t\t\t// region 4\n\n\t\t\t\t\ts0 = Math.max( 0, - ( - a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? - segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else if ( s1 <= extDet ) {\n\n\t\t\t\t\t// region 3\n\n\t\t\t\t\ts0 = 0;\n\t\t\t\t\ts1 = Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 2\n\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// Ray and segment are parallel.\n\n\t\t\ts1 = ( a01 > 0 ) ? - segExtent : segExtent;\n\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t}\n\n\t\tif ( optionalPointOnRay ) {\n\n\t\t\toptionalPointOnRay.copy( this.origin ).addScaledVector( this.direction, s0 );\n\n\t\t}\n\n\t\tif ( optionalPointOnSegment ) {\n\n\t\t\toptionalPointOnSegment.copy( _segCenter ).addScaledVector( _segDir, s1 );\n\n\t\t}\n\n\t\treturn sqrDist;\n\n\t}\n\n\tintersectSphere( sphere, target ) {\n\n\t\t_vector$9.subVectors( sphere.center, this.origin );\n\t\tconst tca = _vector$9.dot( this.direction );\n\t\tconst d2 = _vector$9.dot( _vector$9 ) - tca * tca;\n\t\tconst radius2 = sphere.radius * sphere.radius;\n\n\t\tif ( d2 > radius2 ) return null;\n\n\t\tconst thc = Math.sqrt( radius2 - d2 );\n\n\t\t// t0 = first intersect point - entrance on front of sphere\n\t\tconst t0 = tca - thc;\n\n\t\t// t1 = second intersect point - exit point on back of sphere\n\t\tconst t1 = tca + thc;\n\n\t\t// test to see if t1 is behind the ray - if so, return null\n\t\tif ( t1 < 0 ) return null;\n\n\t\t// test to see if t0 is behind the ray:\n\t\t// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n\t\t// in order to always return an intersect point that is in front of the ray.\n\t\tif ( t0 < 0 ) return this.at( t1, target );\n\n\t\t// else t0 is in front of the ray, so return the first collision point scaled by t0\n\t\treturn this.at( t0, target );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn this.distanceSqToPoint( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tdistanceToPlane( plane ) {\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( plane.distanceToPoint( this.origin ) === 0 ) {\n\n\t\t\t\treturn 0;\n\n\t\t\t}\n\n\t\t\t// Null is preferable to undefined since undefined means.... it is undefined\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( this.origin.dot( plane.normal ) + plane.constant ) / denominator;\n\n\t\t// Return if the ray never intersects the plane\n\n\t\treturn t >= 0 ? t : null;\n\n\t}\n\n\tintersectPlane( plane, target ) {\n\n\t\tconst t = this.distanceToPlane( plane );\n\n\t\tif ( t === null ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn this.at( t, target );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// check if the ray lies on the plane first\n\n\t\tconst distToPoint = plane.distanceToPoint( this.origin );\n\n\t\tif ( distToPoint === 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator * distToPoint < 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\t// ray origin is behind the plane (and is pointing behind it)\n\n\t\treturn false;\n\n\t}\n\n\tintersectBox( box, target ) {\n\n\t\tlet tmin, tmax, tymin, tymax, tzmin, tzmax;\n\n\t\tconst invdirx = 1 / this.direction.x,\n\t\t\tinvdiry = 1 / this.direction.y,\n\t\t\tinvdirz = 1 / this.direction.z;\n\n\t\tconst origin = this.origin;\n\n\t\tif ( invdirx >= 0 ) {\n\n\t\t\ttmin = ( box.min.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.max.x - origin.x ) * invdirx;\n\n\t\t} else {\n\n\t\t\ttmin = ( box.max.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.min.x - origin.x ) * invdirx;\n\n\t\t}\n\n\t\tif ( invdiry >= 0 ) {\n\n\t\t\ttymin = ( box.min.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.max.y - origin.y ) * invdiry;\n\n\t\t} else {\n\n\t\t\ttymin = ( box.max.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.min.y - origin.y ) * invdiry;\n\n\t\t}\n\n\t\tif ( ( tmin > tymax ) || ( tymin > tmax ) ) return null;\n\n\t\tif ( tymin > tmin || isNaN( tmin ) ) tmin = tymin;\n\n\t\tif ( tymax < tmax || isNaN( tmax ) ) tmax = tymax;\n\n\t\tif ( invdirz >= 0 ) {\n\n\t\t\ttzmin = ( box.min.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.max.z - origin.z ) * invdirz;\n\n\t\t} else {\n\n\t\t\ttzmin = ( box.max.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.min.z - origin.z ) * invdirz;\n\n\t\t}\n\n\t\tif ( ( tmin > tzmax ) || ( tzmin > tmax ) ) return null;\n\n\t\tif ( tzmin > tmin || tmin !== tmin ) tmin = tzmin;\n\n\t\tif ( tzmax < tmax || tmax !== tmax ) tmax = tzmax;\n\n\t\t//return point closest to the ray (positive side)\n\n\t\tif ( tmax < 0 ) return null;\n\n\t\treturn this.at( tmin >= 0 ? tmin : tmax, target );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn this.intersectBox( box, _vector$9 ) !== null;\n\n\t}\n\n\tintersectTriangle( a, b, c, backfaceCulling, target ) {\n\n\t\t// Compute the offset origin, edges, and normal.\n\n\t\t// from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n\n\t\t_edge1.subVectors( b, a );\n\t\t_edge2.subVectors( c, a );\n\t\t_normal$1.crossVectors( _edge1, _edge2 );\n\n\t\t// Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n\t\t// E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n\t\t// |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n\t\t// |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n\t\t// |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n\t\tlet DdN = this.direction.dot( _normal$1 );\n\t\tlet sign;\n\n\t\tif ( DdN > 0 ) {\n\n\t\t\tif ( backfaceCulling ) return null;\n\t\t\tsign = 1;\n\n\t\t} else if ( DdN < 0 ) {\n\n\t\t\tsign = - 1;\n\t\t\tDdN = - DdN;\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t_diff.subVectors( this.origin, a );\n\t\tconst DdQxE2 = sign * this.direction.dot( _edge2.crossVectors( _diff, _edge2 ) );\n\n\t\t// b1 < 0, no intersection\n\t\tif ( DdQxE2 < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst DdE1xQ = sign * this.direction.dot( _edge1.cross( _diff ) );\n\n\t\t// b2 < 0, no intersection\n\t\tif ( DdE1xQ < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// b1+b2 > 1, no intersection\n\t\tif ( DdQxE2 + DdE1xQ > DdN ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Line intersects triangle, check if ray does.\n\t\tconst QdN = - sign * _diff.dot( _normal$1 );\n\n\t\t// t < 0, no intersection\n\t\tif ( QdN < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Ray intersects triangle.\n\t\treturn this.at( QdN / DdN, target );\n\n\t}\n\n\tapplyMatrix4( matrix4 ) {\n\n\t\tthis.origin.applyMatrix4( matrix4 );\n\t\tthis.direction.transformDirection( matrix4 );\n\n\t\treturn this;\n\n\t}\n\n\tequals( ray ) {\n\n\t\treturn ray.origin.equals( this.origin ) && ray.direction.equals( this.direction );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass Matrix4 {\n\n\tconstructor( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {\n\n\t\tMatrix4.prototype.isMatrix4 = true;\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t];\n\n\t\tif ( n11 !== undefined ) {\n\n\t\t\tthis.set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 4 ] = n12; te[ 8 ] = n13; te[ 12 ] = n14;\n\t\tte[ 1 ] = n21; te[ 5 ] = n22; te[ 9 ] = n23; te[ 13 ] = n24;\n\t\tte[ 2 ] = n31; te[ 6 ] = n32; te[ 10 ] = n33; te[ 14 ] = n34;\n\t\tte[ 3 ] = n41; te[ 7 ] = n42; te[ 11 ] = n43; te[ 15 ] = n44;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Matrix4().fromArray( this.elements );\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; te[ 3 ] = me[ 3 ];\n\t\tte[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ];\n\t\tte[ 8 ] = me[ 8 ]; te[ 9 ] = me[ 9 ]; te[ 10 ] = me[ 10 ]; te[ 11 ] = me[ 11 ];\n\t\tte[ 12 ] = me[ 12 ]; te[ 13 ] = me[ 13 ]; te[ 14 ] = me[ 14 ]; te[ 15 ] = me[ 15 ];\n\n\t\treturn this;\n\n\t}\n\n\tcopyPosition( m ) {\n\n\t\tconst te = this.elements, me = m.elements;\n\n\t\tte[ 12 ] = me[ 12 ];\n\t\tte[ 13 ] = me[ 13 ];\n\t\tte[ 14 ] = me[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix3( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 3 ], me[ 6 ], 0,\n\t\t\tme[ 1 ], me[ 4 ], me[ 7 ], 0,\n\t\t\tme[ 2 ], me[ 5 ], me[ 8 ], 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrixColumn( this, 0 );\n\t\tyAxis.setFromMatrixColumn( this, 1 );\n\t\tzAxis.setFromMatrixColumn( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmakeBasis( xAxis, yAxis, zAxis ) {\n\n\t\tthis.set(\n\t\t\txAxis.x, yAxis.x, zAxis.x, 0,\n\t\t\txAxis.y, yAxis.y, zAxis.y, 0,\n\t\t\txAxis.z, yAxis.z, zAxis.z, 0,\n\t\t\t0, 0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractRotation( m ) {\n\n\t\t// this method does not support reflection matrices\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tconst scaleX = 1 / _v1$5.setFromMatrixColumn( m, 0 ).length();\n\t\tconst scaleY = 1 / _v1$5.setFromMatrixColumn( m, 1 ).length();\n\t\tconst scaleZ = 1 / _v1$5.setFromMatrixColumn( m, 2 ).length();\n\n\t\tte[ 0 ] = me[ 0 ] * scaleX;\n\t\tte[ 1 ] = me[ 1 ] * scaleX;\n\t\tte[ 2 ] = me[ 2 ] * scaleX;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = me[ 4 ] * scaleY;\n\t\tte[ 5 ] = me[ 5 ] * scaleY;\n\t\tte[ 6 ] = me[ 6 ] * scaleY;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = me[ 8 ] * scaleZ;\n\t\tte[ 9 ] = me[ 9 ] * scaleZ;\n\t\tte[ 10 ] = me[ 10 ] * scaleZ;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromEuler( euler ) {\n\n\t\tconst te = this.elements;\n\n\t\tconst x = euler.x, y = euler.y, z = euler.z;\n\t\tconst a = Math.cos( x ), b = Math.sin( x );\n\t\tconst c = Math.cos( y ), d = Math.sin( y );\n\t\tconst e = Math.cos( z ), f = Math.sin( z );\n\n\t\tif ( euler.order === 'XYZ' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - c * f;\n\t\t\tte[ 8 ] = d;\n\n\t\t\tte[ 1 ] = af + be * d;\n\t\t\tte[ 5 ] = ae - bf * d;\n\t\t\tte[ 9 ] = - b * c;\n\n\t\t\tte[ 2 ] = bf - ae * d;\n\t\t\tte[ 6 ] = be + af * d;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YXZ' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce + df * b;\n\t\t\tte[ 4 ] = de * b - cf;\n\t\t\tte[ 8 ] = a * d;\n\n\t\t\tte[ 1 ] = a * f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b;\n\n\t\t\tte[ 2 ] = cf * b - de;\n\t\t\tte[ 6 ] = df + ce * b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZXY' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce - df * b;\n\t\t\tte[ 4 ] = - a * f;\n\t\t\tte[ 8 ] = de + cf * b;\n\n\t\t\tte[ 1 ] = cf + de * b;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = df - ce * b;\n\n\t\t\tte[ 2 ] = - a * d;\n\t\t\tte[ 6 ] = b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZYX' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = be * d - af;\n\t\t\tte[ 8 ] = ae * d + bf;\n\n\t\t\tte[ 1 ] = c * f;\n\t\t\tte[ 5 ] = bf * d + ae;\n\t\t\tte[ 9 ] = af * d - be;\n\n\t\t\tte[ 2 ] = - d;\n\t\t\tte[ 6 ] = b * c;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YZX' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = bd - ac * f;\n\t\t\tte[ 8 ] = bc * f + ad;\n\n\t\t\tte[ 1 ] = f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b * e;\n\n\t\t\tte[ 2 ] = - d * e;\n\t\t\tte[ 6 ] = ad * f + bc;\n\t\t\tte[ 10 ] = ac - bd * f;\n\n\t\t} else if ( euler.order === 'XZY' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - f;\n\t\t\tte[ 8 ] = d * e;\n\n\t\t\tte[ 1 ] = ac * f + bd;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = ad * f - bc;\n\n\t\t\tte[ 2 ] = bc * f - ad;\n\t\t\tte[ 6 ] = b * e;\n\t\t\tte[ 10 ] = bd * f + ac;\n\n\t\t}\n\n\t\t// bottom row\n\t\tte[ 3 ] = 0;\n\t\tte[ 7 ] = 0;\n\t\tte[ 11 ] = 0;\n\n\t\t// last column\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromQuaternion( q ) {\n\n\t\treturn this.compose( _zero, q, _one );\n\n\t}\n\n\tlookAt( eye, target, up ) {\n\n\t\tconst te = this.elements;\n\n\t\t_z.subVectors( eye, target );\n\n\t\tif ( _z.lengthSq() === 0 ) {\n\n\t\t\t// eye and target are in the same position\n\n\t\t\t_z.z = 1;\n\n\t\t}\n\n\t\t_z.normalize();\n\t\t_x.crossVectors( up, _z );\n\n\t\tif ( _x.lengthSq() === 0 ) {\n\n\t\t\t// up and z are parallel\n\n\t\t\tif ( Math.abs( up.z ) === 1 ) {\n\n\t\t\t\t_z.x += 0.0001;\n\n\t\t\t} else {\n\n\t\t\t\t_z.z += 0.0001;\n\n\t\t\t}\n\n\t\t\t_z.normalize();\n\t\t\t_x.crossVectors( up, _z );\n\n\t\t}\n\n\t\t_x.normalize();\n\t\t_y.crossVectors( _z, _x );\n\n\t\tte[ 0 ] = _x.x; te[ 4 ] = _y.x; te[ 8 ] = _z.x;\n\t\tte[ 1 ] = _x.y; te[ 5 ] = _y.y; te[ 9 ] = _z.y;\n\t\tte[ 2 ] = _x.z; te[ 6 ] = _y.z; te[ 10 ] = _z.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m ) {\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 4 ], a13 = ae[ 8 ], a14 = ae[ 12 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 5 ], a23 = ae[ 9 ], a24 = ae[ 13 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 6 ], a33 = ae[ 10 ], a34 = ae[ 14 ];\n\t\tconst a41 = ae[ 3 ], a42 = ae[ 7 ], a43 = ae[ 11 ], a44 = ae[ 15 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 4 ], b13 = be[ 8 ], b14 = be[ 12 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 5 ], b23 = be[ 9 ], b24 = be[ 13 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 6 ], b33 = be[ 10 ], b34 = be[ 14 ];\n\t\tconst b41 = be[ 3 ], b42 = be[ 7 ], b43 = be[ 11 ], b44 = be[ 15 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n\t\tte[ 4 ] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n\t\tte[ 8 ] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n\t\tte[ 12 ] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n\t\tte[ 5 ] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n\t\tte[ 9 ] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n\t\tte[ 13 ] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n\t\tte[ 6 ] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n\t\tte[ 10 ] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n\t\tte[ 14 ] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n\n\t\tte[ 3 ] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n\t\tte[ 7 ] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n\t\tte[ 11 ] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n\t\tte[ 15 ] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 4 ] *= s; te[ 8 ] *= s; te[ 12 ] *= s;\n\t\tte[ 1 ] *= s; te[ 5 ] *= s; te[ 9 ] *= s; te[ 13 ] *= s;\n\t\tte[ 2 ] *= s; te[ 6 ] *= s; te[ 10 ] *= s; te[ 14 ] *= s;\n\t\tte[ 3 ] *= s; te[ 7 ] *= s; te[ 11 ] *= s; te[ 15 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst n11 = te[ 0 ], n12 = te[ 4 ], n13 = te[ 8 ], n14 = te[ 12 ];\n\t\tconst n21 = te[ 1 ], n22 = te[ 5 ], n23 = te[ 9 ], n24 = te[ 13 ];\n\t\tconst n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ];\n\t\tconst n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ];\n\n\t\t//TODO: make this more efficient\n\t\t//( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n\n\t\treturn (\n\t\t\tn41 * (\n\t\t\t\t+ n14 * n23 * n32\n\t\t\t\t - n13 * n24 * n32\n\t\t\t\t - n14 * n22 * n33\n\t\t\t\t + n12 * n24 * n33\n\t\t\t\t + n13 * n22 * n34\n\t\t\t\t - n12 * n23 * n34\n\t\t\t) +\n\t\t\tn42 * (\n\t\t\t\t+ n11 * n23 * n34\n\t\t\t\t - n11 * n24 * n33\n\t\t\t\t + n14 * n21 * n33\n\t\t\t\t - n13 * n21 * n34\n\t\t\t\t + n13 * n24 * n31\n\t\t\t\t - n14 * n23 * n31\n\t\t\t) +\n\t\t\tn43 * (\n\t\t\t\t+ n11 * n24 * n32\n\t\t\t\t - n11 * n22 * n34\n\t\t\t\t - n14 * n21 * n32\n\t\t\t\t + n12 * n21 * n34\n\t\t\t\t + n14 * n22 * n31\n\t\t\t\t - n12 * n24 * n31\n\t\t\t) +\n\t\t\tn44 * (\n\t\t\t\t- n13 * n22 * n31\n\t\t\t\t - n11 * n23 * n32\n\t\t\t\t + n11 * n22 * n33\n\t\t\t\t + n13 * n21 * n32\n\t\t\t\t - n12 * n21 * n33\n\t\t\t\t + n12 * n23 * n31\n\t\t\t)\n\n\t\t);\n\n\t}\n\n\ttranspose() {\n\n\t\tconst te = this.elements;\n\t\tlet tmp;\n\n\t\ttmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp;\n\t\ttmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp;\n\t\ttmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp;\n\n\t\ttmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp;\n\t\ttmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp;\n\t\ttmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tsetPosition( x, y, z ) {\n\n\t\tconst te = this.elements;\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\tte[ 12 ] = x.x;\n\t\t\tte[ 13 ] = x.y;\n\t\t\tte[ 14 ] = x.z;\n\n\t\t} else {\n\n\t\t\tte[ 12 ] = x;\n\t\t\tte[ 13 ] = y;\n\t\t\tte[ 14 ] = z;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tinvert() {\n\n\t\t// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], n41 = te[ 3 ],\n\t\t\tn12 = te[ 4 ], n22 = te[ 5 ], n32 = te[ 6 ], n42 = te[ 7 ],\n\t\t\tn13 = te[ 8 ], n23 = te[ 9 ], n33 = te[ 10 ], n43 = te[ 11 ],\n\t\t\tn14 = te[ 12 ], n24 = te[ 13 ], n34 = te[ 14 ], n44 = te[ 15 ],\n\n\t\t\tt11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,\n\t\t\tt12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,\n\t\t\tt13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,\n\t\t\tt14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n\n\t\tconst det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44 ) * detInv;\n\t\tte[ 2 ] = ( n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44 ) * detInv;\n\t\tte[ 3 ] = ( n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43 ) * detInv;\n\n\t\tte[ 4 ] = t12 * detInv;\n\t\tte[ 5 ] = ( n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44 ) * detInv;\n\t\tte[ 6 ] = ( n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44 ) * detInv;\n\t\tte[ 7 ] = ( n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43 ) * detInv;\n\n\t\tte[ 8 ] = t13 * detInv;\n\t\tte[ 9 ] = ( n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44 ) * detInv;\n\t\tte[ 10 ] = ( n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44 ) * detInv;\n\t\tte[ 11 ] = ( n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43 ) * detInv;\n\n\t\tte[ 12 ] = t14 * detInv;\n\t\tte[ 13 ] = ( n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34 ) * detInv;\n\t\tte[ 14 ] = ( n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34 ) * detInv;\n\t\tte[ 15 ] = ( n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\tscale( v ) {\n\n\t\tconst te = this.elements;\n\t\tconst x = v.x, y = v.y, z = v.z;\n\n\t\tte[ 0 ] *= x; te[ 4 ] *= y; te[ 8 ] *= z;\n\t\tte[ 1 ] *= x; te[ 5 ] *= y; te[ 9 ] *= z;\n\t\tte[ 2 ] *= x; te[ 6 ] *= y; te[ 10 ] *= z;\n\t\tte[ 3 ] *= x; te[ 7 ] *= y; te[ 11 ] *= z;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxScaleOnAxis() {\n\n\t\tconst te = this.elements;\n\n\t\tconst scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ];\n\t\tconst scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ];\n\t\tconst scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ];\n\n\t\treturn Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) );\n\n\t}\n\n\tmakeTranslation( x, y, z ) {\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, 0, x.x,\n\t\t\t\t0, 1, 0, x.y,\n\t\t\t\t0, 0, 1, x.z,\n\t\t\t\t0, 0, 0, 1\n\n\t\t\t);\n\n\t\t} else {\n\n\t\t\tthis.set(\n\n\t\t\t\t1, 0, 0, x,\n\t\t\t\t0, 1, 0, y,\n\t\t\t\t0, 0, 1, z,\n\t\t\t\t0, 0, 0, 1\n\n\t\t\t);\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationX( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, c, - s, 0,\n\t\t\t0, s, c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationY( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t c, 0, s, 0,\n\t\t\t 0, 1, 0, 0,\n\t\t\t- s, 0, c, 0,\n\t\t\t 0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationZ( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\tc, - s, 0, 0,\n\t\t\ts, c, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationAxis( axis, angle ) {\n\n\t\t// Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n\t\tconst c = Math.cos( angle );\n\t\tconst s = Math.sin( angle );\n\t\tconst t = 1 - c;\n\t\tconst x = axis.x, y = axis.y, z = axis.z;\n\t\tconst tx = t * x, ty = t * y;\n\n\t\tthis.set(\n\n\t\t\ttx * x + c, tx * y - s * z, tx * z + s * y, 0,\n\t\t\ttx * y + s * z, ty * y + c, ty * z - s * x, 0,\n\t\t\ttx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeScale( x, y, z ) {\n\n\t\tthis.set(\n\n\t\t\tx, 0, 0, 0,\n\t\t\t0, y, 0, 0,\n\t\t\t0, 0, z, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeShear( xy, xz, yx, yz, zx, zy ) {\n\n\t\tthis.set(\n\n\t\t\t1, yx, zx, 0,\n\t\t\txy, 1, zy, 0,\n\t\t\txz, yz, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tconst x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;\n\t\tconst x2 = x + x,\ty2 = y + y, z2 = z + z;\n\t\tconst xx = x * x2, xy = x * y2, xz = x * z2;\n\t\tconst yy = y * y2, yz = y * z2, zz = z * z2;\n\t\tconst wx = w * x2, wy = w * y2, wz = w * z2;\n\n\t\tconst sx = scale.x, sy = scale.y, sz = scale.z;\n\n\t\tte[ 0 ] = ( 1 - ( yy + zz ) ) * sx;\n\t\tte[ 1 ] = ( xy + wz ) * sx;\n\t\tte[ 2 ] = ( xz - wy ) * sx;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = ( xy - wz ) * sy;\n\t\tte[ 5 ] = ( 1 - ( xx + zz ) ) * sy;\n\t\tte[ 6 ] = ( yz + wx ) * sy;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = ( xz + wy ) * sz;\n\t\tte[ 9 ] = ( yz - wx ) * sz;\n\t\tte[ 10 ] = ( 1 - ( xx + yy ) ) * sz;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = position.x;\n\t\tte[ 13 ] = position.y;\n\t\tte[ 14 ] = position.z;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tdecompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tlet sx = _v1$5.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length();\n\t\tconst sy = _v1$5.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length();\n\t\tconst sz = _v1$5.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length();\n\n\t\t// if determine is negative, we need to invert one scale\n\t\tconst det = this.determinant();\n\t\tif ( det < 0 ) sx = - sx;\n\n\t\tposition.x = te[ 12 ];\n\t\tposition.y = te[ 13 ];\n\t\tposition.z = te[ 14 ];\n\n\t\t// scale the rotation part\n\t\t_m1$2.copy( this );\n\n\t\tconst invSX = 1 / sx;\n\t\tconst invSY = 1 / sy;\n\t\tconst invSZ = 1 / sz;\n\n\t\t_m1$2.elements[ 0 ] *= invSX;\n\t\t_m1$2.elements[ 1 ] *= invSX;\n\t\t_m1$2.elements[ 2 ] *= invSX;\n\n\t\t_m1$2.elements[ 4 ] *= invSY;\n\t\t_m1$2.elements[ 5 ] *= invSY;\n\t\t_m1$2.elements[ 6 ] *= invSY;\n\n\t\t_m1$2.elements[ 8 ] *= invSZ;\n\t\t_m1$2.elements[ 9 ] *= invSZ;\n\t\t_m1$2.elements[ 10 ] *= invSZ;\n\n\t\tquaternion.setFromRotationMatrix( _m1$2 );\n\n\t\tscale.x = sx;\n\t\tscale.y = sy;\n\t\tscale.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tmakePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {\n\n\t\tconst te = this.elements;\n\t\tconst x = 2 * near / ( right - left );\n\t\tconst y = 2 * near / ( top - bottom );\n\n\t\tconst a = ( right + left ) / ( right - left );\n\t\tconst b = ( top + bottom ) / ( top - bottom );\n\n\t\tlet c, d;\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tc = - ( far + near ) / ( far - near );\n\t\t\td = ( - 2 * far * near ) / ( far - near );\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tc = - far / ( far - near );\n\t\t\td = ( - far * near ) / ( far - near );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.Matrix4.makePerspective(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\tte[ 0 ] = x;\tte[ 4 ] = 0;\tte[ 8 ] = a; \tte[ 12 ] = 0;\n\t\tte[ 1 ] = 0;\tte[ 5 ] = y;\tte[ 9 ] = b; \tte[ 13 ] = 0;\n\t\tte[ 2 ] = 0;\tte[ 6 ] = 0;\tte[ 10 ] = c; \tte[ 14 ] = d;\n\t\tte[ 3 ] = 0;\tte[ 7 ] = 0;\tte[ 11 ] = - 1;\tte[ 15 ] = 0;\n\n\t\treturn this;\n\n\t}\n\n\tmakeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {\n\n\t\tconst te = this.elements;\n\t\tconst w = 1.0 / ( right - left );\n\t\tconst h = 1.0 / ( top - bottom );\n\t\tconst p = 1.0 / ( far - near );\n\n\t\tconst x = ( right + left ) * w;\n\t\tconst y = ( top + bottom ) * h;\n\n\t\tlet z, zInv;\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tz = ( far + near ) * p;\n\t\t\tzInv = - 2 * p;\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tz = near * p;\n\t\t\tzInv = - 1 * p;\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\tte[ 0 ] = 2 * w;\tte[ 4 ] = 0;\t\tte[ 8 ] = 0; \t\tte[ 12 ] = - x;\n\t\tte[ 1 ] = 0; \t\tte[ 5 ] = 2 * h;\tte[ 9 ] = 0; \t\tte[ 13 ] = - y;\n\t\tte[ 2 ] = 0; \t\tte[ 6 ] = 0;\t\tte[ 10 ] = zInv;\tte[ 14 ] = - z;\n\t\tte[ 3 ] = 0; \t\tte[ 7 ] = 0;\t\tte[ 11 ] = 0;\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\t\tarray[ offset + 9 ] = te[ 9 ];\n\t\tarray[ offset + 10 ] = te[ 10 ];\n\t\tarray[ offset + 11 ] = te[ 11 ];\n\n\t\tarray[ offset + 12 ] = te[ 12 ];\n\t\tarray[ offset + 13 ] = te[ 13 ];\n\t\tarray[ offset + 14 ] = te[ 14 ];\n\t\tarray[ offset + 15 ] = te[ 15 ];\n\n\t\treturn array;\n\n\t}\n\n}\n\nconst _v1$5 = /*@__PURE__*/ new Vector3();\nconst _m1$2 = /*@__PURE__*/ new Matrix4();\nconst _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 );\nconst _one = /*@__PURE__*/ new Vector3( 1, 1, 1 );\nconst _x = /*@__PURE__*/ new Vector3();\nconst _y = /*@__PURE__*/ new Vector3();\nconst _z = /*@__PURE__*/ new Vector3();\n\nconst _matrix = /*@__PURE__*/ new Matrix4();\nconst _quaternion$3 = /*@__PURE__*/ new Quaternion();\n\nclass Euler {\n\n\tconstructor( x = 0, y = 0, z = 0, order = Euler.DEFAULT_ORDER ) {\n\n\t\tthis.isEuler = true;\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget order() {\n\n\t\treturn this._order;\n\n\t}\n\n\tset order( value ) {\n\n\t\tthis._order = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, order = this._order ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._order );\n\n\t}\n\n\tcopy( euler ) {\n\n\t\tthis._x = euler._x;\n\t\tthis._y = euler._y;\n\t\tthis._z = euler._z;\n\t\tthis._order = euler._order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m, order = this._order, update = true ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements;\n\t\tconst m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ];\n\t\tconst m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ];\n\t\tconst m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\n\t\t\t\tthis._y = Math.asin( clamp( m13, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m13 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\n\t\t\t\tthis._x = Math.asin( - clamp( m23, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m23 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\n\t\t\t\tthis._x = Math.asin( clamp( m32, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m32 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = 0;\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\n\t\t\t\tthis._y = Math.asin( - clamp( m31, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m31 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\n\t\t\t\tthis._z = Math.asin( clamp( m21, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m21 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m22 );\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\n\t\t\t\tthis._z = Math.asin( - clamp( m12, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m12 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._y = Math.atan2( m13, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._y = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tconsole.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tthis._order = order;\n\n\t\tif ( update === true ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromQuaternion( q, order, update ) {\n\n\t\t_matrix.makeRotationFromQuaternion( q );\n\n\t\treturn this.setFromRotationMatrix( _matrix, order, update );\n\n\t}\n\n\tsetFromVector3( v, order = this._order ) {\n\n\t\treturn this.set( v.x, v.y, v.z, order );\n\n\t}\n\n\treorder( newOrder ) {\n\n\t\t// WARNING: this discards revolution information -bhouston\n\n\t\t_quaternion$3.setFromEuler( this );\n\n\t\treturn this.setFromQuaternion( _quaternion$3, newOrder );\n\n\t}\n\n\tequals( euler ) {\n\n\t\treturn ( euler._x === this._x ) && ( euler._y === this._y ) && ( euler._z === this._z ) && ( euler._order === this._order );\n\n\t}\n\n\tfromArray( array ) {\n\n\t\tthis._x = array[ 0 ];\n\t\tthis._y = array[ 1 ];\n\t\tthis._z = array[ 2 ];\n\t\tif ( array[ 3 ] !== undefined ) this._order = array[ 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._order;\n\n\t\treturn array;\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this._x;\n\t\tyield this._y;\n\t\tyield this._z;\n\t\tyield this._order;\n\n\t}\n\n}\n\nEuler.DEFAULT_ORDER = 'XYZ';\n\nclass Layers {\n\n\tconstructor() {\n\n\t\tthis.mask = 1 | 0;\n\n\t}\n\n\tset( channel ) {\n\n\t\tthis.mask = ( 1 << channel | 0 ) >>> 0;\n\n\t}\n\n\tenable( channel ) {\n\n\t\tthis.mask |= 1 << channel | 0;\n\n\t}\n\n\tenableAll() {\n\n\t\tthis.mask = 0xffffffff | 0;\n\n\t}\n\n\ttoggle( channel ) {\n\n\t\tthis.mask ^= 1 << channel | 0;\n\n\t}\n\n\tdisable( channel ) {\n\n\t\tthis.mask &= ~ ( 1 << channel | 0 );\n\n\t}\n\n\tdisableAll() {\n\n\t\tthis.mask = 0;\n\n\t}\n\n\ttest( layers ) {\n\n\t\treturn ( this.mask & layers.mask ) !== 0;\n\n\t}\n\n\tisEnabled( channel ) {\n\n\t\treturn ( this.mask & ( 1 << channel | 0 ) ) !== 0;\n\n\t}\n\n}\n\nlet _object3DId = 0;\n\nconst _v1$4 = /*@__PURE__*/ new Vector3();\nconst _q1 = /*@__PURE__*/ new Quaternion();\nconst _m1$1 = /*@__PURE__*/ new Matrix4();\nconst _target = /*@__PURE__*/ new Vector3();\n\nconst _position$3 = /*@__PURE__*/ new Vector3();\nconst _scale$2 = /*@__PURE__*/ new Vector3();\nconst _quaternion$2 = /*@__PURE__*/ new Quaternion();\n\nconst _xAxis = /*@__PURE__*/ new Vector3( 1, 0, 0 );\nconst _yAxis = /*@__PURE__*/ new Vector3( 0, 1, 0 );\nconst _zAxis = /*@__PURE__*/ new Vector3( 0, 0, 1 );\n\nconst _addedEvent = { type: 'added' };\nconst _removedEvent = { type: 'removed' };\n\nclass Object3D extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isObject3D = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _object3DId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Object3D';\n\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\n\t\tthis.up = Object3D.DEFAULT_UP.clone();\n\n\t\tconst position = new Vector3();\n\t\tconst rotation = new Euler();\n\t\tconst quaternion = new Quaternion();\n\t\tconst scale = new Vector3( 1, 1, 1 );\n\n\t\tfunction onRotationChange() {\n\n\t\t\tquaternion.setFromEuler( rotation, false );\n\n\t\t}\n\n\t\tfunction onQuaternionChange() {\n\n\t\t\trotation.setFromQuaternion( quaternion, undefined, false );\n\n\t\t}\n\n\t\trotation._onChange( onRotationChange );\n\t\tquaternion._onChange( onQuaternionChange );\n\n\t\tObject.defineProperties( this, {\n\t\t\tposition: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: position\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: rotation\n\t\t\t},\n\t\t\tquaternion: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: quaternion\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: scale\n\t\t\t},\n\t\t\tmodelViewMatrix: {\n\t\t\t\tvalue: new Matrix4()\n\t\t\t},\n\t\t\tnormalMatrix: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t} );\n\n\t\tthis.matrix = new Matrix4();\n\t\tthis.matrixWorld = new Matrix4();\n\n\t\tthis.matrixAutoUpdate = Object3D.DEFAULT_MATRIX_AUTO_UPDATE;\n\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\tthis.matrixWorldAutoUpdate = Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE; // checked by the renderer\n\n\t\tthis.layers = new Layers();\n\t\tthis.visible = true;\n\n\t\tthis.castShadow = false;\n\t\tthis.receiveShadow = false;\n\n\t\tthis.frustumCulled = true;\n\t\tthis.renderOrder = 0;\n\n\t\tthis.animations = [];\n\n\t\tthis.userData = {};\n\n\t}\n\n\tonBeforeRender( /* renderer, scene, camera, geometry, material, group */ ) {}\n\n\tonAfterRender( /* renderer, scene, camera, geometry, material, group */ ) {}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tthis.matrix.premultiply( matrix );\n\n\t\tthis.matrix.decompose( this.position, this.quaternion, this.scale );\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\tthis.quaternion.premultiply( q );\n\n\t\treturn this;\n\n\t}\n\n\tsetRotationFromAxisAngle( axis, angle ) {\n\n\t\t// assumes axis is normalized\n\n\t\tthis.quaternion.setFromAxisAngle( axis, angle );\n\n\t}\n\n\tsetRotationFromEuler( euler ) {\n\n\t\tthis.quaternion.setFromEuler( euler, true );\n\n\t}\n\n\tsetRotationFromMatrix( m ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tthis.quaternion.setFromRotationMatrix( m );\n\n\t}\n\n\tsetRotationFromQuaternion( q ) {\n\n\t\t// assumes q is normalized\n\n\t\tthis.quaternion.copy( q );\n\n\t}\n\n\trotateOnAxis( axis, angle ) {\n\n\t\t// rotate object on axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.multiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateOnWorldAxis( axis, angle ) {\n\n\t\t// rotate object on axis in world space\n\t\t// axis is assumed to be normalized\n\t\t// method assumes no rotated parent\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.premultiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\treturn this.rotateOnAxis( _xAxis, angle );\n\n\t}\n\n\trotateY( angle ) {\n\n\t\treturn this.rotateOnAxis( _yAxis, angle );\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\treturn this.rotateOnAxis( _zAxis, angle );\n\n\t}\n\n\ttranslateOnAxis( axis, distance ) {\n\n\t\t// translate object by distance along axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_v1$4.copy( axis ).applyQuaternion( this.quaternion );\n\n\t\tthis.position.add( _v1$4.multiplyScalar( distance ) );\n\n\t\treturn this;\n\n\t}\n\n\ttranslateX( distance ) {\n\n\t\treturn this.translateOnAxis( _xAxis, distance );\n\n\t}\n\n\ttranslateY( distance ) {\n\n\t\treturn this.translateOnAxis( _yAxis, distance );\n\n\t}\n\n\ttranslateZ( distance ) {\n\n\t\treturn this.translateOnAxis( _zAxis, distance );\n\n\t}\n\n\tlocalToWorld( vector ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn vector.applyMatrix4( this.matrixWorld );\n\n\t}\n\n\tworldToLocal( vector ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn vector.applyMatrix4( _m1$1.copy( this.matrixWorld ).invert() );\n\n\t}\n\n\tlookAt( x, y, z ) {\n\n\t\t// This method does not support objects having non-uniformly-scaled parent(s)\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\t_target.copy( x );\n\n\t\t} else {\n\n\t\t\t_target.set( x, y, z );\n\n\t\t}\n\n\t\tconst parent = this.parent;\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_position$3.setFromMatrixPosition( this.matrixWorld );\n\n\t\tif ( this.isCamera || this.isLight ) {\n\n\t\t\t_m1$1.lookAt( _position$3, _target, this.up );\n\n\t\t} else {\n\n\t\t\t_m1$1.lookAt( _target, _position$3, this.up );\n\n\t\t}\n\n\t\tthis.quaternion.setFromRotationMatrix( _m1$1 );\n\n\t\tif ( parent ) {\n\n\t\t\t_m1$1.extractRotation( parent.matrixWorld );\n\t\t\t_q1.setFromRotationMatrix( _m1$1 );\n\t\t\tthis.quaternion.premultiply( _q1.invert() );\n\n\t\t}\n\n\t}\n\n\tadd( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.add( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object === this ) {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object can\\'t be added as a child of itself.', object );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object && object.isObject3D ) {\n\n\t\t\tif ( object.parent !== null ) {\n\n\t\t\t\tobject.parent.remove( object );\n\n\t\t\t}\n\n\t\t\tobject.parent = this;\n\t\t\tthis.children.push( object );\n\n\t\t\tobject.dispatchEvent( _addedEvent );\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremove( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.remove( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst index = this.children.indexOf( object );\n\n\t\tif ( index !== - 1 ) {\n\n\t\t\tobject.parent = null;\n\t\t\tthis.children.splice( index, 1 );\n\n\t\t\tobject.dispatchEvent( _removedEvent );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremoveFromParent() {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tparent.remove( this );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclear() {\n\n\t\treturn this.remove( ... this.children );\n\n\t}\n\n\tattach( object ) {\n\n\t\t// adds object as a child of this, while maintaining the object's world transform\n\n\t\t// Note: This method does not support scene graphs having non-uniformly-scaled nodes(s)\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_m1$1.copy( this.matrixWorld ).invert();\n\n\t\tif ( object.parent !== null ) {\n\n\t\t\tobject.parent.updateWorldMatrix( true, false );\n\n\t\t\t_m1$1.multiply( object.parent.matrixWorld );\n\n\t\t}\n\n\t\tobject.applyMatrix4( _m1$1 );\n\n\t\tthis.add( object );\n\n\t\tobject.updateWorldMatrix( false, true );\n\n\t\treturn this;\n\n\t}\n\n\tgetObjectById( id ) {\n\n\t\treturn this.getObjectByProperty( 'id', id );\n\n\t}\n\n\tgetObjectByName( name ) {\n\n\t\treturn this.getObjectByProperty( 'name', name );\n\n\t}\n\n\tgetObjectByProperty( name, value ) {\n\n\t\tif ( this[ name ] === value ) return this;\n\n\t\tfor ( let i = 0, l = this.children.length; i < l; i ++ ) {\n\n\t\t\tconst child = this.children[ i ];\n\t\t\tconst object = child.getObjectByProperty( name, value );\n\n\t\t\tif ( object !== undefined ) {\n\n\t\t\t\treturn object;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tgetObjectsByProperty( name, value ) {\n\n\t\tlet result = [];\n\n\t\tif ( this[ name ] === value ) result.push( this );\n\n\t\tfor ( let i = 0, l = this.children.length; i < l; i ++ ) {\n\n\t\t\tconst childResult = this.children[ i ].getObjectsByProperty( name, value );\n\n\t\t\tif ( childResult.length > 0 ) {\n\n\t\t\t\tresult = result.concat( childResult );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\tgetWorldPosition( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn target.setFromMatrixPosition( this.matrixWorld );\n\n\t}\n\n\tgetWorldQuaternion( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, target, _scale$2 );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldScale( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, _quaternion$2, target );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tconst e = this.matrixWorld.elements;\n\n\t\treturn target.set( e[ 8 ], e[ 9 ], e[ 10 ] ).normalize();\n\n\t}\n\n\traycast( /* raycaster, intersects */ ) {}\n\n\ttraverse( callback ) {\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverse( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseVisible( callback ) {\n\n\t\tif ( this.visible === false ) return;\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverseVisible( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseAncestors( callback ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tcallback( parent );\n\n\t\t\tparent.traverseAncestors( callback );\n\n\t\t}\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.compose( this.position, this.quaternion, this.scale );\n\n\t\tthis.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.matrixWorldNeedsUpdate || force ) {\n\n\t\t\tif ( this.parent === null ) {\n\n\t\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t\t}\n\n\t\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\t\tforce = true;\n\n\t\t}\n\n\t\t// update children\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tconst child = children[ i ];\n\n\t\t\tif ( child.matrixWorldAutoUpdate === true || force === true ) {\n\n\t\t\t\tchild.updateMatrixWorld( force );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( updateParents === true && parent !== null && parent.matrixWorldAutoUpdate === true ) {\n\n\t\t\tparent.updateWorldMatrix( true, false );\n\n\t\t}\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.parent === null ) {\n\n\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t} else {\n\n\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t}\n\n\t\t// update children\n\n\t\tif ( updateChildren === true ) {\n\n\t\t\tconst children = this.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tconst child = children[ i ];\n\n\t\t\t\tif ( child.matrixWorldAutoUpdate === true ) {\n\n\t\t\t\t\tchild.updateWorldMatrix( false, true );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\t// meta is a string when called from JSON.stringify\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tconst output = {};\n\n\t\t// meta is a hash used to collect geometries, materials.\n\t\t// not providing it implies that this is the root object\n\t\t// being serialized.\n\t\tif ( isRootObject ) {\n\n\t\t\t// initialize meta obj\n\t\t\tmeta = {\n\t\t\t\tgeometries: {},\n\t\t\t\tmaterials: {},\n\t\t\t\ttextures: {},\n\t\t\t\timages: {},\n\t\t\t\tshapes: {},\n\t\t\t\tskeletons: {},\n\t\t\t\tanimations: {},\n\t\t\t\tnodes: {}\n\t\t\t};\n\n\t\t\toutput.metadata = {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Object',\n\t\t\t\tgenerator: 'Object3D.toJSON'\n\t\t\t};\n\n\t\t}\n\n\t\t// standard Object3D serialization\n\n\t\tconst object = {};\n\n\t\tobject.uuid = this.uuid;\n\t\tobject.type = this.type;\n\n\t\tif ( this.name !== '' ) object.name = this.name;\n\t\tif ( this.castShadow === true ) object.castShadow = true;\n\t\tif ( this.receiveShadow === true ) object.receiveShadow = true;\n\t\tif ( this.visible === false ) object.visible = false;\n\t\tif ( this.frustumCulled === false ) object.frustumCulled = false;\n\t\tif ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;\n\t\tif ( Object.keys( this.userData ).length > 0 ) object.userData = this.userData;\n\n\t\tobject.layers = this.layers.mask;\n\t\tobject.matrix = this.matrix.toArray();\n\t\tobject.up = this.up.toArray();\n\n\t\tif ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false;\n\n\t\t// object specific properties\n\n\t\tif ( this.isInstancedMesh ) {\n\n\t\t\tobject.type = 'InstancedMesh';\n\t\t\tobject.count = this.count;\n\t\t\tobject.instanceMatrix = this.instanceMatrix.toJSON();\n\t\t\tif ( this.instanceColor !== null ) object.instanceColor = this.instanceColor.toJSON();\n\n\t\t}\n\n\t\t//\n\n\t\tfunction serialize( library, element ) {\n\n\t\t\tif ( library[ element.uuid ] === undefined ) {\n\n\t\t\t\tlibrary[ element.uuid ] = element.toJSON( meta );\n\n\t\t\t}\n\n\t\t\treturn element.uuid;\n\n\t\t}\n\n\t\tif ( this.isScene ) {\n\n\t\t\tif ( this.background ) {\n\n\t\t\t\tif ( this.background.isColor ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON();\n\n\t\t\t\t} else if ( this.background.isTexture ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON( meta ).uuid;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( this.environment && this.environment.isTexture && this.environment.isRenderTargetTexture !== true ) {\n\n\t\t\t\tobject.environment = this.environment.toJSON( meta ).uuid;\n\n\t\t\t}\n\n\t\t} else if ( this.isMesh || this.isLine || this.isPoints ) {\n\n\t\t\tobject.geometry = serialize( meta.geometries, this.geometry );\n\n\t\t\tconst parameters = this.geometry.parameters;\n\n\t\t\tif ( parameters !== undefined && parameters.shapes !== undefined ) {\n\n\t\t\t\tconst shapes = parameters.shapes;\n\n\t\t\t\tif ( Array.isArray( shapes ) ) {\n\n\t\t\t\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\t\t\t\tconst shape = shapes[ i ];\n\n\t\t\t\t\t\tserialize( meta.shapes, shape );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tserialize( meta.shapes, shapes );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.isSkinnedMesh ) {\n\n\t\t\tobject.bindMode = this.bindMode;\n\t\t\tobject.bindMatrix = this.bindMatrix.toArray();\n\n\t\t\tif ( this.skeleton !== undefined ) {\n\n\t\t\t\tserialize( meta.skeletons, this.skeleton );\n\n\t\t\t\tobject.skeleton = this.skeleton.uuid;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.material !== undefined ) {\n\n\t\t\tif ( Array.isArray( this.material ) ) {\n\n\t\t\t\tconst uuids = [];\n\n\t\t\t\tfor ( let i = 0, l = this.material.length; i < l; i ++ ) {\n\n\t\t\t\t\tuuids.push( serialize( meta.materials, this.material[ i ] ) );\n\n\t\t\t\t}\n\n\t\t\t\tobject.material = uuids;\n\n\t\t\t} else {\n\n\t\t\t\tobject.material = serialize( meta.materials, this.material );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.children.length > 0 ) {\n\n\t\t\tobject.children = [];\n\n\t\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\n\n\t\t\t\tobject.children.push( this.children[ i ].toJSON( meta ).object );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.animations.length > 0 ) {\n\n\t\t\tobject.animations = [];\n\n\t\t\tfor ( let i = 0; i < this.animations.length; i ++ ) {\n\n\t\t\t\tconst animation = this.animations[ i ];\n\n\t\t\t\tobject.animations.push( serialize( meta.animations, animation ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( isRootObject ) {\n\n\t\t\tconst geometries = extractFromCache( meta.geometries );\n\t\t\tconst materials = extractFromCache( meta.materials );\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\t\t\tconst shapes = extractFromCache( meta.shapes );\n\t\t\tconst skeletons = extractFromCache( meta.skeletons );\n\t\t\tconst animations = extractFromCache( meta.animations );\n\t\t\tconst nodes = extractFromCache( meta.nodes );\n\n\t\t\tif ( geometries.length > 0 ) output.geometries = geometries;\n\t\t\tif ( materials.length > 0 ) output.materials = materials;\n\t\t\tif ( textures.length > 0 ) output.textures = textures;\n\t\t\tif ( images.length > 0 ) output.images = images;\n\t\t\tif ( shapes.length > 0 ) output.shapes = shapes;\n\t\t\tif ( skeletons.length > 0 ) output.skeletons = skeletons;\n\t\t\tif ( animations.length > 0 ) output.animations = animations;\n\t\t\tif ( nodes.length > 0 ) output.nodes = nodes;\n\n\t\t}\n\n\t\toutput.object = object;\n\n\t\treturn output;\n\n\t\t// extract data from the cache hash\n\t\t// remove metadata on each item\n\t\t// and return as array\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t}\n\n\tclone( recursive ) {\n\n\t\treturn new this.constructor().copy( this, recursive );\n\n\t}\n\n\tcopy( source, recursive = true ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.up.copy( source.up );\n\n\t\tthis.position.copy( source.position );\n\t\tthis.rotation.order = source.rotation.order;\n\t\tthis.quaternion.copy( source.quaternion );\n\t\tthis.scale.copy( source.scale );\n\n\t\tthis.matrix.copy( source.matrix );\n\t\tthis.matrixWorld.copy( source.matrixWorld );\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n\n\t\tthis.matrixWorldAutoUpdate = source.matrixWorldAutoUpdate;\n\n\t\tthis.layers.mask = source.layers.mask;\n\t\tthis.visible = source.visible;\n\n\t\tthis.castShadow = source.castShadow;\n\t\tthis.receiveShadow = source.receiveShadow;\n\n\t\tthis.frustumCulled = source.frustumCulled;\n\t\tthis.renderOrder = source.renderOrder;\n\n\t\tthis.animations = source.animations.slice();\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\tif ( recursive === true ) {\n\n\t\t\tfor ( let i = 0; i < source.children.length; i ++ ) {\n\n\t\t\t\tconst child = source.children[ i ];\n\t\t\t\tthis.add( child.clone() );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nObject3D.DEFAULT_UP = /*@__PURE__*/ new Vector3( 0, 1, 0 );\nObject3D.DEFAULT_MATRIX_AUTO_UPDATE = true;\nObject3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;\n\nconst _v0$1 = /*@__PURE__*/ new Vector3();\nconst _v1$3 = /*@__PURE__*/ new Vector3();\nconst _v2$2 = /*@__PURE__*/ new Vector3();\nconst _v3$1 = /*@__PURE__*/ new Vector3();\n\nconst _vab = /*@__PURE__*/ new Vector3();\nconst _vac = /*@__PURE__*/ new Vector3();\nconst _vbc = /*@__PURE__*/ new Vector3();\nconst _vap = /*@__PURE__*/ new Vector3();\nconst _vbp = /*@__PURE__*/ new Vector3();\nconst _vcp = /*@__PURE__*/ new Vector3();\n\nlet warnedGetUV = false;\n\nclass Triangle {\n\n\tconstructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) {\n\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\tthis.c = c;\n\n\t}\n\n\tstatic getNormal( a, b, c, target ) {\n\n\t\ttarget.subVectors( c, b );\n\t\t_v0$1.subVectors( a, b );\n\t\ttarget.cross( _v0$1 );\n\n\t\tconst targetLengthSq = target.lengthSq();\n\t\tif ( targetLengthSq > 0 ) {\n\n\t\t\treturn target.multiplyScalar( 1 / Math.sqrt( targetLengthSq ) );\n\n\t\t}\n\n\t\treturn target.set( 0, 0, 0 );\n\n\t}\n\n\t// static/instance method to calculate barycentric coordinates\n\t// based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n\tstatic getBarycoord( point, a, b, c, target ) {\n\n\t\t_v0$1.subVectors( c, a );\n\t\t_v1$3.subVectors( b, a );\n\t\t_v2$2.subVectors( point, a );\n\n\t\tconst dot00 = _v0$1.dot( _v0$1 );\n\t\tconst dot01 = _v0$1.dot( _v1$3 );\n\t\tconst dot02 = _v0$1.dot( _v2$2 );\n\t\tconst dot11 = _v1$3.dot( _v1$3 );\n\t\tconst dot12 = _v1$3.dot( _v2$2 );\n\n\t\tconst denom = ( dot00 * dot11 - dot01 * dot01 );\n\n\t\t// collinear or singular triangle\n\t\tif ( denom === 0 ) {\n\n\t\t\t// arbitrary location outside of triangle?\n\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\treturn target.set( - 2, - 1, - 1 );\n\n\t\t}\n\n\t\tconst invDenom = 1 / denom;\n\t\tconst u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom;\n\t\tconst v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom;\n\n\t\t// barycentric coordinates must always sum to 1\n\t\treturn target.set( 1 - u - v, v, u );\n\n\t}\n\n\tstatic containsPoint( point, a, b, c ) {\n\n\t\tthis.getBarycoord( point, a, b, c, _v3$1 );\n\n\t\treturn ( _v3$1.x >= 0 ) && ( _v3$1.y >= 0 ) && ( ( _v3$1.x + _v3$1.y ) <= 1 );\n\n\t}\n\n\tstatic getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) { // @deprecated, r151\n\n\t\tif ( warnedGetUV === false ) {\n\n\t\t\tconsole.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' );\n\n\t\t\twarnedGetUV = true;\n\n\t\t}\n\n\t\treturn this.getInterpolation( point, p1, p2, p3, uv1, uv2, uv3, target );\n\n\t}\n\n\tstatic getInterpolation( point, p1, p2, p3, v1, v2, v3, target ) {\n\n\t\tthis.getBarycoord( point, p1, p2, p3, _v3$1 );\n\n\t\ttarget.setScalar( 0 );\n\t\ttarget.addScaledVector( v1, _v3$1.x );\n\t\ttarget.addScaledVector( v2, _v3$1.y );\n\t\ttarget.addScaledVector( v3, _v3$1.z );\n\n\t\treturn target;\n\n\t}\n\n\tstatic isFrontFacing( a, b, c, direction ) {\n\n\t\t_v0$1.subVectors( c, b );\n\t\t_v1$3.subVectors( a, b );\n\n\t\t// strictly front facing\n\t\treturn ( _v0$1.cross( _v1$3 ).dot( direction ) < 0 ) ? true : false;\n\n\t}\n\n\tset( a, b, c ) {\n\n\t\tthis.a.copy( a );\n\t\tthis.b.copy( b );\n\t\tthis.c.copy( c );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPointsAndIndices( points, i0, i1, i2 ) {\n\n\t\tthis.a.copy( points[ i0 ] );\n\t\tthis.b.copy( points[ i1 ] );\n\t\tthis.c.copy( points[ i2 ] );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromAttributeAndIndices( attribute, i0, i1, i2 ) {\n\n\t\tthis.a.fromBufferAttribute( attribute, i0 );\n\t\tthis.b.fromBufferAttribute( attribute, i1 );\n\t\tthis.c.fromBufferAttribute( attribute, i2 );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( triangle ) {\n\n\t\tthis.a.copy( triangle.a );\n\t\tthis.b.copy( triangle.b );\n\t\tthis.c.copy( triangle.c );\n\n\t\treturn this;\n\n\t}\n\n\tgetArea() {\n\n\t\t_v0$1.subVectors( this.c, this.b );\n\t\t_v1$3.subVectors( this.a, this.b );\n\n\t\treturn _v0$1.cross( _v1$3 ).length() * 0.5;\n\n\t}\n\n\tgetMidpoint( target ) {\n\n\t\treturn target.addVectors( this.a, this.b ).add( this.c ).multiplyScalar( 1 / 3 );\n\n\t}\n\n\tgetNormal( target ) {\n\n\t\treturn Triangle.getNormal( this.a, this.b, this.c, target );\n\n\t}\n\n\tgetPlane( target ) {\n\n\t\treturn target.setFromCoplanarPoints( this.a, this.b, this.c );\n\n\t}\n\n\tgetBarycoord( point, target ) {\n\n\t\treturn Triangle.getBarycoord( point, this.a, this.b, this.c, target );\n\n\t}\n\n\tgetUV( point, uv1, uv2, uv3, target ) { // @deprecated, r151\n\n\t\tif ( warnedGetUV === false ) {\n\n\t\t\tconsole.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' );\n\n\t\t\twarnedGetUV = true;\n\n\t\t}\n\n\t\treturn Triangle.getInterpolation( point, this.a, this.b, this.c, uv1, uv2, uv3, target );\n\n\t}\n\n\tgetInterpolation( point, v1, v2, v3, target ) {\n\n\t\treturn Triangle.getInterpolation( point, this.a, this.b, this.c, v1, v2, v3, target );\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn Triangle.containsPoint( point, this.a, this.b, this.c );\n\n\t}\n\n\tisFrontFacing( direction ) {\n\n\t\treturn Triangle.isFrontFacing( this.a, this.b, this.c, direction );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsTriangle( this );\n\n\t}\n\n\tclosestPointToPoint( p, target ) {\n\n\t\tconst a = this.a, b = this.b, c = this.c;\n\t\tlet v, w;\n\n\t\t// algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n\t\t// published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n\t\t// under the accompanying license; see chapter 5.1.5 for detailed explanation.\n\t\t// basically, we're distinguishing which of the voronoi regions of the triangle\n\t\t// the point lies in with the minimum amount of redundant computation.\n\n\t\t_vab.subVectors( b, a );\n\t\t_vac.subVectors( c, a );\n\t\t_vap.subVectors( p, a );\n\t\tconst d1 = _vab.dot( _vap );\n\t\tconst d2 = _vac.dot( _vap );\n\t\tif ( d1 <= 0 && d2 <= 0 ) {\n\n\t\t\t// vertex region of A; barycentric coords (1, 0, 0)\n\t\t\treturn target.copy( a );\n\n\t\t}\n\n\t\t_vbp.subVectors( p, b );\n\t\tconst d3 = _vab.dot( _vbp );\n\t\tconst d4 = _vac.dot( _vbp );\n\t\tif ( d3 >= 0 && d4 <= d3 ) {\n\n\t\t\t// vertex region of B; barycentric coords (0, 1, 0)\n\t\t\treturn target.copy( b );\n\n\t\t}\n\n\t\tconst vc = d1 * d4 - d3 * d2;\n\t\tif ( vc <= 0 && d1 >= 0 && d3 <= 0 ) {\n\n\t\t\tv = d1 / ( d1 - d3 );\n\t\t\t// edge region of AB; barycentric coords (1-v, v, 0)\n\t\t\treturn target.copy( a ).addScaledVector( _vab, v );\n\n\t\t}\n\n\t\t_vcp.subVectors( p, c );\n\t\tconst d5 = _vab.dot( _vcp );\n\t\tconst d6 = _vac.dot( _vcp );\n\t\tif ( d6 >= 0 && d5 <= d6 ) {\n\n\t\t\t// vertex region of C; barycentric coords (0, 0, 1)\n\t\t\treturn target.copy( c );\n\n\t\t}\n\n\t\tconst vb = d5 * d2 - d1 * d6;\n\t\tif ( vb <= 0 && d2 >= 0 && d6 <= 0 ) {\n\n\t\t\tw = d2 / ( d2 - d6 );\n\t\t\t// edge region of AC; barycentric coords (1-w, 0, w)\n\t\t\treturn target.copy( a ).addScaledVector( _vac, w );\n\n\t\t}\n\n\t\tconst va = d3 * d6 - d5 * d4;\n\t\tif ( va <= 0 && ( d4 - d3 ) >= 0 && ( d5 - d6 ) >= 0 ) {\n\n\t\t\t_vbc.subVectors( c, b );\n\t\t\tw = ( d4 - d3 ) / ( ( d4 - d3 ) + ( d5 - d6 ) );\n\t\t\t// edge region of BC; barycentric coords (0, 1-w, w)\n\t\t\treturn target.copy( b ).addScaledVector( _vbc, w ); // edge region of BC\n\n\t\t}\n\n\t\t// face region\n\t\tconst denom = 1 / ( va + vb + vc );\n\t\t// u = va * denom\n\t\tv = vb * denom;\n\t\tw = vc * denom;\n\n\t\treturn target.copy( a ).addScaledVector( _vab, v ).addScaledVector( _vac, w );\n\n\t}\n\n\tequals( triangle ) {\n\n\t\treturn triangle.a.equals( this.a ) && triangle.b.equals( this.b ) && triangle.c.equals( this.c );\n\n\t}\n\n}\n\nconst _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,\n\t'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,\n\t'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50,\n\t'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B,\n\t'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B,\n\t'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F,\n\t'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3,\n\t'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222,\n\t'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700,\n\t'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4,\n\t'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00,\n\t'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3,\n\t'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA,\n\t'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32,\n\t'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3,\n\t'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC,\n\t'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD,\n\t'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6,\n\t'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9,\n\t'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F,\n\t'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE,\n\t'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA,\n\t'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0,\n\t'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 };\n\nconst _hslA = { h: 0, s: 0, l: 0 };\nconst _hslB = { h: 0, s: 0, l: 0 };\n\nfunction hue2rgb( p, q, t ) {\n\n\tif ( t < 0 ) t += 1;\n\tif ( t > 1 ) t -= 1;\n\tif ( t < 1 / 6 ) return p + ( q - p ) * 6 * t;\n\tif ( t < 1 / 2 ) return q;\n\tif ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t );\n\treturn p;\n\n}\n\nclass Color {\n\n\tconstructor( r, g, b ) {\n\n\t\tthis.isColor = true;\n\n\t\tthis.r = 1;\n\t\tthis.g = 1;\n\t\tthis.b = 1;\n\n\t\treturn this.set( r, g, b );\n\n\t}\n\n\tset( r, g, b ) {\n\n\t\tif ( g === undefined && b === undefined ) {\n\n\t\t\t// r is THREE.Color, hex or string\n\n\t\t\tconst value = r;\n\n\t\t\tif ( value && value.isColor ) {\n\n\t\t\t\tthis.copy( value );\n\n\t\t\t} else if ( typeof value === 'number' ) {\n\n\t\t\t\tthis.setHex( value );\n\n\t\t\t} else if ( typeof value === 'string' ) {\n\n\t\t\t\tthis.setStyle( value );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthis.setRGB( r, g, b );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.r = scalar;\n\t\tthis.g = scalar;\n\t\tthis.b = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetHex( hex, colorSpace = SRGBColorSpace ) {\n\n\t\thex = Math.floor( hex );\n\n\t\tthis.r = ( hex >> 16 & 255 ) / 255;\n\t\tthis.g = ( hex >> 8 & 255 ) / 255;\n\t\tthis.b = ( hex & 255 ) / 255;\n\n\t\tColorManagement.toWorkingColorSpace( this, colorSpace );\n\n\t\treturn this;\n\n\t}\n\n\tsetRGB( r, g, b, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\tthis.r = r;\n\t\tthis.g = g;\n\t\tthis.b = b;\n\n\t\tColorManagement.toWorkingColorSpace( this, colorSpace );\n\n\t\treturn this;\n\n\t}\n\n\tsetHSL( h, s, l, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\th = euclideanModulo( h, 1 );\n\t\ts = clamp( s, 0, 1 );\n\t\tl = clamp( l, 0, 1 );\n\n\t\tif ( s === 0 ) {\n\n\t\t\tthis.r = this.g = this.b = l;\n\n\t\t} else {\n\n\t\t\tconst p = l <= 0.5 ? l * ( 1 + s ) : l + s - ( l * s );\n\t\t\tconst q = ( 2 * l ) - p;\n\n\t\t\tthis.r = hue2rgb( q, p, h + 1 / 3 );\n\t\t\tthis.g = hue2rgb( q, p, h );\n\t\t\tthis.b = hue2rgb( q, p, h - 1 / 3 );\n\n\t\t}\n\n\t\tColorManagement.toWorkingColorSpace( this, colorSpace );\n\n\t\treturn this;\n\n\t}\n\n\tsetStyle( style, colorSpace = SRGBColorSpace ) {\n\n\t\tfunction handleAlpha( string ) {\n\n\t\t\tif ( string === undefined ) return;\n\n\t\t\tif ( parseFloat( string ) < 1 ) {\n\n\t\t\t\tconsole.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' );\n\n\t\t\t}\n\n\t\t}\n\n\n\t\tlet m;\n\n\t\tif ( m = /^(\\w+)\\(([^\\)]*)\\)/.exec( style ) ) {\n\n\t\t\t// rgb / hsl\n\n\t\t\tlet color;\n\t\t\tconst name = m[ 1 ];\n\t\t\tconst components = m[ 2 ];\n\n\t\t\tswitch ( name ) {\n\n\t\t\t\tcase 'rgb':\n\t\t\t\tcase 'rgba':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(255,0,0) rgba(255,0,0,0.5)\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setRGB(\n\t\t\t\t\t\t\tMath.min( 255, parseInt( color[ 1 ], 10 ) ) / 255,\n\t\t\t\t\t\t\tMath.min( 255, parseInt( color[ 2 ], 10 ) ) / 255,\n\t\t\t\t\t\t\tMath.min( 255, parseInt( color[ 3 ], 10 ) ) / 255,\n\t\t\t\t\t\t\tcolorSpace\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setRGB(\n\t\t\t\t\t\t\tMath.min( 100, parseInt( color[ 1 ], 10 ) ) / 100,\n\t\t\t\t\t\t\tMath.min( 100, parseInt( color[ 2 ], 10 ) ) / 100,\n\t\t\t\t\t\t\tMath.min( 100, parseInt( color[ 3 ], 10 ) ) / 100,\n\t\t\t\t\t\t\tcolorSpace\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hsl':\n\t\t\t\tcase 'hsla':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setHSL(\n\t\t\t\t\t\t\tparseFloat( color[ 1 ] ) / 360,\n\t\t\t\t\t\t\tparseFloat( color[ 2 ] ) / 100,\n\t\t\t\t\t\t\tparseFloat( color[ 3 ] ) / 100,\n\t\t\t\t\t\t\tcolorSpace\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tconsole.warn( 'THREE.Color: Unknown color model ' + style );\n\n\t\t\t}\n\n\t\t} else if ( m = /^\\#([A-Fa-f\\d]+)$/.exec( style ) ) {\n\n\t\t\t// hex color\n\n\t\t\tconst hex = m[ 1 ];\n\t\t\tconst size = hex.length;\n\n\t\t\tif ( size === 3 ) {\n\n\t\t\t\t// #ff0\n\t\t\t\treturn this.setRGB(\n\t\t\t\t\tparseInt( hex.charAt( 0 ), 16 ) / 15,\n\t\t\t\t\tparseInt( hex.charAt( 1 ), 16 ) / 15,\n\t\t\t\t\tparseInt( hex.charAt( 2 ), 16 ) / 15,\n\t\t\t\t\tcolorSpace\n\t\t\t\t);\n\n\t\t\t} else if ( size === 6 ) {\n\n\t\t\t\t// #ff0000\n\t\t\t\treturn this.setHex( parseInt( hex, 16 ), colorSpace );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.Color: Invalid hex color ' + style );\n\n\t\t\t}\n\n\t\t} else if ( style && style.length > 0 ) {\n\n\t\t\treturn this.setColorName( style, colorSpace );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetColorName( style, colorSpace = SRGBColorSpace ) {\n\n\t\t// color keywords\n\t\tconst hex = _colorKeywords[ style.toLowerCase() ];\n\n\t\tif ( hex !== undefined ) {\n\n\t\t\t// red\n\t\t\tthis.setHex( hex, colorSpace );\n\n\t\t} else {\n\n\t\t\t// unknown color\n\t\t\tconsole.warn( 'THREE.Color: Unknown color ' + style );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.r, this.g, this.b );\n\n\t}\n\n\tcopy( color ) {\n\n\t\tthis.r = color.r;\n\t\tthis.g = color.g;\n\t\tthis.b = color.b;\n\n\t\treturn this;\n\n\t}\n\n\tcopySRGBToLinear( color ) {\n\n\t\tthis.r = SRGBToLinear( color.r );\n\t\tthis.g = SRGBToLinear( color.g );\n\t\tthis.b = SRGBToLinear( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tcopyLinearToSRGB( color ) {\n\n\t\tthis.r = LinearToSRGB( color.r );\n\t\tthis.g = LinearToSRGB( color.g );\n\t\tthis.b = LinearToSRGB( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tconvertSRGBToLinear() {\n\n\t\tthis.copySRGBToLinear( this );\n\n\t\treturn this;\n\n\t}\n\n\tconvertLinearToSRGB() {\n\n\t\tthis.copyLinearToSRGB( this );\n\n\t\treturn this;\n\n\t}\n\n\tgetHex( colorSpace = SRGBColorSpace ) {\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\treturn Math.round( clamp( _color.r * 255, 0, 255 ) ) * 65536 + Math.round( clamp( _color.g * 255, 0, 255 ) ) * 256 + Math.round( clamp( _color.b * 255, 0, 255 ) );\n\n\t}\n\n\tgetHexString( colorSpace = SRGBColorSpace ) {\n\n\t\treturn ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( - 6 );\n\n\t}\n\n\tgetHSL( target, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\tconst r = _color.r, g = _color.g, b = _color.b;\n\n\t\tconst max = Math.max( r, g, b );\n\t\tconst min = Math.min( r, g, b );\n\n\t\tlet hue, saturation;\n\t\tconst lightness = ( min + max ) / 2.0;\n\n\t\tif ( min === max ) {\n\n\t\t\thue = 0;\n\t\t\tsaturation = 0;\n\n\t\t} else {\n\n\t\t\tconst delta = max - min;\n\n\t\t\tsaturation = lightness <= 0.5 ? delta / ( max + min ) : delta / ( 2 - max - min );\n\n\t\t\tswitch ( max ) {\n\n\t\t\t\tcase r: hue = ( g - b ) / delta + ( g < b ? 6 : 0 ); break;\n\t\t\t\tcase g: hue = ( b - r ) / delta + 2; break;\n\t\t\t\tcase b: hue = ( r - g ) / delta + 4; break;\n\n\t\t\t}\n\n\t\t\thue /= 6;\n\n\t\t}\n\n\t\ttarget.h = hue;\n\t\ttarget.s = saturation;\n\t\ttarget.l = lightness;\n\n\t\treturn target;\n\n\t}\n\n\tgetRGB( target, colorSpace = ColorManagement.workingColorSpace ) {\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\ttarget.r = _color.r;\n\t\ttarget.g = _color.g;\n\t\ttarget.b = _color.b;\n\n\t\treturn target;\n\n\t}\n\n\tgetStyle( colorSpace = SRGBColorSpace ) {\n\n\t\tColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace );\n\n\t\tconst r = _color.r, g = _color.g, b = _color.b;\n\n\t\tif ( colorSpace !== SRGBColorSpace ) {\n\n\t\t\t// Requires CSS Color Module Level 4 (https://www.w3.org/TR/css-color-4/).\n\t\t\treturn `color(${ colorSpace } ${ r.toFixed( 3 ) } ${ g.toFixed( 3 ) } ${ b.toFixed( 3 ) })`;\n\n\t\t}\n\n\t\treturn `rgb(${ Math.round( r * 255 ) },${ Math.round( g * 255 ) },${ Math.round( b * 255 ) })`;\n\n\t}\n\n\toffsetHSL( h, s, l ) {\n\n\t\tthis.getHSL( _hslA );\n\n\t\treturn this.setHSL( _hslA.h + h, _hslA.s + s, _hslA.l + l );\n\n\t}\n\n\tadd( color ) {\n\n\t\tthis.r += color.r;\n\t\tthis.g += color.g;\n\t\tthis.b += color.b;\n\n\t\treturn this;\n\n\t}\n\n\taddColors( color1, color2 ) {\n\n\t\tthis.r = color1.r + color2.r;\n\t\tthis.g = color1.g + color2.g;\n\t\tthis.b = color1.b + color2.b;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.r += s;\n\t\tthis.g += s;\n\t\tthis.b += s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( color ) {\n\n\t\tthis.r = Math.max( 0, this.r - color.r );\n\t\tthis.g = Math.max( 0, this.g - color.g );\n\t\tthis.b = Math.max( 0, this.b - color.b );\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( color ) {\n\n\t\tthis.r *= color.r;\n\t\tthis.g *= color.g;\n\t\tthis.b *= color.b;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tthis.r *= s;\n\t\tthis.g *= s;\n\t\tthis.b *= s;\n\n\t\treturn this;\n\n\t}\n\n\tlerp( color, alpha ) {\n\n\t\tthis.r += ( color.r - this.r ) * alpha;\n\t\tthis.g += ( color.g - this.g ) * alpha;\n\t\tthis.b += ( color.b - this.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpColors( color1, color2, alpha ) {\n\n\t\tthis.r = color1.r + ( color2.r - color1.r ) * alpha;\n\t\tthis.g = color1.g + ( color2.g - color1.g ) * alpha;\n\t\tthis.b = color1.b + ( color2.b - color1.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpHSL( color, alpha ) {\n\n\t\tthis.getHSL( _hslA );\n\t\tcolor.getHSL( _hslB );\n\n\t\tconst h = lerp( _hslA.h, _hslB.h, alpha );\n\t\tconst s = lerp( _hslA.s, _hslB.s, alpha );\n\t\tconst l = lerp( _hslA.l, _hslB.l, alpha );\n\n\t\tthis.setHSL( h, s, l );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\tthis.r = v.x;\n\t\tthis.g = v.y;\n\t\tthis.b = v.z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst r = this.r, g = this.g, b = this.b;\n\t\tconst e = m.elements;\n\n\t\tthis.r = e[ 0 ] * r + e[ 3 ] * g + e[ 6 ] * b;\n\t\tthis.g = e[ 1 ] * r + e[ 4 ] * g + e[ 7 ] * b;\n\t\tthis.b = e[ 2 ] * r + e[ 5 ] * g + e[ 8 ] * b;\n\n\t\treturn this;\n\n\t}\n\n\tequals( c ) {\n\n\t\treturn ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.r = array[ offset ];\n\t\tthis.g = array[ offset + 1 ];\n\t\tthis.b = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.r;\n\t\tarray[ offset + 1 ] = this.g;\n\t\tarray[ offset + 2 ] = this.b;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.r = attribute.getX( index );\n\t\tthis.g = attribute.getY( index );\n\t\tthis.b = attribute.getZ( index );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.getHex();\n\n\t}\n\n\t*[ Symbol.iterator ]() {\n\n\t\tyield this.r;\n\t\tyield this.g;\n\t\tyield this.b;\n\n\t}\n\n}\n\nconst _color = /*@__PURE__*/ new Color();\n\nColor.NAMES = _colorKeywords;\n\nlet _materialId = 0;\n\nclass Material extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isMaterial = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _materialId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Material';\n\n\t\tthis.blending = NormalBlending;\n\t\tthis.side = FrontSide;\n\t\tthis.vertexColors = false;\n\n\t\tthis.opacity = 1;\n\t\tthis.transparent = false;\n\t\tthis.alphaHash = false;\n\n\t\tthis.blendSrc = SrcAlphaFactor;\n\t\tthis.blendDst = OneMinusSrcAlphaFactor;\n\t\tthis.blendEquation = AddEquation;\n\t\tthis.blendSrcAlpha = null;\n\t\tthis.blendDstAlpha = null;\n\t\tthis.blendEquationAlpha = null;\n\t\tthis.blendColor = new Color( 0, 0, 0 );\n\t\tthis.blendAlpha = 0;\n\n\t\tthis.depthFunc = LessEqualDepth;\n\t\tthis.depthTest = true;\n\t\tthis.depthWrite = true;\n\n\t\tthis.stencilWriteMask = 0xff;\n\t\tthis.stencilFunc = AlwaysStencilFunc;\n\t\tthis.stencilRef = 0;\n\t\tthis.stencilFuncMask = 0xff;\n\t\tthis.stencilFail = KeepStencilOp;\n\t\tthis.stencilZFail = KeepStencilOp;\n\t\tthis.stencilZPass = KeepStencilOp;\n\t\tthis.stencilWrite = false;\n\n\t\tthis.clippingPlanes = null;\n\t\tthis.clipIntersection = false;\n\t\tthis.clipShadows = false;\n\n\t\tthis.shadowSide = null;\n\n\t\tthis.colorWrite = true;\n\n\t\tthis.precision = null; // override the renderer's default precision for this material\n\n\t\tthis.polygonOffset = false;\n\t\tthis.polygonOffsetFactor = 0;\n\t\tthis.polygonOffsetUnits = 0;\n\n\t\tthis.dithering = false;\n\n\t\tthis.alphaToCoverage = false;\n\t\tthis.premultipliedAlpha = false;\n\t\tthis.forceSinglePass = false;\n\n\t\tthis.visible = true;\n\n\t\tthis.toneMapped = true;\n\n\t\tthis.userData = {};\n\n\t\tthis.version = 0;\n\n\t\tthis._alphaTest = 0;\n\n\t}\n\n\tget alphaTest() {\n\n\t\treturn this._alphaTest;\n\n\t}\n\n\tset alphaTest( value ) {\n\n\t\tif ( this._alphaTest > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._alphaTest = value;\n\n\t}\n\n\tonBuild( /* shaderobject, renderer */ ) {}\n\n\tonBeforeRender( /* renderer, scene, camera, geometry, object, group */ ) {}\n\n\tonBeforeCompile( /* shaderobject, renderer */ ) {}\n\n\tcustomProgramCacheKey() {\n\n\t\treturn this.onBeforeCompile.toString();\n\n\t}\n\n\tsetValues( values ) {\n\n\t\tif ( values === undefined ) return;\n\n\t\tfor ( const key in values ) {\n\n\t\t\tconst newValue = values[ key ];\n\n\t\t\tif ( newValue === undefined ) {\n\n\t\t\t\tconsole.warn( `THREE.Material: parameter '${ key }' has value of undefined.` );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tconst currentValue = this[ key ];\n\n\t\t\tif ( currentValue === undefined ) {\n\n\t\t\t\tconsole.warn( `THREE.Material: '${ key }' is not a property of THREE.${ this.type }.` );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( currentValue && currentValue.isColor ) {\n\n\t\t\t\tcurrentValue.set( newValue );\n\n\t\t\t} else if ( ( currentValue && currentValue.isVector3 ) && ( newValue && newValue.isVector3 ) ) {\n\n\t\t\t\tcurrentValue.copy( newValue );\n\n\t\t\t} else {\n\n\t\t\t\tthis[ key ] = newValue;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( isRootObject ) {\n\n\t\t\tmeta = {\n\t\t\t\ttextures: {},\n\t\t\t\timages: {}\n\t\t\t};\n\n\t\t}\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Material',\n\t\t\t\tgenerator: 'Material.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard Material serialization\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\n\t\tif ( this.color && this.color.isColor ) data.color = this.color.getHex();\n\n\t\tif ( this.roughness !== undefined ) data.roughness = this.roughness;\n\t\tif ( this.metalness !== undefined ) data.metalness = this.metalness;\n\n\t\tif ( this.sheen !== undefined ) data.sheen = this.sheen;\n\t\tif ( this.sheenColor && this.sheenColor.isColor ) data.sheenColor = this.sheenColor.getHex();\n\t\tif ( this.sheenRoughness !== undefined ) data.sheenRoughness = this.sheenRoughness;\n\t\tif ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex();\n\t\tif ( this.emissiveIntensity && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity;\n\n\t\tif ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex();\n\t\tif ( this.specularIntensity !== undefined ) data.specularIntensity = this.specularIntensity;\n\t\tif ( this.specularColor && this.specularColor.isColor ) data.specularColor = this.specularColor.getHex();\n\t\tif ( this.shininess !== undefined ) data.shininess = this.shininess;\n\t\tif ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat;\n\t\tif ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness;\n\n\t\tif ( this.clearcoatMap && this.clearcoatMap.isTexture ) {\n\n\t\t\tdata.clearcoatMap = this.clearcoatMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture ) {\n\n\t\t\tdata.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) {\n\n\t\t\tdata.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid;\n\t\t\tdata.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.iridescence !== undefined ) data.iridescence = this.iridescence;\n\t\tif ( this.iridescenceIOR !== undefined ) data.iridescenceIOR = this.iridescenceIOR;\n\t\tif ( this.iridescenceThicknessRange !== undefined ) data.iridescenceThicknessRange = this.iridescenceThicknessRange;\n\n\t\tif ( this.iridescenceMap && this.iridescenceMap.isTexture ) {\n\n\t\t\tdata.iridescenceMap = this.iridescenceMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture ) {\n\n\t\t\tdata.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.anisotropy !== undefined ) data.anisotropy = this.anisotropy;\n\t\tif ( this.anisotropyRotation !== undefined ) data.anisotropyRotation = this.anisotropyRotation;\n\n\t\tif ( this.anisotropyMap && this.anisotropyMap.isTexture ) {\n\n\t\t\tdata.anisotropyMap = this.anisotropyMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid;\n\t\tif ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid;\n\t\tif ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid;\n\n\t\tif ( this.lightMap && this.lightMap.isTexture ) {\n\n\t\t\tdata.lightMap = this.lightMap.toJSON( meta ).uuid;\n\t\t\tdata.lightMapIntensity = this.lightMapIntensity;\n\n\t\t}\n\n\t\tif ( this.aoMap && this.aoMap.isTexture ) {\n\n\t\t\tdata.aoMap = this.aoMap.toJSON( meta ).uuid;\n\t\t\tdata.aoMapIntensity = this.aoMapIntensity;\n\n\t\t}\n\n\t\tif ( this.bumpMap && this.bumpMap.isTexture ) {\n\n\t\t\tdata.bumpMap = this.bumpMap.toJSON( meta ).uuid;\n\t\t\tdata.bumpScale = this.bumpScale;\n\n\t\t}\n\n\t\tif ( this.normalMap && this.normalMap.isTexture ) {\n\n\t\t\tdata.normalMap = this.normalMap.toJSON( meta ).uuid;\n\t\t\tdata.normalMapType = this.normalMapType;\n\t\t\tdata.normalScale = this.normalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.displacementMap && this.displacementMap.isTexture ) {\n\n\t\t\tdata.displacementMap = this.displacementMap.toJSON( meta ).uuid;\n\t\t\tdata.displacementScale = this.displacementScale;\n\t\t\tdata.displacementBias = this.displacementBias;\n\n\t\t}\n\n\t\tif ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid;\n\t\tif ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid;\n\n\t\tif ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid;\n\t\tif ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid;\n\t\tif ( this.specularIntensityMap && this.specularIntensityMap.isTexture ) data.specularIntensityMap = this.specularIntensityMap.toJSON( meta ).uuid;\n\t\tif ( this.specularColorMap && this.specularColorMap.isTexture ) data.specularColorMap = this.specularColorMap.toJSON( meta ).uuid;\n\n\t\tif ( this.envMap && this.envMap.isTexture ) {\n\n\t\t\tdata.envMap = this.envMap.toJSON( meta ).uuid;\n\n\t\t\tif ( this.combine !== undefined ) data.combine = this.combine;\n\n\t\t}\n\n\t\tif ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;\n\t\tif ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity;\n\t\tif ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio;\n\n\t\tif ( this.gradientMap && this.gradientMap.isTexture ) {\n\n\t\t\tdata.gradientMap = this.gradientMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.transmission !== undefined ) data.transmission = this.transmission;\n\t\tif ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid;\n\t\tif ( this.thickness !== undefined ) data.thickness = this.thickness;\n\t\tif ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid;\n\t\tif ( this.attenuationDistance !== undefined && this.attenuationDistance !== Infinity ) data.attenuationDistance = this.attenuationDistance;\n\t\tif ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex();\n\n\t\tif ( this.size !== undefined ) data.size = this.size;\n\t\tif ( this.shadowSide !== null ) data.shadowSide = this.shadowSide;\n\t\tif ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation;\n\n\t\tif ( this.blending !== NormalBlending ) data.blending = this.blending;\n\t\tif ( this.side !== FrontSide ) data.side = this.side;\n\t\tif ( this.vertexColors === true ) data.vertexColors = true;\n\n\t\tif ( this.opacity < 1 ) data.opacity = this.opacity;\n\t\tif ( this.transparent === true ) data.transparent = true;\n\n\t\tif ( this.blendSrc !== SrcAlphaFactor ) data.blendSrc = this.blendSrc;\n\t\tif ( this.blendDst !== OneMinusSrcAlphaFactor ) data.blendDst = this.blendDst;\n\t\tif ( this.blendEquation !== AddEquation ) data.blendEquation = this.blendEquation;\n\t\tif ( this.blendSrcAlpha !== null ) data.blendSrcAlpha = this.blendSrcAlpha;\n\t\tif ( this.blendDstAlpha !== null ) data.blendDstAlpha = this.blendDstAlpha;\n\t\tif ( this.blendEquationAlpha !== null ) data.blendEquationAlpha = this.blendEquationAlpha;\n\t\tif ( this.blendColor && this.blendColor.isColor ) data.blendColor = this.blendColor.getHex();\n\t\tif ( this.blendAlpha !== 0 ) data.blendAlpha = this.blendAlpha;\n\n\t\tif ( this.depthFunc !== LessEqualDepth ) data.depthFunc = this.depthFunc;\n\t\tif ( this.depthTest === false ) data.depthTest = this.depthTest;\n\t\tif ( this.depthWrite === false ) data.depthWrite = this.depthWrite;\n\t\tif ( this.colorWrite === false ) data.colorWrite = this.colorWrite;\n\n\t\tif ( this.stencilWriteMask !== 0xff ) data.stencilWriteMask = this.stencilWriteMask;\n\t\tif ( this.stencilFunc !== AlwaysStencilFunc ) data.stencilFunc = this.stencilFunc;\n\t\tif ( this.stencilRef !== 0 ) data.stencilRef = this.stencilRef;\n\t\tif ( this.stencilFuncMask !== 0xff ) data.stencilFuncMask = this.stencilFuncMask;\n\t\tif ( this.stencilFail !== KeepStencilOp ) data.stencilFail = this.stencilFail;\n\t\tif ( this.stencilZFail !== KeepStencilOp ) data.stencilZFail = this.stencilZFail;\n\t\tif ( this.stencilZPass !== KeepStencilOp ) data.stencilZPass = this.stencilZPass;\n\t\tif ( this.stencilWrite === true ) data.stencilWrite = this.stencilWrite;\n\n\t\t// rotation (SpriteMaterial)\n\t\tif ( this.rotation !== undefined && this.rotation !== 0 ) data.rotation = this.rotation;\n\n\t\tif ( this.polygonOffset === true ) data.polygonOffset = true;\n\t\tif ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;\n\t\tif ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;\n\n\t\tif ( this.linewidth !== undefined && this.linewidth !== 1 ) data.linewidth = this.linewidth;\n\t\tif ( this.dashSize !== undefined ) data.dashSize = this.dashSize;\n\t\tif ( this.gapSize !== undefined ) data.gapSize = this.gapSize;\n\t\tif ( this.scale !== undefined ) data.scale = this.scale;\n\n\t\tif ( this.dithering === true ) data.dithering = true;\n\n\t\tif ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest;\n\t\tif ( this.alphaHash === true ) data.alphaHash = true;\n\t\tif ( this.alphaToCoverage === true ) data.alphaToCoverage = true;\n\t\tif ( this.premultipliedAlpha === true ) data.premultipliedAlpha = true;\n\t\tif ( this.forceSinglePass === true ) data.forceSinglePass = true;\n\n\t\tif ( this.wireframe === true ) data.wireframe = true;\n\t\tif ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth;\n\t\tif ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap;\n\t\tif ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin;\n\n\t\tif ( this.flatShading === true ) data.flatShading = true;\n\n\t\tif ( this.visible === false ) data.visible = false;\n\n\t\tif ( this.toneMapped === false ) data.toneMapped = false;\n\n\t\tif ( this.fog === false ) data.fog = false;\n\n\t\tif ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;\n\n\t\t// TODO: Copied from Object3D.toJSON\n\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t\tif ( isRootObject ) {\n\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\n\t\t\tif ( textures.length > 0 ) data.textures = textures;\n\t\t\tif ( images.length > 0 ) data.images = images;\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.blending = source.blending;\n\t\tthis.side = source.side;\n\t\tthis.vertexColors = source.vertexColors;\n\n\t\tthis.opacity = source.opacity;\n\t\tthis.transparent = source.transparent;\n\n\t\tthis.blendSrc = source.blendSrc;\n\t\tthis.blendDst = source.blendDst;\n\t\tthis.blendEquation = source.blendEquation;\n\t\tthis.blendSrcAlpha = source.blendSrcAlpha;\n\t\tthis.blendDstAlpha = source.blendDstAlpha;\n\t\tthis.blendEquationAlpha = source.blendEquationAlpha;\n\t\tthis.blendColor.copy( source.blendColor );\n\t\tthis.blendAlpha = source.blendAlpha;\n\n\t\tthis.depthFunc = source.depthFunc;\n\t\tthis.depthTest = source.depthTest;\n\t\tthis.depthWrite = source.depthWrite;\n\n\t\tthis.stencilWriteMask = source.stencilWriteMask;\n\t\tthis.stencilFunc = source.stencilFunc;\n\t\tthis.stencilRef = source.stencilRef;\n\t\tthis.stencilFuncMask = source.stencilFuncMask;\n\t\tthis.stencilFail = source.stencilFail;\n\t\tthis.stencilZFail = source.stencilZFail;\n\t\tthis.stencilZPass = source.stencilZPass;\n\t\tthis.stencilWrite = source.stencilWrite;\n\n\t\tconst srcPlanes = source.clippingPlanes;\n\t\tlet dstPlanes = null;\n\n\t\tif ( srcPlanes !== null ) {\n\n\t\t\tconst n = srcPlanes.length;\n\t\t\tdstPlanes = new Array( n );\n\n\t\t\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\t\t\tdstPlanes[ i ] = srcPlanes[ i ].clone();\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.clippingPlanes = dstPlanes;\n\t\tthis.clipIntersection = source.clipIntersection;\n\t\tthis.clipShadows = source.clipShadows;\n\n\t\tthis.shadowSide = source.shadowSide;\n\n\t\tthis.colorWrite = source.colorWrite;\n\n\t\tthis.precision = source.precision;\n\n\t\tthis.polygonOffset = source.polygonOffset;\n\t\tthis.polygonOffsetFactor = source.polygonOffsetFactor;\n\t\tthis.polygonOffsetUnits = source.polygonOffsetUnits;\n\n\t\tthis.dithering = source.dithering;\n\n\t\tthis.alphaTest = source.alphaTest;\n\t\tthis.alphaHash = source.alphaHash;\n\t\tthis.alphaToCoverage = source.alphaToCoverage;\n\t\tthis.premultipliedAlpha = source.premultipliedAlpha;\n\t\tthis.forceSinglePass = source.forceSinglePass;\n\n\t\tthis.visible = source.visible;\n\n\t\tthis.toneMapped = source.toneMapped;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n}\n\nclass MeshBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshBasicMaterial = true;\n\n\t\tthis.type = 'MeshBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // emissive\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\n// Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf\n\nconst _tables = /*@__PURE__*/ _generateTables();\n\nfunction _generateTables() {\n\n\t// float32 to float16 helpers\n\n\tconst buffer = new ArrayBuffer( 4 );\n\tconst floatView = new Float32Array( buffer );\n\tconst uint32View = new Uint32Array( buffer );\n\n\tconst baseTable = new Uint32Array( 512 );\n\tconst shiftTable = new Uint32Array( 512 );\n\n\tfor ( let i = 0; i < 256; ++ i ) {\n\n\t\tconst e = i - 127;\n\n\t\t// very small number (0, -0)\n\n\t\tif ( e < - 27 ) {\n\n\t\t\tbaseTable[ i ] = 0x0000;\n\t\t\tbaseTable[ i | 0x100 ] = 0x8000;\n\t\t\tshiftTable[ i ] = 24;\n\t\t\tshiftTable[ i | 0x100 ] = 24;\n\n\t\t\t// small number (denorm)\n\n\t\t} else if ( e < - 14 ) {\n\n\t\t\tbaseTable[ i ] = 0x0400 >> ( - e - 14 );\n\t\t\tbaseTable[ i | 0x100 ] = ( 0x0400 >> ( - e - 14 ) ) | 0x8000;\n\t\t\tshiftTable[ i ] = - e - 1;\n\t\t\tshiftTable[ i | 0x100 ] = - e - 1;\n\n\t\t\t// normal number\n\n\t\t} else if ( e <= 15 ) {\n\n\t\t\tbaseTable[ i ] = ( e + 15 ) << 10;\n\t\t\tbaseTable[ i | 0x100 ] = ( ( e + 15 ) << 10 ) | 0x8000;\n\t\t\tshiftTable[ i ] = 13;\n\t\t\tshiftTable[ i | 0x100 ] = 13;\n\n\t\t\t// large number (Infinity, -Infinity)\n\n\t\t} else if ( e < 128 ) {\n\n\t\t\tbaseTable[ i ] = 0x7c00;\n\t\t\tbaseTable[ i | 0x100 ] = 0xfc00;\n\t\t\tshiftTable[ i ] = 24;\n\t\t\tshiftTable[ i | 0x100 ] = 24;\n\n\t\t\t// stay (NaN, Infinity, -Infinity)\n\n\t\t} else {\n\n\t\t\tbaseTable[ i ] = 0x7c00;\n\t\t\tbaseTable[ i | 0x100 ] = 0xfc00;\n\t\t\tshiftTable[ i ] = 13;\n\t\t\tshiftTable[ i | 0x100 ] = 13;\n\n\t\t}\n\n\t}\n\n\t// float16 to float32 helpers\n\n\tconst mantissaTable = new Uint32Array( 2048 );\n\tconst exponentTable = new Uint32Array( 64 );\n\tconst offsetTable = new Uint32Array( 64 );\n\n\tfor ( let i = 1; i < 1024; ++ i ) {\n\n\t\tlet m = i << 13; // zero pad mantissa bits\n\t\tlet e = 0; // zero exponent\n\n\t\t// normalized\n\t\twhile ( ( m & 0x00800000 ) === 0 ) {\n\n\t\t\tm <<= 1;\n\t\t\te -= 0x00800000; // decrement exponent\n\n\t\t}\n\n\t\tm &= ~ 0x00800000; // clear leading 1 bit\n\t\te += 0x38800000; // adjust bias\n\n\t\tmantissaTable[ i ] = m | e;\n\n\t}\n\n\tfor ( let i = 1024; i < 2048; ++ i ) {\n\n\t\tmantissaTable[ i ] = 0x38000000 + ( ( i - 1024 ) << 13 );\n\n\t}\n\n\tfor ( let i = 1; i < 31; ++ i ) {\n\n\t\texponentTable[ i ] = i << 23;\n\n\t}\n\n\texponentTable[ 31 ] = 0x47800000;\n\texponentTable[ 32 ] = 0x80000000;\n\n\tfor ( let i = 33; i < 63; ++ i ) {\n\n\t\texponentTable[ i ] = 0x80000000 + ( ( i - 32 ) << 23 );\n\n\t}\n\n\texponentTable[ 63 ] = 0xc7800000;\n\n\tfor ( let i = 1; i < 64; ++ i ) {\n\n\t\tif ( i !== 32 ) {\n\n\t\t\toffsetTable[ i ] = 1024;\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tfloatView: floatView,\n\t\tuint32View: uint32View,\n\t\tbaseTable: baseTable,\n\t\tshiftTable: shiftTable,\n\t\tmantissaTable: mantissaTable,\n\t\texponentTable: exponentTable,\n\t\toffsetTable: offsetTable\n\t};\n\n}\n\n// float32 to float16\n\nfunction toHalfFloat( val ) {\n\n\tif ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' );\n\n\tval = clamp( val, - 65504, 65504 );\n\n\t_tables.floatView[ 0 ] = val;\n\tconst f = _tables.uint32View[ 0 ];\n\tconst e = ( f >> 23 ) & 0x1ff;\n\treturn _tables.baseTable[ e ] + ( ( f & 0x007fffff ) >> _tables.shiftTable[ e ] );\n\n}\n\n// float16 to float32\n\nfunction fromHalfFloat( val ) {\n\n\tconst m = val >> 10;\n\t_tables.uint32View[ 0 ] = _tables.mantissaTable[ _tables.offsetTable[ m ] + ( val & 0x3ff ) ] + _tables.exponentTable[ m ];\n\treturn _tables.floatView[ 0 ];\n\n}\n\nconst DataUtils = {\n\ttoHalfFloat: toHalfFloat,\n\tfromHalfFloat: fromHalfFloat,\n};\n\nconst _vector$8 = /*@__PURE__*/ new Vector3();\nconst _vector2$1 = /*@__PURE__*/ new Vector2();\n\nclass BufferAttribute {\n\n\tconstructor( array, itemSize, normalized = false ) {\n\n\t\tif ( Array.isArray( array ) ) {\n\n\t\t\tthrow new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );\n\n\t\t}\n\n\t\tthis.isBufferAttribute = true;\n\n\t\tthis.name = '';\n\n\t\tthis.array = array;\n\t\tthis.itemSize = itemSize;\n\t\tthis.count = array !== undefined ? array.length / itemSize : 0;\n\t\tthis.normalized = normalized;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\t\tthis.gpuType = FloatType;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.itemSize = source.itemSize;\n\t\tthis.count = source.count;\n\t\tthis.normalized = source.normalized;\n\n\t\tthis.usage = source.usage;\n\t\tthis.gpuType = source.gpuType;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.itemSize;\n\t\tindex2 *= attribute.itemSize;\n\n\t\tfor ( let i = 0, l = this.itemSize; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyArray( array ) {\n\n\t\tthis.array.set( array );\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tif ( this.itemSize === 2 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector2$1.fromBufferAttribute( this, i );\n\t\t\t\t_vector2$1.applyMatrix3( m );\n\n\t\t\t\tthis.setXY( i, _vector2$1.x, _vector2$1.y );\n\n\t\t\t}\n\n\t\t} else if ( this.itemSize === 3 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector$8.fromBufferAttribute( this, i );\n\t\t\t\t_vector$8.applyMatrix3( m );\n\n\t\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( this, i );\n\n\t\t\t_vector$8.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( this, i );\n\n\t\t\t_vector$8.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( this, i );\n\n\t\t\t_vector$8.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\t// Matching BufferAttribute constructor, do not normalize the array.\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index, component ) {\n\n\t\tlet value = this.array[ index * this.itemSize + component ];\n\n\t\tif ( this.normalized ) value = denormalize( value, this.array );\n\n\t\treturn value;\n\n\t}\n\n\tsetComponent( index, component, value ) {\n\n\t\tif ( this.normalized ) value = normalize( value, this.array );\n\n\t\tthis.array[ index * this.itemSize + component ] = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\tlet x = this.array[ index * this.itemSize ];\n\n\t\tif ( this.normalized ) x = denormalize( x, this.array );\n\n\t\treturn x;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tif ( this.normalized ) x = normalize( x, this.array );\n\n\t\tthis.array[ index * this.itemSize ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tgetY( index ) {\n\n\t\tlet y = this.array[ index * this.itemSize + 1 ];\n\n\t\tif ( this.normalized ) y = denormalize( y, this.array );\n\n\t\treturn y;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tif ( this.normalized ) y = normalize( y, this.array );\n\n\t\tthis.array[ index * this.itemSize + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\tlet z = this.array[ index * this.itemSize + 2 ];\n\n\t\tif ( this.normalized ) z = denormalize( z, this.array );\n\n\t\treturn z;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tif ( this.normalized ) z = normalize( z, this.array );\n\n\t\tthis.array[ index * this.itemSize + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tgetW( index ) {\n\n\t\tlet w = this.array[ index * this.itemSize + 3 ];\n\n\t\tif ( this.normalized ) w = denormalize( w, this.array );\n\n\t\treturn w;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tif ( this.normalized ) w = normalize( w, this.array );\n\n\t\tthis.array[ index * this.itemSize + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\t\t\tw = normalize( w, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\t\tthis.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.array, this.itemSize ).copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\titemSize: this.itemSize,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tarray: Array.from( this.array ),\n\t\t\tnormalized: this.normalized\n\t\t};\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( this.usage !== StaticDrawUsage ) data.usage = this.usage;\n\t\tif ( this.updateRange.offset !== 0 || this.updateRange.count !== - 1 ) data.updateRange = this.updateRange;\n\n\t\treturn data;\n\n\t}\n\n}\n\n//\n\nclass Int8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8ClampedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8ClampedArray( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t\tthis.isFloat16BufferAttribute = true;\n\n\t}\n\n\tgetX( index ) {\n\n\t\tlet x = fromHalfFloat( this.array[ index * this.itemSize ] );\n\n\t\tif ( this.normalized ) x = denormalize( x, this.array );\n\n\t\treturn x;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tif ( this.normalized ) x = normalize( x, this.array );\n\n\t\tthis.array[ index * this.itemSize ] = toHalfFloat( x );\n\n\t\treturn this;\n\n\t}\n\n\tgetY( index ) {\n\n\t\tlet y = fromHalfFloat( this.array[ index * this.itemSize + 1 ] );\n\n\t\tif ( this.normalized ) y = denormalize( y, this.array );\n\n\t\treturn y;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tif ( this.normalized ) y = normalize( y, this.array );\n\n\t\tthis.array[ index * this.itemSize + 1 ] = toHalfFloat( y );\n\n\t\treturn this;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\tlet z = fromHalfFloat( this.array[ index * this.itemSize + 2 ] );\n\n\t\tif ( this.normalized ) z = denormalize( z, this.array );\n\n\t\treturn z;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tif ( this.normalized ) z = normalize( z, this.array );\n\n\t\tthis.array[ index * this.itemSize + 2 ] = toHalfFloat( z );\n\n\t\treturn this;\n\n\t}\n\n\tgetW( index ) {\n\n\t\tlet w = fromHalfFloat( this.array[ index * this.itemSize + 3 ] );\n\n\t\tif ( this.normalized ) w = denormalize( w, this.array );\n\n\t\treturn w;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tif ( this.normalized ) w = normalize( w, this.array );\n\n\t\tthis.array[ index * this.itemSize + 3 ] = toHalfFloat( w );\n\n\t\treturn this;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = toHalfFloat( x );\n\t\tthis.array[ index + 1 ] = toHalfFloat( y );\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = toHalfFloat( x );\n\t\tthis.array[ index + 1 ] = toHalfFloat( y );\n\t\tthis.array[ index + 2 ] = toHalfFloat( z );\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\t\t\tw = normalize( w, this.array );\n\n\t\t}\n\n\t\tthis.array[ index + 0 ] = toHalfFloat( x );\n\t\tthis.array[ index + 1 ] = toHalfFloat( y );\n\t\tthis.array[ index + 2 ] = toHalfFloat( z );\n\t\tthis.array[ index + 3 ] = toHalfFloat( w );\n\n\t\treturn this;\n\n\t}\n\n}\n\n\nclass Float32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float64BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float64Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nlet _id$2 = 0;\n\nconst _m1 = /*@__PURE__*/ new Matrix4();\nconst _obj = /*@__PURE__*/ new Object3D();\nconst _offset = /*@__PURE__*/ new Vector3();\nconst _box$1 = /*@__PURE__*/ new Box3();\nconst _boxMorphTargets = /*@__PURE__*/ new Box3();\nconst _vector$7 = /*@__PURE__*/ new Vector3();\n\nclass BufferGeometry extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isBufferGeometry = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _id$2 ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'BufferGeometry';\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\n\t\tthis.morphAttributes = {};\n\t\tthis.morphTargetsRelative = false;\n\n\t\tthis.groups = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\tthis.drawRange = { start: 0, count: Infinity };\n\n\t\tthis.userData = {};\n\n\t}\n\n\tgetIndex() {\n\n\t\treturn this.index;\n\n\t}\n\n\tsetIndex( index ) {\n\n\t\tif ( Array.isArray( index ) ) {\n\n\t\t\tthis.index = new ( arrayNeedsUint32( index ) ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );\n\n\t\t} else {\n\n\t\t\tthis.index = index;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetAttribute( name ) {\n\n\t\treturn this.attributes[ name ];\n\n\t}\n\n\tsetAttribute( name, attribute ) {\n\n\t\tthis.attributes[ name ] = attribute;\n\n\t\treturn this;\n\n\t}\n\n\tdeleteAttribute( name ) {\n\n\t\tdelete this.attributes[ name ];\n\n\t\treturn this;\n\n\t}\n\n\thasAttribute( name ) {\n\n\t\treturn this.attributes[ name ] !== undefined;\n\n\t}\n\n\taddGroup( start, count, materialIndex = 0 ) {\n\n\t\tthis.groups.push( {\n\n\t\t\tstart: start,\n\t\t\tcount: count,\n\t\t\tmaterialIndex: materialIndex\n\n\t\t} );\n\n\t}\n\n\tclearGroups() {\n\n\t\tthis.groups = [];\n\n\t}\n\n\tsetDrawRange( start, count ) {\n\n\t\tthis.drawRange.start = start;\n\t\tthis.drawRange.count = count;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tconst position = this.attributes.position;\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tposition.applyMatrix4( matrix );\n\n\t\t\tposition.needsUpdate = true;\n\n\t\t}\n\n\t\tconst normal = this.attributes.normal;\n\n\t\tif ( normal !== undefined ) {\n\n\t\t\tconst normalMatrix = new Matrix3().getNormalMatrix( matrix );\n\n\t\t\tnormal.applyNormalMatrix( normalMatrix );\n\n\t\t\tnormal.needsUpdate = true;\n\n\t\t}\n\n\t\tconst tangent = this.attributes.tangent;\n\n\t\tif ( tangent !== undefined ) {\n\n\t\t\ttangent.transformDirection( matrix );\n\n\t\t\ttangent.needsUpdate = true;\n\n\t\t}\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tthis.computeBoundingBox();\n\n\t\t}\n\n\t\tif ( this.boundingSphere !== null ) {\n\n\t\t\tthis.computeBoundingSphere();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\t_m1.makeRotationFromQuaternion( q );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\t// rotate geometry around world x-axis\n\n\t\t_m1.makeRotationX( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateY( angle ) {\n\n\t\t// rotate geometry around world y-axis\n\n\t\t_m1.makeRotationY( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\t// rotate geometry around world z-axis\n\n\t\t_m1.makeRotationZ( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( x, y, z ) {\n\n\t\t// translate geometry\n\n\t\t_m1.makeTranslation( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tscale( x, y, z ) {\n\n\t\t// scale geometry\n\n\t\t_m1.makeScale( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tlookAt( vector ) {\n\n\t\t_obj.lookAt( vector );\n\n\t\t_obj.updateMatrix();\n\n\t\tthis.applyMatrix4( _obj.matrix );\n\n\t\treturn this;\n\n\t}\n\n\tcenter() {\n\n\t\tthis.computeBoundingBox();\n\n\t\tthis.boundingBox.getCenter( _offset ).negate();\n\n\t\tthis.translate( _offset.x, _offset.y, _offset.z );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tconst position = [];\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tconst point = points[ i ];\n\t\t\tposition.push( point.x, point.y, point.z || 0 );\n\n\t\t}\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) );\n\n\t\treturn this;\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingBox.set(\n\t\t\t\tnew Vector3( - Infinity, - Infinity, - Infinity ),\n\t\t\t\tnew Vector3( + Infinity, + Infinity, + Infinity )\n\t\t\t);\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tthis.boundingBox.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_box$1.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$7.addVectors( this.boundingBox.min, _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$7 );\n\n\t\t\t\t\t\t_vector$7.addVectors( this.boundingBox.max, _box$1.max );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$7 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthis.boundingBox.makeEmpty();\n\n\t\t}\n\n\t\tif ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingSphere.set( new Vector3(), Infinity );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position ) {\n\n\t\t\t// first, find the center of the bounding sphere\n\n\t\t\tconst center = this.boundingSphere.center;\n\n\t\t\t_box$1.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_boxMorphTargets.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$7.addVectors( _box$1.min, _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$7 );\n\n\t\t\t\t\t\t_vector$7.addVectors( _box$1.max, _boxMorphTargets.max );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$7 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t_box$1.getCenter( center );\n\n\t\t\t// second, try to find a boundingSphere with a radius smaller than the\n\t\t\t// boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n\n\t\t\tlet maxRadiusSq = 0;\n\n\t\t\tfor ( let i = 0, il = position.count; i < il; i ++ ) {\n\n\t\t\t\t_vector$7.fromBufferAttribute( position, i );\n\n\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$7 ) );\n\n\t\t\t}\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\tconst morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t\t\t\tfor ( let j = 0, jl = morphAttribute.count; j < jl; j ++ ) {\n\n\t\t\t\t\t\t_vector$7.fromBufferAttribute( morphAttribute, j );\n\n\t\t\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t\t\t_offset.fromBufferAttribute( position, j );\n\t\t\t\t\t\t\t_vector$7.add( _offset );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$7 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.boundingSphere.radius = Math.sqrt( maxRadiusSq );\n\n\t\t\tif ( isNaN( this.boundingSphere.radius ) ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeTangents() {\n\n\t\tconst index = this.index;\n\t\tconst attributes = this.attributes;\n\n\t\t// based on http://www.terathon.com/code/tangent.html\n\t\t// (per vertex tangents)\n\n\t\tif ( index === null ||\n\t\t\t attributes.position === undefined ||\n\t\t\t attributes.normal === undefined ||\n\t\t\t attributes.uv === undefined ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst indices = index.array;\n\t\tconst positions = attributes.position.array;\n\t\tconst normals = attributes.normal.array;\n\t\tconst uvs = attributes.uv.array;\n\n\t\tconst nVertices = positions.length / 3;\n\n\t\tif ( this.hasAttribute( 'tangent' ) === false ) {\n\n\t\t\tthis.setAttribute( 'tangent', new BufferAttribute( new Float32Array( 4 * nVertices ), 4 ) );\n\n\t\t}\n\n\t\tconst tangents = this.getAttribute( 'tangent' ).array;\n\n\t\tconst tan1 = [], tan2 = [];\n\n\t\tfor ( let i = 0; i < nVertices; i ++ ) {\n\n\t\t\ttan1[ i ] = new Vector3();\n\t\t\ttan2[ i ] = new Vector3();\n\n\t\t}\n\n\t\tconst vA = new Vector3(),\n\t\t\tvB = new Vector3(),\n\t\t\tvC = new Vector3(),\n\n\t\t\tuvA = new Vector2(),\n\t\t\tuvB = new Vector2(),\n\t\t\tuvC = new Vector2(),\n\n\t\t\tsdir = new Vector3(),\n\t\t\ttdir = new Vector3();\n\n\t\tfunction handleTriangle( a, b, c ) {\n\n\t\t\tvA.fromArray( positions, a * 3 );\n\t\t\tvB.fromArray( positions, b * 3 );\n\t\t\tvC.fromArray( positions, c * 3 );\n\n\t\t\tuvA.fromArray( uvs, a * 2 );\n\t\t\tuvB.fromArray( uvs, b * 2 );\n\t\t\tuvC.fromArray( uvs, c * 2 );\n\n\t\t\tvB.sub( vA );\n\t\t\tvC.sub( vA );\n\n\t\t\tuvB.sub( uvA );\n\t\t\tuvC.sub( uvA );\n\n\t\t\tconst r = 1.0 / ( uvB.x * uvC.y - uvC.x * uvB.y );\n\n\t\t\t// silently ignore degenerate uv triangles having coincident or colinear vertices\n\n\t\t\tif ( ! isFinite( r ) ) return;\n\n\t\t\tsdir.copy( vB ).multiplyScalar( uvC.y ).addScaledVector( vC, - uvB.y ).multiplyScalar( r );\n\t\t\ttdir.copy( vC ).multiplyScalar( uvB.x ).addScaledVector( vB, - uvC.x ).multiplyScalar( r );\n\n\t\t\ttan1[ a ].add( sdir );\n\t\t\ttan1[ b ].add( sdir );\n\t\t\ttan1[ c ].add( sdir );\n\n\t\t\ttan2[ a ].add( tdir );\n\t\t\ttan2[ b ].add( tdir );\n\t\t\ttan2[ c ].add( tdir );\n\n\t\t}\n\n\t\tlet groups = this.groups;\n\n\t\tif ( groups.length === 0 ) {\n\n\t\t\tgroups = [ {\n\t\t\t\tstart: 0,\n\t\t\t\tcount: indices.length\n\t\t\t} ];\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleTriangle(\n\t\t\t\t\tindices[ j + 0 ],\n\t\t\t\t\tindices[ j + 1 ],\n\t\t\t\t\tindices[ j + 2 ]\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst tmp = new Vector3(), tmp2 = new Vector3();\n\t\tconst n = new Vector3(), n2 = new Vector3();\n\n\t\tfunction handleVertex( v ) {\n\n\t\t\tn.fromArray( normals, v * 3 );\n\t\t\tn2.copy( n );\n\n\t\t\tconst t = tan1[ v ];\n\n\t\t\t// Gram-Schmidt orthogonalize\n\n\t\t\ttmp.copy( t );\n\t\t\ttmp.sub( n.multiplyScalar( n.dot( t ) ) ).normalize();\n\n\t\t\t// Calculate handedness\n\n\t\t\ttmp2.crossVectors( n2, t );\n\t\t\tconst test = tmp2.dot( tan2[ v ] );\n\t\t\tconst w = ( test < 0.0 ) ? - 1.0 : 1.0;\n\n\t\t\ttangents[ v * 4 ] = tmp.x;\n\t\t\ttangents[ v * 4 + 1 ] = tmp.y;\n\t\t\ttangents[ v * 4 + 2 ] = tmp.z;\n\t\t\ttangents[ v * 4 + 3 ] = w;\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleVertex( indices[ j + 0 ] );\n\t\t\t\thandleVertex( indices[ j + 1 ] );\n\t\t\t\thandleVertex( indices[ j + 2 ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeVertexNormals() {\n\n\t\tconst index = this.index;\n\t\tconst positionAttribute = this.getAttribute( 'position' );\n\n\t\tif ( positionAttribute !== undefined ) {\n\n\t\t\tlet normalAttribute = this.getAttribute( 'normal' );\n\n\t\t\tif ( normalAttribute === undefined ) {\n\n\t\t\t\tnormalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 );\n\t\t\t\tthis.setAttribute( 'normal', normalAttribute );\n\n\t\t\t} else {\n\n\t\t\t\t// reset existing normals to zero\n\n\t\t\t\tfor ( let i = 0, il = normalAttribute.count; i < il; i ++ ) {\n\n\t\t\t\t\tnormalAttribute.setXYZ( i, 0, 0, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst pA = new Vector3(), pB = new Vector3(), pC = new Vector3();\n\t\t\tconst nA = new Vector3(), nB = new Vector3(), nC = new Vector3();\n\t\t\tconst cb = new Vector3(), ab = new Vector3();\n\n\t\t\t// indexed elements\n\n\t\t\tif ( index ) {\n\n\t\t\t\tfor ( let i = 0, il = index.count; i < il; i += 3 ) {\n\n\t\t\t\t\tconst vA = index.getX( i + 0 );\n\t\t\t\t\tconst vB = index.getX( i + 1 );\n\t\t\t\t\tconst vC = index.getX( i + 2 );\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, vA );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, vB );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, vC );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnA.fromBufferAttribute( normalAttribute, vA );\n\t\t\t\t\tnB.fromBufferAttribute( normalAttribute, vB );\n\t\t\t\t\tnC.fromBufferAttribute( normalAttribute, vC );\n\n\t\t\t\t\tnA.add( cb );\n\t\t\t\t\tnB.add( cb );\n\t\t\t\t\tnC.add( cb );\n\n\t\t\t\t\tnormalAttribute.setXYZ( vA, nA.x, nA.y, nA.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vB, nB.x, nB.y, nB.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vC, nC.x, nC.y, nC.z );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// non-indexed elements (unconnected triangle soup)\n\n\t\t\t\tfor ( let i = 0, il = positionAttribute.count; i < il; i += 3 ) {\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, i + 0 );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, i + 1 );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, i + 2 );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnormalAttribute.setXYZ( i + 0, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 1, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 2, cb.x, cb.y, cb.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.normalizeNormals();\n\n\t\t\tnormalAttribute.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tnormalizeNormals() {\n\n\t\tconst normals = this.attributes.normal;\n\n\t\tfor ( let i = 0, il = normals.count; i < il; i ++ ) {\n\n\t\t\t_vector$7.fromBufferAttribute( normals, i );\n\n\t\t\t_vector$7.normalize();\n\n\t\t\tnormals.setXYZ( i, _vector$7.x, _vector$7.y, _vector$7.z );\n\n\t\t}\n\n\t}\n\n\ttoNonIndexed() {\n\n\t\tfunction convertBufferAttribute( attribute, indices ) {\n\n\t\t\tconst array = attribute.array;\n\t\t\tconst itemSize = attribute.itemSize;\n\t\t\tconst normalized = attribute.normalized;\n\n\t\t\tconst array2 = new array.constructor( indices.length * itemSize );\n\n\t\t\tlet index = 0, index2 = 0;\n\n\t\t\tfor ( let i = 0, l = indices.length; i < l; i ++ ) {\n\n\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\tindex = indices[ i ] * attribute.data.stride + attribute.offset;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tindex = indices[ i ] * itemSize;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let j = 0; j < itemSize; j ++ ) {\n\n\t\t\t\t\tarray2[ index2 ++ ] = array[ index ++ ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( array2, itemSize, normalized );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.index === null ) {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst geometry2 = new BufferGeometry();\n\n\t\tconst indices = this.index.array;\n\t\tconst attributes = this.attributes;\n\n\t\t// attributes\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\n\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\tgeometry2.setAttribute( name, newAttribute );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = this.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst morphArray = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, il = morphAttribute.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = morphAttribute[ i ];\n\n\t\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\t\tmorphArray.push( newAttribute );\n\n\t\t\t}\n\n\t\t\tgeometry2.morphAttributes[ name ] = morphArray;\n\n\t\t}\n\n\t\tgeometry2.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = this.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tgeometry2.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\treturn geometry2;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'BufferGeometry',\n\t\t\t\tgenerator: 'BufferGeometry.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard BufferGeometry serialization\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;\n\n\t\tif ( this.parameters !== undefined ) {\n\n\t\t\tconst parameters = this.parameters;\n\n\t\t\tfor ( const key in parameters ) {\n\n\t\t\t\tif ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ];\n\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t}\n\n\t\t// for simplicity the code assumes attributes are not shared across geometries, see #15811\n\n\t\tdata.data = { attributes: {} };\n\n\t\tconst index = this.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tdata.data.index = {\n\t\t\t\ttype: index.array.constructor.name,\n\t\t\t\tarray: Array.prototype.slice.call( index.array )\n\t\t\t};\n\n\t\t}\n\n\t\tconst attributes = this.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\n\t\t\tdata.data.attributes[ key ] = attribute.toJSON( data.data );\n\n\t\t}\n\n\t\tconst morphAttributes = {};\n\t\tlet hasMorphAttributes = false;\n\n\t\tfor ( const key in this.morphAttributes ) {\n\n\t\t\tconst attributeArray = this.morphAttributes[ key ];\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = attributeArray[ i ];\n\n\t\t\t\tarray.push( attribute.toJSON( data.data ) );\n\n\t\t\t}\n\n\t\t\tif ( array.length > 0 ) {\n\n\t\t\t\tmorphAttributes[ key ] = array;\n\n\t\t\t\thasMorphAttributes = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( hasMorphAttributes ) {\n\n\t\t\tdata.data.morphAttributes = morphAttributes;\n\t\t\tdata.data.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t}\n\n\t\tconst groups = this.groups;\n\n\t\tif ( groups.length > 0 ) {\n\n\t\t\tdata.data.groups = JSON.parse( JSON.stringify( groups ) );\n\n\t\t}\n\n\t\tconst boundingSphere = this.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tdata.data.boundingSphere = {\n\t\t\t\tcenter: boundingSphere.center.toArray(),\n\t\t\t\tradius: boundingSphere.radius\n\t\t\t};\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\t// reset\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\t\tthis.morphAttributes = {};\n\t\tthis.groups = [];\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// used for storing cloned, shared data\n\n\t\tconst data = {};\n\n\t\t// name\n\n\t\tthis.name = source.name;\n\n\t\t// index\n\n\t\tconst index = source.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tthis.setIndex( index.clone( data ) );\n\n\t\t}\n\n\t\t// attributes\n\n\t\tconst attributes = source.attributes;\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\t\t\tthis.setAttribute( name, attribute.clone( data ) );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = source.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, l = morphAttribute.length; i < l; i ++ ) {\n\n\t\t\t\tarray.push( morphAttribute[ i ].clone( data ) );\n\n\t\t\t}\n\n\t\t\tthis.morphAttributes[ name ] = array;\n\n\t\t}\n\n\t\tthis.morphTargetsRelative = source.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = source.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tthis.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\t// bounding box\n\n\t\tconst boundingBox = source.boundingBox;\n\n\t\tif ( boundingBox !== null ) {\n\n\t\t\tthis.boundingBox = boundingBox.clone();\n\n\t\t}\n\n\t\t// bounding sphere\n\n\t\tconst boundingSphere = source.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tthis.boundingSphere = boundingSphere.clone();\n\n\t\t}\n\n\t\t// draw range\n\n\t\tthis.drawRange.start = source.drawRange.start;\n\t\tthis.drawRange.count = source.drawRange.count;\n\n\t\t// user data\n\n\t\tthis.userData = source.userData;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nconst _inverseMatrix$3 = /*@__PURE__*/ new Matrix4();\nconst _ray$3 = /*@__PURE__*/ new Ray();\nconst _sphere$5 = /*@__PURE__*/ new Sphere();\nconst _sphereHitAt = /*@__PURE__*/ new Vector3();\n\nconst _vA$1 = /*@__PURE__*/ new Vector3();\nconst _vB$1 = /*@__PURE__*/ new Vector3();\nconst _vC$1 = /*@__PURE__*/ new Vector3();\n\nconst _tempA = /*@__PURE__*/ new Vector3();\nconst _morphA = /*@__PURE__*/ new Vector3();\n\nconst _uvA$1 = /*@__PURE__*/ new Vector2();\nconst _uvB$1 = /*@__PURE__*/ new Vector2();\nconst _uvC$1 = /*@__PURE__*/ new Vector2();\n\nconst _normalA = /*@__PURE__*/ new Vector3();\nconst _normalB = /*@__PURE__*/ new Vector3();\nconst _normalC = /*@__PURE__*/ new Vector3();\n\nconst _intersectionPoint = /*@__PURE__*/ new Vector3();\nconst _intersectionPointWorld = /*@__PURE__*/ new Vector3();\n\nclass Mesh extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new MeshBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.isMesh = true;\n\n\t\tthis.type = 'Mesh';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.morphTargetInfluences !== undefined ) {\n\n\t\t\tthis.morphTargetInfluences = source.morphTargetInfluences.slice();\n\n\t\t}\n\n\t\tif ( source.morphTargetDictionary !== undefined ) {\n\n\t\t\tthis.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary );\n\n\t\t}\n\n\t\tthis.material = Array.isArray( source.material ) ? source.material.slice() : source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\t\tconst keys = Object.keys( morphAttributes );\n\n\t\tif ( keys.length > 0 ) {\n\n\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tgetVertexPosition( index, target ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst position = geometry.attributes.position;\n\t\tconst morphPosition = geometry.morphAttributes.position;\n\t\tconst morphTargetsRelative = geometry.morphTargetsRelative;\n\n\t\ttarget.fromBufferAttribute( position, index );\n\n\t\tconst morphInfluences = this.morphTargetInfluences;\n\n\t\tif ( morphPosition && morphInfluences ) {\n\n\t\t\t_morphA.set( 0, 0, 0 );\n\n\t\t\tfor ( let i = 0, il = morphPosition.length; i < il; i ++ ) {\n\n\t\t\t\tconst influence = morphInfluences[ i ];\n\t\t\t\tconst morphAttribute = morphPosition[ i ];\n\n\t\t\t\tif ( influence === 0 ) continue;\n\n\t\t\t\t_tempA.fromBufferAttribute( morphAttribute, index );\n\n\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t_morphA.addScaledVector( _tempA, influence );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_morphA.addScaledVector( _tempA.sub( target ), influence );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttarget.add( _morphA );\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst material = this.material;\n\t\tconst matrixWorld = this.matrixWorld;\n\n\t\tif ( material === undefined ) return;\n\n\t\t// test with bounding sphere in world space\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$5.copy( geometry.boundingSphere );\n\t\t_sphere$5.applyMatrix4( matrixWorld );\n\n\t\t// check distance from ray origin to bounding sphere\n\n\t\t_ray$3.copy( raycaster.ray ).recast( raycaster.near );\n\n\t\tif ( _sphere$5.containsPoint( _ray$3.origin ) === false ) {\n\n\t\t\tif ( _ray$3.intersectSphere( _sphere$5, _sphereHitAt ) === null ) return;\n\n\t\t\tif ( _ray$3.origin.distanceToSquared( _sphereHitAt ) > ( raycaster.far - raycaster.near ) ** 2 ) return;\n\n\t\t}\n\n\t\t// convert ray to local space of mesh\n\n\t\t_inverseMatrix$3.copy( matrixWorld ).invert();\n\t\t_ray$3.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$3 );\n\n\t\t// test with bounding box in local space\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tif ( _ray$3.intersectsBox( geometry.boundingBox ) === false ) return;\n\n\t\t}\n\n\t\t// test for intersections with geometry\n\n\t\tthis._computeIntersections( raycaster, intersects, _ray$3 );\n\n\t}\n\n\t_computeIntersections( raycaster, intersects, rayLocalSpace ) {\n\n\t\tlet intersection;\n\n\t\tconst geometry = this.geometry;\n\t\tconst material = this.material;\n\n\t\tconst index = geometry.index;\n\t\tconst position = geometry.attributes.position;\n\t\tconst uv = geometry.attributes.uv;\n\t\tconst uv1 = geometry.attributes.uv1;\n\t\tconst normal = geometry.attributes.normal;\n\t\tconst groups = geometry.groups;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\tif ( index !== null ) {\n\n\t\t\t// indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\tconst end = Math.min( index.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) );\n\n\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\tconst a = index.getX( j );\n\t\t\t\t\t\tconst b = index.getX( j + 1 );\n\t\t\t\t\t\tconst c = index.getX( j + 2 );\n\n\t\t\t\t\t\tintersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n\t\t\t\t\tconst b = index.getX( i + 1 );\n\t\t\t\t\tconst c = index.getX( i + 2 );\n\n\t\t\t\t\tintersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( position !== undefined ) {\n\n\t\t\t// non-indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\tconst end = Math.min( position.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) );\n\n\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\tconst a = j;\n\t\t\t\t\t\tconst b = j + 1;\n\t\t\t\t\t\tconst c = j + 2;\n\n\t\t\t\t\t\tintersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( position.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\tconst a = i;\n\t\t\t\t\tconst b = i + 1;\n\t\t\t\t\tconst c = i + 2;\n\n\t\t\t\t\tintersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c );\n\n\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nfunction checkIntersection( object, material, raycaster, ray, pA, pB, pC, point ) {\n\n\tlet intersect;\n\n\tif ( material.side === BackSide ) {\n\n\t\tintersect = ray.intersectTriangle( pC, pB, pA, true, point );\n\n\t} else {\n\n\t\tintersect = ray.intersectTriangle( pA, pB, pC, ( material.side === FrontSide ), point );\n\n\t}\n\n\tif ( intersect === null ) return null;\n\n\t_intersectionPointWorld.copy( point );\n\t_intersectionPointWorld.applyMatrix4( object.matrixWorld );\n\n\tconst distance = raycaster.ray.origin.distanceTo( _intersectionPointWorld );\n\n\tif ( distance < raycaster.near || distance > raycaster.far ) return null;\n\n\treturn {\n\t\tdistance: distance,\n\t\tpoint: _intersectionPointWorld.clone(),\n\t\tobject: object\n\t};\n\n}\n\nfunction checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, normal, a, b, c ) {\n\n\tobject.getVertexPosition( a, _vA$1 );\n\tobject.getVertexPosition( b, _vB$1 );\n\tobject.getVertexPosition( c, _vC$1 );\n\n\tconst intersection = checkIntersection( object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint );\n\n\tif ( intersection ) {\n\n\t\tif ( uv ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv, c );\n\n\t\t\tintersection.uv = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\n\t\t}\n\n\t\tif ( uv1 ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv1, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv1, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv1, c );\n\n\t\t\tintersection.uv1 = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\t\t\tintersection.uv2 = intersection.uv1; // @deprecated, r152\n\n\t\t}\n\n\t\tif ( normal ) {\n\n\t\t\t_normalA.fromBufferAttribute( normal, a );\n\t\t\t_normalB.fromBufferAttribute( normal, b );\n\t\t\t_normalC.fromBufferAttribute( normal, c );\n\n\t\t\tintersection.normal = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _normalA, _normalB, _normalC, new Vector3() );\n\n\t\t\tif ( intersection.normal.dot( ray.direction ) > 0 ) {\n\n\t\t\t\tintersection.normal.multiplyScalar( - 1 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst face = {\n\t\t\ta: a,\n\t\t\tb: b,\n\t\t\tc: c,\n\t\t\tnormal: new Vector3(),\n\t\t\tmaterialIndex: 0\n\t\t};\n\n\t\tTriangle.getNormal( _vA$1, _vB$1, _vC$1, face.normal );\n\n\t\tintersection.face = face;\n\n\t}\n\n\treturn intersection;\n\n}\n\nclass BoxGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'BoxGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tdepthSegments: depthSegments\n\t\t};\n\n\t\tconst scope = this;\n\n\t\t// segments\n\n\t\twidthSegments = Math.floor( widthSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\t\tdepthSegments = Math.floor( depthSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet numberOfVertices = 0;\n\t\tlet groupStart = 0;\n\n\t\t// build each side of the box geometry\n\n\t\tbuildPlane( 'z', 'y', 'x', - 1, - 1, depth, height, width, depthSegments, heightSegments, 0 ); // px\n\t\tbuildPlane( 'z', 'y', 'x', 1, - 1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx\n\t\tbuildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py\n\t\tbuildPlane( 'x', 'z', 'y', 1, - 1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny\n\t\tbuildPlane( 'x', 'y', 'z', 1, - 1, width, height, depth, widthSegments, heightSegments, 4 ); // pz\n\t\tbuildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) {\n\n\t\t\tconst segmentWidth = width / gridX;\n\t\t\tconst segmentHeight = height / gridY;\n\n\t\t\tconst widthHalf = width / 2;\n\t\t\tconst heightHalf = height / 2;\n\t\t\tconst depthHalf = depth / 2;\n\n\t\t\tconst gridX1 = gridX + 1;\n\t\t\tconst gridY1 = gridY + 1;\n\n\t\t\tlet vertexCounter = 0;\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst vector = new Vector3();\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\t\tconst y = iy * segmentHeight - heightHalf;\n\n\t\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\t\tconst x = ix * segmentWidth - widthHalf;\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = x * udir;\n\t\t\t\t\tvector[ v ] = y * vdir;\n\t\t\t\t\tvector[ w ] = depthHalf;\n\n\t\t\t\t\t// now apply vector to vertex buffer\n\n\t\t\t\t\tvertices.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = 0;\n\t\t\t\t\tvector[ v ] = 0;\n\t\t\t\t\tvector[ w ] = depth > 0 ? 1 : - 1;\n\n\t\t\t\t\t// now apply vector to normal buffer\n\n\t\t\t\t\tnormals.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// uvs\n\n\t\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t\t\t// counters\n\n\t\t\t\t\tvertexCounter += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// indices\n\n\t\t\t// 1. you need three indices to draw a single face\n\t\t\t// 2. a single segment consists of two faces\n\t\t\t// 3. so we need to generate six (2*3) indices per segment\n\n\t\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\t\tconst a = numberOfVertices + ix + gridX1 * iy;\n\t\t\t\t\tconst b = numberOfVertices + ix + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst d = numberOfVertices + ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// increase counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, materialIndex );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t\t// update total number of vertices\n\n\t\t\tnumberOfVertices += vertexCounter;\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments );\n\n\t}\n\n}\n\n/**\n * Uniform Utilities\n */\n\nfunction cloneUniforms( src ) {\n\n\tconst dst = {};\n\n\tfor ( const u in src ) {\n\n\t\tdst[ u ] = {};\n\n\t\tfor ( const p in src[ u ] ) {\n\n\t\t\tconst property = src[ u ][ p ];\n\n\t\t\tif ( property && ( property.isColor ||\n\t\t\t\tproperty.isMatrix3 || property.isMatrix4 ||\n\t\t\t\tproperty.isVector2 || property.isVector3 || property.isVector4 ||\n\t\t\t\tproperty.isTexture || property.isQuaternion ) ) {\n\n\t\t\t\tif ( property.isRenderTargetTexture ) {\n\n\t\t\t\t\tconsole.warn( 'UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().' );\n\t\t\t\t\tdst[ u ][ p ] = null;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tdst[ u ][ p ] = property.clone();\n\n\t\t\t\t}\n\n\t\t\t} else if ( Array.isArray( property ) ) {\n\n\t\t\t\tdst[ u ][ p ] = property.slice();\n\n\t\t\t} else {\n\n\t\t\t\tdst[ u ][ p ] = property;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn dst;\n\n}\n\nfunction mergeUniforms( uniforms ) {\n\n\tconst merged = {};\n\n\tfor ( let u = 0; u < uniforms.length; u ++ ) {\n\n\t\tconst tmp = cloneUniforms( uniforms[ u ] );\n\n\t\tfor ( const p in tmp ) {\n\n\t\t\tmerged[ p ] = tmp[ p ];\n\n\t\t}\n\n\t}\n\n\treturn merged;\n\n}\n\nfunction cloneUniformsGroups( src ) {\n\n\tconst dst = [];\n\n\tfor ( let u = 0; u < src.length; u ++ ) {\n\n\t\tdst.push( src[ u ].clone() );\n\n\t}\n\n\treturn dst;\n\n}\n\nfunction getUnlitUniformColorSpace( renderer ) {\n\n\tif ( renderer.getRenderTarget() === null ) {\n\n\t\t// https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398\n\t\treturn renderer.outputColorSpace;\n\n\t}\n\n\treturn ColorManagement.workingColorSpace;\n\n}\n\n// Legacy\n\nconst UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms };\n\nvar default_vertex = \"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\n\nvar default_fragment = \"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\n\nclass ShaderMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isShaderMaterial = true;\n\n\t\tthis.type = 'ShaderMaterial';\n\n\t\tthis.defines = {};\n\t\tthis.uniforms = {};\n\t\tthis.uniformsGroups = [];\n\n\t\tthis.vertexShader = default_vertex;\n\t\tthis.fragmentShader = default_fragment;\n\n\t\tthis.linewidth = 1;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false; // set to use scene fog\n\t\tthis.lights = false; // set to use scene lights\n\t\tthis.clipping = false; // set to use user-defined clipping planes\n\n\t\tthis.forceSinglePass = true;\n\n\t\tthis.extensions = {\n\t\t\tderivatives: false, // set to use derivatives\n\t\t\tfragDepth: false, // set to use fragment depth values\n\t\t\tdrawBuffers: false, // set to use draw buffers\n\t\t\tshaderTextureLOD: false // set to use shader texture LOD\n\t\t};\n\n\t\t// When rendered geometry doesn't include these attributes but the material does,\n\t\t// use these default values in WebGL. This avoids errors when buffer data is missing.\n\t\tthis.defaultAttributeValues = {\n\t\t\t'color': [ 1, 1, 1 ],\n\t\t\t'uv': [ 0, 0 ],\n\t\t\t'uv1': [ 0, 0 ]\n\t\t};\n\n\t\tthis.index0AttributeName = undefined;\n\t\tthis.uniformsNeedUpdate = false;\n\n\t\tthis.glslVersion = null;\n\n\t\tif ( parameters !== undefined ) {\n\n\t\t\tthis.setValues( parameters );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.fragmentShader = source.fragmentShader;\n\t\tthis.vertexShader = source.vertexShader;\n\n\t\tthis.uniforms = cloneUniforms( source.uniforms );\n\t\tthis.uniformsGroups = cloneUniformsGroups( source.uniformsGroups );\n\n\t\tthis.defines = Object.assign( {}, source.defines );\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.fog = source.fog;\n\t\tthis.lights = source.lights;\n\t\tthis.clipping = source.clipping;\n\n\t\tthis.extensions = Object.assign( {}, source.extensions );\n\n\t\tthis.glslVersion = source.glslVersion;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.glslVersion = this.glslVersion;\n\t\tdata.uniforms = {};\n\n\t\tfor ( const name in this.uniforms ) {\n\n\t\t\tconst uniform = this.uniforms[ name ];\n\t\t\tconst value = uniform.value;\n\n\t\t\tif ( value && value.isTexture ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 't',\n\t\t\t\t\tvalue: value.toJSON( meta ).uuid\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isColor ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'c',\n\t\t\t\t\tvalue: value.getHex()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector2 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v2',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\n\t\t\t\t// note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines;\n\n\t\tdata.vertexShader = this.vertexShader;\n\t\tdata.fragmentShader = this.fragmentShader;\n\n\t\tdata.lights = this.lights;\n\t\tdata.clipping = this.clipping;\n\n\t\tconst extensions = {};\n\n\t\tfor ( const key in this.extensions ) {\n\n\t\t\tif ( this.extensions[ key ] === true ) extensions[ key ] = true;\n\n\t\t}\n\n\t\tif ( Object.keys( extensions ).length > 0 ) data.extensions = extensions;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass Camera extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isCamera = true;\n\n\t\tthis.type = 'Camera';\n\n\t\tthis.matrixWorldInverse = new Matrix4();\n\n\t\tthis.projectionMatrix = new Matrix4();\n\t\tthis.projectionMatrixInverse = new Matrix4();\n\n\t\tthis.coordinateSystem = WebGLCoordinateSystem;\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.matrixWorldInverse.copy( source.matrixWorldInverse );\n\n\t\tthis.projectionMatrix.copy( source.projectionMatrix );\n\t\tthis.projectionMatrixInverse.copy( source.projectionMatrixInverse );\n\n\t\tthis.coordinateSystem = source.coordinateSystem;\n\n\t\treturn this;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\treturn super.getWorldDirection( target ).negate();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tsuper.updateWorldMatrix( updateParents, updateChildren );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass PerspectiveCamera extends Camera {\n\n\tconstructor( fov = 50, aspect = 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.isPerspectiveCamera = true;\n\n\t\tthis.type = 'PerspectiveCamera';\n\n\t\tthis.fov = fov;\n\t\tthis.zoom = 1;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.focus = 10;\n\n\t\tthis.aspect = aspect;\n\t\tthis.view = null;\n\n\t\tthis.filmGauge = 35;\t// width of the film (default in millimeters)\n\t\tthis.filmOffset = 0;\t// horizontal film offset (same unit as gauge)\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.fov = source.fov;\n\t\tthis.zoom = source.zoom;\n\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\t\tthis.focus = source.focus;\n\n\t\tthis.aspect = source.aspect;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\tthis.filmGauge = source.filmGauge;\n\t\tthis.filmOffset = source.filmOffset;\n\n\t\treturn this;\n\n\t}\n\n\t/**\n\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t *\n\t * The default film gauge is 35, so that the focal length can be specified for\n\t * a 35mm (full frame) camera.\n\t *\n\t * Values for focal length and film gauge must have the same unit.\n\t */\n\tsetFocalLength( focalLength ) {\n\n\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\tconst vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\n\t\tthis.fov = RAD2DEG * 2 * Math.atan( vExtentSlope );\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\t/**\n\t * Calculates the focal length from the current .fov and .filmGauge.\n\t */\n\tgetFocalLength() {\n\n\t\tconst vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov );\n\n\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\n\t}\n\n\tgetEffectiveFOV() {\n\n\t\treturn RAD2DEG * 2 * Math.atan(\n\t\t\tMath.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom );\n\n\t}\n\n\tgetFilmWidth() {\n\n\t\t// film not completely covered in portrait format (aspect < 1)\n\t\treturn this.filmGauge * Math.min( this.aspect, 1 );\n\n\t}\n\n\tgetFilmHeight() {\n\n\t\t// film not completely covered in landscape format (aspect > 1)\n\t\treturn this.filmGauge / Math.max( this.aspect, 1 );\n\n\t}\n\n\t/**\n\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t * multi-monitor/multi-machine setups.\n\t *\n\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t * the monitors are in grid like this\n\t *\n\t * +---+---+---+\n\t * | A | B | C |\n\t * +---+---+---+\n\t * | D | E | F |\n\t * +---+---+---+\n\t *\n\t * then for each monitor you would call it like this\n\t *\n\t * const w = 1920;\n\t * const h = 1080;\n\t * const fullWidth = w * 3;\n\t * const fullHeight = h * 2;\n\t *\n\t * --A--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t * --B--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t * --C--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t * --D--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t * --E--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t * --F--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t *\n\t * Note there is no reason monitors have to be the same size or in a grid.\n\t */\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tthis.aspect = fullWidth / fullHeight;\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst near = this.near;\n\t\tlet top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom;\n\t\tlet height = 2 * top;\n\t\tlet width = this.aspect * height;\n\t\tlet left = - 0.5 * width;\n\t\tconst view = this.view;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst fullWidth = view.fullWidth,\n\t\t\t\tfullHeight = view.fullHeight;\n\n\t\t\tleft += view.offsetX * width / fullWidth;\n\t\t\ttop -= view.offsetY * height / fullHeight;\n\t\t\twidth *= view.width / fullWidth;\n\t\t\theight *= view.height / fullHeight;\n\n\t\t}\n\n\t\tconst skew = this.filmOffset;\n\t\tif ( skew !== 0 ) left += near * skew / this.getFilmWidth();\n\n\t\tthis.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.fov = this.fov;\n\t\tdata.object.zoom = this.zoom;\n\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\t\tdata.object.focus = this.focus;\n\n\t\tdata.object.aspect = this.aspect;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\tdata.object.filmGauge = this.filmGauge;\n\t\tdata.object.filmOffset = this.filmOffset;\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst fov = - 90; // negative fov is not an error\nconst aspect = 1;\n\nclass CubeCamera extends Object3D {\n\n\tconstructor( near, far, renderTarget ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubeCamera';\n\n\t\tthis.renderTarget = renderTarget;\n\t\tthis.coordinateSystem = null;\n\t\tthis.activeMipmapLevel = 0;\n\n\t\tconst cameraPX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPX.layers = this.layers;\n\t\tthis.add( cameraPX );\n\n\t\tconst cameraNX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNX.layers = this.layers;\n\t\tthis.add( cameraNX );\n\n\t\tconst cameraPY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPY.layers = this.layers;\n\t\tthis.add( cameraPY );\n\n\t\tconst cameraNY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNY.layers = this.layers;\n\t\tthis.add( cameraNY );\n\n\t\tconst cameraPZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPZ.layers = this.layers;\n\t\tthis.add( cameraPZ );\n\n\t\tconst cameraNZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNZ.layers = this.layers;\n\t\tthis.add( cameraNZ );\n\n\t}\n\n\tupdateCoordinateSystem() {\n\n\t\tconst coordinateSystem = this.coordinateSystem;\n\n\t\tconst cameras = this.children.concat();\n\n\t\tconst [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = cameras;\n\n\t\tfor ( const camera of cameras ) this.remove( camera );\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tcameraPX.up.set( 0, 1, 0 );\n\t\t\tcameraPX.lookAt( 1, 0, 0 );\n\n\t\t\tcameraNX.up.set( 0, 1, 0 );\n\t\t\tcameraNX.lookAt( - 1, 0, 0 );\n\n\t\t\tcameraPY.up.set( 0, 0, - 1 );\n\t\t\tcameraPY.lookAt( 0, 1, 0 );\n\n\t\t\tcameraNY.up.set( 0, 0, 1 );\n\t\t\tcameraNY.lookAt( 0, - 1, 0 );\n\n\t\t\tcameraPZ.up.set( 0, 1, 0 );\n\t\t\tcameraPZ.lookAt( 0, 0, 1 );\n\n\t\t\tcameraNZ.up.set( 0, 1, 0 );\n\t\t\tcameraNZ.lookAt( 0, 0, - 1 );\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tcameraPX.up.set( 0, - 1, 0 );\n\t\t\tcameraPX.lookAt( - 1, 0, 0 );\n\n\t\t\tcameraNX.up.set( 0, - 1, 0 );\n\t\t\tcameraNX.lookAt( 1, 0, 0 );\n\n\t\t\tcameraPY.up.set( 0, 0, 1 );\n\t\t\tcameraPY.lookAt( 0, 1, 0 );\n\n\t\t\tcameraNY.up.set( 0, 0, - 1 );\n\t\t\tcameraNY.lookAt( 0, - 1, 0 );\n\n\t\t\tcameraPZ.up.set( 0, - 1, 0 );\n\t\t\tcameraPZ.lookAt( 0, 0, 1 );\n\n\t\t\tcameraNZ.up.set( 0, - 1, 0 );\n\t\t\tcameraNZ.lookAt( 0, 0, - 1 );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\tfor ( const camera of cameras ) {\n\n\t\t\tthis.add( camera );\n\n\t\t\tcamera.updateMatrixWorld();\n\n\t\t}\n\n\t}\n\n\tupdate( renderer, scene ) {\n\n\t\tif ( this.parent === null ) this.updateMatrixWorld();\n\n\t\tconst { renderTarget, activeMipmapLevel } = this;\n\n\t\tif ( this.coordinateSystem !== renderer.coordinateSystem ) {\n\n\t\t\tthis.coordinateSystem = renderer.coordinateSystem;\n\n\t\t\tthis.updateCoordinateSystem();\n\n\t\t}\n\n\t\tconst [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children;\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\t\tconst currentActiveCubeFace = renderer.getActiveCubeFace();\n\t\tconst currentActiveMipmapLevel = renderer.getActiveMipmapLevel();\n\n\t\tconst currentXrEnabled = renderer.xr.enabled;\n\n\t\trenderer.xr.enabled = false;\n\n\t\tconst generateMipmaps = renderTarget.texture.generateMipmaps;\n\n\t\trenderTarget.texture.generateMipmaps = false;\n\n\t\trenderer.setRenderTarget( renderTarget, 0, activeMipmapLevel );\n\t\trenderer.render( scene, cameraPX );\n\n\t\trenderer.setRenderTarget( renderTarget, 1, activeMipmapLevel );\n\t\trenderer.render( scene, cameraNX );\n\n\t\trenderer.setRenderTarget( renderTarget, 2, activeMipmapLevel );\n\t\trenderer.render( scene, cameraPY );\n\n\t\trenderer.setRenderTarget( renderTarget, 3, activeMipmapLevel );\n\t\trenderer.render( scene, cameraNY );\n\n\t\trenderer.setRenderTarget( renderTarget, 4, activeMipmapLevel );\n\t\trenderer.render( scene, cameraPZ );\n\n\t\t// mipmaps are generated during the last call of render()\n\t\t// at this point, all sides of the cube render target are defined\n\n\t\trenderTarget.texture.generateMipmaps = generateMipmaps;\n\n\t\trenderer.setRenderTarget( renderTarget, 5, activeMipmapLevel );\n\t\trenderer.render( scene, cameraNZ );\n\n\t\trenderer.setRenderTarget( currentRenderTarget, currentActiveCubeFace, currentActiveMipmapLevel );\n\n\t\trenderer.xr.enabled = currentXrEnabled;\n\n\t\trenderTarget.texture.needsPMREMUpdate = true;\n\n\t}\n\n}\n\nclass CubeTexture extends Texture {\n\n\tconstructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ) {\n\n\t\timages = images !== undefined ? images : [];\n\t\tmapping = mapping !== undefined ? mapping : CubeReflectionMapping;\n\n\t\tsuper( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace );\n\n\t\tthis.isCubeTexture = true;\n\n\t\tthis.flipY = false;\n\n\t}\n\n\tget images() {\n\n\t\treturn this.image;\n\n\t}\n\n\tset images( value ) {\n\n\t\tthis.image = value;\n\n\t}\n\n}\n\nclass WebGLCubeRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( size = 1, options = {} ) {\n\n\t\tsuper( size, size, options );\n\n\t\tthis.isWebGLCubeRenderTarget = true;\n\n\t\tconst image = { width: size, height: size, depth: 1 };\n\t\tconst images = [ image, image, image, image, image, image ];\n\n\t\tif ( options.encoding !== undefined ) {\n\n\t\t\t// @deprecated, r152\n\t\t\twarnOnce( 'THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace.' );\n\t\t\toptions.colorSpace = options.encoding === sRGBEncoding ? SRGBColorSpace : NoColorSpace;\n\n\t\t}\n\n\t\tthis.texture = new CubeTexture( images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace );\n\n\t\t// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n\t\t// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n\t\t// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n\n\t\t// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n\t\t// and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture\n\t\t// as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures).\n\n\t\tthis.texture.isRenderTargetTexture = true;\n\n\t\tthis.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\tthis.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\n\t}\n\n\tfromEquirectangularTexture( renderer, texture ) {\n\n\t\tthis.texture.type = texture.type;\n\t\tthis.texture.colorSpace = texture.colorSpace;\n\n\t\tthis.texture.generateMipmaps = texture.generateMipmaps;\n\t\tthis.texture.minFilter = texture.minFilter;\n\t\tthis.texture.magFilter = texture.magFilter;\n\n\t\tconst shader = {\n\n\t\t\tuniforms: {\n\t\t\t\ttEquirect: { value: null },\n\t\t\t},\n\n\t\t\tvertexShader: /* glsl */`\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,\n\n\t\t\tfragmentShader: /* glsl */`\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`\n\t\t};\n\n\t\tconst geometry = new BoxGeometry( 5, 5, 5 );\n\n\t\tconst material = new ShaderMaterial( {\n\n\t\t\tname: 'CubemapFromEquirect',\n\n\t\t\tuniforms: cloneUniforms( shader.uniforms ),\n\t\t\tvertexShader: shader.vertexShader,\n\t\t\tfragmentShader: shader.fragmentShader,\n\t\t\tside: BackSide,\n\t\t\tblending: NoBlending\n\n\t\t} );\n\n\t\tmaterial.uniforms.tEquirect.value = texture;\n\n\t\tconst mesh = new Mesh( geometry, material );\n\n\t\tconst currentMinFilter = texture.minFilter;\n\n\t\t// Avoid blurred poles\n\t\tif ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter;\n\n\t\tconst camera = new CubeCamera( 1, 10, this );\n\t\tcamera.update( renderer, mesh );\n\n\t\ttexture.minFilter = currentMinFilter;\n\n\t\tmesh.geometry.dispose();\n\t\tmesh.material.dispose();\n\n\t\treturn this;\n\n\t}\n\n\tclear( renderer, color, depth, stencil ) {\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\trenderer.setRenderTarget( this, i );\n\n\t\t\trenderer.clear( color, depth, stencil );\n\n\t\t}\n\n\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t}\n\n}\n\nconst _vector1 = /*@__PURE__*/ new Vector3();\nconst _vector2 = /*@__PURE__*/ new Vector3();\nconst _normalMatrix = /*@__PURE__*/ new Matrix3();\n\nclass Plane {\n\n\tconstructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) {\n\n\t\tthis.isPlane = true;\n\n\t\t// normal is assumed to be normalized\n\n\t\tthis.normal = normal;\n\t\tthis.constant = constant;\n\n\t}\n\n\tset( normal, constant ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = constant;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponents( x, y, z, w ) {\n\n\t\tthis.normal.set( x, y, z );\n\t\tthis.constant = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromNormalAndCoplanarPoint( normal, point ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = - point.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCoplanarPoints( a, b, c ) {\n\n\t\tconst normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize();\n\n\t\t// Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n\n\t\tthis.setFromNormalAndCoplanarPoint( normal, a );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( plane ) {\n\n\t\tthis.normal.copy( plane.normal );\n\t\tthis.constant = plane.constant;\n\n\t\treturn this;\n\n\t}\n\n\tnormalize() {\n\n\t\t// Note: will lead to a divide by zero if the plane is invalid.\n\n\t\tconst inverseNormalLength = 1.0 / this.normal.length();\n\t\tthis.normal.multiplyScalar( inverseNormalLength );\n\t\tthis.constant *= inverseNormalLength;\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.constant *= - 1;\n\t\tthis.normal.negate();\n\n\t\treturn this;\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.normal.dot( point ) + this.constant;\n\n\t}\n\n\tdistanceToSphere( sphere ) {\n\n\t\treturn this.distanceToPoint( sphere.center ) - sphere.radius;\n\n\t}\n\n\tprojectPoint( point, target ) {\n\n\t\treturn target.copy( point ).addScaledVector( this.normal, - this.distanceToPoint( point ) );\n\n\t}\n\n\tintersectLine( line, target ) {\n\n\t\tconst direction = line.delta( _vector1 );\n\n\t\tconst denominator = this.normal.dot( direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( this.distanceToPoint( line.start ) === 0 ) {\n\n\t\t\t\treturn target.copy( line.start );\n\n\t\t\t}\n\n\t\t\t// Unsure if this is the correct method to handle this case.\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( line.start.dot( this.normal ) + this.constant ) / denominator;\n\n\t\tif ( t < 0 || t > 1 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn target.copy( line.start ).addScaledVector( direction, t );\n\n\t}\n\n\tintersectsLine( line ) {\n\n\t\t// Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n\n\t\tconst startSign = this.distanceToPoint( line.start );\n\t\tconst endSign = this.distanceToPoint( line.end );\n\n\t\treturn ( startSign < 0 && endSign > 0 ) || ( endSign < 0 && startSign > 0 );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsPlane( this );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn sphere.intersectsPlane( this );\n\n\t}\n\n\tcoplanarPoint( target ) {\n\n\t\treturn target.copy( this.normal ).multiplyScalar( - this.constant );\n\n\t}\n\n\tapplyMatrix4( matrix, optionalNormalMatrix ) {\n\n\t\tconst normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix );\n\n\t\tconst referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix );\n\n\t\tconst normal = this.normal.applyMatrix3( normalMatrix ).normalize();\n\n\t\tthis.constant = - referencePoint.dot( normal );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.constant -= offset.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tequals( plane ) {\n\n\t\treturn plane.normal.equals( this.normal ) && ( plane.constant === this.constant );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _sphere$4 = /*@__PURE__*/ new Sphere();\nconst _vector$6 = /*@__PURE__*/ new Vector3();\n\nclass Frustum {\n\n\tconstructor( p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane() ) {\n\n\t\tthis.planes = [ p0, p1, p2, p3, p4, p5 ];\n\n\t}\n\n\tset( p0, p1, p2, p3, p4, p5 ) {\n\n\t\tconst planes = this.planes;\n\n\t\tplanes[ 0 ].copy( p0 );\n\t\tplanes[ 1 ].copy( p1 );\n\t\tplanes[ 2 ].copy( p2 );\n\t\tplanes[ 3 ].copy( p3 );\n\t\tplanes[ 4 ].copy( p4 );\n\t\tplanes[ 5 ].copy( p5 );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( frustum ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tplanes[ i ].copy( frustum.planes[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem ) {\n\n\t\tconst planes = this.planes;\n\t\tconst me = m.elements;\n\t\tconst me0 = me[ 0 ], me1 = me[ 1 ], me2 = me[ 2 ], me3 = me[ 3 ];\n\t\tconst me4 = me[ 4 ], me5 = me[ 5 ], me6 = me[ 6 ], me7 = me[ 7 ];\n\t\tconst me8 = me[ 8 ], me9 = me[ 9 ], me10 = me[ 10 ], me11 = me[ 11 ];\n\t\tconst me12 = me[ 12 ], me13 = me[ 13 ], me14 = me[ 14 ], me15 = me[ 15 ];\n\n\t\tplanes[ 0 ].setComponents( me3 - me0, me7 - me4, me11 - me8, me15 - me12 ).normalize();\n\t\tplanes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize();\n\t\tplanes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize();\n\t\tplanes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize();\n\t\tplanes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize();\n\n\t\tif ( coordinateSystem === WebGLCoordinateSystem ) {\n\n\t\t\tplanes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize();\n\n\t\t} else if ( coordinateSystem === WebGPUCoordinateSystem ) {\n\n\t\t\tplanes[ 5 ].setComponents( me2, me6, me10, me14 ).normalize();\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: ' + coordinateSystem );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tintersectsObject( object ) {\n\n\t\tif ( object.boundingSphere !== undefined ) {\n\n\t\t\tif ( object.boundingSphere === null ) object.computeBoundingSphere();\n\n\t\t\t_sphere$4.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );\n\n\t\t} else {\n\n\t\t\tconst geometry = object.geometry;\n\n\t\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$4.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );\n\n\t\t}\n\n\t\treturn this.intersectsSphere( _sphere$4 );\n\n\t}\n\n\tintersectsSprite( sprite ) {\n\n\t\t_sphere$4.center.set( 0, 0, 0 );\n\t\t_sphere$4.radius = 0.7071067811865476;\n\t\t_sphere$4.applyMatrix4( sprite.matrixWorld );\n\n\t\treturn this.intersectsSphere( _sphere$4 );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst planes = this.planes;\n\t\tconst center = sphere.center;\n\t\tconst negRadius = - sphere.radius;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst distance = planes[ i ].distanceToPoint( center );\n\n\t\t\tif ( distance < negRadius ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst plane = planes[ i ];\n\n\t\t\t// corner at max distance\n\n\t\t\t_vector$6.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n\t\t\t_vector$6.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n\t\t\t_vector$6.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n\n\t\t\tif ( plane.distanceToPoint( _vector$6 ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tif ( planes[ i ].distanceToPoint( point ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nfunction WebGLAnimation() {\n\n\tlet context = null;\n\tlet isAnimating = false;\n\tlet animationLoop = null;\n\tlet requestId = null;\n\n\tfunction onAnimationFrame( time, frame ) {\n\n\t\tanimationLoop( time, frame );\n\n\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t}\n\n\treturn {\n\n\t\tstart: function () {\n\n\t\t\tif ( isAnimating === true ) return;\n\t\t\tif ( animationLoop === null ) return;\n\n\t\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t\t\tisAnimating = true;\n\n\t\t},\n\n\t\tstop: function () {\n\n\t\t\tcontext.cancelAnimationFrame( requestId );\n\n\t\t\tisAnimating = false;\n\n\t\t},\n\n\t\tsetAnimationLoop: function ( callback ) {\n\n\t\t\tanimationLoop = callback;\n\n\t\t},\n\n\t\tsetContext: function ( value ) {\n\n\t\t\tcontext = value;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLAttributes( gl, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tconst buffers = new WeakMap();\n\n\tfunction createBuffer( attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst usage = attribute.usage;\n\n\t\tconst buffer = gl.createBuffer();\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\t\tgl.bufferData( bufferType, array, usage );\n\n\t\tattribute.onUploadCallback();\n\n\t\tlet type;\n\n\t\tif ( array instanceof Float32Array ) {\n\n\t\t\ttype = gl.FLOAT;\n\n\t\t} else if ( array instanceof Uint16Array ) {\n\n\t\t\tif ( attribute.isFloat16BufferAttribute ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\ttype = gl.HALF_FLOAT;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( 'THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\ttype = gl.UNSIGNED_SHORT;\n\n\t\t\t}\n\n\t\t} else if ( array instanceof Int16Array ) {\n\n\t\t\ttype = gl.SHORT;\n\n\t\t} else if ( array instanceof Uint32Array ) {\n\n\t\t\ttype = gl.UNSIGNED_INT;\n\n\t\t} else if ( array instanceof Int32Array ) {\n\n\t\t\ttype = gl.INT;\n\n\t\t} else if ( array instanceof Int8Array ) {\n\n\t\t\ttype = gl.BYTE;\n\n\t\t} else if ( array instanceof Uint8Array ) {\n\n\t\t\ttype = gl.UNSIGNED_BYTE;\n\n\t\t} else if ( array instanceof Uint8ClampedArray ) {\n\n\t\t\ttype = gl.UNSIGNED_BYTE;\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.WebGLAttributes: Unsupported buffer data format: ' + array );\n\n\t\t}\n\n\t\treturn {\n\t\t\tbuffer: buffer,\n\t\t\ttype: type,\n\t\t\tbytesPerElement: array.BYTES_PER_ELEMENT,\n\t\t\tversion: attribute.version\n\t\t};\n\n\t}\n\n\tfunction updateBuffer( buffer, attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst updateRange = attribute.updateRange;\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\n\t\tif ( updateRange.count === - 1 ) {\n\n\t\t\t// Not using update ranges\n\n\t\t\tgl.bufferSubData( bufferType, 0, array );\n\n\t\t} else {\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray, updateRange.offset, updateRange.count );\n\n\t\t\t} else {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray.subarray( updateRange.offset, updateRange.offset + updateRange.count ) );\n\n\t\t\t}\n\n\t\t\tupdateRange.count = - 1; // reset range\n\n\t\t}\n\n\t\tattribute.onUploadCallback();\n\n\t}\n\n\t//\n\n\tfunction get( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\treturn buffers.get( attribute );\n\n\t}\n\n\tfunction remove( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data ) {\n\n\t\t\tgl.deleteBuffer( data.buffer );\n\n\t\t\tbuffers.delete( attribute );\n\n\t\t}\n\n\t}\n\n\tfunction update( attribute, bufferType ) {\n\n\t\tif ( attribute.isGLBufferAttribute ) {\n\n\t\t\tconst cached = buffers.get( attribute );\n\n\t\t\tif ( ! cached || cached.version < attribute.version ) {\n\n\t\t\t\tbuffers.set( attribute, {\n\t\t\t\t\tbuffer: attribute.buffer,\n\t\t\t\t\ttype: attribute.type,\n\t\t\t\t\tbytesPerElement: attribute.elementSize,\n\t\t\t\t\tversion: attribute.version\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data === undefined ) {\n\n\t\t\tbuffers.set( attribute, createBuffer( attribute, bufferType ) );\n\n\t\t} else if ( data.version < attribute.version ) {\n\n\t\t\tupdateBuffer( data.buffer, attribute, bufferType );\n\n\t\t\tdata.version = attribute.version;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update\n\n\t};\n\n}\n\nclass PlaneGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PlaneGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments\n\t\t};\n\n\t\tconst width_half = width / 2;\n\t\tconst height_half = height / 2;\n\n\t\tconst gridX = Math.floor( widthSegments );\n\t\tconst gridY = Math.floor( heightSegments );\n\n\t\tconst gridX1 = gridX + 1;\n\t\tconst gridY1 = gridY + 1;\n\n\t\tconst segment_width = width / gridX;\n\t\tconst segment_height = height / gridY;\n\n\t\t//\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\tconst y = iy * segment_height - height_half;\n\n\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\tconst x = ix * segment_width - width_half;\n\n\t\t\t\tvertices.push( x, - y, 0 );\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\tconst a = ix + gridX1 * iy;\n\t\t\t\tconst b = ix + gridX1 * ( iy + 1 );\n\t\t\t\tconst c = ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\tconst d = ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments );\n\n\t}\n\n}\n\nvar alphahash_fragment = \"#ifdef USE_ALPHAHASH\\n\\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\\n#endif\";\n\nvar alphahash_pars_fragment = \"#ifdef USE_ALPHAHASH\\n\\tconst float ALPHA_HASH_SCALE = 0.05;\\n\\tfloat hash2D( vec2 value ) {\\n\\t\\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\\n\\t}\\n\\tfloat hash3D( vec3 value ) {\\n\\t\\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\\n\\t}\\n\\tfloat getAlphaHashThreshold( vec3 position ) {\\n\\t\\tfloat maxDeriv = max(\\n\\t\\t\\tlength( dFdx( position.xyz ) ),\\n\\t\\t\\tlength( dFdy( position.xyz ) )\\n\\t\\t);\\n\\t\\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\\n\\t\\tvec2 pixScales = vec2(\\n\\t\\t\\texp2( floor( log2( pixScale ) ) ),\\n\\t\\t\\texp2( ceil( log2( pixScale ) ) )\\n\\t\\t);\\n\\t\\tvec2 alpha = vec2(\\n\\t\\t\\thash3D( floor( pixScales.x * position.xyz ) ),\\n\\t\\t\\thash3D( floor( pixScales.y * position.xyz ) )\\n\\t\\t);\\n\\t\\tfloat lerpFactor = fract( log2( pixScale ) );\\n\\t\\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\\n\\t\\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\\n\\t\\tvec3 cases = vec3(\\n\\t\\t\\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\\n\\t\\t\\t( x - 0.5 * a ) / ( 1.0 - a ),\\n\\t\\t\\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\\n\\t\\t);\\n\\t\\tfloat threshold = ( x < ( 1.0 - a ) )\\n\\t\\t\\t? ( ( x < a ) ? cases.x : cases.y )\\n\\t\\t\\t: cases.z;\\n\\t\\treturn clamp( threshold , 1.0e-6, 1.0 );\\n\\t}\\n#endif\";\n\nvar alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\\n#endif\";\n\nvar alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar alphatest_fragment = \"#ifdef USE_ALPHATEST\\n\\tif ( diffuseColor.a < alphaTest ) discard;\\n#endif\";\n\nvar alphatest_pars_fragment = \"#ifdef USE_ALPHATEST\\n\\tuniform float alphaTest;\\n#endif\";\n\nvar aomap_fragment = \"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_CLEARCOAT ) \\n\\t\\tclearcoatSpecularIndirect *= ambientOcclusion;\\n\\t#endif\\n\\t#if defined( USE_SHEEN ) \\n\\t\\tsheenSpecularIndirect *= ambientOcclusion;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\\t\\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\\n\\t#endif\\n#endif\";\n\nvar aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\";\n\nvar begin_vertex = \"vec3 transformed = vec3( position );\\n#ifdef USE_ALPHAHASH\\n\\tvPosition = vec3( position );\\n#endif\";\n\nvar beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\n\nvar bsdfs = \"float G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n} // validated\";\n\nvar iridescence_fragment = \"#ifdef USE_IRIDESCENCE\\n\\tconst mat3 XYZ_TO_REC709 = mat3(\\n\\t\\t 3.2404542, -0.9692660, 0.0556434,\\n\\t\\t-1.5371385, 1.8760108, -0.2040259,\\n\\t\\t-0.4985314, 0.0415560, 1.0572252\\n\\t);\\n\\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\\n\\t\\tvec3 sqrtF0 = sqrt( fresnel0 );\\n\\t\\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\\n\\t}\\n\\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\\n\\t\\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\\n\\t}\\n\\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\\n\\t\\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\\n\\t}\\n\\tvec3 evalSensitivity( float OPD, vec3 shift ) {\\n\\t\\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\\n\\t\\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\\n\\t\\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\\n\\t\\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\\n\\t\\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\\n\\t\\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\\n\\t\\txyz /= 1.0685e-7;\\n\\t\\tvec3 rgb = XYZ_TO_REC709 * xyz;\\n\\t\\treturn rgb;\\n\\t}\\n\\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\\n\\t\\tvec3 I;\\n\\t\\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\\n\\t\\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\\n\\t\\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\\n\\t\\tif ( cosTheta2Sq < 0.0 ) {\\n\\t\\t\\treturn vec3( 1.0 );\\n\\t\\t}\\n\\t\\tfloat cosTheta2 = sqrt( cosTheta2Sq );\\n\\t\\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\\n\\t\\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\\n\\t\\tfloat T121 = 1.0 - R12;\\n\\t\\tfloat phi12 = 0.0;\\n\\t\\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\\n\\t\\tfloat phi21 = PI - phi12;\\n\\t\\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\\t\\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\\n\\t\\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\\n\\t\\tvec3 phi23 = vec3( 0.0 );\\n\\t\\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\\n\\t\\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\\n\\t\\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\\n\\t\\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\\n\\t\\tvec3 phi = vec3( phi21 ) + phi23;\\n\\t\\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\\n\\t\\tvec3 r123 = sqrt( R123 );\\n\\t\\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\\n\\t\\tvec3 C0 = R12 + Rs;\\n\\t\\tI = C0;\\n\\t\\tvec3 Cm = Rs - T121;\\n\\t\\tfor ( int m = 1; m <= 2; ++ m ) {\\n\\t\\t\\tCm *= r123;\\n\\t\\t\\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\\n\\t\\t\\tI += Cm * Sm;\\n\\t\\t}\\n\\t\\treturn max( I, vec3( 0.0 ) );\\n\\t}\\n#endif\";\n\nvar bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vBumpMapUv );\\n\\t\\tvec2 dSTdy = dFdy( vBumpMapUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\\n\\t\\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\\n\\t\\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\";\n\nvar clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\";\n\nvar clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\n\nvar clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n#endif\";\n\nvar clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvClipPosition = - mvPosition.xyz;\\n#endif\";\n\nvar color_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tdiffuseColor *= vColor;\\n#elif defined( USE_COLOR )\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\";\n\nvar color_pars_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_pars_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvColor = vec4( 1.0 );\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\\tvColor *= color;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\n\nvar common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nvec3 pow2( const in vec3 x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract( sin( sn ) * c );\\n}\\n#ifdef HIGH_PRECISION\\n\\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\\tfloat precisionSafeLength( vec3 v ) {\\n\\t\\tfloat maxComponent = max3( abs( v ) );\\n\\t\\treturn length( v / maxComponent ) * maxComponent;\\n\\t}\\n#endif\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\n#ifdef USE_ALPHAHASH\\n\\tvarying vec3 vPosition;\\n#endif\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat luminance( const in vec3 rgb ) {\\n\\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\\n\\treturn dot( weights, rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\treturn vec2( u, v );\\n}\\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n}\\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\\n} // validated\";\n\nvar cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t#define cubeUV_minMipLevel 4.0\\n\\t#define cubeUV_minTileSize 16.0\\n\\tfloat getFace( vec3 direction ) {\\n\\t\\tvec3 absDirection = abs( direction );\\n\\t\\tfloat face = - 1.0;\\n\\t\\tif ( absDirection.x > absDirection.z ) {\\n\\t\\t\\tif ( absDirection.x > absDirection.y )\\n\\t\\t\\t\\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t} else {\\n\\t\\t\\tif ( absDirection.z > absDirection.y )\\n\\t\\t\\t\\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t}\\n\\t\\treturn face;\\n\\t}\\n\\tvec2 getUV( vec3 direction, float face ) {\\n\\t\\tvec2 uv;\\n\\t\\tif ( face == 0.0 ) {\\n\\t\\t\\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 1.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\\t\\t} else if ( face == 2.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\\t\\t} else if ( face == 3.0 ) {\\n\\t\\t\\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 4.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\\t\\t} else {\\n\\t\\t\\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\\t\\t}\\n\\t\\treturn 0.5 * ( uv + 1.0 );\\n\\t}\\n\\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\\t\\tfloat face = getFace( direction );\\n\\t\\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\\t\\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\\t\\tfloat faceSize = exp2( mipInt );\\n\\t\\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\\n\\t\\tif ( face > 2.0 ) {\\n\\t\\t\\tuv.y += faceSize;\\n\\t\\t\\tface -= 3.0;\\n\\t\\t}\\n\\t\\tuv.x += face * faceSize;\\n\\t\\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\\n\\t\\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\\n\\t\\tuv.x *= CUBEUV_TEXEL_WIDTH;\\n\\t\\tuv.y *= CUBEUV_TEXEL_HEIGHT;\\n\\t\\t#ifdef texture2DGradEXT\\n\\t\\t\\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn texture2D( envMap, uv ).rgb;\\n\\t\\t#endif\\n\\t}\\n\\t#define cubeUV_r0 1.0\\n\\t#define cubeUV_v0 0.339\\n\\t#define cubeUV_m0 - 2.0\\n\\t#define cubeUV_r1 0.8\\n\\t#define cubeUV_v1 0.276\\n\\t#define cubeUV_m1 - 1.0\\n\\t#define cubeUV_r4 0.4\\n\\t#define cubeUV_v4 0.046\\n\\t#define cubeUV_m4 2.0\\n\\t#define cubeUV_r5 0.305\\n\\t#define cubeUV_v5 0.016\\n\\t#define cubeUV_m5 3.0\\n\\t#define cubeUV_r6 0.21\\n\\t#define cubeUV_v6 0.0038\\n\\t#define cubeUV_m6 4.0\\n\\tfloat roughnessToMip( float roughness ) {\\n\\t\\tfloat mip = 0.0;\\n\\t\\tif ( roughness >= cubeUV_r1 ) {\\n\\t\\t\\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\\n\\t\\t} else if ( roughness >= cubeUV_r4 ) {\\n\\t\\t\\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\\n\\t\\t} else if ( roughness >= cubeUV_r5 ) {\\n\\t\\t\\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\\n\\t\\t} else if ( roughness >= cubeUV_r6 ) {\\n\\t\\t\\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\\n\\t\\t} else {\\n\\t\\t\\tmip = - 2.0 * log2( 1.16 * roughness );\\t\\t}\\n\\t\\treturn mip;\\n\\t}\\n\\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\\t\\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\\n\\t\\tfloat mipF = fract( mip );\\n\\t\\tfloat mipInt = floor( mip );\\n\\t\\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\\t\\tif ( mipF == 0.0 ) {\\n\\t\\t\\treturn vec4( color0, 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\\t\\t\\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\\t\\t}\\n\\t}\\n#endif\";\n\nvar defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\\tmat3 m = mat3( instanceMatrix );\\n\\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#ifdef FLIP_SIDED\\n\\t\\ttransformedTangent = - transformedTangent;\\n\\t#endif\\n#endif\";\n\nvar displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\";\n\nvar displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\\n#endif\";\n\nvar emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\n\nvar emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\";\n\nvar colorspace_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\n\nvar colorspace_pars_fragment = \"\\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\\n\\tvec3( 0.8224621, 0.177538, 0.0 ),\\n\\tvec3( 0.0331941, 0.9668058, 0.0 ),\\n\\tvec3( 0.0170827, 0.0723974, 0.9105199 )\\n);\\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\\n\\tvec3( 1.2249401, - 0.2249404, 0.0 ),\\n\\tvec3( - 0.0420569, 1.0420571, 0.0 ),\\n\\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\\n);\\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\\n\\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\\n}\\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\\n\\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\\n}\\nvec4 LinearTransferOETF( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 sRGBTransferOETF( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\\n}\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn sRGBTransferOETF( value );\\n}\";\n\nvar envmap_fragment = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvec3 cameraToFrag;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\";\n\nvar envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float envMapIntensity;\\n\\tuniform float flipEnvMap;\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\t\\n#endif\";\n\nvar envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float reflectivity;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\";\n\nvar envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\t\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\";\n\nvar envmap_vertex = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar fog_vertex = \"#ifdef USE_FOG\\n\\tvFogDepth = - mvPosition.z;\\n#endif\";\n\nvar fog_pars_vertex = \"#ifdef USE_FOG\\n\\tvarying float vFogDepth;\\n#endif\";\n\nvar fog_fragment = \"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\n\nvar fog_pars_fragment = \"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float vFogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\";\n\nvar gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\tfloat dotNL = dot( normal, lightDirection );\\n\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t#ifdef USE_GRADIENTMAP\\n\\t\\treturn vec3( texture2D( gradientMap, coord ).r );\\n\\t#else\\n\\t\\tvec2 fw = fwidth( coord ) * 0.5;\\n\\t\\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\\n\\t#endif\\n}\";\n\nvar lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\\treflectedLight.indirectDiffuse += lightMapIrradiance;\\n#endif\";\n\nvar lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\";\n\nvar lights_lambert_fragment = \"LambertMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularStrength = specularStrength;\";\n\nvar lights_lambert_pars_fragment = \"varying vec3 vViewPosition;\\nstruct LambertMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularStrength;\\n};\\nvoid 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 ) {\\n\\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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 ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Lambert\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Lambert\";\n\nvar lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\n#if defined( USE_LIGHT_PROBES )\\n\\tuniform vec3 lightProbe[ 9 ];\\n#endif\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\\n\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\treturn irradiance;\\n}\\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\t#if defined ( LEGACY_LIGHTS )\\n\\t\\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\\t\\t\\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\\t\\t}\\n\\t\\treturn 1.0;\\n\\t#else\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tif ( cutoffDistance > 0.0 ) {\\n\\t\\t\\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\t}\\n\\t\\treturn distanceFalloff;\\n\\t#endif\\n}\\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\\n\\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\\n\\t\\tlight.color = directionalLight.color;\\n\\t\\tlight.direction = directionalLight.direction;\\n\\t\\tlight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\\n\\t\\tvec3 lVector = pointLight.position - geometryPosition;\\n\\t\\tlight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tlight.color = pointLight.color;\\n\\t\\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\\n\\t\\tvec3 lVector = spotLight.position - geometryPosition;\\n\\t\\tlight.direction = normalize( lVector );\\n\\t\\tfloat angleCos = dot( light.direction, spotLight.direction );\\n\\t\\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\tif ( spotAttenuation > 0.0 ) {\\n\\t\\t\\tfloat lightDistance = length( lVector );\\n\\t\\t\\tlight.color = spotLight.color * spotAttenuation;\\n\\t\\t\\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tlight.visible = ( light.color != vec3( 0.0 ) );\\n\\t\\t} else {\\n\\t\\t\\tlight.color = vec3( 0.0 );\\n\\t\\t\\tlight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\\n\\t\\tfloat dotNL = dot( normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\";\n\nvar envmap_physical_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tvec3 getIBLIrradiance( const in vec3 normal ) {\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\\t\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t\\t#else\\n\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t#endif\\n\\t}\\n\\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\tvec3 reflectVec = reflect( - viewDir, normal );\\n\\t\\t\\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\\t\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\\t\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t\\t#else\\n\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t#endif\\n\\t}\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\\n\\t\\t\\t#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\t\\tvec3 bentNormal = cross( bitangent, viewDir );\\n\\t\\t\\t\\tbentNormal = normalize( cross( bentNormal, bitangent ) );\\n\\t\\t\\t\\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\\n\\t\\t\\t\\treturn getIBLRadiance( viewDir, bentNormal, roughness );\\n\\t\\t\\t#else\\n\\t\\t\\t\\treturn vec3( 0.0 );\\n\\t\\t\\t#endif\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\n\nvar lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\nstruct ToonMaterial {\\n\\tvec3 diffuseColor;\\n};\\nvoid 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 ) {\\n\\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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 ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Toon\";\n\nvar lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\n\nvar lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\nstruct BlinnPhongMaterial {\\n\\tvec3 diffuseColor;\\n\\tvec3 specularColor;\\n\\tfloat specularShininess;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid 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 ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\";\n\nvar lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\\nmaterial.roughness = min( material.roughness, 1.0 );\\n#ifdef IOR\\n\\tmaterial.ior = ior;\\n\\t#ifdef USE_SPECULAR\\n\\t\\tfloat specularIntensityFactor = specularIntensity;\\n\\t\\tvec3 specularColorFactor = specularColor;\\n\\t\\t#ifdef USE_SPECULAR_COLORMAP\\n\\t\\t\\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\\n\\t\\t#endif\\n\\t\\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\\t\\t\\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\\n\\t\\t#endif\\n\\t\\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\\n\\t#else\\n\\t\\tfloat specularIntensityFactor = 1.0;\\n\\t\\tvec3 specularColorFactor = vec3( 1.0 );\\n\\t\\tmaterial.specularF90 = 1.0;\\n\\t#endif\\n\\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.specularF90 = 1.0;\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tmaterial.clearcoat = clearcoat;\\n\\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\\tmaterial.clearcoatF0 = vec3( 0.04 );\\n\\tmaterial.clearcoatF90 = 1.0;\\n\\t#ifdef USE_CLEARCOATMAP\\n\\t\\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\t\\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\\n\\t#endif\\n\\tmaterial.clearcoat = saturate( material.clearcoat );\\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\\tmaterial.clearcoatRoughness += geometryRoughness;\\n\\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tmaterial.iridescence = iridescence;\\n\\tmaterial.iridescenceIOR = iridescenceIOR;\\n\\t#ifdef USE_IRIDESCENCEMAP\\n\\t\\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\\n\\t#endif\\n\\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\t\\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\\n\\t#else\\n\\t\\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\\n\\t#endif\\n#endif\\n#ifdef USE_SHEEN\\n\\tmaterial.sheenColor = sheenColor;\\n\\t#ifdef USE_SHEEN_COLORMAP\\n\\t\\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\\n\\t#endif\\n\\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\\n\\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\t\\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\\n\\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\\t#ifdef USE_ANISOTROPYMAP\\n\\t\\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\\n\\t\\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\\n\\t\\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\\n\\t#else\\n\\t\\tvec2 anisotropyV = anisotropyVector;\\n\\t#endif\\n\\tmaterial.anisotropy = length( anisotropyV );\\n\\tanisotropyV /= material.anisotropy;\\n\\tmaterial.anisotropy = saturate( material.anisotropy );\\n\\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\\n\\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\\n\\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\\n#endif\";\n\nvar lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat roughness;\\n\\tvec3 specularColor;\\n\\tfloat specularF90;\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat clearcoat;\\n\\t\\tfloat clearcoatRoughness;\\n\\t\\tvec3 clearcoatF0;\\n\\t\\tfloat clearcoatF90;\\n\\t#endif\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tfloat iridescence;\\n\\t\\tfloat iridescenceIOR;\\n\\t\\tfloat iridescenceThickness;\\n\\t\\tvec3 iridescenceFresnel;\\n\\t\\tvec3 iridescenceF0;\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tvec3 sheenColor;\\n\\t\\tfloat sheenRoughness;\\n\\t#endif\\n\\t#ifdef IOR\\n\\t\\tfloat ior;\\n\\t#endif\\n\\t#ifdef USE_TRANSMISSION\\n\\t\\tfloat transmission;\\n\\t\\tfloat transmissionAlpha;\\n\\t\\tfloat thickness;\\n\\t\\tfloat attenuationDistance;\\n\\t\\tvec3 attenuationColor;\\n\\t#endif\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tfloat anisotropy;\\n\\t\\tfloat alphaT;\\n\\t\\tvec3 anisotropyT;\\n\\t\\tvec3 anisotropyB;\\n\\t#endif\\n};\\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\\nvec3 sheenSpecularDirect = vec3( 0.0 );\\nvec3 sheenSpecularIndirect = vec3(0.0 );\\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\\n float x2 = x * x;\\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\\n}\\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\n#ifdef USE_ANISOTROPY\\n\\tfloat 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 ) {\\n\\t\\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\\n\\t\\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\\n\\t\\tfloat v = 0.5 / ( gv + gl );\\n\\t\\treturn saturate(v);\\n\\t}\\n\\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\\n\\t\\tfloat a2 = alphaT * alphaB;\\n\\t\\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\\n\\t\\thighp float v2 = dot( v, v );\\n\\t\\tfloat w2 = a2 / v2;\\n\\t\\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\\n\\t}\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\\n\\t\\tvec3 f0 = material.clearcoatF0;\\n\\t\\tfloat f90 = material.clearcoatF90;\\n\\t\\tfloat roughness = material.clearcoatRoughness;\\n\\t\\tfloat alpha = pow2( roughness );\\n\\t\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\t\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\t\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\t\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\t\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\t\\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\\t\\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\t\\tfloat D = D_GGX( alpha, dotNH );\\n\\t\\treturn F * ( V * D );\\n\\t}\\n#endif\\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\\n\\tvec3 f0 = material.specularColor;\\n\\tfloat f90 = material.specularF90;\\n\\tfloat roughness = material.roughness;\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\\n\\tvec3 F = F_Schlick( f0, f90, dotVH );\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tF = mix( F, material.iridescenceFresnel, material.iridescence );\\n\\t#endif\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tfloat dotTL = dot( material.anisotropyT, lightDir );\\n\\t\\tfloat dotTV = dot( material.anisotropyT, viewDir );\\n\\t\\tfloat dotTH = dot( material.anisotropyT, halfDir );\\n\\t\\tfloat dotBL = dot( material.anisotropyB, lightDir );\\n\\t\\tfloat dotBV = dot( material.anisotropyB, viewDir );\\n\\t\\tfloat dotBH = dot( material.anisotropyB, halfDir );\\n\\t\\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\\n\\t\\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\\n\\t#else\\n\\t\\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\t\\tfloat D = D_GGX( alpha, dotNH );\\n\\t#endif\\n\\treturn F * ( V * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie( float roughness, float dotNH ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tfloat invAlpha = 1.0 / alpha;\\n\\tfloat cos2h = dotNH * dotNH;\\n\\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\\n\\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\\n}\\nfloat V_Neubelt( float dotNV, float dotNL ) {\\n\\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\\n}\\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\\n\\tvec3 halfDir = normalize( lightDir + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, lightDir ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat D = D_Charlie( sheenRoughness, dotNH );\\n\\tfloat V = V_Neubelt( dotNV, dotNL );\\n\\treturn sheenColor * ( D * V );\\n}\\n#endif\\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat r2 = roughness * roughness;\\n\\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\\n\\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\\n\\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\\n\\treturn saturate( DG * RECIPROCAL_PI );\\n}\\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\\n\\treturn fab;\\n}\\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\\n\\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\\treturn specularColor * fab.x + specularF90 * fab.y;\\n}\\n#ifdef USE_IRIDESCENCE\\nvoid 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 ) {\\n#else\\nvoid 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 ) {\\n#endif\\n\\tvec2 fab = DFGApprox( normal, viewDir, roughness );\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\\n\\t#else\\n\\t\\tvec3 Fr = specularColor;\\n\\t#endif\\n\\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\\n\\tfloat Ess = fab.x + fab.y;\\n\\tfloat Ems = 1.0 - Ess;\\n\\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\\tsingleScatter += FssEss;\\n\\tmultiScatter += Fms * Ems;\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid 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 ) {\\n\\t\\tvec3 normal = geometryNormal;\\n\\t\\tvec3 viewDir = geometryViewDir;\\n\\t\\tvec3 position = geometryPosition;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.roughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3( 0, 1, 0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\\n\\t\\tvec3 ccIrradiance = dotNLcc * directLight.color;\\n\\t\\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\\n\\t#endif\\n\\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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 ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\\n}\\nvoid 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) {\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\\n\\t#endif\\n\\tvec3 singleScattering = vec3( 0.0 );\\n\\tvec3 multiScattering = vec3( 0.0 );\\n\\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\\t#ifdef USE_IRIDESCENCE\\n\\t\\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\\n\\t#else\\n\\t\\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\\n\\t#endif\\n\\tvec3 totalScattering = singleScattering + multiScattering;\\n\\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\\n\\treflectedLight.indirectSpecular += radiance * singleScattering;\\n\\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\n\nvar lights_fragment_begin = \"\\nvec3 geometryPosition = - vViewPosition;\\nvec3 geometryNormal = normal;\\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\nvec3 geometryClearcoatNormal = vec3( 0.0 );\\n#ifdef USE_CLEARCOAT\\n\\tgeometryClearcoatNormal = clearcoatNormal;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\\n\\tif ( material.iridescenceThickness == 0.0 ) {\\n\\t\\tmaterial.iridescence = 0.0;\\n\\t} else {\\n\\t\\tmaterial.iridescence = saturate( material.iridescence );\\n\\t}\\n\\tif ( material.iridescence > 0.0 ) {\\n\\t\\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\\n\\t\\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\\n\\t}\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointLightInfo( pointLight, geometryPosition, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\\t\\tpointLightShadow = pointLightShadows[ i ];\\n\\t\\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\tvec4 spotColor;\\n\\tvec3 spotLightCoord;\\n\\tbool inSpotLightMap;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\\n\\t\\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\\n\\t\\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\\n\\t\\t#else\\n\\t\\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\\n\\t\\t#endif\\n\\t\\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\\n\\t\\t\\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\\n\\t\\t\\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\\n\\t\\t\\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\\n\\t\\t\\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\\n\\t\\t#endif\\n\\t\\t#undef SPOT_LIGHT_MAP_INDEX\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\tspotLightShadow = spotLightShadows[ i ];\\n\\t\\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalLightInfo( directionalLight, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\\t\\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\\t\\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 iblIrradiance = vec3( 0.0 );\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if defined( USE_LIGHT_PROBES )\\n\\t\\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\\n\\t#endif\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\n\nvar lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\\t\\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tiblIrradiance += getIBLIrradiance( geometryNormal );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\t#ifdef USE_ANISOTROPY\\n\\t\\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\\n\\t#else\\n\\t\\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\\n\\t#endif\\n#endif\";\n\nvar lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\\n#endif\";\n\nvar logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\n\nvar logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tuniform float logDepthBufFC;\\n\\tvarying float vFragDepth;\\n\\tvarying float vIsPerspective;\\n#endif\";\n\nvar logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t\\tvarying float vIsPerspective;\\n\\t#else\\n\\t\\tuniform float logDepthBufFC;\\n\\t#endif\\n#endif\";\n\nvar logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t\\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\\t#else\\n\\t\\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\\t\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\t\\tgl_Position.z *= gl_Position.w;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar map_fragment = \"#ifdef USE_MAP\\n\\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\\n\\t#ifdef DECODE_VIDEO_TEXTURE\\n\\t\\tsampledDiffuseColor = 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 );\\n\\t\\n\\t#endif\\n\\tdiffuseColor *= sampledDiffuseColor;\\n#endif\";\n\nvar map_pars_fragment = \"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\";\n\nvar map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\t#if defined( USE_POINTS_UV )\\n\\t\\tvec2 uv = vUv;\\n\\t#else\\n\\t\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\t#endif\\n#endif\\n#ifdef USE_MAP\\n\\tdiffuseColor *= texture2D( map, uv );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\n\nvar map_particle_pars_fragment = \"#if defined( USE_POINTS_UV )\\n\\tvarying vec2 vUv;\\n#else\\n\\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\t\\tuniform mat3 uvTransform;\\n\\t#endif\\n#endif\\n#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\n\nvar metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\";\n\nvar morphcolor_vertex = \"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\\n\\tvColor *= morphTargetBaseInfluence;\\n\\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t#if defined( USE_COLOR_ALPHA )\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\\n\\t\\t#elif defined( USE_COLOR )\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\nvar morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal *= morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\\n\\t\\t}\\n\\t#else\\n\\t\\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\\t\\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\\t\\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\\t\\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n\\t#endif\\n#endif\";\n\nvar morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\\tuniform float morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\\n\\t\\tuniform sampler2DArray morphTargetsTexture;\\n\\t\\tuniform ivec2 morphTargetsTextureSize;\\n\\t\\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\\n\\t\\t\\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\\n\\t\\t\\tint y = texelIndex / morphTargetsTextureSize.x;\\n\\t\\t\\tint x = texelIndex - y * morphTargetsTextureSize.x;\\n\\t\\t\\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\\n\\t\\t\\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\\n\\t\\t}\\n\\t#else\\n\\t\\t#ifndef USE_MORPHNORMALS\\n\\t\\t\\tuniform float morphTargetInfluences[ 8 ];\\n\\t\\t#else\\n\\t\\t\\tuniform float morphTargetInfluences[ 4 ];\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\\ttransformed *= morphTargetBaseInfluence;\\n\\t#ifdef MORPHTARGETS_TEXTURE\\n\\t\\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\\n\\t\\t\\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\\n\\t\\t}\\n\\t#else\\n\\t\\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\\t\\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\\t\\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\\t\\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\\t\\t#ifndef USE_MORPHNORMALS\\n\\t\\t\\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\\t\\t\\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\\t\\t\\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\\t\\t\\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar normal_fragment_begin = \"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\\n#ifdef FLAT_SHADED\\n\\tvec3 fdx = dFdx( vViewPosition );\\n\\tvec3 fdy = dFdy( vViewPosition );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal *= faceDirection;\\n\\t#endif\\n#endif\\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\\n\\t#ifdef USE_TANGENT\\n\\t\\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\\t#else\\n\\t\\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\\n\\t\\t#if defined( USE_NORMALMAP )\\n\\t\\t\\tvNormalMapUv\\n\\t\\t#elif defined( USE_CLEARCOAT_NORMALMAP )\\n\\t\\t\\tvClearcoatNormalMapUv\\n\\t\\t#else\\n\\t\\t\\tvUv\\n\\t\\t#endif\\n\\t\\t);\\n\\t#endif\\n\\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\\t\\ttbn[0] *= faceDirection;\\n\\t\\ttbn[1] *= faceDirection;\\n\\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\t#ifdef USE_TANGENT\\n\\t\\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\\n\\t#else\\n\\t\\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\\n\\t#endif\\n\\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\\n\\t\\ttbn2[0] *= faceDirection;\\n\\t\\ttbn2[1] *= faceDirection;\\n\\t#endif\\n#endif\\nvec3 nonPerturbedNormal = normal;\";\n\nvar normal_fragment_maps = \"#ifdef USE_NORMALMAP_OBJECTSPACE\\n\\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\\t#ifdef FLIP_SIDED\\n\\t\\tnormal = - normal;\\n\\t#endif\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\tnormal = normalize( normalMatrix * normal );\\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\\n\\tmapN.xy *= normalScale;\\n\\tnormal = normalize( tbn * mapN );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\\n#endif\";\n\nvar normal_pars_fragment = \"#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\";\n\nvar normal_pars_vertex = \"#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\";\n\nvar normal_vertex = \"#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\";\n\nvar normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n#endif\\n#ifdef USE_NORMALMAP_OBJECTSPACE\\n\\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\\n\\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\\n\\t\\tvec3 q0 = dFdx( eye_pos.xyz );\\n\\t\\tvec3 q1 = dFdy( eye_pos.xyz );\\n\\t\\tvec2 st0 = dFdx( uv.st );\\n\\t\\tvec2 st1 = dFdy( uv.st );\\n\\t\\tvec3 N = surf_norm;\\n\\t\\tvec3 q1perp = cross( q1, N );\\n\\t\\tvec3 q0perp = cross( N, q0 );\\n\\t\\tvec3 T = q1perp * st0.x + q0perp * st1.x;\\n\\t\\tvec3 B = q1perp * st0.y + q0perp * st1.y;\\n\\t\\tfloat det = max( dot( T, T ), dot( B, B ) );\\n\\t\\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\\n\\t\\treturn mat3( T * scale, B * scale, N );\\n\\t}\\n#endif\";\n\nvar clearcoat_normal_fragment_begin = \"#ifdef USE_CLEARCOAT\\n\\tvec3 clearcoatNormal = nonPerturbedNormal;\\n#endif\";\n\nvar clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\\n\\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\\n#endif\";\n\nvar clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform sampler2D clearcoatNormalMap;\\n\\tuniform vec2 clearcoatNormalScale;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\";\n\nvar iridescence_pars_fragment = \"#ifdef USE_IRIDESCENCEMAP\\n\\tuniform sampler2D iridescenceMap;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tuniform sampler2D iridescenceThicknessMap;\\n#endif\";\n\nvar opaque_fragment = \"#ifdef OPAQUE\\ndiffuseColor.a = 1.0;\\n#endif\\n#ifdef USE_TRANSMISSION\\ndiffuseColor.a *= material.transmissionAlpha;\\n#endif\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\";\n\nvar packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nvec2 packDepthToRG( in highp float v ) {\\n\\treturn packDepthToRGBA( v ).yx;\\n}\\nfloat unpackRGToDepth( const in highp vec2 v ) {\\n\\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\\n\\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\\treturn depth * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * depth - far );\\n}\";\n\nvar premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\n\nvar project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\n\nvar dithering_fragment = \"#ifdef DITHERING\\n\\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\n\nvar dithering_pars_fragment = \"#ifdef DITHERING\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\";\n\nvar roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\";\n\nvar roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\";\n\nvar shadowmap_pars_fragment = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#if NUM_SPOT_LIGHT_MAPS > 0\\n\\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\\t\\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\\t}\\n\\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\\t\\tfloat occlusion = 1.0;\\n\\t\\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\\t\\tfloat hard_shadow = step( compare , distribution.x );\\n\\t\\tif (hard_shadow != 1.0 ) {\\n\\t\\t\\tfloat distance = compare - distribution.x ;\\n\\t\\t\\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\\t\\t\\tfloat softness_probability = variance / (variance + distance * distance );\\t\\t\\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\\t\\t\\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\\t\\t}\\n\\t\\treturn occlusion;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\\n\\t\\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx2 = dx0 / 2.0;\\n\\t\\t\\tfloat dy2 = dy0 / 2.0;\\n\\t\\t\\tfloat dx3 = dx1 / 2.0;\\n\\t\\t\\tfloat dy3 = dy1 / 2.0;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 17.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx = texelSize.x;\\n\\t\\t\\tfloat dy = texelSize.y;\\n\\t\\t\\tvec2 uv = shadowCoord.xy;\\n\\t\\t\\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t f.y )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\nvar shadowmap_pars_vertex = \"#if NUM_SPOT_LIGHT_COORDS > 0\\n\\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\\n\\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\\n#endif\\n#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n#endif\";\n\nvar shadowmap_vertex = \"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\\n\\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\tvec4 shadowWorldPosition;\\n#endif\\n#if defined( USE_SHADOWMAP )\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if NUM_SPOT_LIGHT_COORDS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition;\\n\\t\\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\t\\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\\n\\t\\t#endif\\n\\t\\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\";\n\nvar shadowmask_pars_fragment = \"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tspotLight = spotLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tpointLight = pointLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\";\n\nvar skinbase_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\n\nvar skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\tuniform highp sampler2D boneTexture;\\n\\tuniform int boneTextureSize;\\n\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\tfloat j = i * 4.0;\\n\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\ty = dy * ( y + 0.5 );\\n\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\treturn bone;\\n\\t}\\n#endif\";\n\nvar skinning_vertex = \"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\n\nvar skinnormal_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\\t#ifdef USE_TANGENT\\n\\t\\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#endif\\n#endif\";\n\nvar specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\";\n\nvar specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\";\n\nvar tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\n\nvar tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate( a ) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn saturate( toneMappingExposure * color );\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\\tconst mat3 ACESInputMat = mat3(\\n\\t\\tvec3( 0.59719, 0.07600, 0.02840 ),\\t\\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\\t\\tvec3( 0.04823, 0.01566, 0.83777 )\\n\\t);\\n\\tconst mat3 ACESOutputMat = mat3(\\n\\t\\tvec3( 1.60475, -0.10208, -0.00327 ),\\t\\tvec3( -0.53108, 1.10813, -0.07276 ),\\n\\t\\tvec3( -0.07367, -0.00605, 1.07602 )\\n\\t);\\n\\tcolor *= toneMappingExposure / 0.6;\\n\\tcolor = ACESInputMat * color;\\n\\tcolor = RRTAndODTFit( color );\\n\\tcolor = ACESOutputMat * color;\\n\\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\n\nvar transmission_fragment = \"#ifdef USE_TRANSMISSION\\n\\tmaterial.transmission = transmission;\\n\\tmaterial.transmissionAlpha = 1.0;\\n\\tmaterial.thickness = thickness;\\n\\tmaterial.attenuationDistance = attenuationDistance;\\n\\tmaterial.attenuationColor = attenuationColor;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\\n\\t#endif\\n\\tvec3 pos = vWorldPosition;\\n\\tvec3 v = normalize( cameraPosition - pos );\\n\\tvec3 n = inverseTransformDirection( normal, viewMatrix );\\n\\tvec4 transmitted = getIBLVolumeRefraction(\\n\\t\\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\\n\\t\\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\\n\\t\\tmaterial.attenuationColor, material.attenuationDistance );\\n\\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\\n\\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\\n#endif\";\n\nvar transmission_pars_fragment = \"#ifdef USE_TRANSMISSION\\n\\tuniform float transmission;\\n\\tuniform float thickness;\\n\\tuniform float attenuationDistance;\\n\\tuniform vec3 attenuationColor;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tuniform sampler2D transmissionMap;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tuniform sampler2D thicknessMap;\\n\\t#endif\\n\\tuniform vec2 transmissionSamplerSize;\\n\\tuniform sampler2D transmissionSamplerMap;\\n\\tuniform mat4 modelMatrix;\\n\\tuniform mat4 projectionMatrix;\\n\\tvarying vec3 vWorldPosition;\\n\\tfloat w0( float a ) {\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\\n\\t}\\n\\tfloat w1( float a ) {\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\\n\\t}\\n\\tfloat w2( float a ){\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\\n\\t}\\n\\tfloat w3( float a ) {\\n\\t\\treturn ( 1.0 / 6.0 ) * ( a * a * a );\\n\\t}\\n\\tfloat g0( float a ) {\\n\\t\\treturn w0( a ) + w1( a );\\n\\t}\\n\\tfloat g1( float a ) {\\n\\t\\treturn w2( a ) + w3( a );\\n\\t}\\n\\tfloat h0( float a ) {\\n\\t\\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\\n\\t}\\n\\tfloat h1( float a ) {\\n\\t\\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\\n\\t}\\n\\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\\n\\t\\tuv = uv * texelSize.zw + 0.5;\\n\\t\\tvec2 iuv = floor( uv );\\n\\t\\tvec2 fuv = fract( uv );\\n\\t\\tfloat g0x = g0( fuv.x );\\n\\t\\tfloat g1x = g1( fuv.x );\\n\\t\\tfloat h0x = h0( fuv.x );\\n\\t\\tfloat h1x = h1( fuv.x );\\n\\t\\tfloat h0y = h0( fuv.y );\\n\\t\\tfloat h1y = h1( fuv.y );\\n\\t\\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\\t\\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\\n\\t\\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\\t\\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\\n\\t\\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\\n\\t\\t\\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\\n\\t}\\n\\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\\n\\t\\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\\n\\t\\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\\n\\t\\tvec2 fLodSizeInv = 1.0 / fLodSize;\\n\\t\\tvec2 cLodSizeInv = 1.0 / cLodSize;\\n\\t\\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\\n\\t\\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\\n\\t\\treturn mix( fSample, cSample, fract( lod ) );\\n\\t}\\n\\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\\n\\t\\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\\n\\t\\tvec3 modelScale;\\n\\t\\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\\n\\t\\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\\n\\t\\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\\n\\t\\treturn normalize( refractionVector ) * thickness * modelScale;\\n\\t}\\n\\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\\n\\t\\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\\n\\t}\\n\\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\\n\\t\\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\\n\\t\\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\\n\\t}\\n\\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\\n\\t\\tif ( isinf( attenuationDistance ) ) {\\n\\t\\t\\treturn vec3( 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\\n\\t\\t\\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\\t\\t\\treturn transmittance;\\n\\t\\t}\\n\\t}\\n\\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\\n\\t\\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\\n\\t\\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\\n\\t\\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\\n\\t\\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\\n\\t\\tvec3 refractedRayExit = position + transmissionRay;\\n\\t\\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\\n\\t\\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\\n\\t\\trefractionCoords += 1.0;\\n\\t\\trefractionCoords /= 2.0;\\n\\t\\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\\n\\t\\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\\n\\t\\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\\n\\t\\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\\n\\t\\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\\n\\t\\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\\n\\t}\\n#endif\";\n\nvar uv_pars_fragment = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\\tuniform mat3 transmissionMapTransform;\\n\\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\\tuniform mat3 thicknessMapTransform;\\n\\tvarying vec2 vThicknessMapUv;\\n#endif\";\n\nvar uv_pars_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\\tvarying vec2 vUv;\\n#endif\\n#ifdef USE_MAP\\n\\tuniform mat3 mapTransform;\\n\\tvarying vec2 vMapUv;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform mat3 alphaMapTransform;\\n\\tvarying vec2 vAlphaMapUv;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\\tuniform mat3 lightMapTransform;\\n\\tvarying vec2 vLightMapUv;\\n#endif\\n#ifdef USE_AOMAP\\n\\tuniform mat3 aoMapTransform;\\n\\tvarying vec2 vAoMapUv;\\n#endif\\n#ifdef USE_BUMPMAP\\n\\tuniform mat3 bumpMapTransform;\\n\\tvarying vec2 vBumpMapUv;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tuniform mat3 normalMapTransform;\\n\\tvarying vec2 vNormalMapUv;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\\tuniform mat3 displacementMapTransform;\\n\\tvarying vec2 vDisplacementMapUv;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\\tuniform mat3 emissiveMapTransform;\\n\\tvarying vec2 vEmissiveMapUv;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\\tuniform mat3 metalnessMapTransform;\\n\\tvarying vec2 vMetalnessMapUv;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\\tuniform mat3 roughnessMapTransform;\\n\\tvarying vec2 vRoughnessMapUv;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\\tuniform mat3 anisotropyMapTransform;\\n\\tvarying vec2 vAnisotropyMapUv;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\\tuniform mat3 clearcoatMapTransform;\\n\\tvarying vec2 vClearcoatMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform mat3 clearcoatNormalMapTransform;\\n\\tvarying vec2 vClearcoatNormalMapUv;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform mat3 clearcoatRoughnessMapTransform;\\n\\tvarying vec2 vClearcoatRoughnessMapUv;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\\tuniform mat3 sheenColorMapTransform;\\n\\tvarying vec2 vSheenColorMapUv;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\tuniform mat3 sheenRoughnessMapTransform;\\n\\tvarying vec2 vSheenRoughnessMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\\tuniform mat3 iridescenceMapTransform;\\n\\tvarying vec2 vIridescenceMapUv;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tuniform mat3 iridescenceThicknessMapTransform;\\n\\tvarying vec2 vIridescenceThicknessMapUv;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\\tuniform mat3 specularMapTransform;\\n\\tvarying vec2 vSpecularMapUv;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\\tuniform mat3 specularColorMapTransform;\\n\\tvarying vec2 vSpecularColorMapUv;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\\tuniform mat3 specularIntensityMapTransform;\\n\\tvarying vec2 vSpecularIntensityMapUv;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\\tuniform mat3 transmissionMapTransform;\\n\\tvarying vec2 vTransmissionMapUv;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\\tuniform mat3 thicknessMapTransform;\\n\\tvarying vec2 vThicknessMapUv;\\n#endif\";\n\nvar uv_vertex = \"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\\n\\tvUv = vec3( uv, 1 ).xy;\\n#endif\\n#ifdef USE_MAP\\n\\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_LIGHTMAP\\n\\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_AOMAP\\n\\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_BUMPMAP\\n\\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_DISPLACEMENTMAP\\n\\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_EMISSIVEMAP\\n\\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_METALNESSMAP\\n\\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ROUGHNESSMAP\\n\\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_ANISOTROPYMAP\\n\\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOATMAP\\n\\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCEMAP\\n\\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\\n\\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_COLORMAP\\n\\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULARMAP\\n\\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_COLORMAP\\n\\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_SPECULAR_INTENSITYMAP\\n\\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_TRANSMISSIONMAP\\n\\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\\n#endif\\n#ifdef USE_THICKNESSMAP\\n\\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\\n#endif\";\n\nvar worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\\n\\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\\t#ifdef USE_INSTANCING\\n\\t\\tworldPosition = instanceMatrix * worldPosition;\\n\\t#endif\\n\\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\n\nconst vertex$h = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\n\nconst fragment$h = \"uniform sampler2D t2D;\\nuniform float backgroundIntensity;\\nvarying vec2 vUv;\\nvoid main() {\\n\\tvec4 texColor = texture2D( t2D, vUv );\\n\\t#ifdef DECODE_VIDEO_TEXTURE\\n\\t\\ttexColor = 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 );\\n\\t#endif\\n\\ttexColor.rgb *= backgroundIntensity;\\n\\tgl_FragColor = texColor;\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$g = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\nconst fragment$g = \"#ifdef ENVMAP_TYPE_CUBE\\n\\tuniform samplerCube envMap;\\n#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\tuniform sampler2D envMap;\\n#endif\\nuniform float flipEnvMap;\\nuniform float backgroundBlurriness;\\nuniform float backgroundIntensity;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\\n\\t#else\\n\\t\\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t#endif\\n\\ttexColor.rgb *= backgroundIntensity;\\n\\tgl_FragColor = texColor;\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$f = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\nconst fragment$f = \"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\nvoid main() {\\n\\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\\n\\tgl_FragColor = texColor;\\n\\tgl_FragColor.a *= opacity;\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$e = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvHighPrecisionZW = gl_Position.zw;\\n}\";\n\nconst fragment$e = \"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\\t#endif\\n}\";\n\nconst vertex$d = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvWorldPosition = worldPosition.xyz;\\n}\";\n\nconst fragment$d = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main () {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\n\nconst vertex$c = \"varying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$c = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include \\nvoid main() {\\n\\tvec3 direction = normalize( vWorldDirection );\\n\\tvec2 sampleUV = equirectUv( direction );\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$b = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\tvLineDistance = scale * lineDistance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$b = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$a = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$a = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\\n\\t\\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include \\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$9 = \"#define LAMBERT\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$9 = \"#define LAMBERT\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$8 = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n}\";\n\nconst fragment$8 = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 viewDir = normalize( vViewPosition );\\n\\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\\tvec3 y = cross( viewDir, x );\\n\\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\\t#ifdef USE_MATCAP\\n\\t\\tvec4 matcapColor = texture2D( matcap, uv );\\n\\t#else\\n\\t\\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\\n\\t#endif\\n\\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$7 = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\n\nconst fragment$7 = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n\\t#ifdef OPAQUE\\n\\t\\tgl_FragColor.a = 1.0;\\n\\t#endif\\n}\";\n\nconst vertex$6 = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$6 = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$5 = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifdef USE_TRANSMISSION\\n\\tvarying vec3 vWorldPosition;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n#ifdef USE_TRANSMISSION\\n\\tvWorldPosition = worldPosition.xyz;\\n#endif\\n}\";\n\nconst fragment$5 = \"#define STANDARD\\n#ifdef PHYSICAL\\n\\t#define IOR\\n\\t#define USE_SPECULAR\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef IOR\\n\\tuniform float ior;\\n#endif\\n#ifdef USE_SPECULAR\\n\\tuniform float specularIntensity;\\n\\tuniform vec3 specularColor;\\n\\t#ifdef USE_SPECULAR_COLORMAP\\n\\t\\tuniform sampler2D specularColorMap;\\n\\t#endif\\n\\t#ifdef USE_SPECULAR_INTENSITYMAP\\n\\t\\tuniform sampler2D specularIntensityMap;\\n\\t#endif\\n#endif\\n#ifdef USE_CLEARCOAT\\n\\tuniform float clearcoat;\\n\\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_IRIDESCENCE\\n\\tuniform float iridescence;\\n\\tuniform float iridescenceIOR;\\n\\tuniform float iridescenceThicknessMinimum;\\n\\tuniform float iridescenceThicknessMaximum;\\n#endif\\n#ifdef USE_SHEEN\\n\\tuniform vec3 sheenColor;\\n\\tuniform float sheenRoughness;\\n\\t#ifdef USE_SHEEN_COLORMAP\\n\\t\\tuniform sampler2D sheenColorMap;\\n\\t#endif\\n\\t#ifdef USE_SHEEN_ROUGHNESSMAP\\n\\t\\tuniform sampler2D sheenRoughnessMap;\\n\\t#endif\\n#endif\\n#ifdef USE_ANISOTROPY\\n\\tuniform vec2 anisotropyVector;\\n\\t#ifdef USE_ANISOTROPYMAP\\n\\t\\tuniform sampler2D anisotropyMap;\\n\\t#endif\\n#endif\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\\n\\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\\n\\t#include \\n\\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\\n\\t#ifdef USE_SHEEN\\n\\t\\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\\n\\t\\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT\\n\\t\\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\\n\\t\\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\\n\\t\\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$4 = \"#define TOON\\nvarying vec3 vViewPosition;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$4 = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$3 = \"uniform float size;\\nuniform float scale;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#ifdef USE_POINTS_UV\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\nvoid main() {\\n\\t#ifdef USE_POINTS_UV\\n\\t\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tgl_PointSize = size;\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$3 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$2 = \"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$2 = \"uniform vec3 color;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst vertex$1 = \"uniform float rotation;\\nuniform vec2 center;\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\t#ifndef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) scale *= - mvPosition.z;\\n\\t#endif\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst fragment$1 = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\";\n\nconst ShaderChunk = {\n\talphahash_fragment: alphahash_fragment,\n\talphahash_pars_fragment: alphahash_pars_fragment,\n\talphamap_fragment: alphamap_fragment,\n\talphamap_pars_fragment: alphamap_pars_fragment,\n\talphatest_fragment: alphatest_fragment,\n\talphatest_pars_fragment: alphatest_pars_fragment,\n\taomap_fragment: aomap_fragment,\n\taomap_pars_fragment: aomap_pars_fragment,\n\tbegin_vertex: begin_vertex,\n\tbeginnormal_vertex: beginnormal_vertex,\n\tbsdfs: bsdfs,\n\tiridescence_fragment: iridescence_fragment,\n\tbumpmap_pars_fragment: bumpmap_pars_fragment,\n\tclipping_planes_fragment: clipping_planes_fragment,\n\tclipping_planes_pars_fragment: clipping_planes_pars_fragment,\n\tclipping_planes_pars_vertex: clipping_planes_pars_vertex,\n\tclipping_planes_vertex: clipping_planes_vertex,\n\tcolor_fragment: color_fragment,\n\tcolor_pars_fragment: color_pars_fragment,\n\tcolor_pars_vertex: color_pars_vertex,\n\tcolor_vertex: color_vertex,\n\tcommon: common,\n\tcube_uv_reflection_fragment: cube_uv_reflection_fragment,\n\tdefaultnormal_vertex: defaultnormal_vertex,\n\tdisplacementmap_pars_vertex: displacementmap_pars_vertex,\n\tdisplacementmap_vertex: displacementmap_vertex,\n\temissivemap_fragment: emissivemap_fragment,\n\temissivemap_pars_fragment: emissivemap_pars_fragment,\n\tcolorspace_fragment: colorspace_fragment,\n\tcolorspace_pars_fragment: colorspace_pars_fragment,\n\tenvmap_fragment: envmap_fragment,\n\tenvmap_common_pars_fragment: envmap_common_pars_fragment,\n\tenvmap_pars_fragment: envmap_pars_fragment,\n\tenvmap_pars_vertex: envmap_pars_vertex,\n\tenvmap_physical_pars_fragment: envmap_physical_pars_fragment,\n\tenvmap_vertex: envmap_vertex,\n\tfog_vertex: fog_vertex,\n\tfog_pars_vertex: fog_pars_vertex,\n\tfog_fragment: fog_fragment,\n\tfog_pars_fragment: fog_pars_fragment,\n\tgradientmap_pars_fragment: gradientmap_pars_fragment,\n\tlightmap_fragment: lightmap_fragment,\n\tlightmap_pars_fragment: lightmap_pars_fragment,\n\tlights_lambert_fragment: lights_lambert_fragment,\n\tlights_lambert_pars_fragment: lights_lambert_pars_fragment,\n\tlights_pars_begin: lights_pars_begin,\n\tlights_toon_fragment: lights_toon_fragment,\n\tlights_toon_pars_fragment: lights_toon_pars_fragment,\n\tlights_phong_fragment: lights_phong_fragment,\n\tlights_phong_pars_fragment: lights_phong_pars_fragment,\n\tlights_physical_fragment: lights_physical_fragment,\n\tlights_physical_pars_fragment: lights_physical_pars_fragment,\n\tlights_fragment_begin: lights_fragment_begin,\n\tlights_fragment_maps: lights_fragment_maps,\n\tlights_fragment_end: lights_fragment_end,\n\tlogdepthbuf_fragment: logdepthbuf_fragment,\n\tlogdepthbuf_pars_fragment: logdepthbuf_pars_fragment,\n\tlogdepthbuf_pars_vertex: logdepthbuf_pars_vertex,\n\tlogdepthbuf_vertex: logdepthbuf_vertex,\n\tmap_fragment: map_fragment,\n\tmap_pars_fragment: map_pars_fragment,\n\tmap_particle_fragment: map_particle_fragment,\n\tmap_particle_pars_fragment: map_particle_pars_fragment,\n\tmetalnessmap_fragment: metalnessmap_fragment,\n\tmetalnessmap_pars_fragment: metalnessmap_pars_fragment,\n\tmorphcolor_vertex: morphcolor_vertex,\n\tmorphnormal_vertex: morphnormal_vertex,\n\tmorphtarget_pars_vertex: morphtarget_pars_vertex,\n\tmorphtarget_vertex: morphtarget_vertex,\n\tnormal_fragment_begin: normal_fragment_begin,\n\tnormal_fragment_maps: normal_fragment_maps,\n\tnormal_pars_fragment: normal_pars_fragment,\n\tnormal_pars_vertex: normal_pars_vertex,\n\tnormal_vertex: normal_vertex,\n\tnormalmap_pars_fragment: normalmap_pars_fragment,\n\tclearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin,\n\tclearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps,\n\tclearcoat_pars_fragment: clearcoat_pars_fragment,\n\tiridescence_pars_fragment: iridescence_pars_fragment,\n\topaque_fragment: opaque_fragment,\n\tpacking: packing,\n\tpremultiplied_alpha_fragment: premultiplied_alpha_fragment,\n\tproject_vertex: project_vertex,\n\tdithering_fragment: dithering_fragment,\n\tdithering_pars_fragment: dithering_pars_fragment,\n\troughnessmap_fragment: roughnessmap_fragment,\n\troughnessmap_pars_fragment: roughnessmap_pars_fragment,\n\tshadowmap_pars_fragment: shadowmap_pars_fragment,\n\tshadowmap_pars_vertex: shadowmap_pars_vertex,\n\tshadowmap_vertex: shadowmap_vertex,\n\tshadowmask_pars_fragment: shadowmask_pars_fragment,\n\tskinbase_vertex: skinbase_vertex,\n\tskinning_pars_vertex: skinning_pars_vertex,\n\tskinning_vertex: skinning_vertex,\n\tskinnormal_vertex: skinnormal_vertex,\n\tspecularmap_fragment: specularmap_fragment,\n\tspecularmap_pars_fragment: specularmap_pars_fragment,\n\ttonemapping_fragment: tonemapping_fragment,\n\ttonemapping_pars_fragment: tonemapping_pars_fragment,\n\ttransmission_fragment: transmission_fragment,\n\ttransmission_pars_fragment: transmission_pars_fragment,\n\tuv_pars_fragment: uv_pars_fragment,\n\tuv_pars_vertex: uv_pars_vertex,\n\tuv_vertex: uv_vertex,\n\tworldpos_vertex: worldpos_vertex,\n\n\tbackground_vert: vertex$h,\n\tbackground_frag: fragment$h,\n\tbackgroundCube_vert: vertex$g,\n\tbackgroundCube_frag: fragment$g,\n\tcube_vert: vertex$f,\n\tcube_frag: fragment$f,\n\tdepth_vert: vertex$e,\n\tdepth_frag: fragment$e,\n\tdistanceRGBA_vert: vertex$d,\n\tdistanceRGBA_frag: fragment$d,\n\tequirect_vert: vertex$c,\n\tequirect_frag: fragment$c,\n\tlinedashed_vert: vertex$b,\n\tlinedashed_frag: fragment$b,\n\tmeshbasic_vert: vertex$a,\n\tmeshbasic_frag: fragment$a,\n\tmeshlambert_vert: vertex$9,\n\tmeshlambert_frag: fragment$9,\n\tmeshmatcap_vert: vertex$8,\n\tmeshmatcap_frag: fragment$8,\n\tmeshnormal_vert: vertex$7,\n\tmeshnormal_frag: fragment$7,\n\tmeshphong_vert: vertex$6,\n\tmeshphong_frag: fragment$6,\n\tmeshphysical_vert: vertex$5,\n\tmeshphysical_frag: fragment$5,\n\tmeshtoon_vert: vertex$4,\n\tmeshtoon_frag: fragment$4,\n\tpoints_vert: vertex$3,\n\tpoints_frag: fragment$3,\n\tshadow_vert: vertex$2,\n\tshadow_frag: fragment$2,\n\tsprite_vert: vertex$1,\n\tsprite_frag: fragment$1\n};\n\n/**\n * Uniforms library for shared webgl shaders\n */\n\nconst UniformsLib = {\n\n\tcommon: {\n\n\t\tdiffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\n\t\tmap: { value: null },\n\t\tmapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\n\t\talphaMap: { value: null },\n\t\talphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\n\t\talphaTest: { value: 0 }\n\n\t},\n\n\tspecularmap: {\n\n\t\tspecularMap: { value: null },\n\t\tspecularMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tenvmap: {\n\n\t\tenvMap: { value: null },\n\t\tflipEnvMap: { value: - 1 },\n\t\treflectivity: { value: 1.0 }, // basic, lambert, phong\n\t\tior: { value: 1.5 }, // physical\n\t\trefractionRatio: { value: 0.98 }, // basic, lambert, phong\n\n\t},\n\n\taomap: {\n\n\t\taoMap: { value: null },\n\t\taoMapIntensity: { value: 1 },\n\t\taoMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tlightmap: {\n\n\t\tlightMap: { value: null },\n\t\tlightMapIntensity: { value: 1 },\n\t\tlightMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tbumpmap: {\n\n\t\tbumpMap: { value: null },\n\t\tbumpMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\tbumpScale: { value: 1 }\n\n\t},\n\n\tnormalmap: {\n\n\t\tnormalMap: { value: null },\n\t\tnormalMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\tnormalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) }\n\n\t},\n\n\tdisplacementmap: {\n\n\t\tdisplacementMap: { value: null },\n\t\tdisplacementMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\tdisplacementScale: { value: 1 },\n\t\tdisplacementBias: { value: 0 }\n\n\t},\n\n\temissivemap: {\n\n\t\temissiveMap: { value: null },\n\t\temissiveMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tmetalnessmap: {\n\n\t\tmetalnessMap: { value: null },\n\t\tmetalnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\troughnessmap: {\n\n\t\troughnessMap: { value: null },\n\t\troughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tgradientmap: {\n\n\t\tgradientMap: { value: null }\n\n\t},\n\n\tfog: {\n\n\t\tfogDensity: { value: 0.00025 },\n\t\tfogNear: { value: 1 },\n\t\tfogFar: { value: 2000 },\n\t\tfogColor: { value: /*@__PURE__*/ new Color( 0xffffff ) }\n\n\t},\n\n\tlights: {\n\n\t\tambientLightColor: { value: [] },\n\n\t\tlightProbe: { value: [] },\n\n\t\tdirectionalLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tcolor: {}\n\t\t} },\n\n\t\tdirectionalLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tdirectionalShadowMap: { value: [] },\n\t\tdirectionalShadowMatrix: { value: [] },\n\n\t\tspotLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdirection: {},\n\t\t\tdistance: {},\n\t\t\tconeCos: {},\n\t\t\tpenumbraCos: {},\n\t\t\tdecay: {}\n\t\t} },\n\n\t\tspotLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tspotLightMap: { value: [] },\n\t\tspotShadowMap: { value: [] },\n\t\tspotLightMatrix: { value: [] },\n\n\t\tpointLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdecay: {},\n\t\t\tdistance: {}\n\t\t} },\n\n\t\tpointLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {},\n\t\t\tshadowCameraNear: {},\n\t\t\tshadowCameraFar: {}\n\t\t} },\n\n\t\tpointShadowMap: { value: [] },\n\t\tpointShadowMatrix: { value: [] },\n\n\t\themisphereLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tskyColor: {},\n\t\t\tgroundColor: {}\n\t\t} },\n\n\t\t// TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n\t\trectAreaLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\twidth: {},\n\t\t\theight: {}\n\t\t} },\n\n\t\tltc_1: { value: null },\n\t\tltc_2: { value: null }\n\n\t},\n\n\tpoints: {\n\n\t\tdiffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tsize: { value: 1.0 },\n\t\tscale: { value: 1.0 },\n\t\tmap: { value: null },\n\t\talphaMap: { value: null },\n\t\talphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\talphaTest: { value: 0 },\n\t\tuvTransform: { value: /*@__PURE__*/ new Matrix3() }\n\n\t},\n\n\tsprite: {\n\n\t\tdiffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tcenter: { value: /*@__PURE__*/ new Vector2( 0.5, 0.5 ) },\n\t\trotation: { value: 0.0 },\n\t\tmap: { value: null },\n\t\tmapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\talphaMap: { value: null },\n\t\talphaMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\talphaTest: { value: 0 }\n\n\t}\n\n};\n\nconst ShaderLib = {\n\n\tbasic: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshbasic_vert,\n\t\tfragmentShader: ShaderChunk.meshbasic_frag\n\n\t},\n\n\tlambert: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshlambert_vert,\n\t\tfragmentShader: ShaderChunk.meshlambert_frag\n\n\t},\n\n\tphong: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\t\tspecular: { value: /*@__PURE__*/ new Color( 0x111111 ) },\n\t\t\t\tshininess: { value: 30 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphong_vert,\n\t\tfragmentShader: ShaderChunk.meshphong_frag\n\n\t},\n\n\tstandard: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.roughnessmap,\n\t\t\tUniformsLib.metalnessmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\t\troughness: { value: 1.0 },\n\t\t\t\tmetalness: { value: 0.0 },\n\t\t\t\tenvMapIntensity: { value: 1 } // temporary\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\n\t},\n\n\ttoon: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.gradientmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshtoon_vert,\n\t\tfragmentShader: ShaderChunk.meshtoon_frag\n\n\t},\n\n\tmatcap: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tmatcap: { value: null }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshmatcap_vert,\n\t\tfragmentShader: ShaderChunk.meshmatcap_frag\n\n\t},\n\n\tpoints: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.points,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.points_vert,\n\t\tfragmentShader: ShaderChunk.points_frag\n\n\t},\n\n\tdashed: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tscale: { value: 1 },\n\t\t\t\tdashSize: { value: 1 },\n\t\t\t\ttotalSize: { value: 2 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.linedashed_vert,\n\t\tfragmentShader: ShaderChunk.linedashed_frag\n\n\t},\n\n\tdepth: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.depth_vert,\n\t\tfragmentShader: ShaderChunk.depth_frag\n\n\t},\n\n\tnormal: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshnormal_vert,\n\t\tfragmentShader: ShaderChunk.meshnormal_frag\n\n\t},\n\n\tsprite: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.sprite,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.sprite_vert,\n\t\tfragmentShader: ShaderChunk.sprite_frag\n\n\t},\n\n\tbackground: {\n\n\t\tuniforms: {\n\t\t\tuvTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tt2D: { value: null },\n\t\t\tbackgroundIntensity: { value: 1 }\n\t\t},\n\n\t\tvertexShader: ShaderChunk.background_vert,\n\t\tfragmentShader: ShaderChunk.background_frag\n\n\t},\n\n\tbackgroundCube: {\n\n\t\tuniforms: {\n\t\t\tenvMap: { value: null },\n\t\t\tflipEnvMap: { value: - 1 },\n\t\t\tbackgroundBlurriness: { value: 0 },\n\t\t\tbackgroundIntensity: { value: 1 }\n\t\t},\n\n\t\tvertexShader: ShaderChunk.backgroundCube_vert,\n\t\tfragmentShader: ShaderChunk.backgroundCube_frag\n\n\t},\n\n\tcube: {\n\n\t\tuniforms: {\n\t\t\ttCube: { value: null },\n\t\t\ttFlip: { value: - 1 },\n\t\t\topacity: { value: 1.0 }\n\t\t},\n\n\t\tvertexShader: ShaderChunk.cube_vert,\n\t\tfragmentShader: ShaderChunk.cube_frag\n\n\t},\n\n\tequirect: {\n\n\t\tuniforms: {\n\t\t\ttEquirect: { value: null },\n\t\t},\n\n\t\tvertexShader: ShaderChunk.equirect_vert,\n\t\tfragmentShader: ShaderChunk.equirect_frag\n\n\t},\n\n\tdistanceRGBA: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\treferencePosition: { value: /*@__PURE__*/ new Vector3() },\n\t\t\t\tnearDistance: { value: 1 },\n\t\t\t\tfarDistance: { value: 1000 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.distanceRGBA_vert,\n\t\tfragmentShader: ShaderChunk.distanceRGBA_frag\n\n\t},\n\n\tshadow: {\n\n\t\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\t\tUniformsLib.lights,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tcolor: { value: /*@__PURE__*/ new Color( 0x00000 ) },\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t},\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.shadow_vert,\n\t\tfragmentShader: ShaderChunk.shadow_frag\n\n\t}\n\n};\n\nShaderLib.physical = {\n\n\tuniforms: /*@__PURE__*/ mergeUniforms( [\n\t\tShaderLib.standard.uniforms,\n\t\t{\n\t\t\tclearcoat: { value: 0 },\n\t\t\tclearcoatMap: { value: null },\n\t\t\tclearcoatMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tclearcoatNormalMap: { value: null },\n\t\t\tclearcoatNormalMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tclearcoatNormalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) },\n\t\t\tclearcoatRoughness: { value: 0 },\n\t\t\tclearcoatRoughnessMap: { value: null },\n\t\t\tclearcoatRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tiridescence: { value: 0 },\n\t\t\tiridescenceMap: { value: null },\n\t\t\tiridescenceMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tiridescenceIOR: { value: 1.3 },\n\t\t\tiridescenceThicknessMinimum: { value: 100 },\n\t\t\tiridescenceThicknessMaximum: { value: 400 },\n\t\t\tiridescenceThicknessMap: { value: null },\n\t\t\tiridescenceThicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tsheen: { value: 0 },\n\t\t\tsheenColor: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\tsheenColorMap: { value: null },\n\t\t\tsheenColorMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tsheenRoughness: { value: 1 },\n\t\t\tsheenRoughnessMap: { value: null },\n\t\t\tsheenRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\ttransmission: { value: 0 },\n\t\t\ttransmissionMap: { value: null },\n\t\t\ttransmissionMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\ttransmissionSamplerSize: { value: /*@__PURE__*/ new Vector2() },\n\t\t\ttransmissionSamplerMap: { value: null },\n\t\t\tthickness: { value: 0 },\n\t\t\tthicknessMap: { value: null },\n\t\t\tthicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tattenuationDistance: { value: 0 },\n\t\t\tattenuationColor: { value: /*@__PURE__*/ new Color( 0x000000 ) },\n\t\t\tspecularColor: { value: /*@__PURE__*/ new Color( 1, 1, 1 ) },\n\t\t\tspecularColorMap: { value: null },\n\t\t\tspecularColorMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tspecularIntensity: { value: 1 },\n\t\t\tspecularIntensityMap: { value: null },\n\t\t\tspecularIntensityMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t\tanisotropyVector: { value: /*@__PURE__*/ new Vector2() },\n\t\t\tanisotropyMap: { value: null },\n\t\t\tanisotropyMapTransform: { value: /*@__PURE__*/ new Matrix3() },\n\t\t}\n\t] ),\n\n\tvertexShader: ShaderChunk.meshphysical_vert,\n\tfragmentShader: ShaderChunk.meshphysical_frag\n\n};\n\nconst _rgb = { r: 0, b: 0, g: 0 };\n\nfunction WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha ) {\n\n\tconst clearColor = new Color( 0x000000 );\n\tlet clearAlpha = alpha === true ? 0 : 1;\n\n\tlet planeMesh;\n\tlet boxMesh;\n\n\tlet currentBackground = null;\n\tlet currentBackgroundVersion = 0;\n\tlet currentTonemapping = null;\n\n\tfunction render( renderList, scene ) {\n\n\t\tlet forceClear = false;\n\t\tlet background = scene.isScene === true ? scene.background : null;\n\n\t\tif ( background && background.isTexture ) {\n\n\t\t\tconst usePMREM = scene.backgroundBlurriness > 0; // use PMREM if the user wants to blur the background\n\t\t\tbackground = ( usePMREM ? cubeuvmaps : cubemaps ).get( background );\n\n\t\t}\n\n\t\tif ( background === null ) {\n\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t} else if ( background && background.isColor ) {\n\n\t\t\tsetClear( background, 1 );\n\t\t\tforceClear = true;\n\n\t\t}\n\n\t\tconst environmentBlendMode = renderer.xr.getEnvironmentBlendMode();\n\n\t\tif ( environmentBlendMode === 'additive' ) {\n\n\t\t\tstate.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha );\n\n\t\t} else if ( environmentBlendMode === 'alpha-blend' ) {\n\n\t\t\tstate.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha );\n\n\t\t}\n\n\t\tif ( renderer.autoClear || forceClear ) {\n\n\t\t\trenderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\n\t\t}\n\n\t\tif ( background && ( background.isCubeTexture || background.mapping === CubeUVReflectionMapping ) ) {\n\n\t\t\tif ( boxMesh === undefined ) {\n\n\t\t\t\tboxMesh = new Mesh(\n\t\t\t\t\tnew BoxGeometry( 1, 1, 1 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundCubeMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.backgroundCube.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.backgroundCube.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.backgroundCube.fragmentShader,\n\t\t\t\t\t\tside: BackSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'normal' );\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'uv' );\n\n\t\t\t\tboxMesh.onBeforeRender = function ( renderer, scene, camera ) {\n\n\t\t\t\t\tthis.matrixWorld.copyPosition( camera.matrixWorld );\n\n\t\t\t\t};\n\n\t\t\t\t// add \"envMap\" material property so the renderer can evaluate it like for built-in materials\n\t\t\t\tObject.defineProperty( boxMesh.material, 'envMap', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.envMap.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( boxMesh );\n\n\t\t\t}\n\n\t\t\tboxMesh.material.uniforms.envMap.value = background;\n\t\t\tboxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? - 1 : 1;\n\t\t\tboxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness;\n\t\t\tboxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n\t\t\tboxMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer;\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tboxMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t\tboxMesh.layers.enableAll();\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null );\n\n\t\t} else if ( background && background.isTexture ) {\n\n\t\t\tif ( planeMesh === undefined ) {\n\n\t\t\t\tplaneMesh = new Mesh(\n\t\t\t\t\tnew PlaneGeometry( 2, 2 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.background.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.background.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.background.fragmentShader,\n\t\t\t\t\t\tside: FrontSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tplaneMesh.geometry.deleteAttribute( 'normal' );\n\n\t\t\t\t// add \"map\" material property so the renderer can evaluate it like for built-in materials\n\t\t\t\tObject.defineProperty( planeMesh.material, 'map', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.t2D.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( planeMesh );\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.t2D.value = background;\n\t\t\tplaneMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity;\n\t\t\tplaneMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer;\n\n\t\t\tif ( background.matrixAutoUpdate === true ) {\n\n\t\t\t\tbackground.updateMatrix();\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.uvTransform.value.copy( background.matrix );\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tplaneMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t\tplaneMesh.layers.enableAll();\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null );\n\n\t\t}\n\n\t}\n\n\tfunction setClear( color, alpha ) {\n\n\t\tcolor.getRGB( _rgb, getUnlitUniformColorSpace( renderer ) );\n\n\t\tstate.buffers.color.setClear( _rgb.r, _rgb.g, _rgb.b, alpha, premultipliedAlpha );\n\n\t}\n\n\treturn {\n\n\t\tgetClearColor: function () {\n\n\t\t\treturn clearColor;\n\n\t\t},\n\t\tsetClearColor: function ( color, alpha = 1 ) {\n\n\t\t\tclearColor.set( color );\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\tgetClearAlpha: function () {\n\n\t\t\treturn clearAlpha;\n\n\t\t},\n\t\tsetClearAlpha: function ( alpha ) {\n\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\trender: render\n\n\t};\n\n}\n\nfunction WebGLBindingStates( gl, extensions, attributes, capabilities ) {\n\n\tconst maxVertexAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS );\n\n\tconst extension = capabilities.isWebGL2 ? null : extensions.get( 'OES_vertex_array_object' );\n\tconst vaoAvailable = capabilities.isWebGL2 || extension !== null;\n\n\tconst bindingStates = {};\n\n\tconst defaultState = createBindingState( null );\n\tlet currentState = defaultState;\n\tlet forceUpdate = false;\n\n\tfunction setup( object, material, program, geometry, index ) {\n\n\t\tlet updateBuffers = false;\n\n\t\tif ( vaoAvailable ) {\n\n\t\t\tconst state = getBindingState( geometry, program, material );\n\n\t\t\tif ( currentState !== state ) {\n\n\t\t\t\tcurrentState = state;\n\t\t\t\tbindVertexArrayObject( currentState.object );\n\n\t\t\t}\n\n\t\t\tupdateBuffers = needsUpdate( object, geometry, program, index );\n\n\t\t\tif ( updateBuffers ) saveCache( object, geometry, program, index );\n\n\t\t} else {\n\n\t\t\tconst wireframe = ( material.wireframe === true );\n\n\t\t\tif ( currentState.geometry !== geometry.id ||\n\t\t\t\tcurrentState.program !== program.id ||\n\t\t\t\tcurrentState.wireframe !== wireframe ) {\n\n\t\t\t\tcurrentState.geometry = geometry.id;\n\t\t\t\tcurrentState.program = program.id;\n\t\t\t\tcurrentState.wireframe = wireframe;\n\n\t\t\t\tupdateBuffers = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( index !== null ) {\n\n\t\t\tattributes.update( index, gl.ELEMENT_ARRAY_BUFFER );\n\n\t\t}\n\n\t\tif ( updateBuffers || forceUpdate ) {\n\n\t\t\tforceUpdate = false;\n\n\t\t\tsetupVertexAttributes( object, material, program, geometry );\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tgl.bindBuffer( gl.ELEMENT_ARRAY_BUFFER, attributes.get( index ).buffer );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction createVertexArrayObject() {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.createVertexArray();\n\n\t\treturn extension.createVertexArrayOES();\n\n\t}\n\n\tfunction bindVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.bindVertexArray( vao );\n\n\t\treturn extension.bindVertexArrayOES( vao );\n\n\t}\n\n\tfunction deleteVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.deleteVertexArray( vao );\n\n\t\treturn extension.deleteVertexArrayOES( vao );\n\n\t}\n\n\tfunction getBindingState( geometry, program, material ) {\n\n\t\tconst wireframe = ( material.wireframe === true );\n\n\t\tlet programMap = bindingStates[ geometry.id ];\n\n\t\tif ( programMap === undefined ) {\n\n\t\t\tprogramMap = {};\n\t\t\tbindingStates[ geometry.id ] = programMap;\n\n\t\t}\n\n\t\tlet stateMap = programMap[ program.id ];\n\n\t\tif ( stateMap === undefined ) {\n\n\t\t\tstateMap = {};\n\t\t\tprogramMap[ program.id ] = stateMap;\n\n\t\t}\n\n\t\tlet state = stateMap[ wireframe ];\n\n\t\tif ( state === undefined ) {\n\n\t\t\tstate = createBindingState( createVertexArrayObject() );\n\t\t\tstateMap[ wireframe ] = state;\n\n\t\t}\n\n\t\treturn state;\n\n\t}\n\n\tfunction createBindingState( vao ) {\n\n\t\tconst newAttributes = [];\n\t\tconst enabledAttributes = [];\n\t\tconst attributeDivisors = [];\n\n\t\tfor ( let i = 0; i < maxVertexAttributes; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\t\t\tenabledAttributes[ i ] = 0;\n\t\t\tattributeDivisors[ i ] = 0;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\t// for backward compatibility on non-VAO support browser\n\t\t\tgeometry: null,\n\t\t\tprogram: null,\n\t\t\twireframe: false,\n\n\t\t\tnewAttributes: newAttributes,\n\t\t\tenabledAttributes: enabledAttributes,\n\t\t\tattributeDivisors: attributeDivisors,\n\t\t\tobject: vao,\n\t\t\tattributes: {},\n\t\t\tindex: null\n\n\t\t};\n\n\t}\n\n\tfunction needsUpdate( object, geometry, program, index ) {\n\n\t\tconst cachedAttributes = currentState.attributes;\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tlet attributesNum = 0;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute.location >= 0 ) {\n\n\t\t\t\tconst cachedAttribute = cachedAttributes[ name ];\n\t\t\t\tlet geometryAttribute = geometryAttributes[ name ];\n\n\t\t\t\tif ( geometryAttribute === undefined ) {\n\n\t\t\t\t\tif ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix;\n\t\t\t\t\tif ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor;\n\n\t\t\t\t}\n\n\t\t\t\tif ( cachedAttribute === undefined ) return true;\n\n\t\t\t\tif ( cachedAttribute.attribute !== geometryAttribute ) return true;\n\n\t\t\t\tif ( geometryAttribute && cachedAttribute.data !== geometryAttribute.data ) return true;\n\n\t\t\t\tattributesNum ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( currentState.attributesNum !== attributesNum ) return true;\n\n\t\tif ( currentState.index !== index ) return true;\n\n\t\treturn false;\n\n\t}\n\n\tfunction saveCache( object, geometry, program, index ) {\n\n\t\tconst cache = {};\n\t\tconst attributes = geometry.attributes;\n\t\tlet attributesNum = 0;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute.location >= 0 ) {\n\n\t\t\t\tlet attribute = attributes[ name ];\n\n\t\t\t\tif ( attribute === undefined ) {\n\n\t\t\t\t\tif ( name === 'instanceMatrix' && object.instanceMatrix ) attribute = object.instanceMatrix;\n\t\t\t\t\tif ( name === 'instanceColor' && object.instanceColor ) attribute = object.instanceColor;\n\n\t\t\t\t}\n\n\t\t\t\tconst data = {};\n\t\t\t\tdata.attribute = attribute;\n\n\t\t\t\tif ( attribute && attribute.data ) {\n\n\t\t\t\t\tdata.data = attribute.data;\n\n\t\t\t\t}\n\n\t\t\t\tcache[ name ] = data;\n\n\t\t\t\tattributesNum ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tcurrentState.attributes = cache;\n\t\tcurrentState.attributesNum = attributesNum;\n\n\t\tcurrentState.index = index;\n\n\t}\n\n\tfunction initAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\n\t\tfor ( let i = 0, il = newAttributes.length; i < il; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\tfunction enableAttribute( attribute ) {\n\n\t\tenableAttributeAndDivisor( attribute, 0 );\n\n\t}\n\n\tfunction enableAttributeAndDivisor( attribute, meshPerAttribute ) {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\t\tconst attributeDivisors = currentState.attributeDivisors;\n\n\t\tnewAttributes[ attribute ] = 1;\n\n\t\tif ( enabledAttributes[ attribute ] === 0 ) {\n\n\t\t\tgl.enableVertexAttribArray( attribute );\n\t\t\tenabledAttributes[ attribute ] = 1;\n\n\t\t}\n\n\t\tif ( attributeDivisors[ attribute ] !== meshPerAttribute ) {\n\n\t\t\tconst extension = capabilities.isWebGL2 ? gl : extensions.get( 'ANGLE_instanced_arrays' );\n\n\t\t\textension[ capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE' ]( attribute, meshPerAttribute );\n\t\t\tattributeDivisors[ attribute ] = meshPerAttribute;\n\n\t\t}\n\n\t}\n\n\tfunction disableUnusedAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\n\t\tfor ( let i = 0, il = enabledAttributes.length; i < il; i ++ ) {\n\n\t\t\tif ( enabledAttributes[ i ] !== newAttributes[ i ] ) {\n\n\t\t\t\tgl.disableVertexAttribArray( i );\n\t\t\t\tenabledAttributes[ i ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction vertexAttribPointer( index, size, type, normalized, stride, offset, integer ) {\n\n\t\tif ( integer === true ) {\n\n\t\t\tgl.vertexAttribIPointer( index, size, type, stride, offset );\n\n\t\t} else {\n\n\t\t\tgl.vertexAttribPointer( index, size, type, normalized, stride, offset );\n\n\t\t}\n\n\t}\n\n\tfunction setupVertexAttributes( object, material, program, geometry ) {\n\n\t\tif ( capabilities.isWebGL2 === false && ( object.isInstancedMesh || geometry.isInstancedBufferGeometry ) ) {\n\n\t\t\tif ( extensions.get( 'ANGLE_instanced_arrays' ) === null ) return;\n\n\t\t}\n\n\t\tinitAttributes();\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tconst materialDefaultAttributeValues = material.defaultAttributeValues;\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute.location >= 0 ) {\n\n\t\t\t\tlet geometryAttribute = geometryAttributes[ name ];\n\n\t\t\t\tif ( geometryAttribute === undefined ) {\n\n\t\t\t\t\tif ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix;\n\t\t\t\t\tif ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor;\n\n\t\t\t\t}\n\n\t\t\t\tif ( geometryAttribute !== undefined ) {\n\n\t\t\t\t\tconst normalized = geometryAttribute.normalized;\n\t\t\t\t\tconst size = geometryAttribute.itemSize;\n\n\t\t\t\t\tconst attribute = attributes.get( geometryAttribute );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\t\t\t\t\tconst bytesPerElement = attribute.bytesPerElement;\n\n\t\t\t\t\t// check for integer attributes (WebGL 2 only)\n\n\t\t\t\t\tconst integer = ( capabilities.isWebGL2 === true && ( type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === IntType ) );\n\n\t\t\t\t\tif ( geometryAttribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst data = geometryAttribute.data;\n\t\t\t\t\t\tconst stride = data.stride;\n\t\t\t\t\t\tconst offset = geometryAttribute.offset;\n\n\t\t\t\t\t\tif ( data.isInstancedInterleavedBuffer ) {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute.location + i, data.meshPerAttribute );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = data.meshPerAttribute * data.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttribute( programAttribute.location + i );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( gl.ARRAY_BUFFER, buffer );\n\n\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\tvertexAttribPointer(\n\t\t\t\t\t\t\t\tprogramAttribute.location + i,\n\t\t\t\t\t\t\t\tsize / programAttribute.locationSize,\n\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\tnormalized,\n\t\t\t\t\t\t\t\tstride * bytesPerElement,\n\t\t\t\t\t\t\t\t( offset + ( size / programAttribute.locationSize ) * i ) * bytesPerElement,\n\t\t\t\t\t\t\t\tinteger\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( geometryAttribute.isInstancedBufferAttribute ) {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute.location + i, geometryAttribute.meshPerAttribute );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\t\tenableAttribute( programAttribute.location + i );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( gl.ARRAY_BUFFER, buffer );\n\n\t\t\t\t\t\tfor ( let i = 0; i < programAttribute.locationSize; i ++ ) {\n\n\t\t\t\t\t\t\tvertexAttribPointer(\n\t\t\t\t\t\t\t\tprogramAttribute.location + i,\n\t\t\t\t\t\t\t\tsize / programAttribute.locationSize,\n\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\tnormalized,\n\t\t\t\t\t\t\t\tsize * bytesPerElement,\n\t\t\t\t\t\t\t\t( size / programAttribute.locationSize ) * i * bytesPerElement,\n\t\t\t\t\t\t\t\tinteger\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( materialDefaultAttributeValues !== undefined ) {\n\n\t\t\t\t\tconst value = materialDefaultAttributeValues[ name ];\n\n\t\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\t\tswitch ( value.length ) {\n\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tgl.vertexAttrib2fv( programAttribute.location, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tgl.vertexAttrib3fv( programAttribute.location, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tgl.vertexAttrib4fv( programAttribute.location, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tgl.vertexAttrib1fv( programAttribute.location, value );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tdisableUnusedAttributes();\n\n\t}\n\n\tfunction dispose() {\n\n\t\treset();\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tfor ( const programId in programMap ) {\n\n\t\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[ programId ];\n\n\t\t\t}\n\n\t\t\tdelete bindingStates[ geometryId ];\n\n\t\t}\n\n\t}\n\n\tfunction releaseStatesOfGeometry( geometry ) {\n\n\t\tif ( bindingStates[ geometry.id ] === undefined ) return;\n\n\t\tconst programMap = bindingStates[ geometry.id ];\n\n\t\tfor ( const programId in programMap ) {\n\n\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ programId ];\n\n\t\t}\n\n\t\tdelete bindingStates[ geometry.id ];\n\n\t}\n\n\tfunction releaseStatesOfProgram( program ) {\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tif ( programMap[ program.id ] === undefined ) continue;\n\n\t\t\tconst stateMap = programMap[ program.id ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ program.id ];\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\tresetDefaultState();\n\t\tforceUpdate = true;\n\n\t\tif ( currentState === defaultState ) return;\n\n\t\tcurrentState = defaultState;\n\t\tbindVertexArrayObject( currentState.object );\n\n\t}\n\n\t// for backward-compatibility\n\n\tfunction resetDefaultState() {\n\n\t\tdefaultState.geometry = null;\n\t\tdefaultState.program = null;\n\t\tdefaultState.wireframe = false;\n\n\t}\n\n\treturn {\n\n\t\tsetup: setup,\n\t\treset: reset,\n\t\tresetDefaultState: resetDefaultState,\n\t\tdispose: dispose,\n\t\treleaseStatesOfGeometry: releaseStatesOfGeometry,\n\t\treleaseStatesOfProgram: releaseStatesOfProgram,\n\n\t\tinitAttributes: initAttributes,\n\t\tenableAttribute: enableAttribute,\n\t\tdisableUnusedAttributes: disableUnusedAttributes\n\n\t};\n\n}\n\nfunction WebGLBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawArrays( mode, start, count );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawArraysInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawArraysInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, start, count, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLCapabilities( gl, extensions, parameters ) {\n\n\tlet maxAnisotropy;\n\n\tfunction getMaxAnisotropy() {\n\n\t\tif ( maxAnisotropy !== undefined ) return maxAnisotropy;\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tmaxAnisotropy = gl.getParameter( extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT );\n\n\t\t} else {\n\n\t\t\tmaxAnisotropy = 0;\n\n\t\t}\n\n\t\treturn maxAnisotropy;\n\n\t}\n\n\tfunction getMaxPrecision( precision ) {\n\n\t\tif ( precision === 'highp' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0 ) {\n\n\t\t\t\treturn 'highp';\n\n\t\t\t}\n\n\t\t\tprecision = 'mediump';\n\n\t\t}\n\n\t\tif ( precision === 'mediump' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0 ) {\n\n\t\t\t\treturn 'mediump';\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn 'lowp';\n\n\t}\n\n\tconst isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl.constructor.name === 'WebGL2RenderingContext';\n\n\tlet precision = parameters.precision !== undefined ? parameters.precision : 'highp';\n\tconst maxPrecision = getMaxPrecision( precision );\n\n\tif ( maxPrecision !== precision ) {\n\n\t\tconsole.warn( 'THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.' );\n\t\tprecision = maxPrecision;\n\n\t}\n\n\tconst drawBuffers = isWebGL2 || extensions.has( 'WEBGL_draw_buffers' );\n\n\tconst logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n\n\tconst maxTextures = gl.getParameter( gl.MAX_TEXTURE_IMAGE_UNITS );\n\tconst maxVertexTextures = gl.getParameter( gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS );\n\tconst maxTextureSize = gl.getParameter( gl.MAX_TEXTURE_SIZE );\n\tconst maxCubemapSize = gl.getParameter( gl.MAX_CUBE_MAP_TEXTURE_SIZE );\n\n\tconst maxAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS );\n\tconst maxVertexUniforms = gl.getParameter( gl.MAX_VERTEX_UNIFORM_VECTORS );\n\tconst maxVaryings = gl.getParameter( gl.MAX_VARYING_VECTORS );\n\tconst maxFragmentUniforms = gl.getParameter( gl.MAX_FRAGMENT_UNIFORM_VECTORS );\n\n\tconst vertexTextures = maxVertexTextures > 0;\n\tconst floatFragmentTextures = isWebGL2 || extensions.has( 'OES_texture_float' );\n\tconst floatVertexTextures = vertexTextures && floatFragmentTextures;\n\n\tconst maxSamples = isWebGL2 ? gl.getParameter( gl.MAX_SAMPLES ) : 0;\n\n\treturn {\n\n\t\tisWebGL2: isWebGL2,\n\n\t\tdrawBuffers: drawBuffers,\n\n\t\tgetMaxAnisotropy: getMaxAnisotropy,\n\t\tgetMaxPrecision: getMaxPrecision,\n\n\t\tprecision: precision,\n\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\tmaxTextures: maxTextures,\n\t\tmaxVertexTextures: maxVertexTextures,\n\t\tmaxTextureSize: maxTextureSize,\n\t\tmaxCubemapSize: maxCubemapSize,\n\n\t\tmaxAttributes: maxAttributes,\n\t\tmaxVertexUniforms: maxVertexUniforms,\n\t\tmaxVaryings: maxVaryings,\n\t\tmaxFragmentUniforms: maxFragmentUniforms,\n\n\t\tvertexTextures: vertexTextures,\n\t\tfloatFragmentTextures: floatFragmentTextures,\n\t\tfloatVertexTextures: floatVertexTextures,\n\n\t\tmaxSamples: maxSamples\n\n\t};\n\n}\n\nfunction WebGLClipping( properties ) {\n\n\tconst scope = this;\n\n\tlet globalState = null,\n\t\tnumGlobalPlanes = 0,\n\t\tlocalClippingEnabled = false,\n\t\trenderingShadows = false;\n\n\tconst plane = new Plane(),\n\t\tviewNormalMatrix = new Matrix3(),\n\n\t\tuniform = { value: null, needsUpdate: false };\n\n\tthis.uniform = uniform;\n\tthis.numPlanes = 0;\n\tthis.numIntersection = 0;\n\n\tthis.init = function ( planes, enableLocalClipping ) {\n\n\t\tconst enabled =\n\t\t\tplanes.length !== 0 ||\n\t\t\tenableLocalClipping ||\n\t\t\t// enable state of previous frame - the clipping code has to\n\t\t\t// run another frame in order to reset the state:\n\t\t\tnumGlobalPlanes !== 0 ||\n\t\t\tlocalClippingEnabled;\n\n\t\tlocalClippingEnabled = enableLocalClipping;\n\n\t\tnumGlobalPlanes = planes.length;\n\n\t\treturn enabled;\n\n\t};\n\n\tthis.beginShadows = function () {\n\n\t\trenderingShadows = true;\n\t\tprojectPlanes( null );\n\n\t};\n\n\tthis.endShadows = function () {\n\n\t\trenderingShadows = false;\n\n\t};\n\n\tthis.setGlobalState = function ( planes, camera ) {\n\n\t\tglobalState = projectPlanes( planes, camera, 0 );\n\n\t};\n\n\tthis.setState = function ( material, camera, useCache ) {\n\n\t\tconst planes = material.clippingPlanes,\n\t\t\tclipIntersection = material.clipIntersection,\n\t\t\tclipShadows = material.clipShadows;\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tif ( ! localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && ! clipShadows ) {\n\n\t\t\t// there's no local clipping\n\n\t\t\tif ( renderingShadows ) {\n\n\t\t\t\t// there's no global clipping\n\n\t\t\t\tprojectPlanes( null );\n\n\t\t\t} else {\n\n\t\t\t\tresetGlobalState();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst nGlobal = renderingShadows ? 0 : numGlobalPlanes,\n\t\t\t\tlGlobal = nGlobal * 4;\n\n\t\t\tlet dstArray = materialProperties.clippingState || null;\n\n\t\t\tuniform.value = dstArray; // ensure unique state\n\n\t\t\tdstArray = projectPlanes( planes, camera, lGlobal, useCache );\n\n\t\t\tfor ( let i = 0; i !== lGlobal; ++ i ) {\n\n\t\t\t\tdstArray[ i ] = globalState[ i ];\n\n\t\t\t}\n\n\t\t\tmaterialProperties.clippingState = dstArray;\n\t\t\tthis.numIntersection = clipIntersection ? this.numPlanes : 0;\n\t\t\tthis.numPlanes += nGlobal;\n\n\t\t}\n\n\n\t};\n\n\tfunction resetGlobalState() {\n\n\t\tif ( uniform.value !== globalState ) {\n\n\t\t\tuniform.value = globalState;\n\t\t\tuniform.needsUpdate = numGlobalPlanes > 0;\n\n\t\t}\n\n\t\tscope.numPlanes = numGlobalPlanes;\n\t\tscope.numIntersection = 0;\n\n\t}\n\n\tfunction projectPlanes( planes, camera, dstOffset, skipTransform ) {\n\n\t\tconst nPlanes = planes !== null ? planes.length : 0;\n\t\tlet dstArray = null;\n\n\t\tif ( nPlanes !== 0 ) {\n\n\t\t\tdstArray = uniform.value;\n\n\t\t\tif ( skipTransform !== true || dstArray === null ) {\n\n\t\t\t\tconst flatSize = dstOffset + nPlanes * 4,\n\t\t\t\t\tviewMatrix = camera.matrixWorldInverse;\n\n\t\t\t\tviewNormalMatrix.getNormalMatrix( viewMatrix );\n\n\t\t\t\tif ( dstArray === null || dstArray.length < flatSize ) {\n\n\t\t\t\t\tdstArray = new Float32Array( flatSize );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0, i4 = dstOffset; i !== nPlanes; ++ i, i4 += 4 ) {\n\n\t\t\t\t\tplane.copy( planes[ i ] ).applyMatrix4( viewMatrix, viewNormalMatrix );\n\n\t\t\t\t\tplane.normal.toArray( dstArray, i4 );\n\t\t\t\t\tdstArray[ i4 + 3 ] = plane.constant;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tuniform.value = dstArray;\n\t\t\tuniform.needsUpdate = true;\n\n\t\t}\n\n\t\tscope.numPlanes = nPlanes;\n\t\tscope.numIntersection = 0;\n\n\t\treturn dstArray;\n\n\t}\n\n}\n\nfunction WebGLCubeMaps( renderer ) {\n\n\tlet cubemaps = new WeakMap();\n\n\tfunction mapTextureMapping( texture, mapping ) {\n\n\t\tif ( mapping === EquirectangularReflectionMapping ) {\n\n\t\t\ttexture.mapping = CubeReflectionMapping;\n\n\t\t} else if ( mapping === EquirectangularRefractionMapping ) {\n\n\t\t\ttexture.mapping = CubeRefractionMapping;\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction get( texture ) {\n\n\t\tif ( texture && texture.isTexture && texture.isRenderTargetTexture === false ) {\n\n\t\t\tconst mapping = texture.mapping;\n\n\t\t\tif ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ) {\n\n\t\t\t\tif ( cubemaps.has( texture ) ) {\n\n\t\t\t\t\tconst cubemap = cubemaps.get( texture ).texture;\n\t\t\t\t\treturn mapTextureMapping( cubemap, texture.mapping );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst image = texture.image;\n\n\t\t\t\t\tif ( image && image.height > 0 ) {\n\n\t\t\t\t\t\tconst renderTarget = new WebGLCubeRenderTarget( image.height / 2 );\n\t\t\t\t\t\trenderTarget.fromEquirectangularTexture( renderer, texture );\n\t\t\t\t\t\tcubemaps.set( texture, renderTarget );\n\n\t\t\t\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\t\t\t\treturn mapTextureMapping( renderTarget.texture, texture.mapping );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tconst cubemap = cubemaps.get( texture );\n\n\t\tif ( cubemap !== undefined ) {\n\n\t\t\tcubemaps.delete( texture );\n\t\t\tcubemap.dispose();\n\n\t\t}\n\n\t}\n\n\tfunction dispose() {\n\n\t\tcubemaps = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nclass OrthographicCamera extends Camera {\n\n\tconstructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.isOrthographicCamera = true;\n\n\t\tthis.type = 'OrthographicCamera';\n\n\t\tthis.zoom = 1;\n\t\tthis.view = null;\n\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t\tthis.bottom = bottom;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.left = source.left;\n\t\tthis.right = source.right;\n\t\tthis.top = source.top;\n\t\tthis.bottom = source.bottom;\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\n\t\tthis.zoom = source.zoom;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\treturn this;\n\n\t}\n\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst dx = ( this.right - this.left ) / ( 2 * this.zoom );\n\t\tconst dy = ( this.top - this.bottom ) / ( 2 * this.zoom );\n\t\tconst cx = ( this.right + this.left ) / 2;\n\t\tconst cy = ( this.top + this.bottom ) / 2;\n\n\t\tlet left = cx - dx;\n\t\tlet right = cx + dx;\n\t\tlet top = cy + dy;\n\t\tlet bottom = cy - dy;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst scaleW = ( this.right - this.left ) / this.view.fullWidth / this.zoom;\n\t\t\tconst scaleH = ( this.top - this.bottom ) / this.view.fullHeight / this.zoom;\n\n\t\t\tleft += scaleW * this.view.offsetX;\n\t\t\tright = left + scaleW * this.view.width;\n\t\t\ttop -= scaleH * this.view.offsetY;\n\t\t\tbottom = top - scaleH * this.view.height;\n\n\t\t}\n\n\t\tthis.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.zoom = this.zoom;\n\t\tdata.object.left = this.left;\n\t\tdata.object.right = this.right;\n\t\tdata.object.top = this.top;\n\t\tdata.object.bottom = this.bottom;\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst LOD_MIN = 4;\n\n// The standard deviations (radians) associated with the extra mips. These are\n// chosen to approximate a Trowbridge-Reitz distribution function times the\n// geometric shadowing function. These sigma values squared must match the\n// variance #defines in cube_uv_reflection_fragment.glsl.js.\nconst EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ];\n\n// The maximum length of the blur for loop. Smaller sigmas will use fewer\n// samples and exit early, but not recompile the shader.\nconst MAX_SAMPLES = 20;\n\nconst _flatCamera = /*@__PURE__*/ new OrthographicCamera();\nconst _clearColor = /*@__PURE__*/ new Color();\nlet _oldTarget = null;\nlet _oldActiveCubeFace = 0;\nlet _oldActiveMipmapLevel = 0;\n\n// Golden Ratio\nconst PHI = ( 1 + Math.sqrt( 5 ) ) / 2;\nconst INV_PHI = 1 / PHI;\n\n// Vertices of a dodecahedron (except the opposites, which represent the\n// same axis), used as axis directions evenly spread on a sphere.\nconst _axisDirections = [\n\t/*@__PURE__*/ new Vector3( 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ),\n\t/*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( - INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( PHI, INV_PHI, 0 ),\n\t/*@__PURE__*/ new Vector3( - PHI, INV_PHI, 0 ) ];\n\n/**\n * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n * (PMREM) from a cubeMap environment texture. This allows different levels of\n * blur to be quickly accessed based on material roughness. It is packed into a\n * special CubeUV format that allows us to perform custom interpolation so that\n * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n * higher roughness levels. In this way we maintain resolution to smoothly\n * interpolate diffuse lighting while limiting sampling computation.\n *\n * Paper: Fast, Accurate Image-Based Lighting\n * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view\n*/\n\nclass PMREMGenerator {\n\n\tconstructor( renderer ) {\n\n\t\tthis._renderer = renderer;\n\t\tthis._pingPongRenderTarget = null;\n\n\t\tthis._lodMax = 0;\n\t\tthis._cubeSize = 0;\n\t\tthis._lodPlanes = [];\n\t\tthis._sizeLods = [];\n\t\tthis._sigmas = [];\n\n\t\tthis._blurMaterial = null;\n\t\tthis._cubemapMaterial = null;\n\t\tthis._equirectMaterial = null;\n\n\t\tthis._compileMaterial( this._blurMaterial );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t * is placed at the origin).\n\t */\n\tfromScene( scene, sigma = 0, near = 0.1, far = 100 ) {\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\t\t_oldActiveCubeFace = this._renderer.getActiveCubeFace();\n\t\t_oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel();\n\n\t\tthis._setSize( 256 );\n\n\t\tconst cubeUVRenderTarget = this._allocateTargets();\n\t\tcubeUVRenderTarget.depthBuffer = true;\n\n\t\tthis._sceneToCubeUV( scene, near, far, cubeUVRenderTarget );\n\n\t\tif ( sigma > 0 ) {\n\n\t\t\tthis._blur( cubeUVRenderTarget, 0, 0, sigma );\n\n\t\t}\n\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t * or HDR. The ideal input image size is 1k (1024 x 512),\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromEquirectangular( equirectangular, renderTarget = null ) {\n\n\t\treturn this._fromTexture( equirectangular, renderTarget );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t * or HDR. The ideal input cube size is 256 x 256,\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromCubemap( cubemap, renderTarget = null ) {\n\n\t\treturn this._fromTexture( cubemap, renderTarget );\n\n\t}\n\n\t/**\n\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileCubemapShader() {\n\n\t\tif ( this._cubemapMaterial === null ) {\n\n\t\t\tthis._cubemapMaterial = _getCubemapMaterial();\n\t\t\tthis._compileMaterial( this._cubemapMaterial );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileEquirectangularShader() {\n\n\t\tif ( this._equirectMaterial === null ) {\n\n\t\t\tthis._equirectMaterial = _getEquirectMaterial();\n\t\t\tthis._compileMaterial( this._equirectMaterial );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t * one of them will cause any others to also become unusable.\n\t */\n\tdispose() {\n\n\t\tthis._dispose();\n\n\t\tif ( this._cubemapMaterial !== null ) this._cubemapMaterial.dispose();\n\t\tif ( this._equirectMaterial !== null ) this._equirectMaterial.dispose();\n\n\t}\n\n\t// private interface\n\n\t_setSize( cubeSize ) {\n\n\t\tthis._lodMax = Math.floor( Math.log2( cubeSize ) );\n\t\tthis._cubeSize = Math.pow( 2, this._lodMax );\n\n\t}\n\n\t_dispose() {\n\n\t\tif ( this._blurMaterial !== null ) this._blurMaterial.dispose();\n\n\t\tif ( this._pingPongRenderTarget !== null ) this._pingPongRenderTarget.dispose();\n\n\t\tfor ( let i = 0; i < this._lodPlanes.length; i ++ ) {\n\n\t\t\tthis._lodPlanes[ i ].dispose();\n\n\t\t}\n\n\t}\n\n\t_cleanup( outputTarget ) {\n\n\t\tthis._renderer.setRenderTarget( _oldTarget, _oldActiveCubeFace, _oldActiveMipmapLevel );\n\t\toutputTarget.scissorTest = false;\n\t\t_setViewport( outputTarget, 0, 0, outputTarget.width, outputTarget.height );\n\n\t}\n\n\t_fromTexture( texture, renderTarget ) {\n\n\t\tif ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ) {\n\n\t\t\tthis._setSize( texture.image.length === 0 ? 16 : ( texture.image[ 0 ].width || texture.image[ 0 ].image.width ) );\n\n\t\t} else { // Equirectangular\n\n\t\t\tthis._setSize( texture.image.width / 4 );\n\n\t\t}\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\t\t_oldActiveCubeFace = this._renderer.getActiveCubeFace();\n\t\t_oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel();\n\n\t\tconst cubeUVRenderTarget = renderTarget || this._allocateTargets();\n\t\tthis._textureToCubeUV( texture, cubeUVRenderTarget );\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_allocateTargets() {\n\n\t\tconst width = 3 * Math.max( this._cubeSize, 16 * 7 );\n\t\tconst height = 4 * this._cubeSize;\n\n\t\tconst params = {\n\t\t\tmagFilter: LinearFilter,\n\t\t\tminFilter: LinearFilter,\n\t\t\tgenerateMipmaps: false,\n\t\t\ttype: HalfFloatType,\n\t\t\tformat: RGBAFormat,\n\t\t\tcolorSpace: LinearSRGBColorSpace,\n\t\t\tdepthBuffer: false\n\t\t};\n\n\t\tconst cubeUVRenderTarget = _createRenderTarget( width, height, params );\n\n\t\tif ( this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== width || this._pingPongRenderTarget.height !== height ) {\n\n\t\t\tif ( this._pingPongRenderTarget !== null ) {\n\n\t\t\t\tthis._dispose();\n\n\t\t\t}\n\n\t\t\tthis._pingPongRenderTarget = _createRenderTarget( width, height, params );\n\n\t\t\tconst { _lodMax } = this;\n\t\t\t( { sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = _createPlanes( _lodMax ) );\n\n\t\t\tthis._blurMaterial = _getBlurShader( _lodMax, width, height );\n\n\t\t}\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_compileMaterial( material ) {\n\n\t\tconst tmpMesh = new Mesh( this._lodPlanes[ 0 ], material );\n\t\tthis._renderer.compile( tmpMesh, _flatCamera );\n\n\t}\n\n\t_sceneToCubeUV( scene, near, far, cubeUVRenderTarget ) {\n\n\t\tconst fov = 90;\n\t\tconst aspect = 1;\n\t\tconst cubeCamera = new PerspectiveCamera( fov, aspect, near, far );\n\t\tconst upSign = [ 1, - 1, 1, 1, 1, 1 ];\n\t\tconst forwardSign = [ 1, 1, 1, - 1, - 1, - 1 ];\n\t\tconst renderer = this._renderer;\n\n\t\tconst originalAutoClear = renderer.autoClear;\n\t\tconst toneMapping = renderer.toneMapping;\n\t\trenderer.getClearColor( _clearColor );\n\n\t\trenderer.toneMapping = NoToneMapping;\n\t\trenderer.autoClear = false;\n\n\t\tconst backgroundMaterial = new MeshBasicMaterial( {\n\t\t\tname: 'PMREM.Background',\n\t\t\tside: BackSide,\n\t\t\tdepthWrite: false,\n\t\t\tdepthTest: false,\n\t\t} );\n\n\t\tconst backgroundBox = new Mesh( new BoxGeometry(), backgroundMaterial );\n\n\t\tlet useSolidColor = false;\n\t\tconst background = scene.background;\n\n\t\tif ( background ) {\n\n\t\t\tif ( background.isColor ) {\n\n\t\t\t\tbackgroundMaterial.color.copy( background );\n\t\t\t\tscene.background = null;\n\t\t\t\tuseSolidColor = true;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tbackgroundMaterial.color.copy( _clearColor );\n\t\t\tuseSolidColor = true;\n\n\t\t}\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst col = i % 3;\n\n\t\t\tif ( col === 0 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( forwardSign[ i ], 0, 0 );\n\n\t\t\t} else if ( col === 1 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, 0, upSign[ i ] );\n\t\t\t\tcubeCamera.lookAt( 0, forwardSign[ i ], 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( 0, 0, forwardSign[ i ] );\n\n\t\t\t}\n\n\t\t\tconst size = this._cubeSize;\n\n\t\t\t_setViewport( cubeUVRenderTarget, col * size, i > 2 ? size : 0, size, size );\n\n\t\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\n\t\t\tif ( useSolidColor ) {\n\n\t\t\t\trenderer.render( backgroundBox, cubeCamera );\n\n\t\t\t}\n\n\t\t\trenderer.render( scene, cubeCamera );\n\n\t\t}\n\n\t\tbackgroundBox.geometry.dispose();\n\t\tbackgroundBox.material.dispose();\n\n\t\trenderer.toneMapping = toneMapping;\n\t\trenderer.autoClear = originalAutoClear;\n\t\tscene.background = background;\n\n\t}\n\n\t_textureToCubeUV( texture, cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\n\t\tconst isCubeTexture = ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping );\n\n\t\tif ( isCubeTexture ) {\n\n\t\t\tif ( this._cubemapMaterial === null ) {\n\n\t\t\t\tthis._cubemapMaterial = _getCubemapMaterial();\n\n\t\t\t}\n\n\t\t\tthis._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? - 1 : 1;\n\n\t\t} else {\n\n\t\t\tif ( this._equirectMaterial === null ) {\n\n\t\t\t\tthis._equirectMaterial = _getEquirectMaterial();\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst material = isCubeTexture ? this._cubemapMaterial : this._equirectMaterial;\n\t\tconst mesh = new Mesh( this._lodPlanes[ 0 ], material );\n\n\t\tconst uniforms = material.uniforms;\n\n\t\tuniforms[ 'envMap' ].value = texture;\n\n\t\tconst size = this._cubeSize;\n\n\t\t_setViewport( cubeUVRenderTarget, 0, 0, 3 * size, 2 * size );\n\n\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\t\trenderer.render( mesh, _flatCamera );\n\n\t}\n\n\t_applyPMREM( cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst autoClear = renderer.autoClear;\n\t\trenderer.autoClear = false;\n\n\t\tfor ( let i = 1; i < this._lodPlanes.length; i ++ ) {\n\n\t\t\tconst sigma = Math.sqrt( this._sigmas[ i ] * this._sigmas[ i ] - this._sigmas[ i - 1 ] * this._sigmas[ i - 1 ] );\n\n\t\t\tconst poleAxis = _axisDirections[ ( i - 1 ) % _axisDirections.length ];\n\n\t\t\tthis._blur( cubeUVRenderTarget, i - 1, i, sigma, poleAxis );\n\n\t\t}\n\n\t\trenderer.autoClear = autoClear;\n\n\t}\n\n\t/**\n\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t * accurate at the poles, but still does a decent job.\n\t */\n\t_blur( cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis ) {\n\n\t\tconst pingPongRenderTarget = this._pingPongRenderTarget;\n\n\t\tthis._halfBlur(\n\t\t\tcubeUVRenderTarget,\n\t\t\tpingPongRenderTarget,\n\t\t\tlodIn,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'latitudinal',\n\t\t\tpoleAxis );\n\n\t\tthis._halfBlur(\n\t\t\tpingPongRenderTarget,\n\t\t\tcubeUVRenderTarget,\n\t\t\tlodOut,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'longitudinal',\n\t\t\tpoleAxis );\n\n\t}\n\n\t_halfBlur( targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst blurMaterial = this._blurMaterial;\n\n\t\tif ( direction !== 'latitudinal' && direction !== 'longitudinal' ) {\n\n\t\t\tconsole.error(\n\t\t\t\t'blur direction must be either latitudinal or longitudinal!' );\n\n\t\t}\n\n\t\t// Number of standard deviations at which to cut off the discrete approximation.\n\t\tconst STANDARD_DEVIATIONS = 3;\n\n\t\tconst blurMesh = new Mesh( this._lodPlanes[ lodOut ], blurMaterial );\n\t\tconst blurUniforms = blurMaterial.uniforms;\n\n\t\tconst pixels = this._sizeLods[ lodIn ] - 1;\n\t\tconst radiansPerPixel = isFinite( sigmaRadians ) ? Math.PI / ( 2 * pixels ) : 2 * Math.PI / ( 2 * MAX_SAMPLES - 1 );\n\t\tconst sigmaPixels = sigmaRadians / radiansPerPixel;\n\t\tconst samples = isFinite( sigmaRadians ) ? 1 + Math.floor( STANDARD_DEVIATIONS * sigmaPixels ) : MAX_SAMPLES;\n\n\t\tif ( samples > MAX_SAMPLES ) {\n\n\t\t\tconsole.warn( `sigmaRadians, ${\n\t\t\t\tsigmaRadians}, is too large and will clip, as it requested ${\n\t\t\t\tsamples} samples when the maximum is set to ${MAX_SAMPLES}` );\n\n\t\t}\n\n\t\tconst weights = [];\n\t\tlet sum = 0;\n\n\t\tfor ( let i = 0; i < MAX_SAMPLES; ++ i ) {\n\n\t\t\tconst x = i / sigmaPixels;\n\t\t\tconst weight = Math.exp( - x * x / 2 );\n\t\t\tweights.push( weight );\n\n\t\t\tif ( i === 0 ) {\n\n\t\t\t\tsum += weight;\n\n\t\t\t} else if ( i < samples ) {\n\n\t\t\t\tsum += 2 * weight;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let i = 0; i < weights.length; i ++ ) {\n\n\t\t\tweights[ i ] = weights[ i ] / sum;\n\n\t\t}\n\n\t\tblurUniforms[ 'envMap' ].value = targetIn.texture;\n\t\tblurUniforms[ 'samples' ].value = samples;\n\t\tblurUniforms[ 'weights' ].value = weights;\n\t\tblurUniforms[ 'latitudinal' ].value = direction === 'latitudinal';\n\n\t\tif ( poleAxis ) {\n\n\t\t\tblurUniforms[ 'poleAxis' ].value = poleAxis;\n\n\t\t}\n\n\t\tconst { _lodMax } = this;\n\t\tblurUniforms[ 'dTheta' ].value = radiansPerPixel;\n\t\tblurUniforms[ 'mipInt' ].value = _lodMax - lodIn;\n\n\t\tconst outputSize = this._sizeLods[ lodOut ];\n\t\tconst x = 3 * outputSize * ( lodOut > _lodMax - LOD_MIN ? lodOut - _lodMax + LOD_MIN : 0 );\n\t\tconst y = 4 * ( this._cubeSize - outputSize );\n\n\t\t_setViewport( targetOut, x, y, 3 * outputSize, 2 * outputSize );\n\t\trenderer.setRenderTarget( targetOut );\n\t\trenderer.render( blurMesh, _flatCamera );\n\n\t}\n\n}\n\n\n\nfunction _createPlanes( lodMax ) {\n\n\tconst lodPlanes = [];\n\tconst sizeLods = [];\n\tconst sigmas = [];\n\n\tlet lod = lodMax;\n\n\tconst totalLods = lodMax - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length;\n\n\tfor ( let i = 0; i < totalLods; i ++ ) {\n\n\t\tconst sizeLod = Math.pow( 2, lod );\n\t\tsizeLods.push( sizeLod );\n\t\tlet sigma = 1.0 / sizeLod;\n\n\t\tif ( i > lodMax - LOD_MIN ) {\n\n\t\t\tsigma = EXTRA_LOD_SIGMA[ i - lodMax + LOD_MIN - 1 ];\n\n\t\t} else if ( i === 0 ) {\n\n\t\t\tsigma = 0;\n\n\t\t}\n\n\t\tsigmas.push( sigma );\n\n\t\tconst texelSize = 1.0 / ( sizeLod - 2 );\n\t\tconst min = - texelSize;\n\t\tconst max = 1 + texelSize;\n\t\tconst uv1 = [ min, min, max, min, max, max, min, min, max, max, min, max ];\n\n\t\tconst cubeFaces = 6;\n\t\tconst vertices = 6;\n\t\tconst positionSize = 3;\n\t\tconst uvSize = 2;\n\t\tconst faceIndexSize = 1;\n\n\t\tconst position = new Float32Array( positionSize * vertices * cubeFaces );\n\t\tconst uv = new Float32Array( uvSize * vertices * cubeFaces );\n\t\tconst faceIndex = new Float32Array( faceIndexSize * vertices * cubeFaces );\n\n\t\tfor ( let face = 0; face < cubeFaces; face ++ ) {\n\n\t\t\tconst x = ( face % 3 ) * 2 / 3 - 1;\n\t\t\tconst y = face > 2 ? 0 : - 1;\n\t\t\tconst coordinates = [\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y + 1, 0\n\t\t\t];\n\t\t\tposition.set( coordinates, positionSize * vertices * face );\n\t\t\tuv.set( uv1, uvSize * vertices * face );\n\t\t\tconst fill = [ face, face, face, face, face, face ];\n\t\t\tfaceIndex.set( fill, faceIndexSize * vertices * face );\n\n\t\t}\n\n\t\tconst planes = new BufferGeometry();\n\t\tplanes.setAttribute( 'position', new BufferAttribute( position, positionSize ) );\n\t\tplanes.setAttribute( 'uv', new BufferAttribute( uv, uvSize ) );\n\t\tplanes.setAttribute( 'faceIndex', new BufferAttribute( faceIndex, faceIndexSize ) );\n\t\tlodPlanes.push( planes );\n\n\t\tif ( lod > LOD_MIN ) {\n\n\t\t\tlod --;\n\n\t\t}\n\n\t}\n\n\treturn { lodPlanes, sizeLods, sigmas };\n\n}\n\nfunction _createRenderTarget( width, height, params ) {\n\n\tconst cubeUVRenderTarget = new WebGLRenderTarget( width, height, params );\n\tcubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;\n\tcubeUVRenderTarget.texture.name = 'PMREM.cubeUv';\n\tcubeUVRenderTarget.scissorTest = true;\n\treturn cubeUVRenderTarget;\n\n}\n\nfunction _setViewport( target, x, y, width, height ) {\n\n\ttarget.viewport.set( x, y, width, height );\n\ttarget.scissor.set( x, y, width, height );\n\n}\n\nfunction _getBlurShader( lodMax, width, height ) {\n\n\tconst weights = new Float32Array( MAX_SAMPLES );\n\tconst poleAxis = new Vector3( 0, 1, 0 );\n\tconst shaderMaterial = new ShaderMaterial( {\n\n\t\tname: 'SphericalGaussianBlur',\n\n\t\tdefines: {\n\t\t\t'n': MAX_SAMPLES,\n\t\t\t'CUBEUV_TEXEL_WIDTH': 1.0 / width,\n\t\t\t'CUBEUV_TEXEL_HEIGHT': 1.0 / height,\n\t\t\t'CUBEUV_MAX_MIP': `${lodMax}.0`,\n\t\t},\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'samples': { value: 1 },\n\t\t\t'weights': { value: weights },\n\t\t\t'latitudinal': { value: false },\n\t\t\t'dTheta': { value: 0 },\n\t\t\t'mipInt': { value: 0 },\n\t\t\t'poleAxis': { value: poleAxis }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getEquirectMaterial() {\n\n\treturn new ShaderMaterial( {\n\n\t\tname: 'EquirectangularToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n}\n\nfunction _getCubemapMaterial() {\n\n\treturn new ShaderMaterial( {\n\n\t\tname: 'CubemapToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'flipEnvMap': { value: - 1 }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n}\n\nfunction _getCommonVertexShader() {\n\n\treturn /* glsl */`\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`;\n\n}\n\nfunction WebGLCubeUVMaps( renderer ) {\n\n\tlet cubeUVmaps = new WeakMap();\n\n\tlet pmremGenerator = null;\n\n\tfunction get( texture ) {\n\n\t\tif ( texture && texture.isTexture ) {\n\n\t\t\tconst mapping = texture.mapping;\n\n\t\t\tconst isEquirectMap = ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping );\n\t\t\tconst isCubeMap = ( mapping === CubeReflectionMapping || mapping === CubeRefractionMapping );\n\n\t\t\t// equirect/cube map to cubeUV conversion\n\n\t\t\tif ( isEquirectMap || isCubeMap ) {\n\n\t\t\t\tif ( texture.isRenderTargetTexture && texture.needsPMREMUpdate === true ) {\n\n\t\t\t\t\ttexture.needsPMREMUpdate = false;\n\n\t\t\t\t\tlet renderTarget = cubeUVmaps.get( texture );\n\n\t\t\t\t\tif ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer );\n\n\t\t\t\t\trenderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture, renderTarget ) : pmremGenerator.fromCubemap( texture, renderTarget );\n\t\t\t\t\tcubeUVmaps.set( texture, renderTarget );\n\n\t\t\t\t\treturn renderTarget.texture;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( cubeUVmaps.has( texture ) ) {\n\n\t\t\t\t\t\treturn cubeUVmaps.get( texture ).texture;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst image = texture.image;\n\n\t\t\t\t\t\tif ( ( isEquirectMap && image && image.height > 0 ) || ( isCubeMap && image && isCubeTextureComplete( image ) ) ) {\n\n\t\t\t\t\t\t\tif ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer );\n\n\t\t\t\t\t\t\tconst renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture ) : pmremGenerator.fromCubemap( texture );\n\t\t\t\t\t\t\tcubeUVmaps.set( texture, renderTarget );\n\n\t\t\t\t\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\t\t\t\t\treturn renderTarget.texture;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\n\t\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction isCubeTextureComplete( image ) {\n\n\t\tlet count = 0;\n\t\tconst length = 6;\n\n\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\tif ( image[ i ] !== undefined ) count ++;\n\n\t\t}\n\n\t\treturn count === length;\n\n\n\t}\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tconst cubemapUV = cubeUVmaps.get( texture );\n\n\t\tif ( cubemapUV !== undefined ) {\n\n\t\t\tcubeUVmaps.delete( texture );\n\t\t\tcubemapUV.dispose();\n\n\t\t}\n\n\t}\n\n\tfunction dispose() {\n\n\t\tcubeUVmaps = new WeakMap();\n\n\t\tif ( pmremGenerator !== null ) {\n\n\t\t\tpmremGenerator.dispose();\n\t\t\tpmremGenerator = null;\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction WebGLExtensions( gl ) {\n\n\tconst extensions = {};\n\n\tfunction getExtension( name ) {\n\n\t\tif ( extensions[ name ] !== undefined ) {\n\n\t\t\treturn extensions[ name ];\n\n\t\t}\n\n\t\tlet extension;\n\n\t\tswitch ( name ) {\n\n\t\t\tcase 'WEBGL_depth_texture':\n\t\t\t\textension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'EXT_texture_filter_anisotropic':\n\t\t\t\textension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_s3tc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_pvrtc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\textension = gl.getExtension( name );\n\n\t\t}\n\n\t\textensions[ name ] = extension;\n\n\t\treturn extension;\n\n\t}\n\n\treturn {\n\n\t\thas: function ( name ) {\n\n\t\t\treturn getExtension( name ) !== null;\n\n\t\t},\n\n\t\tinit: function ( capabilities ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\tgetExtension( 'EXT_color_buffer_float' );\n\n\t\t\t} else {\n\n\t\t\t\tgetExtension( 'WEBGL_depth_texture' );\n\t\t\t\tgetExtension( 'OES_texture_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float_linear' );\n\t\t\t\tgetExtension( 'OES_standard_derivatives' );\n\t\t\t\tgetExtension( 'OES_element_index_uint' );\n\t\t\t\tgetExtension( 'OES_vertex_array_object' );\n\t\t\t\tgetExtension( 'ANGLE_instanced_arrays' );\n\n\t\t\t}\n\n\t\t\tgetExtension( 'OES_texture_float_linear' );\n\t\t\tgetExtension( 'EXT_color_buffer_half_float' );\n\t\t\tgetExtension( 'WEBGL_multisampled_render_to_texture' );\n\n\t\t},\n\n\t\tget: function ( name ) {\n\n\t\t\tconst extension = getExtension( name );\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' );\n\n\t\t\t}\n\n\t\t\treturn extension;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLGeometries( gl, attributes, info, bindingStates ) {\n\n\tconst geometries = {};\n\tconst wireframeAttributes = new WeakMap();\n\n\tfunction onGeometryDispose( event ) {\n\n\t\tconst geometry = event.target;\n\n\t\tif ( geometry.index !== null ) {\n\n\t\t\tattributes.remove( geometry.index );\n\n\t\t}\n\n\t\tfor ( const name in geometry.attributes ) {\n\n\t\t\tattributes.remove( geometry.attributes[ name ] );\n\n\t\t}\n\n\t\tfor ( const name in geometry.morphAttributes ) {\n\n\t\t\tconst array = geometry.morphAttributes[ name ];\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tattributes.remove( array[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.removeEventListener( 'dispose', onGeometryDispose );\n\n\t\tdelete geometries[ geometry.id ];\n\n\t\tconst attribute = wireframeAttributes.get( geometry );\n\n\t\tif ( attribute ) {\n\n\t\t\tattributes.remove( attribute );\n\t\t\twireframeAttributes.delete( geometry );\n\n\t\t}\n\n\t\tbindingStates.releaseStatesOfGeometry( geometry );\n\n\t\tif ( geometry.isInstancedBufferGeometry === true ) {\n\n\t\t\tdelete geometry._maxInstanceCount;\n\n\t\t}\n\n\t\t//\n\n\t\tinfo.memory.geometries --;\n\n\t}\n\n\tfunction get( object, geometry ) {\n\n\t\tif ( geometries[ geometry.id ] === true ) return geometry;\n\n\t\tgeometry.addEventListener( 'dispose', onGeometryDispose );\n\n\t\tgeometries[ geometry.id ] = true;\n\n\t\tinfo.memory.geometries ++;\n\n\t\treturn geometry;\n\n\t}\n\n\tfunction update( geometry ) {\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates.\n\n\t\tfor ( const name in geometryAttributes ) {\n\n\t\t\tattributes.update( geometryAttributes[ name ], gl.ARRAY_BUFFER );\n\n\t\t}\n\n\t\t// morph targets\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = morphAttributes[ name ];\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tattributes.update( array[ i ], gl.ARRAY_BUFFER );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateWireframeAttribute( geometry ) {\n\n\t\tconst indices = [];\n\n\t\tconst geometryIndex = geometry.index;\n\t\tconst geometryPosition = geometry.attributes.position;\n\t\tlet version = 0;\n\n\t\tif ( geometryIndex !== null ) {\n\n\t\t\tconst array = geometryIndex.array;\n\t\t\tversion = geometryIndex.version;\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i += 3 ) {\n\n\t\t\t\tconst a = array[ i + 0 ];\n\t\t\t\tconst b = array[ i + 1 ];\n\t\t\t\tconst c = array[ i + 2 ];\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t} else if ( geometryPosition !== undefined ) {\n\n\t\t\tconst array = geometryPosition.array;\n\t\t\tversion = geometryPosition.version;\n\n\t\t\tfor ( let i = 0, l = ( array.length / 3 ) - 1; i < l; i += 3 ) {\n\n\t\t\t\tconst a = i + 0;\n\t\t\t\tconst b = i + 1;\n\t\t\t\tconst c = i + 2;\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst attribute = new ( arrayNeedsUint32( indices ) ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );\n\t\tattribute.version = version;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates\n\n\t\t//\n\n\t\tconst previousAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( previousAttribute ) attributes.remove( previousAttribute );\n\n\t\t//\n\n\t\twireframeAttributes.set( geometry, attribute );\n\n\t}\n\n\tfunction getWireframeAttribute( geometry ) {\n\n\t\tconst currentAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( currentAttribute ) {\n\n\t\t\tconst geometryIndex = geometry.index;\n\n\t\t\tif ( geometryIndex !== null ) {\n\n\t\t\t\t// if the attribute is obsolete, create a new one\n\n\t\t\t\tif ( currentAttribute.version < geometryIndex.version ) {\n\n\t\t\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t}\n\n\t\treturn wireframeAttributes.get( geometry );\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tupdate: update,\n\n\t\tgetWireframeAttribute: getWireframeAttribute\n\n\t};\n\n}\n\nfunction WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tlet type, bytesPerElement;\n\n\tfunction setIndex( value ) {\n\n\t\ttype = value.type;\n\t\tbytesPerElement = value.bytesPerElement;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawElements( mode, count, type, start * bytesPerElement );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawElementsInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawElementsInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, count, type, start * bytesPerElement, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.setIndex = setIndex;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLInfo( gl ) {\n\n\tconst memory = {\n\t\tgeometries: 0,\n\t\ttextures: 0\n\t};\n\n\tconst render = {\n\t\tframe: 0,\n\t\tcalls: 0,\n\t\ttriangles: 0,\n\t\tpoints: 0,\n\t\tlines: 0\n\t};\n\n\tfunction update( count, mode, instanceCount ) {\n\n\t\trender.calls ++;\n\n\t\tswitch ( mode ) {\n\n\t\t\tcase gl.TRIANGLES:\n\t\t\t\trender.triangles += instanceCount * ( count / 3 );\n\t\t\t\tbreak;\n\n\t\t\tcase gl.LINES:\n\t\t\t\trender.lines += instanceCount * ( count / 2 );\n\t\t\t\tbreak;\n\n\t\t\tcase gl.LINE_STRIP:\n\t\t\t\trender.lines += instanceCount * ( count - 1 );\n\t\t\t\tbreak;\n\n\t\t\tcase gl.LINE_LOOP:\n\t\t\t\trender.lines += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tcase gl.POINTS:\n\t\t\t\trender.points += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.error( 'THREE.WebGLInfo: Unknown draw mode:', mode );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\trender.calls = 0;\n\t\trender.triangles = 0;\n\t\trender.points = 0;\n\t\trender.lines = 0;\n\n\t}\n\n\treturn {\n\t\tmemory: memory,\n\t\trender: render,\n\t\tprograms: null,\n\t\tautoReset: true,\n\t\treset: reset,\n\t\tupdate: update\n\t};\n\n}\n\nfunction numericalSort( a, b ) {\n\n\treturn a[ 0 ] - b[ 0 ];\n\n}\n\nfunction absNumericalSort( a, b ) {\n\n\treturn Math.abs( b[ 1 ] ) - Math.abs( a[ 1 ] );\n\n}\n\nfunction WebGLMorphtargets( gl, capabilities, textures ) {\n\n\tconst influencesList = {};\n\tconst morphInfluences = new Float32Array( 8 );\n\tconst morphTextures = new WeakMap();\n\tconst morph = new Vector4();\n\n\tconst workInfluences = [];\n\n\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\tworkInfluences[ i ] = [ i, 0 ];\n\n\t}\n\n\tfunction update( object, geometry, program ) {\n\n\t\tconst objectInfluences = object.morphTargetInfluences;\n\n\t\tif ( capabilities.isWebGL2 === true ) {\n\n\t\t\t// instead of using attributes, the WebGL 2 code path encodes morph targets\n\t\t\t// into an array of data textures. Each layer represents a single morph target.\n\n\t\t\tconst morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n\t\t\tconst morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;\n\n\t\t\tlet entry = morphTextures.get( geometry );\n\n\t\t\tif ( entry === undefined || entry.count !== morphTargetsCount ) {\n\n\t\t\t\tif ( entry !== undefined ) entry.texture.dispose();\n\n\t\t\t\tconst hasMorphPosition = geometry.morphAttributes.position !== undefined;\n\t\t\t\tconst hasMorphNormals = geometry.morphAttributes.normal !== undefined;\n\t\t\t\tconst hasMorphColors = geometry.morphAttributes.color !== undefined;\n\n\t\t\t\tconst morphTargets = geometry.morphAttributes.position || [];\n\t\t\t\tconst morphNormals = geometry.morphAttributes.normal || [];\n\t\t\t\tconst morphColors = geometry.morphAttributes.color || [];\n\n\t\t\t\tlet vertexDataCount = 0;\n\n\t\t\t\tif ( hasMorphPosition === true ) vertexDataCount = 1;\n\t\t\t\tif ( hasMorphNormals === true ) vertexDataCount = 2;\n\t\t\t\tif ( hasMorphColors === true ) vertexDataCount = 3;\n\n\t\t\t\tlet width = geometry.attributes.position.count * vertexDataCount;\n\t\t\t\tlet height = 1;\n\n\t\t\t\tif ( width > capabilities.maxTextureSize ) {\n\n\t\t\t\t\theight = Math.ceil( width / capabilities.maxTextureSize );\n\t\t\t\t\twidth = capabilities.maxTextureSize;\n\n\t\t\t\t}\n\n\t\t\t\tconst buffer = new Float32Array( width * height * 4 * morphTargetsCount );\n\n\t\t\t\tconst texture = new DataArrayTexture( buffer, width, height, morphTargetsCount );\n\t\t\t\ttexture.type = FloatType;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t// fill buffer\n\n\t\t\t\tconst vertexDataStride = vertexDataCount * 4;\n\n\t\t\t\tfor ( let i = 0; i < morphTargetsCount; i ++ ) {\n\n\t\t\t\t\tconst morphTarget = morphTargets[ i ];\n\t\t\t\t\tconst morphNormal = morphNormals[ i ];\n\t\t\t\t\tconst morphColor = morphColors[ i ];\n\n\t\t\t\t\tconst offset = width * height * 4 * i;\n\n\t\t\t\t\tfor ( let j = 0; j < morphTarget.count; j ++ ) {\n\n\t\t\t\t\t\tconst stride = j * vertexDataStride;\n\n\t\t\t\t\t\tif ( hasMorphPosition === true ) {\n\n\t\t\t\t\t\t\tmorph.fromBufferAttribute( morphTarget, j );\n\n\t\t\t\t\t\t\tbuffer[ offset + stride + 0 ] = morph.x;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 1 ] = morph.y;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 2 ] = morph.z;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 3 ] = 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( hasMorphNormals === true ) {\n\n\t\t\t\t\t\t\tmorph.fromBufferAttribute( morphNormal, j );\n\n\t\t\t\t\t\t\tbuffer[ offset + stride + 4 ] = morph.x;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 5 ] = morph.y;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 6 ] = morph.z;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 7 ] = 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( hasMorphColors === true ) {\n\n\t\t\t\t\t\t\tmorph.fromBufferAttribute( morphColor, j );\n\n\t\t\t\t\t\t\tbuffer[ offset + stride + 8 ] = morph.x;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 9 ] = morph.y;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 10 ] = morph.z;\n\t\t\t\t\t\t\tbuffer[ offset + stride + 11 ] = ( morphColor.itemSize === 4 ) ? morph.w : 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tentry = {\n\t\t\t\t\tcount: morphTargetsCount,\n\t\t\t\t\ttexture: texture,\n\t\t\t\t\tsize: new Vector2( width, height )\n\t\t\t\t};\n\n\t\t\t\tmorphTextures.set( geometry, entry );\n\n\t\t\t\tfunction disposeTexture() {\n\n\t\t\t\t\ttexture.dispose();\n\n\t\t\t\t\tmorphTextures.delete( geometry );\n\n\t\t\t\t\tgeometry.removeEventListener( 'dispose', disposeTexture );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.addEventListener( 'dispose', disposeTexture );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet morphInfluencesSum = 0;\n\n\t\t\tfor ( let i = 0; i < objectInfluences.length; i ++ ) {\n\n\t\t\t\tmorphInfluencesSum += objectInfluences[ i ];\n\n\t\t\t}\n\n\t\t\tconst morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence );\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetInfluences', objectInfluences );\n\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetsTexture', entry.texture, textures );\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetsTextureSize', entry.size );\n\n\n\t\t} else {\n\n\t\t\t// When object doesn't have morph target influences defined, we treat it as a 0-length array\n\t\t\t// This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n\n\t\t\tconst length = objectInfluences === undefined ? 0 : objectInfluences.length;\n\n\t\t\tlet influences = influencesList[ geometry.id ];\n\n\t\t\tif ( influences === undefined || influences.length !== length ) {\n\n\t\t\t\t// initialise list\n\n\t\t\t\tinfluences = [];\n\n\t\t\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\t\t\tinfluences[ i ] = [ i, 0 ];\n\n\t\t\t\t}\n\n\t\t\t\tinfluencesList[ geometry.id ] = influences;\n\n\t\t\t}\n\n\t\t\t// Collect influences\n\n\t\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\t\tconst influence = influences[ i ];\n\n\t\t\t\tinfluence[ 0 ] = i;\n\t\t\t\tinfluence[ 1 ] = objectInfluences[ i ];\n\n\t\t\t}\n\n\t\t\tinfluences.sort( absNumericalSort );\n\n\t\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\t\tif ( i < length && influences[ i ][ 1 ] ) {\n\n\t\t\t\t\tworkInfluences[ i ][ 0 ] = influences[ i ][ 0 ];\n\t\t\t\t\tworkInfluences[ i ][ 1 ] = influences[ i ][ 1 ];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tworkInfluences[ i ][ 0 ] = Number.MAX_SAFE_INTEGER;\n\t\t\t\t\tworkInfluences[ i ][ 1 ] = 0;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tworkInfluences.sort( numericalSort );\n\n\t\t\tconst morphTargets = geometry.morphAttributes.position;\n\t\t\tconst morphNormals = geometry.morphAttributes.normal;\n\n\t\t\tlet morphInfluencesSum = 0;\n\n\t\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\t\tconst influence = workInfluences[ i ];\n\t\t\t\tconst index = influence[ 0 ];\n\t\t\t\tconst value = influence[ 1 ];\n\n\t\t\t\tif ( index !== Number.MAX_SAFE_INTEGER && value ) {\n\n\t\t\t\t\tif ( morphTargets && geometry.getAttribute( 'morphTarget' + i ) !== morphTargets[ index ] ) {\n\n\t\t\t\t\t\tgeometry.setAttribute( 'morphTarget' + i, morphTargets[ index ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( morphNormals && geometry.getAttribute( 'morphNormal' + i ) !== morphNormals[ index ] ) {\n\n\t\t\t\t\t\tgeometry.setAttribute( 'morphNormal' + i, morphNormals[ index ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[ i ] = value;\n\t\t\t\t\tmorphInfluencesSum += value;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( morphTargets && geometry.hasAttribute( 'morphTarget' + i ) === true ) {\n\n\t\t\t\t\t\tgeometry.deleteAttribute( 'morphTarget' + i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( morphNormals && geometry.hasAttribute( 'morphNormal' + i ) === true ) {\n\n\t\t\t\t\t\tgeometry.deleteAttribute( 'morphNormal' + i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[ i ] = 0;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// GLSL shader uses formula baseinfluence * base + sum(target * influence)\n\t\t\t// This allows us to switch between absolute morphs and relative morphs without changing shader code\n\t\t\t// When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n\t\t\tconst morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence );\n\t\t\tprogram.getUniforms().setValue( gl, 'morphTargetInfluences', morphInfluences );\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\tupdate: update\n\n\t};\n\n}\n\nfunction WebGLObjects( gl, geometries, attributes, info ) {\n\n\tlet updateMap = new WeakMap();\n\n\tfunction update( object ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\tconst geometry = object.geometry;\n\t\tconst buffergeometry = geometries.get( object, geometry );\n\n\t\t// Update once per frame\n\n\t\tif ( updateMap.get( buffergeometry ) !== frame ) {\n\n\t\t\tgeometries.update( buffergeometry );\n\n\t\t\tupdateMap.set( buffergeometry, frame );\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh ) {\n\n\t\t\tif ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) {\n\n\t\t\t\tobject.addEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\t\t}\n\n\t\t\tif ( updateMap.get( object ) !== frame ) {\n\n\t\t\t\tattributes.update( object.instanceMatrix, gl.ARRAY_BUFFER );\n\n\t\t\t\tif ( object.instanceColor !== null ) {\n\n\t\t\t\t\tattributes.update( object.instanceColor, gl.ARRAY_BUFFER );\n\n\t\t\t\t}\n\n\t\t\t\tupdateMap.set( object, frame );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\tconst skeleton = object.skeleton;\n\n\t\t\tif ( updateMap.get( skeleton ) !== frame ) {\n\n\t\t\t\tskeleton.update();\n\n\t\t\t\tupdateMap.set( skeleton, frame );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn buffergeometry;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tupdateMap = new WeakMap();\n\n\t}\n\n\tfunction onInstancedMeshDispose( event ) {\n\n\t\tconst instancedMesh = event.target;\n\n\t\tinstancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\tattributes.remove( instancedMesh.instanceMatrix );\n\n\t\tif ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor );\n\n\t}\n\n\treturn {\n\n\t\tupdate: update,\n\t\tdispose: dispose\n\n\t};\n\n}\n\n/**\n * Uniforms of a program.\n * Those form a tree structure with a special top-level container for the root,\n * which you get by calling 'new WebGLUniforms( gl, program )'.\n *\n *\n * Properties of inner nodes including the top-level container:\n *\n * .seq - array of nested uniforms\n * .map - nested uniforms by name\n *\n *\n * Methods of all nodes except the top-level container:\n *\n * .setValue( gl, value, [textures] )\n *\n * \t\tuploads a uniform value(s)\n * \tthe 'textures' parameter is needed for sampler uniforms\n *\n *\n * Static methods of the top-level container (textures factorizations):\n *\n * .upload( gl, seq, values, textures )\n *\n * \t\tsets uniforms in 'seq' to 'values[id].value'\n *\n * .seqWithValue( seq, values ) : filteredSeq\n *\n * \t\tfilters 'seq' entries with corresponding entry in values\n *\n *\n * Methods of the top-level container (textures factorizations):\n *\n * .setValue( gl, name, value, textures )\n *\n * \t\tsets uniform with name 'name' to 'value'\n *\n * .setOptional( gl, obj, prop )\n *\n * \t\tlike .set for an optional property of the object\n *\n */\n\n\nconst emptyTexture = /*@__PURE__*/ new Texture();\nconst emptyArrayTexture = /*@__PURE__*/ new DataArrayTexture();\nconst empty3dTexture = /*@__PURE__*/ new Data3DTexture();\nconst emptyCubeTexture = /*@__PURE__*/ new CubeTexture();\n\n// --- Utilities ---\n\n// Array Caches (provide typed arrays for temporary by size)\n\nconst arrayCacheF32 = [];\nconst arrayCacheI32 = [];\n\n// Float32Array caches used for uploading Matrix uniforms\n\nconst mat4array = new Float32Array( 16 );\nconst mat3array = new Float32Array( 9 );\nconst mat2array = new Float32Array( 4 );\n\n// Flattening for arrays of vectors and matrices\n\nfunction flatten( array, nBlocks, blockSize ) {\n\n\tconst firstElem = array[ 0 ];\n\n\tif ( firstElem <= 0 || firstElem > 0 ) return array;\n\t// unoptimized: ! isNaN( firstElem )\n\t// see http://jacksondunstan.com/articles/983\n\n\tconst n = nBlocks * blockSize;\n\tlet r = arrayCacheF32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Float32Array( n );\n\t\tarrayCacheF32[ n ] = r;\n\n\t}\n\n\tif ( nBlocks !== 0 ) {\n\n\t\tfirstElem.toArray( r, 0 );\n\n\t\tfor ( let i = 1, offset = 0; i !== nBlocks; ++ i ) {\n\n\t\t\toffset += blockSize;\n\t\t\tarray[ i ].toArray( r, offset );\n\n\t\t}\n\n\t}\n\n\treturn r;\n\n}\n\nfunction arraysEqual( a, b ) {\n\n\tif ( a.length !== b.length ) return false;\n\n\tfor ( let i = 0, l = a.length; i < l; i ++ ) {\n\n\t\tif ( a[ i ] !== b[ i ] ) return false;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction copyArray( a, b ) {\n\n\tfor ( let i = 0, l = b.length; i < l; i ++ ) {\n\n\t\ta[ i ] = b[ i ];\n\n\t}\n\n}\n\n// Texture unit allocation\n\nfunction allocTexUnits( textures, n ) {\n\n\tlet r = arrayCacheI32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Int32Array( n );\n\t\tarrayCacheI32[ n ] = r;\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\tr[ i ] = textures.allocateTextureUnit();\n\n\t}\n\n\treturn r;\n\n}\n\n// --- Setters ---\n\n// Note: Defining these methods externally, because they come in a bunch\n// and this way their names minify.\n\n// Single scalar\n\nfunction setValueV1f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1f( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single float vector (from flat array or THREE.VectorN)\n\nfunction setValueV2f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2f( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3f( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else if ( v.r !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.r || cache[ 1 ] !== v.g || cache[ 2 ] !== v.b ) {\n\n\t\t\tgl.uniform3f( this.addr, v.r, v.g, v.b );\n\n\t\t\tcache[ 0 ] = v.r;\n\t\t\tcache[ 1 ] = v.g;\n\t\t\tcache[ 2 ] = v.b;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4f( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n// Single matrix (from flat array or THREE.MatrixN)\n\nfunction setValueM2( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix2fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat2array.set( elements );\n\n\t\tgl.uniformMatrix2fv( this.addr, false, mat2array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM3( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix3fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat3array.set( elements );\n\n\t\tgl.uniformMatrix3fv( this.addr, false, mat3array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM4( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix4fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat4array.set( elements );\n\n\t\tgl.uniformMatrix4fv( this.addr, false, mat4array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\n// Single integer / boolean\n\nfunction setValueV1i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1i( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single integer / boolean vector (from flat array or THREE.VectorN)\n\nfunction setValueV2i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2i( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2iv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3i( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3iv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4i( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4iv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n// Single unsigned integer\n\nfunction setValueV1ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1ui( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single unsigned integer vector (from flat array or THREE.VectorN)\n\nfunction setValueV2ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2ui( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2uiv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3ui( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3uiv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4ui( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4uiv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n\n// Single texture (2D / Cube)\n\nfunction setValueT1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture2D( v || emptyTexture, unit );\n\n}\n\nfunction setValueT3D1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture3D( v || empty3dTexture, unit );\n\n}\n\nfunction setValueT6( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTextureCube( v || emptyCubeTexture, unit );\n\n}\n\nfunction setValueT2DArray1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture2DArray( v || emptyArrayTexture, unit );\n\n}\n\n// Helper to pick the right setter for the singular case\n\nfunction getSingularSetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1f; // FLOAT\n\t\tcase 0x8b50: return setValueV2f; // _VEC2\n\t\tcase 0x8b51: return setValueV3f; // _VEC3\n\t\tcase 0x8b52: return setValueV4f; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2; // _MAT2\n\t\tcase 0x8b5b: return setValueM3; // _MAT3\n\t\tcase 0x8b5c: return setValueM4; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2i; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3i; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4i; // _VEC4\n\n\t\tcase 0x1405: return setValueV1ui; // UINT\n\t\tcase 0x8dc6: return setValueV2ui; // _VEC2\n\t\tcase 0x8dc7: return setValueV3ui; // _VEC3\n\t\tcase 0x8dc8: return setValueV4ui; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1;\n\n\t\tcase 0x8b5f: // SAMPLER_3D\n\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\t\tcase 0x8dd3: // UNSIGNED_INT_SAMPLER_3D\n\t\t\treturn setValueT3D1;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6;\n\n\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW\n\t\t\treturn setValueT2DArray1;\n\n\t}\n\n}\n\n\n// Array of scalars\n\nfunction setValueV1fArray( gl, v ) {\n\n\tgl.uniform1fv( this.addr, v );\n\n}\n\n// Array of vectors (from flat array or array of THREE.VectorN)\n\nfunction setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}\n\nfunction setValueV3fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 3 );\n\n\tgl.uniform3fv( this.addr, data );\n\n}\n\nfunction setValueV4fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniform4fv( this.addr, data );\n\n}\n\n// Array of matrices (from flat array or array of THREE.MatrixN)\n\nfunction setValueM2Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniformMatrix2fv( this.addr, false, data );\n\n}\n\nfunction setValueM3Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 9 );\n\n\tgl.uniformMatrix3fv( this.addr, false, data );\n\n}\n\nfunction setValueM4Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 16 );\n\n\tgl.uniformMatrix4fv( this.addr, false, data );\n\n}\n\n// Array of integer / boolean\n\nfunction setValueV1iArray( gl, v ) {\n\n\tgl.uniform1iv( this.addr, v );\n\n}\n\n// Array of integer / boolean vectors (from flat array)\n\nfunction setValueV2iArray( gl, v ) {\n\n\tgl.uniform2iv( this.addr, v );\n\n}\n\nfunction setValueV3iArray( gl, v ) {\n\n\tgl.uniform3iv( this.addr, v );\n\n}\n\nfunction setValueV4iArray( gl, v ) {\n\n\tgl.uniform4iv( this.addr, v );\n\n}\n\n// Array of unsigned integer\n\nfunction setValueV1uiArray( gl, v ) {\n\n\tgl.uniform1uiv( this.addr, v );\n\n}\n\n// Array of unsigned integer vectors (from flat array)\n\nfunction setValueV2uiArray( gl, v ) {\n\n\tgl.uniform2uiv( this.addr, v );\n\n}\n\nfunction setValueV3uiArray( gl, v ) {\n\n\tgl.uniform3uiv( this.addr, v );\n\n}\n\nfunction setValueV4uiArray( gl, v ) {\n\n\tgl.uniform4uiv( this.addr, v );\n\n}\n\n\n// Array of textures (2D / 3D / Cube / 2DArray)\n\nfunction setValueT1Array( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTexture2D( v[ i ] || emptyTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT3DArray( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTexture3D( v[ i ] || empty3dTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT6Array( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT2DArrayArray( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tif ( ! arraysEqual( cache, units ) ) {\n\n\t\tgl.uniform1iv( this.addr, units );\n\n\t\tcopyArray( cache, units );\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.setTexture2DArray( v[ i ] || emptyArrayTexture, units[ i ] );\n\n\t}\n\n}\n\n\n// Helper to pick the right setter for a pure (bottom-level) array\n\nfunction getPureArraySetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1fArray; // FLOAT\n\t\tcase 0x8b50: return setValueV2fArray; // _VEC2\n\t\tcase 0x8b51: return setValueV3fArray; // _VEC3\n\t\tcase 0x8b52: return setValueV4fArray; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2Array; // _MAT2\n\t\tcase 0x8b5b: return setValueM3Array; // _MAT3\n\t\tcase 0x8b5c: return setValueM4Array; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4\n\n\t\tcase 0x1405: return setValueV1uiArray; // UINT\n\t\tcase 0x8dc6: return setValueV2uiArray; // _VEC2\n\t\tcase 0x8dc7: return setValueV3uiArray; // _VEC3\n\t\tcase 0x8dc8: return setValueV4uiArray; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1Array;\n\n\t\tcase 0x8b5f: // SAMPLER_3D\n\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\t\tcase 0x8dd3: // UNSIGNED_INT_SAMPLER_3D\n\t\t\treturn setValueT3DArray;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6Array;\n\n\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW\n\t\t\treturn setValueT2DArrayArray;\n\n\t}\n\n}\n\n// --- Uniform Classes ---\n\nclass SingleUniform {\n\n\tconstructor( id, activeInfo, addr ) {\n\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.setValue = getSingularSetter( activeInfo.type );\n\n\t\t// this.path = activeInfo.name; // DEBUG\n\n\t}\n\n}\n\nclass PureArrayUniform {\n\n\tconstructor( id, activeInfo, addr ) {\n\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.size = activeInfo.size;\n\t\tthis.setValue = getPureArraySetter( activeInfo.type );\n\n\t\t// this.path = activeInfo.name; // DEBUG\n\n\t}\n\n}\n\nclass StructuredUniform {\n\n\tconstructor( id ) {\n\n\t\tthis.id = id;\n\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\n\t}\n\n\tsetValue( gl, value, textures ) {\n\n\t\tconst seq = this.seq;\n\n\t\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\t\tconst u = seq[ i ];\n\t\t\tu.setValue( gl, value[ u.id ], textures );\n\n\t\t}\n\n\t}\n\n}\n\n// --- Top-level ---\n\n// Parser - builds up the property tree from the path strings\n\nconst RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g;\n\n// extracts\n// \t- the identifier (member name or array index)\n// - followed by an optional right bracket (found when array index)\n// - followed by an optional left bracket or dot (type of subscript)\n//\n// Note: These portions can be read in a non-overlapping fashion and\n// allow straightforward parsing of the hierarchy that WebGL encodes\n// in the uniform names.\n\nfunction addUniform( container, uniformObject ) {\n\n\tcontainer.seq.push( uniformObject );\n\tcontainer.map[ uniformObject.id ] = uniformObject;\n\n}\n\nfunction parseUniform( activeInfo, addr, container ) {\n\n\tconst path = activeInfo.name,\n\t\tpathLength = path.length;\n\n\t// reset RegExp object, because of the early exit of a previous run\n\tRePathPart.lastIndex = 0;\n\n\twhile ( true ) {\n\n\t\tconst match = RePathPart.exec( path ),\n\t\t\tmatchEnd = RePathPart.lastIndex;\n\n\t\tlet id = match[ 1 ];\n\t\tconst idIsIndex = match[ 2 ] === ']',\n\t\t\tsubscript = match[ 3 ];\n\n\t\tif ( idIsIndex ) id = id | 0; // convert to integer\n\n\t\tif ( subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength ) {\n\n\t\t\t// bare name or \"pure\" bottom-level array \"[0]\" suffix\n\n\t\t\taddUniform( container, subscript === undefined ?\n\t\t\t\tnew SingleUniform( id, activeInfo, addr ) :\n\t\t\t\tnew PureArrayUniform( id, activeInfo, addr ) );\n\n\t\t\tbreak;\n\n\t\t} else {\n\n\t\t\t// step into inner node / create it in case it doesn't exist\n\n\t\t\tconst map = container.map;\n\t\t\tlet next = map[ id ];\n\n\t\t\tif ( next === undefined ) {\n\n\t\t\t\tnext = new StructuredUniform( id );\n\t\t\t\taddUniform( container, next );\n\n\t\t\t}\n\n\t\t\tcontainer = next;\n\n\t\t}\n\n\t}\n\n}\n\n// Root Container\n\nclass WebGLUniforms {\n\n\tconstructor( gl, program ) {\n\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\n\t\tconst n = gl.getProgramParameter( program, gl.ACTIVE_UNIFORMS );\n\n\t\tfor ( let i = 0; i < n; ++ i ) {\n\n\t\t\tconst info = gl.getActiveUniform( program, i ),\n\t\t\t\taddr = gl.getUniformLocation( program, info.name );\n\n\t\t\tparseUniform( info, addr, this );\n\n\t\t}\n\n\t}\n\n\tsetValue( gl, name, value, textures ) {\n\n\t\tconst u = this.map[ name ];\n\n\t\tif ( u !== undefined ) u.setValue( gl, value, textures );\n\n\t}\n\n\tsetOptional( gl, object, name ) {\n\n\t\tconst v = object[ name ];\n\n\t\tif ( v !== undefined ) this.setValue( gl, name, v );\n\n\t}\n\n\tstatic upload( gl, seq, values, textures ) {\n\n\t\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\t\tconst u = seq[ i ],\n\t\t\t\tv = values[ u.id ];\n\n\t\t\tif ( v.needsUpdate !== false ) {\n\n\t\t\t\t// note: always updating when .needsUpdate is undefined\n\t\t\t\tu.setValue( gl, v.value, textures );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tstatic seqWithValue( seq, values ) {\n\n\t\tconst r = [];\n\n\t\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\t\tconst u = seq[ i ];\n\t\t\tif ( u.id in values ) r.push( u );\n\n\t\t}\n\n\t\treturn r;\n\n\t}\n\n}\n\nfunction WebGLShader( gl, type, string ) {\n\n\tconst shader = gl.createShader( type );\n\n\tgl.shaderSource( shader, string );\n\tgl.compileShader( shader );\n\n\treturn shader;\n\n}\n\n// From https://www.khronos.org/registry/webgl/extensions/KHR_parallel_shader_compile/\nconst COMPLETION_STATUS_KHR = 0x91B1;\n\nlet programIdCount = 0;\n\nfunction handleSource( string, errorLine ) {\n\n\tconst lines = string.split( '\\n' );\n\tconst lines2 = [];\n\n\tconst from = Math.max( errorLine - 6, 0 );\n\tconst to = Math.min( errorLine + 6, lines.length );\n\n\tfor ( let i = from; i < to; i ++ ) {\n\n\t\tconst line = i + 1;\n\t\tlines2.push( `${line === errorLine ? '>' : ' '} ${line}: ${lines[ i ]}` );\n\n\t}\n\n\treturn lines2.join( '\\n' );\n\n}\n\nfunction getEncodingComponents( colorSpace ) {\n\n\tconst workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace );\n\tconst encodingPrimaries = ColorManagement.getPrimaries( colorSpace );\n\n\tlet gamutMapping;\n\n\tif ( workingPrimaries === encodingPrimaries ) {\n\n\t\tgamutMapping = '';\n\n\t} else if ( workingPrimaries === P3Primaries && encodingPrimaries === Rec709Primaries ) {\n\n\t\tgamutMapping = 'LinearDisplayP3ToLinearSRGB';\n\n\t} else if ( workingPrimaries === Rec709Primaries && encodingPrimaries === P3Primaries ) {\n\n\t\tgamutMapping = 'LinearSRGBToLinearDisplayP3';\n\n\t}\n\n\tswitch ( colorSpace ) {\n\n\t\tcase LinearSRGBColorSpace:\n\t\tcase LinearDisplayP3ColorSpace:\n\t\t\treturn [ gamutMapping, 'LinearTransferOETF' ];\n\n\t\tcase SRGBColorSpace:\n\t\tcase DisplayP3ColorSpace:\n\t\t\treturn [ gamutMapping, 'sRGBTransferOETF' ];\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported color space:', colorSpace );\n\t\t\treturn [ gamutMapping, 'LinearTransferOETF' ];\n\n\t}\n\n}\n\nfunction getShaderErrors( gl, shader, type ) {\n\n\tconst status = gl.getShaderParameter( shader, gl.COMPILE_STATUS );\n\tconst errors = gl.getShaderInfoLog( shader ).trim();\n\n\tif ( status && errors === '' ) return '';\n\n\tconst errorMatches = /ERROR: 0:(\\d+)/.exec( errors );\n\tif ( errorMatches ) {\n\n\t\t// --enable-privileged-webgl-extension\n\t\t// console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n\n\t\tconst errorLine = parseInt( errorMatches[ 1 ] );\n\t\treturn type.toUpperCase() + '\\n\\n' + errors + '\\n\\n' + handleSource( gl.getShaderSource( shader ), errorLine );\n\n\t} else {\n\n\t\treturn errors;\n\n\t}\n\n}\n\nfunction getTexelEncodingFunction( functionName, colorSpace ) {\n\n\tconst components = getEncodingComponents( colorSpace );\n\treturn `vec4 ${functionName}( vec4 value ) { return ${components[ 0 ]}( ${components[ 1 ]}( value ) ); }`;\n\n}\n\nfunction getToneMappingFunction( functionName, toneMapping ) {\n\n\tlet toneMappingName;\n\n\tswitch ( toneMapping ) {\n\n\t\tcase LinearToneMapping:\n\t\t\ttoneMappingName = 'Linear';\n\t\t\tbreak;\n\n\t\tcase ReinhardToneMapping:\n\t\t\ttoneMappingName = 'Reinhard';\n\t\t\tbreak;\n\n\t\tcase CineonToneMapping:\n\t\t\ttoneMappingName = 'OptimizedCineon';\n\t\t\tbreak;\n\n\t\tcase ACESFilmicToneMapping:\n\t\t\ttoneMappingName = 'ACESFilmic';\n\t\t\tbreak;\n\n\t\tcase CustomToneMapping:\n\t\t\ttoneMappingName = 'Custom';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported toneMapping:', toneMapping );\n\t\t\ttoneMappingName = 'Linear';\n\n\t}\n\n\treturn 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }';\n\n}\n\nfunction generateExtensions( parameters ) {\n\n\tconst chunks = [\n\t\t( parameters.extensionDerivatives || !! parameters.envMapCubeUVHeight || parameters.bumpMap || parameters.normalMapTangentSpace || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ) ? '#extension GL_OES_standard_derivatives : enable' : '',\n\t\t( parameters.extensionFragDepth || parameters.logarithmicDepthBuffer ) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '',\n\t\t( parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ) ? '#extension GL_EXT_draw_buffers : require' : '',\n\t\t( parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission ) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''\n\t];\n\n\treturn chunks.filter( filterEmptyLine ).join( '\\n' );\n\n}\n\nfunction generateDefines( defines ) {\n\n\tconst chunks = [];\n\n\tfor ( const name in defines ) {\n\n\t\tconst value = defines[ name ];\n\n\t\tif ( value === false ) continue;\n\n\t\tchunks.push( '#define ' + name + ' ' + value );\n\n\t}\n\n\treturn chunks.join( '\\n' );\n\n}\n\nfunction fetchAttributeLocations( gl, program ) {\n\n\tconst attributes = {};\n\n\tconst n = gl.getProgramParameter( program, gl.ACTIVE_ATTRIBUTES );\n\n\tfor ( let i = 0; i < n; i ++ ) {\n\n\t\tconst info = gl.getActiveAttrib( program, i );\n\t\tconst name = info.name;\n\n\t\tlet locationSize = 1;\n\t\tif ( info.type === gl.FLOAT_MAT2 ) locationSize = 2;\n\t\tif ( info.type === gl.FLOAT_MAT3 ) locationSize = 3;\n\t\tif ( info.type === gl.FLOAT_MAT4 ) locationSize = 4;\n\n\t\t// console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n\n\t\tattributes[ name ] = {\n\t\t\ttype: info.type,\n\t\t\tlocation: gl.getAttribLocation( program, name ),\n\t\t\tlocationSize: locationSize\n\t\t};\n\n\t}\n\n\treturn attributes;\n\n}\n\nfunction filterEmptyLine( string ) {\n\n\treturn string !== '';\n\n}\n\nfunction replaceLightNums( string, parameters ) {\n\n\tconst numSpotLightCoords = parameters.numSpotLightShadows + parameters.numSpotLightMaps - parameters.numSpotLightShadowsWithMaps;\n\n\treturn string\n\t\t.replace( /NUM_DIR_LIGHTS/g, parameters.numDirLights )\n\t\t.replace( /NUM_SPOT_LIGHTS/g, parameters.numSpotLights )\n\t\t.replace( /NUM_SPOT_LIGHT_MAPS/g, parameters.numSpotLightMaps )\n\t\t.replace( /NUM_SPOT_LIGHT_COORDS/g, numSpotLightCoords )\n\t\t.replace( /NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights )\n\t\t.replace( /NUM_POINT_LIGHTS/g, parameters.numPointLights )\n\t\t.replace( /NUM_HEMI_LIGHTS/g, parameters.numHemiLights )\n\t\t.replace( /NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows )\n\t\t.replace( /NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g, parameters.numSpotLightShadowsWithMaps )\n\t\t.replace( /NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows )\n\t\t.replace( /NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows );\n\n}\n\nfunction replaceClippingPlaneNums( string, parameters ) {\n\n\treturn string\n\t\t.replace( /NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes )\n\t\t.replace( /UNION_CLIPPING_PLANES/g, ( parameters.numClippingPlanes - parameters.numClipIntersection ) );\n\n}\n\n// Resolve Includes\n\nconst includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n\nfunction resolveIncludes( string ) {\n\n\treturn string.replace( includePattern, includeReplacer );\n\n}\n\nconst shaderChunkMap = new Map( [\n\t[ 'encodings_fragment', 'colorspace_fragment' ], // @deprecated, r154\n\t[ 'encodings_pars_fragment', 'colorspace_pars_fragment' ], // @deprecated, r154\n\t[ 'output_fragment', 'opaque_fragment' ], // @deprecated, r154\n] );\n\nfunction includeReplacer( match, include ) {\n\n\tlet string = ShaderChunk[ include ];\n\n\tif ( string === undefined ) {\n\n\t\tconst newInclude = shaderChunkMap.get( include );\n\n\t\tif ( newInclude !== undefined ) {\n\n\t\t\tstring = ShaderChunk[ newInclude ];\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.', include, newInclude );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Can not resolve #include <' + include + '>' );\n\n\t\t}\n\n\t}\n\n\treturn resolveIncludes( string );\n\n}\n\n// Unroll Loops\n\nconst unrollLoopPattern = /#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;\n\nfunction unrollLoops( string ) {\n\n\treturn string.replace( unrollLoopPattern, loopReplacer );\n\n}\n\nfunction loopReplacer( match, start, end, snippet ) {\n\n\tlet string = '';\n\n\tfor ( let i = parseInt( start ); i < parseInt( end ); i ++ ) {\n\n\t\tstring += snippet\n\t\t\t.replace( /\\[\\s*i\\s*\\]/g, '[ ' + i + ' ]' )\n\t\t\t.replace( /UNROLLED_LOOP_INDEX/g, i );\n\n\t}\n\n\treturn string;\n\n}\n\n//\n\nfunction generatePrecision( parameters ) {\n\n\tlet precisionstring = 'precision ' + parameters.precision + ' float;\\nprecision ' + parameters.precision + ' int;';\n\n\tif ( parameters.precision === 'highp' ) {\n\n\t\tprecisionstring += '\\n#define HIGH_PRECISION';\n\n\t} else if ( parameters.precision === 'mediump' ) {\n\n\t\tprecisionstring += '\\n#define MEDIUM_PRECISION';\n\n\t} else if ( parameters.precision === 'lowp' ) {\n\n\t\tprecisionstring += '\\n#define LOW_PRECISION';\n\n\t}\n\n\treturn precisionstring;\n\n}\n\nfunction generateShadowMapTypeDefine( parameters ) {\n\n\tlet shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC';\n\n\tif ( parameters.shadowMapType === PCFShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF';\n\n\t} else if ( parameters.shadowMapType === PCFSoftShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT';\n\n\t} else if ( parameters.shadowMapType === VSMShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM';\n\n\t}\n\n\treturn shadowMapTypeDefine;\n\n}\n\nfunction generateEnvMapTypeDefine( parameters ) {\n\n\tlet envMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeReflectionMapping:\n\t\t\tcase CubeRefractionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\t\t\t\tbreak;\n\n\t\t\tcase CubeUVReflectionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapTypeDefine;\n\n}\n\nfunction generateEnvMapModeDefine( parameters ) {\n\n\tlet envMapModeDefine = 'ENVMAP_MODE_REFLECTION';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeRefractionMapping:\n\n\t\t\t\tenvMapModeDefine = 'ENVMAP_MODE_REFRACTION';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapModeDefine;\n\n}\n\nfunction generateEnvMapBlendingDefine( parameters ) {\n\n\tlet envMapBlendingDefine = 'ENVMAP_BLENDING_NONE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.combine ) {\n\n\t\t\tcase MultiplyOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY';\n\t\t\t\tbreak;\n\n\t\t\tcase MixOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MIX';\n\t\t\t\tbreak;\n\n\t\t\tcase AddOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_ADD';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapBlendingDefine;\n\n}\n\nfunction generateCubeUVSize( parameters ) {\n\n\tconst imageHeight = parameters.envMapCubeUVHeight;\n\n\tif ( imageHeight === null ) return null;\n\n\tconst maxMip = Math.log2( imageHeight ) - 2;\n\n\tconst texelHeight = 1.0 / imageHeight;\n\n\tconst texelWidth = 1.0 / ( 3 * Math.max( Math.pow( 2, maxMip ), 7 * 16 ) );\n\n\treturn { texelWidth, texelHeight, maxMip };\n\n}\n\nfunction WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {\n\n\t// TODO Send this event to Three.js DevTools\n\t// console.log( 'WebGLProgram', cacheKey );\n\n\tconst gl = renderer.getContext();\n\n\tconst defines = parameters.defines;\n\n\tlet vertexShader = parameters.vertexShader;\n\tlet fragmentShader = parameters.fragmentShader;\n\n\tconst shadowMapTypeDefine = generateShadowMapTypeDefine( parameters );\n\tconst envMapTypeDefine = generateEnvMapTypeDefine( parameters );\n\tconst envMapModeDefine = generateEnvMapModeDefine( parameters );\n\tconst envMapBlendingDefine = generateEnvMapBlendingDefine( parameters );\n\tconst envMapCubeUVSize = generateCubeUVSize( parameters );\n\n\tconst customExtensions = parameters.isWebGL2 ? '' : generateExtensions( parameters );\n\n\tconst customDefines = generateDefines( defines );\n\n\tconst program = gl.createProgram();\n\n\tlet prefixVertex, prefixFragment;\n\tlet versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\\n' : '';\n\n\tif ( parameters.isRawShaderMaterial ) {\n\n\t\tprefixVertex = [\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixVertex.length > 0 ) {\n\n\t\t\tprefixVertex += '\\n';\n\n\t\t}\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixFragment.length > 0 ) {\n\n\t\t\tprefixFragment += '\\n';\n\n\t\t}\n\n\t} else {\n\n\t\tprefixVertex = [\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.instancing ? '#define USE_INSTANCING' : '',\n\t\t\tparameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '',\n\n\t\t\tparameters.useFog && parameters.fog ? '#define USE_FOG' : '',\n\t\t\tparameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\tparameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '',\n\t\t\tparameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '',\n\t\t\tparameters.displacementMap ? '#define USE_DISPLACEMENTMAP' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\n\t\t\tparameters.anisotropy ? '#define USE_ANISOTROPY' : '',\n\t\t\tparameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '',\n\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\n\t\t\tparameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '',\n\t\t\tparameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '',\n\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '',\n\t\t\tparameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '',\n\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\t\t\tparameters.alphaHash ? '#define USE_ALPHAHASH' : '',\n\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '',\n\t\t\tparameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '',\n\n\t\t\t//\n\n\t\t\tparameters.mapUv ? '#define MAP_UV ' + parameters.mapUv : '',\n\t\t\tparameters.alphaMapUv ? '#define ALPHAMAP_UV ' + parameters.alphaMapUv : '',\n\t\t\tparameters.lightMapUv ? '#define LIGHTMAP_UV ' + parameters.lightMapUv : '',\n\t\t\tparameters.aoMapUv ? '#define AOMAP_UV ' + parameters.aoMapUv : '',\n\t\t\tparameters.emissiveMapUv ? '#define EMISSIVEMAP_UV ' + parameters.emissiveMapUv : '',\n\t\t\tparameters.bumpMapUv ? '#define BUMPMAP_UV ' + parameters.bumpMapUv : '',\n\t\t\tparameters.normalMapUv ? '#define NORMALMAP_UV ' + parameters.normalMapUv : '',\n\t\t\tparameters.displacementMapUv ? '#define DISPLACEMENTMAP_UV ' + parameters.displacementMapUv : '',\n\n\t\t\tparameters.metalnessMapUv ? '#define METALNESSMAP_UV ' + parameters.metalnessMapUv : '',\n\t\t\tparameters.roughnessMapUv ? '#define ROUGHNESSMAP_UV ' + parameters.roughnessMapUv : '',\n\n\t\t\tparameters.anisotropyMapUv ? '#define ANISOTROPYMAP_UV ' + parameters.anisotropyMapUv : '',\n\n\t\t\tparameters.clearcoatMapUv ? '#define CLEARCOATMAP_UV ' + parameters.clearcoatMapUv : '',\n\t\t\tparameters.clearcoatNormalMapUv ? '#define CLEARCOAT_NORMALMAP_UV ' + parameters.clearcoatNormalMapUv : '',\n\t\t\tparameters.clearcoatRoughnessMapUv ? '#define CLEARCOAT_ROUGHNESSMAP_UV ' + parameters.clearcoatRoughnessMapUv : '',\n\n\t\t\tparameters.iridescenceMapUv ? '#define IRIDESCENCEMAP_UV ' + parameters.iridescenceMapUv : '',\n\t\t\tparameters.iridescenceThicknessMapUv ? '#define IRIDESCENCE_THICKNESSMAP_UV ' + parameters.iridescenceThicknessMapUv : '',\n\n\t\t\tparameters.sheenColorMapUv ? '#define SHEEN_COLORMAP_UV ' + parameters.sheenColorMapUv : '',\n\t\t\tparameters.sheenRoughnessMapUv ? '#define SHEEN_ROUGHNESSMAP_UV ' + parameters.sheenRoughnessMapUv : '',\n\n\t\t\tparameters.specularMapUv ? '#define SPECULARMAP_UV ' + parameters.specularMapUv : '',\n\t\t\tparameters.specularColorMapUv ? '#define SPECULAR_COLORMAP_UV ' + parameters.specularColorMapUv : '',\n\t\t\tparameters.specularIntensityMapUv ? '#define SPECULAR_INTENSITYMAP_UV ' + parameters.specularIntensityMapUv : '',\n\n\t\t\tparameters.transmissionMapUv ? '#define TRANSMISSIONMAP_UV ' + parameters.transmissionMapUv : '',\n\t\t\tparameters.thicknessMapUv ? '#define THICKNESSMAP_UV ' + parameters.thicknessMapUv : '',\n\n\t\t\t//\n\n\t\t\tparameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUv1s ? '#define USE_UV1' : '',\n\t\t\tparameters.vertexUv2s ? '#define USE_UV2' : '',\n\t\t\tparameters.vertexUv3s ? '#define USE_UV3' : '',\n\n\t\t\tparameters.pointsUvs ? '#define USE_POINTS_UV' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.skinning ? '#define USE_SKINNING' : '',\n\n\t\t\tparameters.morphTargets ? '#define USE_MORPHTARGETS' : '',\n\t\t\tparameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '',\n\t\t\t( parameters.morphColors && parameters.isWebGL2 ) ? '#define USE_MORPHCOLORS' : '',\n\t\t\t( parameters.morphTargetsCount > 0 && parameters.isWebGL2 ) ? '#define MORPHTARGETS_TEXTURE' : '',\n\t\t\t( parameters.morphTargetsCount > 0 && parameters.isWebGL2 ) ? '#define MORPHTARGETS_TEXTURE_STRIDE ' + parameters.morphTextureStride : '',\n\t\t\t( parameters.morphTargetsCount > 0 && parameters.isWebGL2 ) ? '#define MORPHTARGETS_COUNT ' + parameters.morphTargetsCount : '',\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '',\n\n\t\t\tparameters.numLightProbes > 0 ? '#define USE_LIGHT_PROBES' : '',\n\n\t\t\tparameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t'uniform mat4 modelMatrix;',\n\t\t\t'uniform mat4 modelViewMatrix;',\n\t\t\t'uniform mat4 projectionMatrix;',\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform mat3 normalMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t'#ifdef USE_INSTANCING',\n\n\t\t\t'\tattribute mat4 instanceMatrix;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_INSTANCING_COLOR',\n\n\t\t\t'\tattribute vec3 instanceColor;',\n\n\t\t\t'#endif',\n\n\t\t\t'attribute vec3 position;',\n\t\t\t'attribute vec3 normal;',\n\t\t\t'attribute vec2 uv;',\n\n\t\t\t'#ifdef USE_UV1',\n\n\t\t\t'\tattribute vec2 uv1;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_UV2',\n\n\t\t\t'\tattribute vec2 uv2;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_UV3',\n\n\t\t\t'\tattribute vec2 uv3;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_TANGENT',\n\n\t\t\t'\tattribute vec4 tangent;',\n\n\t\t\t'#endif',\n\n\t\t\t'#if defined( USE_COLOR_ALPHA )',\n\n\t\t\t'\tattribute vec4 color;',\n\n\t\t\t'#elif defined( USE_COLOR )',\n\n\t\t\t'\tattribute vec3 color;',\n\n\t\t\t'#endif',\n\n\t\t\t'#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )',\n\n\t\t\t'\tattribute vec3 morphTarget0;',\n\t\t\t'\tattribute vec3 morphTarget1;',\n\t\t\t'\tattribute vec3 morphTarget2;',\n\t\t\t'\tattribute vec3 morphTarget3;',\n\n\t\t\t'\t#ifdef USE_MORPHNORMALS',\n\n\t\t\t'\t\tattribute vec3 morphNormal0;',\n\t\t\t'\t\tattribute vec3 morphNormal1;',\n\t\t\t'\t\tattribute vec3 morphNormal2;',\n\t\t\t'\t\tattribute vec3 morphNormal3;',\n\n\t\t\t'\t#else',\n\n\t\t\t'\t\tattribute vec3 morphTarget4;',\n\t\t\t'\t\tattribute vec3 morphTarget5;',\n\t\t\t'\t\tattribute vec3 morphTarget6;',\n\t\t\t'\t\tattribute vec3 morphTarget7;',\n\n\t\t\t'\t#endif',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_SKINNING',\n\n\t\t\t'\tattribute vec4 skinIndex;',\n\t\t\t'\tattribute vec4 skinWeight;',\n\n\t\t\t'#endif',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_TYPE ' + parameters.shaderType,\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.useFog && parameters.fog ? '#define USE_FOG' : '',\n\t\t\tparameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.matcap ? '#define USE_MATCAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapTypeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapBlendingDefine : '',\n\t\t\tenvMapCubeUVSize ? '#define CUBEUV_TEXEL_WIDTH ' + envMapCubeUVSize.texelWidth : '',\n\t\t\tenvMapCubeUVSize ? '#define CUBEUV_TEXEL_HEIGHT ' + envMapCubeUVSize.texelHeight : '',\n\t\t\tenvMapCubeUVSize ? '#define CUBEUV_MAX_MIP ' + envMapCubeUVSize.maxMip + '.0' : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\tparameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '',\n\t\t\tparameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\n\t\t\tparameters.anisotropy ? '#define USE_ANISOTROPY' : '',\n\t\t\tparameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '',\n\n\t\t\tparameters.clearcoat ? '#define USE_CLEARCOAT' : '',\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\n\t\t\tparameters.iridescence ? '#define USE_IRIDESCENCE' : '',\n\t\t\tparameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '',\n\t\t\tparameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '',\n\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '',\n\t\t\tparameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '',\n\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\t\t\tparameters.alphaTest ? '#define USE_ALPHATEST' : '',\n\t\t\tparameters.alphaHash ? '#define USE_ALPHAHASH' : '',\n\n\t\t\tparameters.sheen ? '#define USE_SHEEN' : '',\n\t\t\tparameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '',\n\t\t\tparameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '',\n\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUv1s ? '#define USE_UV1' : '',\n\t\t\tparameters.vertexUv2s ? '#define USE_UV2' : '',\n\t\t\tparameters.vertexUv3s ? '#define USE_UV3' : '',\n\n\t\t\tparameters.pointsUvs ? '#define USE_POINTS_UV' : '',\n\n\t\t\tparameters.gradientMap ? '#define USE_GRADIENTMAP' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '',\n\n\t\t\tparameters.numLightProbes > 0 ? '#define USE_LIGHT_PROBES' : '',\n\n\t\t\tparameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '',\n\n\t\t\tparameters.decodeVideoTexture ? '#define DECODE_VIDEO_TEXTURE' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? '#define TONE_MAPPING' : '',\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? ShaderChunk[ 'tonemapping_pars_fragment' ] : '', // this code is required here because it is used by the toneMapping() function defined below\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '',\n\n\t\t\tparameters.dithering ? '#define DITHERING' : '',\n\t\t\tparameters.opaque ? '#define OPAQUE' : '',\n\n\t\t\tShaderChunk[ 'colorspace_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below\n\t\t\tgetTexelEncodingFunction( 'linearToOutputTexel', parameters.outputColorSpace ),\n\n\t\t\tparameters.useDepthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t}\n\n\tvertexShader = resolveIncludes( vertexShader );\n\tvertexShader = replaceLightNums( vertexShader, parameters );\n\tvertexShader = replaceClippingPlaneNums( vertexShader, parameters );\n\n\tfragmentShader = resolveIncludes( fragmentShader );\n\tfragmentShader = replaceLightNums( fragmentShader, parameters );\n\tfragmentShader = replaceClippingPlaneNums( fragmentShader, parameters );\n\n\tvertexShader = unrollLoops( vertexShader );\n\tfragmentShader = unrollLoops( fragmentShader );\n\n\tif ( parameters.isWebGL2 && parameters.isRawShaderMaterial !== true ) {\n\n\t\t// GLSL 3.0 conversion for built-in materials and ShaderMaterial\n\n\t\tversionString = '#version 300 es\\n';\n\n\t\tprefixVertex = [\n\t\t\t'precision mediump sampler2DArray;',\n\t\t\t'#define attribute in',\n\t\t\t'#define varying out',\n\t\t\t'#define texture2D texture'\n\t\t].join( '\\n' ) + '\\n' + prefixVertex;\n\n\t\tprefixFragment = [\n\t\t\t'precision mediump sampler2DArray;',\n\t\t\t'#define varying in',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : 'layout(location = 0) out highp vec4 pc_fragColor;',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor',\n\t\t\t'#define gl_FragDepthEXT gl_FragDepth',\n\t\t\t'#define texture2D texture',\n\t\t\t'#define textureCube texture',\n\t\t\t'#define texture2DProj textureProj',\n\t\t\t'#define texture2DLodEXT textureLod',\n\t\t\t'#define texture2DProjLodEXT textureProjLod',\n\t\t\t'#define textureCubeLodEXT textureLod',\n\t\t\t'#define texture2DGradEXT textureGrad',\n\t\t\t'#define texture2DProjGradEXT textureProjGrad',\n\t\t\t'#define textureCubeGradEXT textureGrad'\n\t\t].join( '\\n' ) + '\\n' + prefixFragment;\n\n\t}\n\n\tconst vertexGlsl = versionString + prefixVertex + vertexShader;\n\tconst fragmentGlsl = versionString + prefixFragment + fragmentShader;\n\n\t// console.log( '*VERTEX*', vertexGlsl );\n\t// console.log( '*FRAGMENT*', fragmentGlsl );\n\n\tconst glVertexShader = WebGLShader( gl, gl.VERTEX_SHADER, vertexGlsl );\n\tconst glFragmentShader = WebGLShader( gl, gl.FRAGMENT_SHADER, fragmentGlsl );\n\n\tgl.attachShader( program, glVertexShader );\n\tgl.attachShader( program, glFragmentShader );\n\n\t// Force a particular attribute to index 0.\n\n\tif ( parameters.index0AttributeName !== undefined ) {\n\n\t\tgl.bindAttribLocation( program, 0, parameters.index0AttributeName );\n\n\t} else if ( parameters.morphTargets === true ) {\n\n\t\t// programs with morphTargets displace position out of attribute 0\n\t\tgl.bindAttribLocation( program, 0, 'position' );\n\n\t}\n\n\tgl.linkProgram( program );\n\n\tfunction onFirstUse( self ) {\n\n\t\t// check for link errors\n\t\tif ( renderer.debug.checkShaderErrors ) {\n\n\t\t\tconst programLog = gl.getProgramInfoLog( program ).trim();\n\t\t\tconst vertexLog = gl.getShaderInfoLog( glVertexShader ).trim();\n\t\t\tconst fragmentLog = gl.getShaderInfoLog( glFragmentShader ).trim();\n\n\t\t\tlet runnable = true;\n\t\t\tlet haveDiagnostics = true;\n\n\t\t\tif ( gl.getProgramParameter( program, gl.LINK_STATUS ) === false ) {\n\n\t\t\t\trunnable = false;\n\n\t\t\t\tif ( typeof renderer.debug.onShaderError === 'function' ) {\n\n\t\t\t\t\trenderer.debug.onShaderError( gl, program, glVertexShader, glFragmentShader );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// default error reporting\n\n\t\t\t\t\tconst vertexErrors = getShaderErrors( gl, glVertexShader, 'vertex' );\n\t\t\t\t\tconst fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' );\n\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'THREE.WebGLProgram: Shader Error ' + gl.getError() + ' - ' +\n\t\t\t\t\t\t'VALIDATE_STATUS ' + gl.getProgramParameter( program, gl.VALIDATE_STATUS ) + '\\n\\n' +\n\t\t\t\t\t\t'Program Info Log: ' + programLog + '\\n' +\n\t\t\t\t\t\tvertexErrors + '\\n' +\n\t\t\t\t\t\tfragmentErrors\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t} else if ( programLog !== '' ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLProgram: Program Info Log:', programLog );\n\n\t\t\t} else if ( vertexLog === '' || fragmentLog === '' ) {\n\n\t\t\t\thaveDiagnostics = false;\n\n\t\t\t}\n\n\t\t\tif ( haveDiagnostics ) {\n\n\t\t\t\tself.diagnostics = {\n\n\t\t\t\t\trunnable: runnable,\n\n\t\t\t\t\tprogramLog: programLog,\n\n\t\t\t\t\tvertexShader: {\n\n\t\t\t\t\t\tlog: vertexLog,\n\t\t\t\t\t\tprefix: prefixVertex\n\n\t\t\t\t\t},\n\n\t\t\t\t\tfragmentShader: {\n\n\t\t\t\t\t\tlog: fragmentLog,\n\t\t\t\t\t\tprefix: prefixFragment\n\n\t\t\t\t\t}\n\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Clean up\n\n\t\t// Crashes in iOS9 and iOS10. #18402\n\t\t// gl.detachShader( program, glVertexShader );\n\t\t// gl.detachShader( program, glFragmentShader );\n\n\t\tgl.deleteShader( glVertexShader );\n\t\tgl.deleteShader( glFragmentShader );\n\n\t\tcachedUniforms = new WebGLUniforms( gl, program );\n\t\tcachedAttributes = fetchAttributeLocations( gl, program );\n\n\t}\n\n\t// set up caching for uniform locations\n\n\tlet cachedUniforms;\n\n\tthis.getUniforms = function () {\n\n\t\tif ( cachedUniforms === undefined ) {\n\n\t\t\t// Populates cachedUniforms and cachedAttributes\n\t\t\tonFirstUse( this );\n\n\t\t}\n\n\t\treturn cachedUniforms;\n\n\t};\n\n\t// set up caching for attribute locations\n\n\tlet cachedAttributes;\n\n\tthis.getAttributes = function () {\n\n\t\tif ( cachedAttributes === undefined ) {\n\n\t\t\t// Populates cachedAttributes and cachedUniforms\n\t\t\tonFirstUse( this );\n\n\t\t}\n\n\t\treturn cachedAttributes;\n\n\t};\n\n\t// indicate when the program is ready to be used. if the KHR_parallel_shader_compile extension isn't supported,\n\t// flag the program as ready immediately. It may cause a stall when it's first used.\n\n\tlet programReady = ( parameters.rendererExtensionParallelShaderCompile === false );\n\n\tthis.isReady = function () {\n\n\t\tif ( programReady === false ) {\n\n\t\t\tprogramReady = gl.getProgramParameter( program, COMPLETION_STATUS_KHR );\n\n\t\t}\n\n\t\treturn programReady;\n\n\t};\n\n\t// free resource\n\n\tthis.destroy = function () {\n\n\t\tbindingStates.releaseStatesOfProgram( this );\n\n\t\tgl.deleteProgram( program );\n\t\tthis.program = undefined;\n\n\t};\n\n\t//\n\n\tthis.type = parameters.shaderType;\n\tthis.name = parameters.shaderName;\n\tthis.id = programIdCount ++;\n\tthis.cacheKey = cacheKey;\n\tthis.usedTimes = 1;\n\tthis.program = program;\n\tthis.vertexShader = glVertexShader;\n\tthis.fragmentShader = glFragmentShader;\n\n\treturn this;\n\n}\n\nlet _id$1 = 0;\n\nclass WebGLShaderCache {\n\n\tconstructor() {\n\n\t\tthis.shaderCache = new Map();\n\t\tthis.materialCache = new Map();\n\n\t}\n\n\tupdate( material ) {\n\n\t\tconst vertexShader = material.vertexShader;\n\t\tconst fragmentShader = material.fragmentShader;\n\n\t\tconst vertexShaderStage = this._getShaderStage( vertexShader );\n\t\tconst fragmentShaderStage = this._getShaderStage( fragmentShader );\n\n\t\tconst materialShaders = this._getShaderCacheForMaterial( material );\n\n\t\tif ( materialShaders.has( vertexShaderStage ) === false ) {\n\n\t\t\tmaterialShaders.add( vertexShaderStage );\n\t\t\tvertexShaderStage.usedTimes ++;\n\n\t\t}\n\n\t\tif ( materialShaders.has( fragmentShaderStage ) === false ) {\n\n\t\t\tmaterialShaders.add( fragmentShaderStage );\n\t\t\tfragmentShaderStage.usedTimes ++;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremove( material ) {\n\n\t\tconst materialShaders = this.materialCache.get( material );\n\n\t\tfor ( const shaderStage of materialShaders ) {\n\n\t\t\tshaderStage.usedTimes --;\n\n\t\t\tif ( shaderStage.usedTimes === 0 ) this.shaderCache.delete( shaderStage.code );\n\n\t\t}\n\n\t\tthis.materialCache.delete( material );\n\n\t\treturn this;\n\n\t}\n\n\tgetVertexShaderID( material ) {\n\n\t\treturn this._getShaderStage( material.vertexShader ).id;\n\n\t}\n\n\tgetFragmentShaderID( material ) {\n\n\t\treturn this._getShaderStage( material.fragmentShader ).id;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shaderCache.clear();\n\t\tthis.materialCache.clear();\n\n\t}\n\n\t_getShaderCacheForMaterial( material ) {\n\n\t\tconst cache = this.materialCache;\n\t\tlet set = cache.get( material );\n\n\t\tif ( set === undefined ) {\n\n\t\t\tset = new Set();\n\t\t\tcache.set( material, set );\n\n\t\t}\n\n\t\treturn set;\n\n\t}\n\n\t_getShaderStage( code ) {\n\n\t\tconst cache = this.shaderCache;\n\t\tlet stage = cache.get( code );\n\n\t\tif ( stage === undefined ) {\n\n\t\t\tstage = new WebGLShaderStage( code );\n\t\t\tcache.set( code, stage );\n\n\t\t}\n\n\t\treturn stage;\n\n\t}\n\n}\n\nclass WebGLShaderStage {\n\n\tconstructor( code ) {\n\n\t\tthis.id = _id$1 ++;\n\n\t\tthis.code = code;\n\t\tthis.usedTimes = 0;\n\n\t}\n\n}\n\nfunction WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping ) {\n\n\tconst _programLayers = new Layers();\n\tconst _customShaders = new WebGLShaderCache();\n\tconst programs = [];\n\n\tconst IS_WEBGL2 = capabilities.isWebGL2;\n\tconst logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n\tconst SUPPORTS_VERTEX_TEXTURES = capabilities.vertexTextures;\n\n\tlet precision = capabilities.precision;\n\n\tconst shaderIDs = {\n\t\tMeshDepthMaterial: 'depth',\n\t\tMeshDistanceMaterial: 'distanceRGBA',\n\t\tMeshNormalMaterial: 'normal',\n\t\tMeshBasicMaterial: 'basic',\n\t\tMeshLambertMaterial: 'lambert',\n\t\tMeshPhongMaterial: 'phong',\n\t\tMeshToonMaterial: 'toon',\n\t\tMeshStandardMaterial: 'physical',\n\t\tMeshPhysicalMaterial: 'physical',\n\t\tMeshMatcapMaterial: 'matcap',\n\t\tLineBasicMaterial: 'basic',\n\t\tLineDashedMaterial: 'dashed',\n\t\tPointsMaterial: 'points',\n\t\tShadowMaterial: 'shadow',\n\t\tSpriteMaterial: 'sprite'\n\t};\n\n\tfunction getChannel( value ) {\n\n\t\tif ( value === 0 ) return 'uv';\n\n\t\treturn `uv${ value }`;\n\n\t}\n\n\tfunction getParameters( material, lights, shadows, scene, object ) {\n\n\t\tconst fog = scene.fog;\n\t\tconst geometry = object.geometry;\n\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\n\t\tconst envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment );\n\t\tconst envMapCubeUVHeight = ( !! envMap ) && ( envMap.mapping === CubeUVReflectionMapping ) ? envMap.image.height : null;\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\n\t\t// heuristics to create shader parameters according to lights in the scene\n\t\t// (not to blow over maxLights budget)\n\n\t\tif ( material.precision !== null ) {\n\n\t\t\tprecision = capabilities.getMaxPrecision( material.precision );\n\n\t\t\tif ( precision !== material.precision ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tconst morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n\t\tconst morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;\n\n\t\tlet morphTextureStride = 0;\n\n\t\tif ( geometry.morphAttributes.position !== undefined ) morphTextureStride = 1;\n\t\tif ( geometry.morphAttributes.normal !== undefined ) morphTextureStride = 2;\n\t\tif ( geometry.morphAttributes.color !== undefined ) morphTextureStride = 3;\n\n\t\t//\n\n\t\tlet vertexShader, fragmentShader;\n\t\tlet customVertexShaderID, customFragmentShaderID;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\n\t\t\tvertexShader = shader.vertexShader;\n\t\t\tfragmentShader = shader.fragmentShader;\n\n\t\t} else {\n\n\t\t\tvertexShader = material.vertexShader;\n\t\t\tfragmentShader = material.fragmentShader;\n\n\t\t\t_customShaders.update( material );\n\n\t\t\tcustomVertexShaderID = _customShaders.getVertexShaderID( material );\n\t\t\tcustomFragmentShaderID = _customShaders.getFragmentShaderID( material );\n\n\t\t}\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tconst IS_INSTANCEDMESH = object.isInstancedMesh === true;\n\n\t\tconst HAS_MAP = !! material.map;\n\t\tconst HAS_MATCAP = !! material.matcap;\n\t\tconst HAS_ENVMAP = !! envMap;\n\t\tconst HAS_AOMAP = !! material.aoMap;\n\t\tconst HAS_LIGHTMAP = !! material.lightMap;\n\t\tconst HAS_BUMPMAP = !! material.bumpMap;\n\t\tconst HAS_NORMALMAP = !! material.normalMap;\n\t\tconst HAS_DISPLACEMENTMAP = !! material.displacementMap;\n\t\tconst HAS_EMISSIVEMAP = !! material.emissiveMap;\n\n\t\tconst HAS_METALNESSMAP = !! material.metalnessMap;\n\t\tconst HAS_ROUGHNESSMAP = !! material.roughnessMap;\n\n\t\tconst HAS_ANISOTROPY = material.anisotropy > 0;\n\t\tconst HAS_CLEARCOAT = material.clearcoat > 0;\n\t\tconst HAS_IRIDESCENCE = material.iridescence > 0;\n\t\tconst HAS_SHEEN = material.sheen > 0;\n\t\tconst HAS_TRANSMISSION = material.transmission > 0;\n\n\t\tconst HAS_ANISOTROPYMAP = HAS_ANISOTROPY && !! material.anisotropyMap;\n\n\t\tconst HAS_CLEARCOATMAP = HAS_CLEARCOAT && !! material.clearcoatMap;\n\t\tconst HAS_CLEARCOAT_NORMALMAP = HAS_CLEARCOAT && !! material.clearcoatNormalMap;\n\t\tconst HAS_CLEARCOAT_ROUGHNESSMAP = HAS_CLEARCOAT && !! material.clearcoatRoughnessMap;\n\n\t\tconst HAS_IRIDESCENCEMAP = HAS_IRIDESCENCE && !! material.iridescenceMap;\n\t\tconst HAS_IRIDESCENCE_THICKNESSMAP = HAS_IRIDESCENCE && !! material.iridescenceThicknessMap;\n\n\t\tconst HAS_SHEEN_COLORMAP = HAS_SHEEN && !! material.sheenColorMap;\n\t\tconst HAS_SHEEN_ROUGHNESSMAP = HAS_SHEEN && !! material.sheenRoughnessMap;\n\n\t\tconst HAS_SPECULARMAP = !! material.specularMap;\n\t\tconst HAS_SPECULAR_COLORMAP = !! material.specularColorMap;\n\t\tconst HAS_SPECULAR_INTENSITYMAP = !! material.specularIntensityMap;\n\n\t\tconst HAS_TRANSMISSIONMAP = HAS_TRANSMISSION && !! material.transmissionMap;\n\t\tconst HAS_THICKNESSMAP = HAS_TRANSMISSION && !! material.thicknessMap;\n\n\t\tconst HAS_GRADIENTMAP = !! material.gradientMap;\n\n\t\tconst HAS_ALPHAMAP = !! material.alphaMap;\n\n\t\tconst HAS_ALPHATEST = material.alphaTest > 0;\n\n\t\tconst HAS_ALPHAHASH = !! material.alphaHash;\n\n\t\tconst HAS_EXTENSIONS = !! material.extensions;\n\n\t\tconst HAS_ATTRIBUTE_UV1 = !! geometry.attributes.uv1;\n\t\tconst HAS_ATTRIBUTE_UV2 = !! geometry.attributes.uv2;\n\t\tconst HAS_ATTRIBUTE_UV3 = !! geometry.attributes.uv3;\n\n\t\tlet toneMapping = NoToneMapping;\n\n\t\tif ( material.toneMapped ) {\n\n\t\t\tif ( currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true ) {\n\n\t\t\t\ttoneMapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst parameters = {\n\n\t\t\tisWebGL2: IS_WEBGL2,\n\n\t\t\tshaderID: shaderID,\n\t\t\tshaderType: material.type,\n\t\t\tshaderName: material.name,\n\n\t\t\tvertexShader: vertexShader,\n\t\t\tfragmentShader: fragmentShader,\n\t\t\tdefines: material.defines,\n\n\t\t\tcustomVertexShaderID: customVertexShaderID,\n\t\t\tcustomFragmentShaderID: customFragmentShaderID,\n\n\t\t\tisRawShaderMaterial: material.isRawShaderMaterial === true,\n\t\t\tglslVersion: material.glslVersion,\n\n\t\t\tprecision: precision,\n\n\t\t\tinstancing: IS_INSTANCEDMESH,\n\t\t\tinstancingColor: IS_INSTANCEDMESH && object.instanceColor !== null,\n\n\t\t\tsupportsVertexTextures: SUPPORTS_VERTEX_TEXTURES,\n\t\t\toutputColorSpace: ( currentRenderTarget === null ) ? renderer.outputColorSpace : ( currentRenderTarget.isXRRenderTarget === true ? currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace ),\n\n\t\t\tmap: HAS_MAP,\n\t\t\tmatcap: HAS_MATCAP,\n\t\t\tenvMap: HAS_ENVMAP,\n\t\t\tenvMapMode: HAS_ENVMAP && envMap.mapping,\n\t\t\tenvMapCubeUVHeight: envMapCubeUVHeight,\n\t\t\taoMap: HAS_AOMAP,\n\t\t\tlightMap: HAS_LIGHTMAP,\n\t\t\tbumpMap: HAS_BUMPMAP,\n\t\t\tnormalMap: HAS_NORMALMAP,\n\t\t\tdisplacementMap: SUPPORTS_VERTEX_TEXTURES && HAS_DISPLACEMENTMAP,\n\t\t\temissiveMap: HAS_EMISSIVEMAP,\n\n\t\t\tnormalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === ObjectSpaceNormalMap,\n\t\t\tnormalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === TangentSpaceNormalMap,\n\n\t\t\tmetalnessMap: HAS_METALNESSMAP,\n\t\t\troughnessMap: HAS_ROUGHNESSMAP,\n\n\t\t\tanisotropy: HAS_ANISOTROPY,\n\t\t\tanisotropyMap: HAS_ANISOTROPYMAP,\n\n\t\t\tclearcoat: HAS_CLEARCOAT,\n\t\t\tclearcoatMap: HAS_CLEARCOATMAP,\n\t\t\tclearcoatNormalMap: HAS_CLEARCOAT_NORMALMAP,\n\t\t\tclearcoatRoughnessMap: HAS_CLEARCOAT_ROUGHNESSMAP,\n\n\t\t\tiridescence: HAS_IRIDESCENCE,\n\t\t\tiridescenceMap: HAS_IRIDESCENCEMAP,\n\t\t\tiridescenceThicknessMap: HAS_IRIDESCENCE_THICKNESSMAP,\n\n\t\t\tsheen: HAS_SHEEN,\n\t\t\tsheenColorMap: HAS_SHEEN_COLORMAP,\n\t\t\tsheenRoughnessMap: HAS_SHEEN_ROUGHNESSMAP,\n\n\t\t\tspecularMap: HAS_SPECULARMAP,\n\t\t\tspecularColorMap: HAS_SPECULAR_COLORMAP,\n\t\t\tspecularIntensityMap: HAS_SPECULAR_INTENSITYMAP,\n\n\t\t\ttransmission: HAS_TRANSMISSION,\n\t\t\ttransmissionMap: HAS_TRANSMISSIONMAP,\n\t\t\tthicknessMap: HAS_THICKNESSMAP,\n\n\t\t\tgradientMap: HAS_GRADIENTMAP,\n\n\t\t\topaque: material.transparent === false && material.blending === NormalBlending,\n\n\t\t\talphaMap: HAS_ALPHAMAP,\n\t\t\talphaTest: HAS_ALPHATEST,\n\t\t\talphaHash: HAS_ALPHAHASH,\n\n\t\t\tcombine: material.combine,\n\n\t\t\t//\n\n\t\t\tmapUv: HAS_MAP && getChannel( material.map.channel ),\n\t\t\taoMapUv: HAS_AOMAP && getChannel( material.aoMap.channel ),\n\t\t\tlightMapUv: HAS_LIGHTMAP && getChannel( material.lightMap.channel ),\n\t\t\tbumpMapUv: HAS_BUMPMAP && getChannel( material.bumpMap.channel ),\n\t\t\tnormalMapUv: HAS_NORMALMAP && getChannel( material.normalMap.channel ),\n\t\t\tdisplacementMapUv: HAS_DISPLACEMENTMAP && getChannel( material.displacementMap.channel ),\n\t\t\temissiveMapUv: HAS_EMISSIVEMAP && getChannel( material.emissiveMap.channel ),\n\n\t\t\tmetalnessMapUv: HAS_METALNESSMAP && getChannel( material.metalnessMap.channel ),\n\t\t\troughnessMapUv: HAS_ROUGHNESSMAP && getChannel( material.roughnessMap.channel ),\n\n\t\t\tanisotropyMapUv: HAS_ANISOTROPYMAP && getChannel( material.anisotropyMap.channel ),\n\n\t\t\tclearcoatMapUv: HAS_CLEARCOATMAP && getChannel( material.clearcoatMap.channel ),\n\t\t\tclearcoatNormalMapUv: HAS_CLEARCOAT_NORMALMAP && getChannel( material.clearcoatNormalMap.channel ),\n\t\t\tclearcoatRoughnessMapUv: HAS_CLEARCOAT_ROUGHNESSMAP && getChannel( material.clearcoatRoughnessMap.channel ),\n\n\t\t\tiridescenceMapUv: HAS_IRIDESCENCEMAP && getChannel( material.iridescenceMap.channel ),\n\t\t\tiridescenceThicknessMapUv: HAS_IRIDESCENCE_THICKNESSMAP && getChannel( material.iridescenceThicknessMap.channel ),\n\n\t\t\tsheenColorMapUv: HAS_SHEEN_COLORMAP && getChannel( material.sheenColorMap.channel ),\n\t\t\tsheenRoughnessMapUv: HAS_SHEEN_ROUGHNESSMAP && getChannel( material.sheenRoughnessMap.channel ),\n\n\t\t\tspecularMapUv: HAS_SPECULARMAP && getChannel( material.specularMap.channel ),\n\t\t\tspecularColorMapUv: HAS_SPECULAR_COLORMAP && getChannel( material.specularColorMap.channel ),\n\t\t\tspecularIntensityMapUv: HAS_SPECULAR_INTENSITYMAP && getChannel( material.specularIntensityMap.channel ),\n\n\t\t\ttransmissionMapUv: HAS_TRANSMISSIONMAP && getChannel( material.transmissionMap.channel ),\n\t\t\tthicknessMapUv: HAS_THICKNESSMAP && getChannel( material.thicknessMap.channel ),\n\n\t\t\talphaMapUv: HAS_ALPHAMAP && getChannel( material.alphaMap.channel ),\n\n\t\t\t//\n\n\t\t\tvertexTangents: !! geometry.attributes.tangent && ( HAS_NORMALMAP || HAS_ANISOTROPY ),\n\t\t\tvertexColors: material.vertexColors,\n\t\t\tvertexAlphas: material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4,\n\t\t\tvertexUv1s: HAS_ATTRIBUTE_UV1,\n\t\t\tvertexUv2s: HAS_ATTRIBUTE_UV2,\n\t\t\tvertexUv3s: HAS_ATTRIBUTE_UV3,\n\n\t\t\tpointsUvs: object.isPoints === true && !! geometry.attributes.uv && ( HAS_MAP || HAS_ALPHAMAP ),\n\n\t\t\tfog: !! fog,\n\t\t\tuseFog: material.fog === true,\n\t\t\tfogExp2: ( fog && fog.isFogExp2 ),\n\n\t\t\tflatShading: material.flatShading === true,\n\n\t\t\tsizeAttenuation: material.sizeAttenuation === true,\n\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\t\tskinning: object.isSkinnedMesh === true,\n\n\t\t\tmorphTargets: geometry.morphAttributes.position !== undefined,\n\t\t\tmorphNormals: geometry.morphAttributes.normal !== undefined,\n\t\t\tmorphColors: geometry.morphAttributes.color !== undefined,\n\t\t\tmorphTargetsCount: morphTargetsCount,\n\t\t\tmorphTextureStride: morphTextureStride,\n\n\t\t\tnumDirLights: lights.directional.length,\n\t\t\tnumPointLights: lights.point.length,\n\t\t\tnumSpotLights: lights.spot.length,\n\t\t\tnumSpotLightMaps: lights.spotLightMap.length,\n\t\t\tnumRectAreaLights: lights.rectArea.length,\n\t\t\tnumHemiLights: lights.hemi.length,\n\n\t\t\tnumDirLightShadows: lights.directionalShadowMap.length,\n\t\t\tnumPointLightShadows: lights.pointShadowMap.length,\n\t\t\tnumSpotLightShadows: lights.spotShadowMap.length,\n\t\t\tnumSpotLightShadowsWithMaps: lights.numSpotLightShadowsWithMaps,\n\n\t\t\tnumLightProbes: lights.numLightProbes,\n\n\t\t\tnumClippingPlanes: clipping.numPlanes,\n\t\t\tnumClipIntersection: clipping.numIntersection,\n\n\t\t\tdithering: material.dithering,\n\n\t\t\tshadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n\t\t\tshadowMapType: renderer.shadowMap.type,\n\n\t\t\ttoneMapping: toneMapping,\n\t\t\tuseLegacyLights: renderer._useLegacyLights,\n\n\t\t\tdecodeVideoTexture: HAS_MAP && ( material.map.isVideoTexture === true ) && ( ColorManagement.getTransfer( material.map.colorSpace ) === SRGBTransfer ),\n\n\t\t\tpremultipliedAlpha: material.premultipliedAlpha,\n\n\t\t\tdoubleSided: material.side === DoubleSide,\n\t\t\tflipSided: material.side === BackSide,\n\n\t\t\tuseDepthPacking: material.depthPacking >= 0,\n\t\t\tdepthPacking: material.depthPacking || 0,\n\n\t\t\tindex0AttributeName: material.index0AttributeName,\n\n\t\t\textensionDerivatives: HAS_EXTENSIONS && material.extensions.derivatives === true,\n\t\t\textensionFragDepth: HAS_EXTENSIONS && material.extensions.fragDepth === true,\n\t\t\textensionDrawBuffers: HAS_EXTENSIONS && material.extensions.drawBuffers === true,\n\t\t\textensionShaderTextureLOD: HAS_EXTENSIONS && material.extensions.shaderTextureLOD === true,\n\n\t\t\trendererExtensionFragDepth: IS_WEBGL2 || extensions.has( 'EXT_frag_depth' ),\n\t\t\trendererExtensionDrawBuffers: IS_WEBGL2 || extensions.has( 'WEBGL_draw_buffers' ),\n\t\t\trendererExtensionShaderTextureLod: IS_WEBGL2 || extensions.has( 'EXT_shader_texture_lod' ),\n\t\t\trendererExtensionParallelShaderCompile: extensions.has( 'KHR_parallel_shader_compile' ),\n\n\t\t\tcustomProgramCacheKey: material.customProgramCacheKey()\n\n\t\t};\n\n\t\treturn parameters;\n\n\t}\n\n\tfunction getProgramCacheKey( parameters ) {\n\n\t\tconst array = [];\n\n\t\tif ( parameters.shaderID ) {\n\n\t\t\tarray.push( parameters.shaderID );\n\n\t\t} else {\n\n\t\t\tarray.push( parameters.customVertexShaderID );\n\t\t\tarray.push( parameters.customFragmentShaderID );\n\n\t\t}\n\n\t\tif ( parameters.defines !== undefined ) {\n\n\t\t\tfor ( const name in parameters.defines ) {\n\n\t\t\t\tarray.push( name );\n\t\t\t\tarray.push( parameters.defines[ name ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( parameters.isRawShaderMaterial === false ) {\n\n\t\t\tgetProgramCacheKeyParameters( array, parameters );\n\t\t\tgetProgramCacheKeyBooleans( array, parameters );\n\t\t\tarray.push( renderer.outputColorSpace );\n\n\t\t}\n\n\t\tarray.push( parameters.customProgramCacheKey );\n\n\t\treturn array.join();\n\n\t}\n\n\tfunction getProgramCacheKeyParameters( array, parameters ) {\n\n\t\tarray.push( parameters.precision );\n\t\tarray.push( parameters.outputColorSpace );\n\t\tarray.push( parameters.envMapMode );\n\t\tarray.push( parameters.envMapCubeUVHeight );\n\t\tarray.push( parameters.mapUv );\n\t\tarray.push( parameters.alphaMapUv );\n\t\tarray.push( parameters.lightMapUv );\n\t\tarray.push( parameters.aoMapUv );\n\t\tarray.push( parameters.bumpMapUv );\n\t\tarray.push( parameters.normalMapUv );\n\t\tarray.push( parameters.displacementMapUv );\n\t\tarray.push( parameters.emissiveMapUv );\n\t\tarray.push( parameters.metalnessMapUv );\n\t\tarray.push( parameters.roughnessMapUv );\n\t\tarray.push( parameters.anisotropyMapUv );\n\t\tarray.push( parameters.clearcoatMapUv );\n\t\tarray.push( parameters.clearcoatNormalMapUv );\n\t\tarray.push( parameters.clearcoatRoughnessMapUv );\n\t\tarray.push( parameters.iridescenceMapUv );\n\t\tarray.push( parameters.iridescenceThicknessMapUv );\n\t\tarray.push( parameters.sheenColorMapUv );\n\t\tarray.push( parameters.sheenRoughnessMapUv );\n\t\tarray.push( parameters.specularMapUv );\n\t\tarray.push( parameters.specularColorMapUv );\n\t\tarray.push( parameters.specularIntensityMapUv );\n\t\tarray.push( parameters.transmissionMapUv );\n\t\tarray.push( parameters.thicknessMapUv );\n\t\tarray.push( parameters.combine );\n\t\tarray.push( parameters.fogExp2 );\n\t\tarray.push( parameters.sizeAttenuation );\n\t\tarray.push( parameters.morphTargetsCount );\n\t\tarray.push( parameters.morphAttributeCount );\n\t\tarray.push( parameters.numDirLights );\n\t\tarray.push( parameters.numPointLights );\n\t\tarray.push( parameters.numSpotLights );\n\t\tarray.push( parameters.numSpotLightMaps );\n\t\tarray.push( parameters.numHemiLights );\n\t\tarray.push( parameters.numRectAreaLights );\n\t\tarray.push( parameters.numDirLightShadows );\n\t\tarray.push( parameters.numPointLightShadows );\n\t\tarray.push( parameters.numSpotLightShadows );\n\t\tarray.push( parameters.numSpotLightShadowsWithMaps );\n\t\tarray.push( parameters.numLightProbes );\n\t\tarray.push( parameters.shadowMapType );\n\t\tarray.push( parameters.toneMapping );\n\t\tarray.push( parameters.numClippingPlanes );\n\t\tarray.push( parameters.numClipIntersection );\n\t\tarray.push( parameters.depthPacking );\n\n\t}\n\n\tfunction getProgramCacheKeyBooleans( array, parameters ) {\n\n\t\t_programLayers.disableAll();\n\n\t\tif ( parameters.isWebGL2 )\n\t\t\t_programLayers.enable( 0 );\n\t\tif ( parameters.supportsVertexTextures )\n\t\t\t_programLayers.enable( 1 );\n\t\tif ( parameters.instancing )\n\t\t\t_programLayers.enable( 2 );\n\t\tif ( parameters.instancingColor )\n\t\t\t_programLayers.enable( 3 );\n\t\tif ( parameters.matcap )\n\t\t\t_programLayers.enable( 4 );\n\t\tif ( parameters.envMap )\n\t\t\t_programLayers.enable( 5 );\n\t\tif ( parameters.normalMapObjectSpace )\n\t\t\t_programLayers.enable( 6 );\n\t\tif ( parameters.normalMapTangentSpace )\n\t\t\t_programLayers.enable( 7 );\n\t\tif ( parameters.clearcoat )\n\t\t\t_programLayers.enable( 8 );\n\t\tif ( parameters.iridescence )\n\t\t\t_programLayers.enable( 9 );\n\t\tif ( parameters.alphaTest )\n\t\t\t_programLayers.enable( 10 );\n\t\tif ( parameters.vertexColors )\n\t\t\t_programLayers.enable( 11 );\n\t\tif ( parameters.vertexAlphas )\n\t\t\t_programLayers.enable( 12 );\n\t\tif ( parameters.vertexUv1s )\n\t\t\t_programLayers.enable( 13 );\n\t\tif ( parameters.vertexUv2s )\n\t\t\t_programLayers.enable( 14 );\n\t\tif ( parameters.vertexUv3s )\n\t\t\t_programLayers.enable( 15 );\n\t\tif ( parameters.vertexTangents )\n\t\t\t_programLayers.enable( 16 );\n\t\tif ( parameters.anisotropy )\n\t\t\t_programLayers.enable( 17 );\n\t\tif ( parameters.alphaHash )\n\t\t\t_programLayers.enable( 18 );\n\n\t\tarray.push( _programLayers.mask );\n\t\t_programLayers.disableAll();\n\n\t\tif ( parameters.fog )\n\t\t\t_programLayers.enable( 0 );\n\t\tif ( parameters.useFog )\n\t\t\t_programLayers.enable( 1 );\n\t\tif ( parameters.flatShading )\n\t\t\t_programLayers.enable( 2 );\n\t\tif ( parameters.logarithmicDepthBuffer )\n\t\t\t_programLayers.enable( 3 );\n\t\tif ( parameters.skinning )\n\t\t\t_programLayers.enable( 4 );\n\t\tif ( parameters.morphTargets )\n\t\t\t_programLayers.enable( 5 );\n\t\tif ( parameters.morphNormals )\n\t\t\t_programLayers.enable( 6 );\n\t\tif ( parameters.morphColors )\n\t\t\t_programLayers.enable( 7 );\n\t\tif ( parameters.premultipliedAlpha )\n\t\t\t_programLayers.enable( 8 );\n\t\tif ( parameters.shadowMapEnabled )\n\t\t\t_programLayers.enable( 9 );\n\t\tif ( parameters.useLegacyLights )\n\t\t\t_programLayers.enable( 10 );\n\t\tif ( parameters.doubleSided )\n\t\t\t_programLayers.enable( 11 );\n\t\tif ( parameters.flipSided )\n\t\t\t_programLayers.enable( 12 );\n\t\tif ( parameters.useDepthPacking )\n\t\t\t_programLayers.enable( 13 );\n\t\tif ( parameters.dithering )\n\t\t\t_programLayers.enable( 14 );\n\t\tif ( parameters.transmission )\n\t\t\t_programLayers.enable( 15 );\n\t\tif ( parameters.sheen )\n\t\t\t_programLayers.enable( 16 );\n\t\tif ( parameters.opaque )\n\t\t\t_programLayers.enable( 17 );\n\t\tif ( parameters.pointsUvs )\n\t\t\t_programLayers.enable( 18 );\n\t\tif ( parameters.decodeVideoTexture )\n\t\t\t_programLayers.enable( 19 );\n\n\t\tarray.push( _programLayers.mask );\n\n\t}\n\n\tfunction getUniforms( material ) {\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\t\tlet uniforms;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\t\t\tuniforms = UniformsUtils.clone( shader.uniforms );\n\n\t\t} else {\n\n\t\t\tuniforms = material.uniforms;\n\n\t\t}\n\n\t\treturn uniforms;\n\n\t}\n\n\tfunction acquireProgram( parameters, cacheKey ) {\n\n\t\tlet program;\n\n\t\t// Check if code has been already compiled\n\t\tfor ( let p = 0, pl = programs.length; p < pl; p ++ ) {\n\n\t\t\tconst preexistingProgram = programs[ p ];\n\n\t\t\tif ( preexistingProgram.cacheKey === cacheKey ) {\n\n\t\t\t\tprogram = preexistingProgram;\n\t\t\t\t++ program.usedTimes;\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( program === undefined ) {\n\n\t\t\tprogram = new WebGLProgram( renderer, cacheKey, parameters, bindingStates );\n\t\t\tprograms.push( program );\n\n\t\t}\n\n\t\treturn program;\n\n\t}\n\n\tfunction releaseProgram( program ) {\n\n\t\tif ( -- program.usedTimes === 0 ) {\n\n\t\t\t// Remove from unordered set\n\t\t\tconst i = programs.indexOf( program );\n\t\t\tprograms[ i ] = programs[ programs.length - 1 ];\n\t\t\tprograms.pop();\n\n\t\t\t// Free WebGL resources\n\t\t\tprogram.destroy();\n\n\t\t}\n\n\t}\n\n\tfunction releaseShaderCache( material ) {\n\n\t\t_customShaders.remove( material );\n\n\t}\n\n\tfunction dispose() {\n\n\t\t_customShaders.dispose();\n\n\t}\n\n\treturn {\n\t\tgetParameters: getParameters,\n\t\tgetProgramCacheKey: getProgramCacheKey,\n\t\tgetUniforms: getUniforms,\n\t\tacquireProgram: acquireProgram,\n\t\treleaseProgram: releaseProgram,\n\t\treleaseShaderCache: releaseShaderCache,\n\t\t// Exposed for resource monitoring & error feedback via renderer.info:\n\t\tprograms: programs,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction WebGLProperties() {\n\n\tlet properties = new WeakMap();\n\n\tfunction get( object ) {\n\n\t\tlet map = properties.get( object );\n\n\t\tif ( map === undefined ) {\n\n\t\t\tmap = {};\n\t\t\tproperties.set( object, map );\n\n\t\t}\n\n\t\treturn map;\n\n\t}\n\n\tfunction remove( object ) {\n\n\t\tproperties.delete( object );\n\n\t}\n\n\tfunction update( object, key, value ) {\n\n\t\tproperties.get( object )[ key ] = value;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tproperties = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction painterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.material.id !== b.material.id ) {\n\n\t\treturn a.material.id - b.material.id;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn a.z - b.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\nfunction reversePainterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn b.z - a.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\n\nfunction WebGLRenderList() {\n\n\tconst renderItems = [];\n\tlet renderItemsIndex = 0;\n\n\tconst opaque = [];\n\tconst transmissive = [];\n\tconst transparent = [];\n\n\tfunction init() {\n\n\t\trenderItemsIndex = 0;\n\n\t\topaque.length = 0;\n\t\ttransmissive.length = 0;\n\t\ttransparent.length = 0;\n\n\t}\n\n\tfunction getNextRenderItem( object, geometry, material, groupOrder, z, group ) {\n\n\t\tlet renderItem = renderItems[ renderItemsIndex ];\n\n\t\tif ( renderItem === undefined ) {\n\n\t\t\trenderItem = {\n\t\t\t\tid: object.id,\n\t\t\t\tobject: object,\n\t\t\t\tgeometry: geometry,\n\t\t\t\tmaterial: material,\n\t\t\t\tgroupOrder: groupOrder,\n\t\t\t\trenderOrder: object.renderOrder,\n\t\t\t\tz: z,\n\t\t\t\tgroup: group\n\t\t\t};\n\n\t\t\trenderItems[ renderItemsIndex ] = renderItem;\n\n\t\t} else {\n\n\t\t\trenderItem.id = object.id;\n\t\t\trenderItem.object = object;\n\t\t\trenderItem.geometry = geometry;\n\t\t\trenderItem.material = material;\n\t\t\trenderItem.groupOrder = groupOrder;\n\t\t\trenderItem.renderOrder = object.renderOrder;\n\t\t\trenderItem.z = z;\n\t\t\trenderItem.group = group;\n\n\t\t}\n\n\t\trenderItemsIndex ++;\n\n\t\treturn renderItem;\n\n\t}\n\n\tfunction push( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.push( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.push( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.push( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction unshift( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.unshift( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.unshift( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.unshift( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction sort( customOpaqueSort, customTransparentSort ) {\n\n\t\tif ( opaque.length > 1 ) opaque.sort( customOpaqueSort || painterSortStable );\n\t\tif ( transmissive.length > 1 ) transmissive.sort( customTransparentSort || reversePainterSortStable );\n\t\tif ( transparent.length > 1 ) transparent.sort( customTransparentSort || reversePainterSortStable );\n\n\t}\n\n\tfunction finish() {\n\n\t\t// Clear references from inactive renderItems in the list\n\n\t\tfor ( let i = renderItemsIndex, il = renderItems.length; i < il; i ++ ) {\n\n\t\t\tconst renderItem = renderItems[ i ];\n\n\t\t\tif ( renderItem.id === null ) break;\n\n\t\t\trenderItem.id = null;\n\t\t\trenderItem.object = null;\n\t\t\trenderItem.geometry = null;\n\t\t\trenderItem.material = null;\n\t\t\trenderItem.group = null;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\topaque: opaque,\n\t\ttransmissive: transmissive,\n\t\ttransparent: transparent,\n\n\t\tinit: init,\n\t\tpush: push,\n\t\tunshift: unshift,\n\t\tfinish: finish,\n\n\t\tsort: sort\n\t};\n\n}\n\nfunction WebGLRenderLists() {\n\n\tlet lists = new WeakMap();\n\n\tfunction get( scene, renderCallDepth ) {\n\n\t\tconst listArray = lists.get( scene );\n\t\tlet list;\n\n\t\tif ( listArray === undefined ) {\n\n\t\t\tlist = new WebGLRenderList();\n\t\t\tlists.set( scene, [ list ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= listArray.length ) {\n\n\t\t\t\tlist = new WebGLRenderList();\n\t\t\t\tlistArray.push( list );\n\n\t\t\t} else {\n\n\t\t\t\tlist = listArray[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn list;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tlists = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction UniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tconeCos: 0,\n\t\t\t\t\t\tpenumbraCos: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tskyColor: new Color(),\n\t\t\t\t\t\tgroundColor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\thalfWidth: new Vector3(),\n\t\t\t\t\t\thalfHeight: new Vector3()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\nfunction ShadowUniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2(),\n\t\t\t\t\t\tshadowCameraNear: 1,\n\t\t\t\t\t\tshadowCameraFar: 1000\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\t// TODO (abelnation): set RectAreaLight shadow uniforms\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\n\n\nlet nextVersion = 0;\n\nfunction shadowCastingAndTexturingLightsFirst( lightA, lightB ) {\n\n\treturn ( lightB.castShadow ? 2 : 0 ) - ( lightA.castShadow ? 2 : 0 ) + ( lightB.map ? 1 : 0 ) - ( lightA.map ? 1 : 0 );\n\n}\n\nfunction WebGLLights( extensions, capabilities ) {\n\n\tconst cache = new UniformsCache();\n\n\tconst shadowCache = ShadowUniformsCache();\n\n\tconst state = {\n\n\t\tversion: 0,\n\n\t\thash: {\n\t\t\tdirectionalLength: - 1,\n\t\t\tpointLength: - 1,\n\t\t\tspotLength: - 1,\n\t\t\trectAreaLength: - 1,\n\t\t\themiLength: - 1,\n\n\t\t\tnumDirectionalShadows: - 1,\n\t\t\tnumPointShadows: - 1,\n\t\t\tnumSpotShadows: - 1,\n\t\t\tnumSpotMaps: - 1,\n\n\t\t\tnumLightProbes: - 1\n\t\t},\n\n\t\tambient: [ 0, 0, 0 ],\n\t\tprobe: [],\n\t\tdirectional: [],\n\t\tdirectionalShadow: [],\n\t\tdirectionalShadowMap: [],\n\t\tdirectionalShadowMatrix: [],\n\t\tspot: [],\n\t\tspotLightMap: [],\n\t\tspotShadow: [],\n\t\tspotShadowMap: [],\n\t\tspotLightMatrix: [],\n\t\trectArea: [],\n\t\trectAreaLTC1: null,\n\t\trectAreaLTC2: null,\n\t\tpoint: [],\n\t\tpointShadow: [],\n\t\tpointShadowMap: [],\n\t\tpointShadowMatrix: [],\n\t\themi: [],\n\t\tnumSpotLightShadowsWithMaps: 0,\n\t\tnumLightProbes: 0\n\n\t};\n\n\tfor ( let i = 0; i < 9; i ++ ) state.probe.push( new Vector3() );\n\n\tconst vector3 = new Vector3();\n\tconst matrix4 = new Matrix4();\n\tconst matrix42 = new Matrix4();\n\n\tfunction setup( lights, useLegacyLights ) {\n\n\t\tlet r = 0, g = 0, b = 0;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) state.probe[ i ].set( 0, 0, 0 );\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tlet numDirectionalShadows = 0;\n\t\tlet numPointShadows = 0;\n\t\tlet numSpotShadows = 0;\n\t\tlet numSpotMaps = 0;\n\t\tlet numSpotShadowsWithMaps = 0;\n\n\t\tlet numLightProbes = 0;\n\n\t\t// ordering : [shadow casting + map texturing, map texturing, shadow casting, none ]\n\t\tlights.sort( shadowCastingAndTexturingLightsFirst );\n\n\t\t// artist-friendly light intensity scaling factor\n\t\tconst scaleFactor = ( useLegacyLights === true ) ? Math.PI : 1;\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tconst color = light.color;\n\t\t\tconst intensity = light.intensity;\n\t\t\tconst distance = light.distance;\n\n\t\t\tconst shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null;\n\n\t\t\tif ( light.isAmbientLight ) {\n\n\t\t\t\tr += color.r * intensity * scaleFactor;\n\t\t\t\tg += color.g * intensity * scaleFactor;\n\t\t\t\tb += color.b * intensity * scaleFactor;\n\n\t\t\t} else if ( light.isLightProbe ) {\n\n\t\t\t\tfor ( let j = 0; j < 9; j ++ ) {\n\n\t\t\t\t\tstate.probe[ j ].addScaledVector( light.sh.coefficients[ j ], intensity );\n\n\t\t\t\t}\n\n\t\t\t\tnumLightProbes ++;\n\n\t\t\t} else if ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor );\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.directionalShadow[ directionalLength ] = shadowUniforms;\n\t\t\t\t\tstate.directionalShadowMap[ directionalLength ] = shadowMap;\n\t\t\t\t\tstate.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumDirectionalShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.directional[ directionalLength ] = uniforms;\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity * scaleFactor );\n\t\t\t\tuniforms.distance = distance;\n\n\t\t\t\tuniforms.coneCos = Math.cos( light.angle );\n\t\t\t\tuniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) );\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tstate.spot[ spotLength ] = uniforms;\n\n\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\tif ( light.map ) {\n\n\t\t\t\t\tstate.spotLightMap[ numSpotMaps ] = light.map;\n\t\t\t\t\tnumSpotMaps ++;\n\n\t\t\t\t\t// make sure the lightMatrix is up to date\n\t\t\t\t\t// TODO : do it if required only\n\t\t\t\t\tshadow.updateMatrices( light );\n\n\t\t\t\t\tif ( light.castShadow ) numSpotShadowsWithMaps ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.spotLightMatrix[ spotLength ] = shadow.matrix;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.spotShadow[ spotLength ] = shadowUniforms;\n\t\t\t\t\tstate.spotShadowMap[ spotLength ] = shadowMap;\n\n\t\t\t\t\tnumSpotShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tstate.rectArea[ rectAreaLength ] = uniforms;\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor );\n\t\t\t\tuniforms.distance = light.distance;\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\t\t\t\t\tshadowUniforms.shadowCameraNear = shadow.camera.near;\n\t\t\t\t\tshadowUniforms.shadowCameraFar = shadow.camera.far;\n\n\t\t\t\t\tstate.pointShadow[ pointLength ] = shadowUniforms;\n\t\t\t\t\tstate.pointShadowMap[ pointLength ] = shadowMap;\n\t\t\t\t\tstate.pointShadowMatrix[ pointLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumPointShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.point[ pointLength ] = uniforms;\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.skyColor.copy( light.color ).multiplyScalar( intensity * scaleFactor );\n\t\t\t\tuniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity * scaleFactor );\n\n\t\t\t\tstate.hemi[ hemiLength ] = uniforms;\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( rectAreaLength > 0 ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t// WebGL 2\n\n\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t} else {\n\n\t\t\t\t// WebGL 1\n\n\t\t\t\tif ( extensions.has( 'OES_texture_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t\t} else if ( extensions.has( 'OES_texture_half_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_HALF_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_HALF_2;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.ambient[ 0 ] = r;\n\t\tstate.ambient[ 1 ] = g;\n\t\tstate.ambient[ 2 ] = b;\n\n\t\tconst hash = state.hash;\n\n\t\tif ( hash.directionalLength !== directionalLength ||\n\t\t\thash.pointLength !== pointLength ||\n\t\t\thash.spotLength !== spotLength ||\n\t\t\thash.rectAreaLength !== rectAreaLength ||\n\t\t\thash.hemiLength !== hemiLength ||\n\t\t\thash.numDirectionalShadows !== numDirectionalShadows ||\n\t\t\thash.numPointShadows !== numPointShadows ||\n\t\t\thash.numSpotShadows !== numSpotShadows ||\n\t\t\thash.numSpotMaps !== numSpotMaps ||\n\t\t\thash.numLightProbes !== numLightProbes ) {\n\n\t\t\tstate.directional.length = directionalLength;\n\t\t\tstate.spot.length = spotLength;\n\t\t\tstate.rectArea.length = rectAreaLength;\n\t\t\tstate.point.length = pointLength;\n\t\t\tstate.hemi.length = hemiLength;\n\n\t\t\tstate.directionalShadow.length = numDirectionalShadows;\n\t\t\tstate.directionalShadowMap.length = numDirectionalShadows;\n\t\t\tstate.pointShadow.length = numPointShadows;\n\t\t\tstate.pointShadowMap.length = numPointShadows;\n\t\t\tstate.spotShadow.length = numSpotShadows;\n\t\t\tstate.spotShadowMap.length = numSpotShadows;\n\t\t\tstate.directionalShadowMatrix.length = numDirectionalShadows;\n\t\t\tstate.pointShadowMatrix.length = numPointShadows;\n\t\t\tstate.spotLightMatrix.length = numSpotShadows + numSpotMaps - numSpotShadowsWithMaps;\n\t\t\tstate.spotLightMap.length = numSpotMaps;\n\t\t\tstate.numSpotLightShadowsWithMaps = numSpotShadowsWithMaps;\n\t\t\tstate.numLightProbes = numLightProbes;\n\n\t\t\thash.directionalLength = directionalLength;\n\t\t\thash.pointLength = pointLength;\n\t\t\thash.spotLength = spotLength;\n\t\t\thash.rectAreaLength = rectAreaLength;\n\t\t\thash.hemiLength = hemiLength;\n\n\t\t\thash.numDirectionalShadows = numDirectionalShadows;\n\t\t\thash.numPointShadows = numPointShadows;\n\t\t\thash.numSpotShadows = numSpotShadows;\n\t\t\thash.numSpotMaps = numSpotMaps;\n\n\t\t\thash.numLightProbes = numLightProbes;\n\n\t\t\tstate.version = nextVersion ++;\n\n\t\t}\n\n\t}\n\n\tfunction setupView( lights, camera ) {\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tconst viewMatrix = camera.matrixWorldInverse;\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tif ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = state.directional[ directionalLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = state.spot[ spotLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = state.rectArea[ rectAreaLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\t// extract local rotation of light to derive width/height half vectors\n\t\t\t\tmatrix42.identity();\n\t\t\t\tmatrix4.copy( light.matrixWorld );\n\t\t\t\tmatrix4.premultiply( viewMatrix );\n\t\t\t\tmatrix42.extractRotation( matrix4 );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tuniforms.halfWidth.applyMatrix4( matrix42 );\n\t\t\t\tuniforms.halfHeight.applyMatrix4( matrix42 );\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = state.point[ pointLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = state.hemi[ hemiLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tsetup: setup,\n\t\tsetupView: setupView,\n\t\tstate: state\n\t};\n\n}\n\nfunction WebGLRenderState( extensions, capabilities ) {\n\n\tconst lights = new WebGLLights( extensions, capabilities );\n\n\tconst lightsArray = [];\n\tconst shadowsArray = [];\n\n\tfunction init() {\n\n\t\tlightsArray.length = 0;\n\t\tshadowsArray.length = 0;\n\n\t}\n\n\tfunction pushLight( light ) {\n\n\t\tlightsArray.push( light );\n\n\t}\n\n\tfunction pushShadow( shadowLight ) {\n\n\t\tshadowsArray.push( shadowLight );\n\n\t}\n\n\tfunction setupLights( useLegacyLights ) {\n\n\t\tlights.setup( lightsArray, useLegacyLights );\n\n\t}\n\n\tfunction setupLightsView( camera ) {\n\n\t\tlights.setupView( lightsArray, camera );\n\n\t}\n\n\tconst state = {\n\t\tlightsArray: lightsArray,\n\t\tshadowsArray: shadowsArray,\n\n\t\tlights: lights\n\t};\n\n\treturn {\n\t\tinit: init,\n\t\tstate: state,\n\t\tsetupLights: setupLights,\n\t\tsetupLightsView: setupLightsView,\n\n\t\tpushLight: pushLight,\n\t\tpushShadow: pushShadow\n\t};\n\n}\n\nfunction WebGLRenderStates( extensions, capabilities ) {\n\n\tlet renderStates = new WeakMap();\n\n\tfunction get( scene, renderCallDepth = 0 ) {\n\n\t\tconst renderStateArray = renderStates.get( scene );\n\t\tlet renderState;\n\n\t\tif ( renderStateArray === undefined ) {\n\n\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\trenderStates.set( scene, [ renderState ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= renderStateArray.length ) {\n\n\t\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\t\trenderStateArray.push( renderState );\n\n\t\t\t} else {\n\n\t\t\t\trenderState = renderStateArray[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn renderState;\n\n\t}\n\n\tfunction dispose() {\n\n\t\trenderStates = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nclass MeshDepthMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshDepthMaterial = true;\n\n\t\tthis.type = 'MeshDepthMaterial';\n\n\t\tthis.depthPacking = BasicDepthPacking;\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.depthPacking = source.depthPacking;\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshDistanceMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshDistanceMaterial = true;\n\n\t\tthis.type = 'MeshDistanceMaterial';\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst vertex = \"void main() {\\n\\tgl_Position = vec4( position, 1.0 );\\n}\";\n\nconst fragment = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include \\nvoid main() {\\n\\tconst float samples = float( VSM_SAMPLES );\\n\\tfloat mean = 0.0;\\n\\tfloat squared_mean = 0.0;\\n\\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\\n\\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\\n\\tfor ( float i = 0.0; i < samples; i ++ ) {\\n\\t\\tfloat uvOffset = uvStart + i * uvStride;\\n\\t\\t#ifdef HORIZONTAL_PASS\\n\\t\\t\\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\\n\\t\\t\\tmean += distribution.x;\\n\\t\\t\\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\\t\\t#else\\n\\t\\t\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\\n\\t\\t\\tmean += depth;\\n\\t\\t\\tsquared_mean += depth * depth;\\n\\t\\t#endif\\n\\t}\\n\\tmean = mean / samples;\\n\\tsquared_mean = squared_mean / samples;\\n\\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\n\nfunction WebGLShadowMap( _renderer, _objects, _capabilities ) {\n\n\tlet _frustum = new Frustum();\n\n\tconst _shadowMapSize = new Vector2(),\n\t\t_viewportSize = new Vector2(),\n\n\t\t_viewport = new Vector4(),\n\n\t\t_depthMaterial = new MeshDepthMaterial( { depthPacking: RGBADepthPacking } ),\n\t\t_distanceMaterial = new MeshDistanceMaterial(),\n\n\t\t_materialCache = {},\n\n\t\t_maxTextureSize = _capabilities.maxTextureSize;\n\n\tconst shadowSide = { [ FrontSide ]: BackSide, [ BackSide ]: FrontSide, [ DoubleSide ]: DoubleSide };\n\n\tconst shadowMaterialVertical = new ShaderMaterial( {\n\t\tdefines: {\n\t\t\tVSM_SAMPLES: 8\n\t\t},\n\t\tuniforms: {\n\t\t\tshadow_pass: { value: null },\n\t\t\tresolution: { value: new Vector2() },\n\t\t\tradius: { value: 4.0 }\n\t\t},\n\n\t\tvertexShader: vertex,\n\t\tfragmentShader: fragment\n\n\t} );\n\n\tconst shadowMaterialHorizontal = shadowMaterialVertical.clone();\n\tshadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n\n\tconst fullScreenTri = new BufferGeometry();\n\tfullScreenTri.setAttribute(\n\t\t'position',\n\t\tnew BufferAttribute(\n\t\t\tnew Float32Array( [ - 1, - 1, 0.5, 3, - 1, 0.5, - 1, 3, 0.5 ] ),\n\t\t\t3\n\t\t)\n\t);\n\n\tconst fullScreenMesh = new Mesh( fullScreenTri, shadowMaterialVertical );\n\n\tconst scope = this;\n\n\tthis.enabled = false;\n\n\tthis.autoUpdate = true;\n\tthis.needsUpdate = false;\n\n\tthis.type = PCFShadowMap;\n\tlet _previousType = this.type;\n\n\tthis.render = function ( lights, scene, camera ) {\n\n\t\tif ( scope.enabled === false ) return;\n\t\tif ( scope.autoUpdate === false && scope.needsUpdate === false ) return;\n\n\t\tif ( lights.length === 0 ) return;\n\n\t\tconst currentRenderTarget = _renderer.getRenderTarget();\n\t\tconst activeCubeFace = _renderer.getActiveCubeFace();\n\t\tconst activeMipmapLevel = _renderer.getActiveMipmapLevel();\n\n\t\tconst _state = _renderer.state;\n\n\t\t// Set GL state for depth map.\n\t\t_state.setBlending( NoBlending );\n\t\t_state.buffers.color.setClear( 1, 1, 1, 1 );\n\t\t_state.buffers.depth.setTest( true );\n\t\t_state.setScissorTest( false );\n\n\t\t// check for shadow map type changes\n\n\t\tconst toVSM = ( _previousType !== VSMShadowMap && this.type === VSMShadowMap );\n\t\tconst fromVSM = ( _previousType === VSMShadowMap && this.type !== VSMShadowMap );\n\n\t\t// render depth map\n\n\t\tfor ( let i = 0, il = lights.length; i < il; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\t\t\tconst shadow = light.shadow;\n\n\t\t\tif ( shadow === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;\n\n\t\t\t_shadowMapSize.copy( shadow.mapSize );\n\n\t\t\tconst shadowFrameExtents = shadow.getFrameExtents();\n\n\t\t\t_shadowMapSize.multiply( shadowFrameExtents );\n\n\t\t\t_viewportSize.copy( shadow.mapSize );\n\n\t\t\tif ( _shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\tif ( _shadowMapSize.x > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.x = Math.floor( _maxTextureSize / shadowFrameExtents.x );\n\t\t\t\t\t_shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n\t\t\t\t\tshadow.mapSize.x = _viewportSize.x;\n\n\t\t\t\t}\n\n\t\t\t\tif ( _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.y = Math.floor( _maxTextureSize / shadowFrameExtents.y );\n\t\t\t\t\t_shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n\t\t\t\t\tshadow.mapSize.y = _viewportSize.y;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( shadow.map === null || toVSM === true || fromVSM === true ) {\n\n\t\t\t\tconst pars = ( this.type !== VSMShadowMap ) ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};\n\n\t\t\t\tif ( shadow.map !== null ) {\n\n\t\t\t\t\tshadow.map.dispose();\n\n\t\t\t\t}\n\n\t\t\t\tshadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\n\t\t\t\tshadow.camera.updateProjectionMatrix();\n\n\t\t\t}\n\n\t\t\t_renderer.setRenderTarget( shadow.map );\n\t\t\t_renderer.clear();\n\n\t\t\tconst viewportCount = shadow.getViewportCount();\n\n\t\t\tfor ( let vp = 0; vp < viewportCount; vp ++ ) {\n\n\t\t\t\tconst viewport = shadow.getViewport( vp );\n\n\t\t\t\t_viewport.set(\n\t\t\t\t\t_viewportSize.x * viewport.x,\n\t\t\t\t\t_viewportSize.y * viewport.y,\n\t\t\t\t\t_viewportSize.x * viewport.z,\n\t\t\t\t\t_viewportSize.y * viewport.w\n\t\t\t\t);\n\n\t\t\t\t_state.viewport( _viewport );\n\n\t\t\t\tshadow.updateMatrices( light, vp );\n\n\t\t\t\t_frustum = shadow.getFrustum();\n\n\t\t\t\trenderObject( scene, camera, shadow.camera, light, this.type );\n\n\t\t\t}\n\n\t\t\t// do blur pass for VSM\n\n\t\t\tif ( shadow.isPointLightShadow !== true && this.type === VSMShadowMap ) {\n\n\t\t\t\tVSMPass( shadow, camera );\n\n\t\t\t}\n\n\t\t\tshadow.needsUpdate = false;\n\n\t\t}\n\n\t\t_previousType = this.type;\n\n\t\tscope.needsUpdate = false;\n\n\t\t_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );\n\n\t};\n\n\tfunction VSMPass( shadow, camera ) {\n\n\t\tconst geometry = _objects.update( fullScreenMesh );\n\n\t\tif ( shadowMaterialVertical.defines.VSM_SAMPLES !== shadow.blurSamples ) {\n\n\t\t\tshadowMaterialVertical.defines.VSM_SAMPLES = shadow.blurSamples;\n\t\t\tshadowMaterialHorizontal.defines.VSM_SAMPLES = shadow.blurSamples;\n\n\t\t\tshadowMaterialVertical.needsUpdate = true;\n\t\t\tshadowMaterialHorizontal.needsUpdate = true;\n\n\t\t}\n\n\t\tif ( shadow.mapPass === null ) {\n\n\t\t\tshadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y );\n\n\t\t}\n\n\t\t// vertical pass\n\n\t\tshadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n\t\tshadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialVertical.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.mapPass );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null );\n\n\t\t// horizontal pass\n\n\t\tshadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n\t\tshadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.map );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null );\n\n\t}\n\n\tfunction getDepthMaterial( object, material, light, type ) {\n\n\t\tlet result = null;\n\n\t\tconst customMaterial = ( light.isPointLight === true ) ? object.customDistanceMaterial : object.customDepthMaterial;\n\n\t\tif ( customMaterial !== undefined ) {\n\n\t\t\tresult = customMaterial;\n\n\t\t} else {\n\n\t\t\tresult = ( light.isPointLight === true ) ? _distanceMaterial : _depthMaterial;\n\n\t\t\tif ( ( _renderer.localClippingEnabled && material.clipShadows === true && Array.isArray( material.clippingPlanes ) && material.clippingPlanes.length !== 0 ) ||\n\t\t\t\t( material.displacementMap && material.displacementScale !== 0 ) ||\n\t\t\t\t( material.alphaMap && material.alphaTest > 0 ) ||\n\t\t\t\t( material.map && material.alphaTest > 0 ) ) {\n\n\t\t\t\t// in this case we need a unique material instance reflecting the\n\t\t\t\t// appropriate state\n\n\t\t\t\tconst keyA = result.uuid, keyB = material.uuid;\n\n\t\t\t\tlet materialsForVariant = _materialCache[ keyA ];\n\n\t\t\t\tif ( materialsForVariant === undefined ) {\n\n\t\t\t\t\tmaterialsForVariant = {};\n\t\t\t\t\t_materialCache[ keyA ] = materialsForVariant;\n\n\t\t\t\t}\n\n\t\t\t\tlet cachedMaterial = materialsForVariant[ keyB ];\n\n\t\t\t\tif ( cachedMaterial === undefined ) {\n\n\t\t\t\t\tcachedMaterial = result.clone();\n\t\t\t\t\tmaterialsForVariant[ keyB ] = cachedMaterial;\n\n\t\t\t\t}\n\n\t\t\t\tresult = cachedMaterial;\n\n\t\t\t}\n\n\t\t}\n\n\t\tresult.visible = material.visible;\n\t\tresult.wireframe = material.wireframe;\n\n\t\tif ( type === VSMShadowMap ) {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : material.side;\n\n\t\t} else {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : shadowSide[ material.side ];\n\n\t\t}\n\n\t\tresult.alphaMap = material.alphaMap;\n\t\tresult.alphaTest = material.alphaTest;\n\t\tresult.map = material.map;\n\n\t\tresult.clipShadows = material.clipShadows;\n\t\tresult.clippingPlanes = material.clippingPlanes;\n\t\tresult.clipIntersection = material.clipIntersection;\n\n\t\tresult.displacementMap = material.displacementMap;\n\t\tresult.displacementScale = material.displacementScale;\n\t\tresult.displacementBias = material.displacementBias;\n\n\t\tresult.wireframeLinewidth = material.wireframeLinewidth;\n\t\tresult.linewidth = material.linewidth;\n\n\t\tif ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) {\n\n\t\t\tconst materialProperties = _renderer.properties.get( result );\n\t\t\tmaterialProperties.light = light;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\tfunction renderObject( object, camera, shadowCamera, light, type ) {\n\n\t\tif ( object.visible === false ) return;\n\n\t\tconst visible = object.layers.test( camera.layers );\n\n\t\tif ( visible && ( object.isMesh || object.isLine || object.isPoints ) ) {\n\n\t\t\tif ( ( object.castShadow || ( object.receiveShadow && type === VSMShadowMap ) ) && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) {\n\n\t\t\t\tobject.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );\n\n\t\t\t\tconst geometry = _objects.update( object );\n\t\t\t\tconst material = object.material;\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\tfor ( let k = 0, kl = groups.length; k < kl; k ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ k ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, groupMaterial, light, type );\n\n\t\t\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, material, light, type );\n\n\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\trenderObject( children[ i ], camera, shadowCamera, light, type );\n\n\t\t}\n\n\t}\n\n}\n\nfunction WebGLState( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction ColorBuffer() {\n\n\t\tlet locked = false;\n\n\t\tconst color = new Vector4();\n\t\tlet currentColorMask = null;\n\t\tconst currentColorClear = new Vector4( 0, 0, 0, 0 );\n\n\t\treturn {\n\n\t\t\tsetMask: function ( colorMask ) {\n\n\t\t\t\tif ( currentColorMask !== colorMask && ! locked ) {\n\n\t\t\t\t\tgl.colorMask( colorMask, colorMask, colorMask, colorMask );\n\t\t\t\t\tcurrentColorMask = colorMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( r, g, b, a, premultipliedAlpha ) {\n\n\t\t\t\tif ( premultipliedAlpha === true ) {\n\n\t\t\t\t\tr *= a; g *= a; b *= a;\n\n\t\t\t\t}\n\n\t\t\t\tcolor.set( r, g, b, a );\n\n\t\t\t\tif ( currentColorClear.equals( color ) === false ) {\n\n\t\t\t\t\tgl.clearColor( r, g, b, a );\n\t\t\t\t\tcurrentColorClear.copy( color );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentColorMask = null;\n\t\t\t\tcurrentColorClear.set( - 1, 0, 0, 0 ); // set to invalid state\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction DepthBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentDepthMask = null;\n\t\tlet currentDepthFunc = null;\n\t\tlet currentDepthClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( depthTest ) {\n\n\t\t\t\tif ( depthTest ) {\n\n\t\t\t\t\tenable( gl.DEPTH_TEST );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tdisable( gl.DEPTH_TEST );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( depthMask ) {\n\n\t\t\t\tif ( currentDepthMask !== depthMask && ! locked ) {\n\n\t\t\t\t\tgl.depthMask( depthMask );\n\t\t\t\t\tcurrentDepthMask = depthMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( depthFunc ) {\n\n\t\t\t\tif ( currentDepthFunc !== depthFunc ) {\n\n\t\t\t\t\tswitch ( depthFunc ) {\n\n\t\t\t\t\t\tcase NeverDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.NEVER );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AlwaysDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.ALWAYS );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase LessDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.LESS );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase LessEqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.LEQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.EQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase GreaterEqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.GEQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase GreaterDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.GREATER );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase NotEqualDepth:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.NOTEQUAL );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tgl.depthFunc( gl.LEQUAL );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentDepthFunc = depthFunc;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( depth ) {\n\n\t\t\t\tif ( currentDepthClear !== depth ) {\n\n\t\t\t\t\tgl.clearDepth( depth );\n\t\t\t\t\tcurrentDepthClear = depth;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentDepthMask = null;\n\t\t\t\tcurrentDepthFunc = null;\n\t\t\t\tcurrentDepthClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction StencilBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentStencilMask = null;\n\t\tlet currentStencilFunc = null;\n\t\tlet currentStencilRef = null;\n\t\tlet currentStencilFuncMask = null;\n\t\tlet currentStencilFail = null;\n\t\tlet currentStencilZFail = null;\n\t\tlet currentStencilZPass = null;\n\t\tlet currentStencilClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( stencilTest ) {\n\n\t\t\t\tif ( ! locked ) {\n\n\t\t\t\t\tif ( stencilTest ) {\n\n\t\t\t\t\t\tenable( gl.STENCIL_TEST );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdisable( gl.STENCIL_TEST );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( stencilMask ) {\n\n\t\t\t\tif ( currentStencilMask !== stencilMask && ! locked ) {\n\n\t\t\t\t\tgl.stencilMask( stencilMask );\n\t\t\t\t\tcurrentStencilMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( stencilFunc, stencilRef, stencilMask ) {\n\n\t\t\t\tif ( currentStencilFunc !== stencilFunc ||\n\t\t\t\t currentStencilRef !== stencilRef ||\n\t\t\t\t currentStencilFuncMask !== stencilMask ) {\n\n\t\t\t\t\tgl.stencilFunc( stencilFunc, stencilRef, stencilMask );\n\n\t\t\t\t\tcurrentStencilFunc = stencilFunc;\n\t\t\t\t\tcurrentStencilRef = stencilRef;\n\t\t\t\t\tcurrentStencilFuncMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetOp: function ( stencilFail, stencilZFail, stencilZPass ) {\n\n\t\t\t\tif ( currentStencilFail !== stencilFail ||\n\t\t\t\t currentStencilZFail !== stencilZFail ||\n\t\t\t\t currentStencilZPass !== stencilZPass ) {\n\n\t\t\t\t\tgl.stencilOp( stencilFail, stencilZFail, stencilZPass );\n\n\t\t\t\t\tcurrentStencilFail = stencilFail;\n\t\t\t\t\tcurrentStencilZFail = stencilZFail;\n\t\t\t\t\tcurrentStencilZPass = stencilZPass;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( stencil ) {\n\n\t\t\t\tif ( currentStencilClear !== stencil ) {\n\n\t\t\t\t\tgl.clearStencil( stencil );\n\t\t\t\t\tcurrentStencilClear = stencil;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentStencilMask = null;\n\t\t\t\tcurrentStencilFunc = null;\n\t\t\t\tcurrentStencilRef = null;\n\t\t\t\tcurrentStencilFuncMask = null;\n\t\t\t\tcurrentStencilFail = null;\n\t\t\t\tcurrentStencilZFail = null;\n\t\t\t\tcurrentStencilZPass = null;\n\t\t\t\tcurrentStencilClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t//\n\n\tconst colorBuffer = new ColorBuffer();\n\tconst depthBuffer = new DepthBuffer();\n\tconst stencilBuffer = new StencilBuffer();\n\n\tconst uboBindings = new WeakMap();\n\tconst uboProgramMap = new WeakMap();\n\n\tlet enabledCapabilities = {};\n\n\tlet currentBoundFramebuffers = {};\n\tlet currentDrawbuffers = new WeakMap();\n\tlet defaultDrawbuffers = [];\n\n\tlet currentProgram = null;\n\n\tlet currentBlendingEnabled = false;\n\tlet currentBlending = null;\n\tlet currentBlendEquation = null;\n\tlet currentBlendSrc = null;\n\tlet currentBlendDst = null;\n\tlet currentBlendEquationAlpha = null;\n\tlet currentBlendSrcAlpha = null;\n\tlet currentBlendDstAlpha = null;\n\tlet currentBlendColor = new Color( 0, 0, 0 );\n\tlet currentBlendAlpha = 0;\n\tlet currentPremultipledAlpha = false;\n\n\tlet currentFlipSided = null;\n\tlet currentCullFace = null;\n\n\tlet currentLineWidth = null;\n\n\tlet currentPolygonOffsetFactor = null;\n\tlet currentPolygonOffsetUnits = null;\n\n\tconst maxTextures = gl.getParameter( gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS );\n\n\tlet lineWidthAvailable = false;\n\tlet version = 0;\n\tconst glVersion = gl.getParameter( gl.VERSION );\n\n\tif ( glVersion.indexOf( 'WebGL' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^WebGL (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 1.0 );\n\n\t} else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^OpenGL ES (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 2.0 );\n\n\t}\n\n\tlet currentTextureSlot = null;\n\tlet currentBoundTextures = {};\n\n\tconst scissorParam = gl.getParameter( gl.SCISSOR_BOX );\n\tconst viewportParam = gl.getParameter( gl.VIEWPORT );\n\n\tconst currentScissor = new Vector4().fromArray( scissorParam );\n\tconst currentViewport = new Vector4().fromArray( viewportParam );\n\n\tfunction createTexture( type, target, count, dimensions ) {\n\n\t\tconst data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4.\n\t\tconst texture = gl.createTexture();\n\n\t\tgl.bindTexture( type, texture );\n\t\tgl.texParameteri( type, gl.TEXTURE_MIN_FILTER, gl.NEAREST );\n\t\tgl.texParameteri( type, gl.TEXTURE_MAG_FILTER, gl.NEAREST );\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tif ( isWebGL2 && ( type === gl.TEXTURE_3D || type === gl.TEXTURE_2D_ARRAY ) ) {\n\n\t\t\t\tgl.texImage3D( target, 0, gl.RGBA, 1, 1, dimensions, 0, gl.RGBA, gl.UNSIGNED_BYTE, data );\n\n\t\t\t} else {\n\n\t\t\t\tgl.texImage2D( target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tconst emptyTextures = {};\n\temptyTextures[ gl.TEXTURE_2D ] = createTexture( gl.TEXTURE_2D, gl.TEXTURE_2D, 1 );\n\temptyTextures[ gl.TEXTURE_CUBE_MAP ] = createTexture( gl.TEXTURE_CUBE_MAP, gl.TEXTURE_CUBE_MAP_POSITIVE_X, 6 );\n\n\tif ( isWebGL2 ) {\n\n\t\temptyTextures[ gl.TEXTURE_2D_ARRAY ] = createTexture( gl.TEXTURE_2D_ARRAY, gl.TEXTURE_2D_ARRAY, 1, 1 );\n\t\temptyTextures[ gl.TEXTURE_3D ] = createTexture( gl.TEXTURE_3D, gl.TEXTURE_3D, 1, 1 );\n\n\t}\n\n\t// init\n\n\tcolorBuffer.setClear( 0, 0, 0, 1 );\n\tdepthBuffer.setClear( 1 );\n\tstencilBuffer.setClear( 0 );\n\n\tenable( gl.DEPTH_TEST );\n\tdepthBuffer.setFunc( LessEqualDepth );\n\n\tsetFlipSided( false );\n\tsetCullFace( CullFaceBack );\n\tenable( gl.CULL_FACE );\n\n\tsetBlending( NoBlending );\n\n\t//\n\n\tfunction enable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== true ) {\n\n\t\t\tgl.enable( id );\n\t\t\tenabledCapabilities[ id ] = true;\n\n\t\t}\n\n\t}\n\n\tfunction disable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== false ) {\n\n\t\t\tgl.disable( id );\n\t\t\tenabledCapabilities[ id ] = false;\n\n\t\t}\n\n\t}\n\n\tfunction bindFramebuffer( target, framebuffer ) {\n\n\t\tif ( currentBoundFramebuffers[ target ] !== framebuffer ) {\n\n\t\t\tgl.bindFramebuffer( target, framebuffer );\n\n\t\t\tcurrentBoundFramebuffers[ target ] = framebuffer;\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t// gl.DRAW_FRAMEBUFFER is equivalent to gl.FRAMEBUFFER\n\n\t\t\t\tif ( target === gl.DRAW_FRAMEBUFFER ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ gl.FRAMEBUFFER ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t\tif ( target === gl.FRAMEBUFFER ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ gl.DRAW_FRAMEBUFFER ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tfunction drawBuffers( renderTarget, framebuffer ) {\n\n\t\tlet drawBuffers = defaultDrawbuffers;\n\n\t\tlet needsUpdate = false;\n\n\t\tif ( renderTarget ) {\n\n\t\t\tdrawBuffers = currentDrawbuffers.get( framebuffer );\n\n\t\t\tif ( drawBuffers === undefined ) {\n\n\t\t\t\tdrawBuffers = [];\n\t\t\t\tcurrentDrawbuffers.set( framebuffer, drawBuffers );\n\n\t\t\t}\n\n\t\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\tif ( drawBuffers.length !== textures.length || drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) {\n\n\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tdrawBuffers[ i ] = gl.COLOR_ATTACHMENT0 + i;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tdrawBuffers.length = textures.length;\n\n\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) {\n\n\t\t\t\t\tdrawBuffers[ 0 ] = gl.COLOR_ATTACHMENT0;\n\n\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( drawBuffers[ 0 ] !== gl.BACK ) {\n\n\t\t\t\tdrawBuffers[ 0 ] = gl.BACK;\n\n\t\t\t\tneedsUpdate = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( needsUpdate ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\tgl.drawBuffers( drawBuffers );\n\n\t\t\t} else {\n\n\t\t\t\textensions.get( 'WEBGL_draw_buffers' ).drawBuffersWEBGL( drawBuffers );\n\n\t\t\t}\n\n\t\t}\n\n\n\t}\n\n\tfunction useProgram( program ) {\n\n\t\tif ( currentProgram !== program ) {\n\n\t\t\tgl.useProgram( program );\n\n\t\t\tcurrentProgram = program;\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tconst equationToGL = {\n\t\t[ AddEquation ]: gl.FUNC_ADD,\n\t\t[ SubtractEquation ]: gl.FUNC_SUBTRACT,\n\t\t[ ReverseSubtractEquation ]: gl.FUNC_REVERSE_SUBTRACT\n\t};\n\n\tif ( isWebGL2 ) {\n\n\t\tequationToGL[ MinEquation ] = gl.MIN;\n\t\tequationToGL[ MaxEquation ] = gl.MAX;\n\n\t} else {\n\n\t\tconst extension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tequationToGL[ MinEquation ] = extension.MIN_EXT;\n\t\t\tequationToGL[ MaxEquation ] = extension.MAX_EXT;\n\n\t\t}\n\n\t}\n\n\tconst factorToGL = {\n\t\t[ ZeroFactor ]: gl.ZERO,\n\t\t[ OneFactor ]: gl.ONE,\n\t\t[ SrcColorFactor ]: gl.SRC_COLOR,\n\t\t[ SrcAlphaFactor ]: gl.SRC_ALPHA,\n\t\t[ SrcAlphaSaturateFactor ]: gl.SRC_ALPHA_SATURATE,\n\t\t[ DstColorFactor ]: gl.DST_COLOR,\n\t\t[ DstAlphaFactor ]: gl.DST_ALPHA,\n\t\t[ OneMinusSrcColorFactor ]: gl.ONE_MINUS_SRC_COLOR,\n\t\t[ OneMinusSrcAlphaFactor ]: gl.ONE_MINUS_SRC_ALPHA,\n\t\t[ OneMinusDstColorFactor ]: gl.ONE_MINUS_DST_COLOR,\n\t\t[ OneMinusDstAlphaFactor ]: gl.ONE_MINUS_DST_ALPHA,\n\t\t[ ConstantColorFactor ]: gl.CONSTANT_COLOR,\n\t\t[ OneMinusConstantColorFactor ]: gl.ONE_MINUS_CONSTANT_COLOR,\n\t\t[ ConstantAlphaFactor ]: gl.CONSTANT_ALPHA,\n\t\t[ OneMinusConstantAlphaFactor ]: gl.ONE_MINUS_CONSTANT_ALPHA\n\t};\n\n\tfunction setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, blendColor, blendAlpha, premultipliedAlpha ) {\n\n\t\tif ( blending === NoBlending ) {\n\n\t\t\tif ( currentBlendingEnabled === true ) {\n\n\t\t\t\tdisable( gl.BLEND );\n\t\t\t\tcurrentBlendingEnabled = false;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( currentBlendingEnabled === false ) {\n\n\t\t\tenable( gl.BLEND );\n\t\t\tcurrentBlendingEnabled = true;\n\n\t\t}\n\n\t\tif ( blending !== CustomBlending ) {\n\n\t\t\tif ( blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha ) {\n\n\t\t\t\tif ( currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation ) {\n\n\t\t\t\t\tgl.blendEquation( gl.FUNC_ADD );\n\n\t\t\t\t\tcurrentBlendEquation = AddEquation;\n\t\t\t\t\tcurrentBlendEquationAlpha = AddEquation;\n\n\t\t\t\t}\n\n\t\t\t\tif ( premultipliedAlpha ) {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( gl.ONE, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( gl.SRC_ALPHA, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFunc( gl.ZERO, gl.SRC_COLOR );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tcurrentBlendSrc = null;\n\t\t\t\tcurrentBlendDst = null;\n\t\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\t\tcurrentBlendDstAlpha = null;\n\t\t\t\tcurrentBlendColor.set( 0, 0, 0 );\n\t\t\t\tcurrentBlendAlpha = 0;\n\n\t\t\t\tcurrentBlending = blending;\n\t\t\t\tcurrentPremultipledAlpha = premultipliedAlpha;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// custom blending\n\n\t\tblendEquationAlpha = blendEquationAlpha || blendEquation;\n\t\tblendSrcAlpha = blendSrcAlpha || blendSrc;\n\t\tblendDstAlpha = blendDstAlpha || blendDst;\n\n\t\tif ( blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha ) {\n\n\t\t\tgl.blendEquationSeparate( equationToGL[ blendEquation ], equationToGL[ blendEquationAlpha ] );\n\n\t\t\tcurrentBlendEquation = blendEquation;\n\t\t\tcurrentBlendEquationAlpha = blendEquationAlpha;\n\n\t\t}\n\n\t\tif ( blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha ) {\n\n\t\t\tgl.blendFuncSeparate( factorToGL[ blendSrc ], factorToGL[ blendDst ], factorToGL[ blendSrcAlpha ], factorToGL[ blendDstAlpha ] );\n\n\t\t\tcurrentBlendSrc = blendSrc;\n\t\t\tcurrentBlendDst = blendDst;\n\t\t\tcurrentBlendSrcAlpha = blendSrcAlpha;\n\t\t\tcurrentBlendDstAlpha = blendDstAlpha;\n\n\t\t}\n\n\t\tif ( blendColor.equals( currentBlendColor ) === false || blendAlpha !== currentBlendAlpha ) {\n\n\t\t\tgl.blendColor( blendColor.r, blendColor.g, blendColor.b, blendAlpha );\n\n\t\t\tcurrentBlendColor.copy( blendColor );\n\t\t\tcurrentBlendAlpha = blendAlpha;\n\n\t\t}\n\n\t\tcurrentBlending = blending;\n\t\tcurrentPremultipledAlpha = false;\n\n\t}\n\n\tfunction setMaterial( material, frontFaceCW ) {\n\n\t\tmaterial.side === DoubleSide\n\t\t\t? disable( gl.CULL_FACE )\n\t\t\t: enable( gl.CULL_FACE );\n\n\t\tlet flipSided = ( material.side === BackSide );\n\t\tif ( frontFaceCW ) flipSided = ! flipSided;\n\n\t\tsetFlipSided( flipSided );\n\n\t\t( material.blending === NormalBlending && material.transparent === false )\n\t\t\t? setBlending( NoBlending )\n\t\t\t: setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.blendColor, material.blendAlpha, material.premultipliedAlpha );\n\n\t\tdepthBuffer.setFunc( material.depthFunc );\n\t\tdepthBuffer.setTest( material.depthTest );\n\t\tdepthBuffer.setMask( material.depthWrite );\n\t\tcolorBuffer.setMask( material.colorWrite );\n\n\t\tconst stencilWrite = material.stencilWrite;\n\t\tstencilBuffer.setTest( stencilWrite );\n\t\tif ( stencilWrite ) {\n\n\t\t\tstencilBuffer.setMask( material.stencilWriteMask );\n\t\t\tstencilBuffer.setFunc( material.stencilFunc, material.stencilRef, material.stencilFuncMask );\n\t\t\tstencilBuffer.setOp( material.stencilFail, material.stencilZFail, material.stencilZPass );\n\n\t\t}\n\n\t\tsetPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits );\n\n\t\tmaterial.alphaToCoverage === true\n\t\t\t? enable( gl.SAMPLE_ALPHA_TO_COVERAGE )\n\t\t\t: disable( gl.SAMPLE_ALPHA_TO_COVERAGE );\n\n\t}\n\n\t//\n\n\tfunction setFlipSided( flipSided ) {\n\n\t\tif ( currentFlipSided !== flipSided ) {\n\n\t\t\tif ( flipSided ) {\n\n\t\t\t\tgl.frontFace( gl.CW );\n\n\t\t\t} else {\n\n\t\t\t\tgl.frontFace( gl.CCW );\n\n\t\t\t}\n\n\t\t\tcurrentFlipSided = flipSided;\n\n\t\t}\n\n\t}\n\n\tfunction setCullFace( cullFace ) {\n\n\t\tif ( cullFace !== CullFaceNone ) {\n\n\t\t\tenable( gl.CULL_FACE );\n\n\t\t\tif ( cullFace !== currentCullFace ) {\n\n\t\t\t\tif ( cullFace === CullFaceBack ) {\n\n\t\t\t\t\tgl.cullFace( gl.BACK );\n\n\t\t\t\t} else if ( cullFace === CullFaceFront ) {\n\n\t\t\t\t\tgl.cullFace( gl.FRONT );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tgl.cullFace( gl.FRONT_AND_BACK );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( gl.CULL_FACE );\n\n\t\t}\n\n\t\tcurrentCullFace = cullFace;\n\n\t}\n\n\tfunction setLineWidth( width ) {\n\n\t\tif ( width !== currentLineWidth ) {\n\n\t\t\tif ( lineWidthAvailable ) gl.lineWidth( width );\n\n\t\t\tcurrentLineWidth = width;\n\n\t\t}\n\n\t}\n\n\tfunction setPolygonOffset( polygonOffset, factor, units ) {\n\n\t\tif ( polygonOffset ) {\n\n\t\t\tenable( gl.POLYGON_OFFSET_FILL );\n\n\t\t\tif ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) {\n\n\t\t\t\tgl.polygonOffset( factor, units );\n\n\t\t\t\tcurrentPolygonOffsetFactor = factor;\n\t\t\t\tcurrentPolygonOffsetUnits = units;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( gl.POLYGON_OFFSET_FILL );\n\n\t\t}\n\n\t}\n\n\tfunction setScissorTest( scissorTest ) {\n\n\t\tif ( scissorTest ) {\n\n\t\t\tenable( gl.SCISSOR_TEST );\n\n\t\t} else {\n\n\t\t\tdisable( gl.SCISSOR_TEST );\n\n\t\t}\n\n\t}\n\n\t// texture\n\n\tfunction activeTexture( webglSlot ) {\n\n\t\tif ( webglSlot === undefined ) webglSlot = gl.TEXTURE0 + maxTextures - 1;\n\n\t\tif ( currentTextureSlot !== webglSlot ) {\n\n\t\t\tgl.activeTexture( webglSlot );\n\t\t\tcurrentTextureSlot = webglSlot;\n\n\t\t}\n\n\t}\n\n\tfunction bindTexture( webglType, webglTexture, webglSlot ) {\n\n\t\tif ( webglSlot === undefined ) {\n\n\t\t\tif ( currentTextureSlot === null ) {\n\n\t\t\t\twebglSlot = gl.TEXTURE0 + maxTextures - 1;\n\n\t\t\t} else {\n\n\t\t\t\twebglSlot = currentTextureSlot;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet boundTexture = currentBoundTextures[ webglSlot ];\n\n\t\tif ( boundTexture === undefined ) {\n\n\t\t\tboundTexture = { type: undefined, texture: undefined };\n\t\t\tcurrentBoundTextures[ webglSlot ] = boundTexture;\n\n\t\t}\n\n\t\tif ( boundTexture.type !== webglType || boundTexture.texture !== webglTexture ) {\n\n\t\t\tif ( currentTextureSlot !== webglSlot ) {\n\n\t\t\t\tgl.activeTexture( webglSlot );\n\t\t\t\tcurrentTextureSlot = webglSlot;\n\n\t\t\t}\n\n\t\t\tgl.bindTexture( webglType, webglTexture || emptyTextures[ webglType ] );\n\n\t\t\tboundTexture.type = webglType;\n\t\t\tboundTexture.texture = webglTexture;\n\n\t\t}\n\n\t}\n\n\tfunction unbindTexture() {\n\n\t\tconst boundTexture = currentBoundTextures[ currentTextureSlot ];\n\n\t\tif ( boundTexture !== undefined && boundTexture.type !== undefined ) {\n\n\t\t\tgl.bindTexture( boundTexture.type, null );\n\n\t\t\tboundTexture.type = undefined;\n\t\t\tboundTexture.texture = undefined;\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texSubImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texSubImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texSubImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texSubImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexSubImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexSubImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexSubImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexSubImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texStorage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texStorage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texStorage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texStorage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction scissor( scissor ) {\n\n\t\tif ( currentScissor.equals( scissor ) === false ) {\n\n\t\t\tgl.scissor( scissor.x, scissor.y, scissor.z, scissor.w );\n\t\t\tcurrentScissor.copy( scissor );\n\n\t\t}\n\n\t}\n\n\tfunction viewport( viewport ) {\n\n\t\tif ( currentViewport.equals( viewport ) === false ) {\n\n\t\t\tgl.viewport( viewport.x, viewport.y, viewport.z, viewport.w );\n\t\t\tcurrentViewport.copy( viewport );\n\n\t\t}\n\n\t}\n\n\tfunction updateUBOMapping( uniformsGroup, program ) {\n\n\t\tlet mapping = uboProgramMap.get( program );\n\n\t\tif ( mapping === undefined ) {\n\n\t\t\tmapping = new WeakMap();\n\n\t\t\tuboProgramMap.set( program, mapping );\n\n\t\t}\n\n\t\tlet blockIndex = mapping.get( uniformsGroup );\n\n\t\tif ( blockIndex === undefined ) {\n\n\t\t\tblockIndex = gl.getUniformBlockIndex( program, uniformsGroup.name );\n\n\t\t\tmapping.set( uniformsGroup, blockIndex );\n\n\t\t}\n\n\t}\n\n\tfunction uniformBlockBinding( uniformsGroup, program ) {\n\n\t\tconst mapping = uboProgramMap.get( program );\n\t\tconst blockIndex = mapping.get( uniformsGroup );\n\n\t\tif ( uboBindings.get( program ) !== blockIndex ) {\n\n\t\t\t// bind shader specific block index to global block point\n\t\t\tgl.uniformBlockBinding( program, blockIndex, uniformsGroup.__bindingPointIndex );\n\n\t\t\tuboBindings.set( program, blockIndex );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction reset() {\n\n\t\t// reset state\n\n\t\tgl.disable( gl.BLEND );\n\t\tgl.disable( gl.CULL_FACE );\n\t\tgl.disable( gl.DEPTH_TEST );\n\t\tgl.disable( gl.POLYGON_OFFSET_FILL );\n\t\tgl.disable( gl.SCISSOR_TEST );\n\t\tgl.disable( gl.STENCIL_TEST );\n\t\tgl.disable( gl.SAMPLE_ALPHA_TO_COVERAGE );\n\n\t\tgl.blendEquation( gl.FUNC_ADD );\n\t\tgl.blendFunc( gl.ONE, gl.ZERO );\n\t\tgl.blendFuncSeparate( gl.ONE, gl.ZERO, gl.ONE, gl.ZERO );\n\t\tgl.blendColor( 0, 0, 0, 0 );\n\n\t\tgl.colorMask( true, true, true, true );\n\t\tgl.clearColor( 0, 0, 0, 0 );\n\n\t\tgl.depthMask( true );\n\t\tgl.depthFunc( gl.LESS );\n\t\tgl.clearDepth( 1 );\n\n\t\tgl.stencilMask( 0xffffffff );\n\t\tgl.stencilFunc( gl.ALWAYS, 0, 0xffffffff );\n\t\tgl.stencilOp( gl.KEEP, gl.KEEP, gl.KEEP );\n\t\tgl.clearStencil( 0 );\n\n\t\tgl.cullFace( gl.BACK );\n\t\tgl.frontFace( gl.CCW );\n\n\t\tgl.polygonOffset( 0, 0 );\n\n\t\tgl.activeTexture( gl.TEXTURE0 );\n\n\t\tgl.bindFramebuffer( gl.FRAMEBUFFER, null );\n\n\t\tif ( isWebGL2 === true ) {\n\n\t\t\tgl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, null );\n\t\t\tgl.bindFramebuffer( gl.READ_FRAMEBUFFER, null );\n\n\t\t}\n\n\t\tgl.useProgram( null );\n\n\t\tgl.lineWidth( 1 );\n\n\t\tgl.scissor( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tgl.viewport( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\t// reset internals\n\n\t\tenabledCapabilities = {};\n\n\t\tcurrentTextureSlot = null;\n\t\tcurrentBoundTextures = {};\n\n\t\tcurrentBoundFramebuffers = {};\n\t\tcurrentDrawbuffers = new WeakMap();\n\t\tdefaultDrawbuffers = [];\n\n\t\tcurrentProgram = null;\n\n\t\tcurrentBlendingEnabled = false;\n\t\tcurrentBlending = null;\n\t\tcurrentBlendEquation = null;\n\t\tcurrentBlendSrc = null;\n\t\tcurrentBlendDst = null;\n\t\tcurrentBlendEquationAlpha = null;\n\t\tcurrentBlendSrcAlpha = null;\n\t\tcurrentBlendDstAlpha = null;\n\t\tcurrentBlendColor = new Color( 0, 0, 0 );\n\t\tcurrentBlendAlpha = 0;\n\t\tcurrentPremultipledAlpha = false;\n\n\t\tcurrentFlipSided = null;\n\t\tcurrentCullFace = null;\n\n\t\tcurrentLineWidth = null;\n\n\t\tcurrentPolygonOffsetFactor = null;\n\t\tcurrentPolygonOffsetUnits = null;\n\n\t\tcurrentScissor.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tcurrentViewport.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\tcolorBuffer.reset();\n\t\tdepthBuffer.reset();\n\t\tstencilBuffer.reset();\n\n\t}\n\n\treturn {\n\n\t\tbuffers: {\n\t\t\tcolor: colorBuffer,\n\t\t\tdepth: depthBuffer,\n\t\t\tstencil: stencilBuffer\n\t\t},\n\n\t\tenable: enable,\n\t\tdisable: disable,\n\n\t\tbindFramebuffer: bindFramebuffer,\n\t\tdrawBuffers: drawBuffers,\n\n\t\tuseProgram: useProgram,\n\n\t\tsetBlending: setBlending,\n\t\tsetMaterial: setMaterial,\n\n\t\tsetFlipSided: setFlipSided,\n\t\tsetCullFace: setCullFace,\n\n\t\tsetLineWidth: setLineWidth,\n\t\tsetPolygonOffset: setPolygonOffset,\n\n\t\tsetScissorTest: setScissorTest,\n\n\t\tactiveTexture: activeTexture,\n\t\tbindTexture: bindTexture,\n\t\tunbindTexture: unbindTexture,\n\t\tcompressedTexImage2D: compressedTexImage2D,\n\t\tcompressedTexImage3D: compressedTexImage3D,\n\t\ttexImage2D: texImage2D,\n\t\ttexImage3D: texImage3D,\n\n\t\tupdateUBOMapping: updateUBOMapping,\n\t\tuniformBlockBinding: uniformBlockBinding,\n\n\t\ttexStorage2D: texStorage2D,\n\t\ttexStorage3D: texStorage3D,\n\t\ttexSubImage2D: texSubImage2D,\n\t\ttexSubImage3D: texSubImage3D,\n\t\tcompressedTexSubImage2D: compressedTexSubImage2D,\n\t\tcompressedTexSubImage3D: compressedTexSubImage3D,\n\n\t\tscissor: scissor,\n\t\tviewport: viewport,\n\n\t\treset: reset\n\n\t};\n\n}\n\nfunction WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\tconst maxTextures = capabilities.maxTextures;\n\tconst maxCubemapSize = capabilities.maxCubemapSize;\n\tconst maxTextureSize = capabilities.maxTextureSize;\n\tconst maxSamples = capabilities.maxSamples;\n\tconst multisampledRTTExt = extensions.has( 'WEBGL_multisampled_render_to_texture' ) ? extensions.get( 'WEBGL_multisampled_render_to_texture' ) : null;\n\tconst supportsInvalidateFramebuffer = typeof navigator === 'undefined' ? false : /OculusBrowser/g.test( navigator.userAgent );\n\n\tconst _videoTextures = new WeakMap();\n\tlet _canvas;\n\n\tconst _sources = new WeakMap(); // maps WebglTexture objects to instances of Source\n\n\t// cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n\t// also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n\t// Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n\n\tlet useOffscreenCanvas = false;\n\n\ttry {\n\n\t\tuseOffscreenCanvas = typeof OffscreenCanvas !== 'undefined'\n\t\t\t// eslint-disable-next-line compat/compat\n\t\t\t&& ( new OffscreenCanvas( 1, 1 ).getContext( '2d' ) ) !== null;\n\n\t} catch ( err ) {\n\n\t\t// Ignore any errors\n\n\t}\n\n\tfunction createCanvas( width, height ) {\n\n\t\t// Use OffscreenCanvas when available. Specially needed in web workers\n\n\t\treturn useOffscreenCanvas ?\n\t\t\t// eslint-disable-next-line compat/compat\n\t\t\tnew OffscreenCanvas( width, height ) : createElementNS( 'canvas' );\n\n\t}\n\n\tfunction resizeImage( image, needsPowerOfTwo, needsNewCanvas, maxSize ) {\n\n\t\tlet scale = 1;\n\n\t\t// handle case if texture exceeds max size\n\n\t\tif ( image.width > maxSize || image.height > maxSize ) {\n\n\t\t\tscale = maxSize / Math.max( image.width, image.height );\n\n\t\t}\n\n\t\t// only perform resize if necessary\n\n\t\tif ( scale < 1 || needsPowerOfTwo === true ) {\n\n\t\t\t// only perform resize for certain image types\n\n\t\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\t\tconst floor = needsPowerOfTwo ? floorPowerOfTwo : Math.floor;\n\n\t\t\t\tconst width = floor( scale * image.width );\n\t\t\t\tconst height = floor( scale * image.height );\n\n\t\t\t\tif ( _canvas === undefined ) _canvas = createCanvas( width, height );\n\n\t\t\t\t// cube textures can't reuse the same canvas\n\n\t\t\t\tconst canvas = needsNewCanvas ? createCanvas( width, height ) : _canvas;\n\n\t\t\t\tcanvas.width = width;\n\t\t\t\tcanvas.height = height;\n\n\t\t\t\tconst context = canvas.getContext( '2d' );\n\t\t\t\tcontext.drawImage( image, 0, 0, width, height );\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').' );\n\n\t\t\t\treturn canvas;\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'data' in image ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').' );\n\n\t\t\t\t}\n\n\t\t\t\treturn image;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn image;\n\n\t}\n\n\tfunction isPowerOfTwo$1( image ) {\n\n\t\treturn isPowerOfTwo( image.width ) && isPowerOfTwo( image.height );\n\n\t}\n\n\tfunction textureNeedsPowerOfTwo( texture ) {\n\n\t\tif ( isWebGL2 ) return false;\n\n\t\treturn ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) ||\n\t\t\t( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter );\n\n\t}\n\n\tfunction textureNeedsGenerateMipmaps( texture, supportsMips ) {\n\n\t\treturn texture.generateMipmaps && supportsMips &&\n\t\t\ttexture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\n\t}\n\n\tfunction generateMipmap( target ) {\n\n\t\t_gl.generateMipmap( target );\n\n\t}\n\n\tfunction getInternalFormat( internalFormatName, glFormat, glType, colorSpace, forceLinearTransfer = false ) {\n\n\t\tif ( isWebGL2 === false ) return glFormat;\n\n\t\tif ( internalFormatName !== null ) {\n\n\t\t\tif ( _gl[ internalFormatName ] !== undefined ) return _gl[ internalFormatName ];\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \\'' + internalFormatName + '\\'' );\n\n\t\t}\n\n\t\tlet internalFormat = glFormat;\n\n\t\tif ( glFormat === _gl.RED ) {\n\n\t\t\tif ( glType === _gl.FLOAT ) internalFormat = _gl.R32F;\n\t\t\tif ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.R16F;\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8;\n\n\t\t}\n\n\t\tif ( glFormat === _gl.RED_INTEGER ) {\n\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8UI;\n\t\t\tif ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.R16UI;\n\t\t\tif ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.R32UI;\n\t\t\tif ( glType === _gl.BYTE ) internalFormat = _gl.R8I;\n\t\t\tif ( glType === _gl.SHORT ) internalFormat = _gl.R16I;\n\t\t\tif ( glType === _gl.INT ) internalFormat = _gl.R32I;\n\n\t\t}\n\n\t\tif ( glFormat === _gl.RG ) {\n\n\t\t\tif ( glType === _gl.FLOAT ) internalFormat = _gl.RG32F;\n\t\t\tif ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RG16F;\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RG8;\n\n\t\t}\n\n\t\tif ( glFormat === _gl.RGBA ) {\n\n\t\t\tconst transfer = forceLinearTransfer ? LinearTransfer : ColorManagement.getTransfer( colorSpace );\n\n\t\t\tif ( glType === _gl.FLOAT ) internalFormat = _gl.RGBA32F;\n\t\t\tif ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RGBA16F;\n\t\t\tif ( glType === _gl.UNSIGNED_BYTE ) internalFormat = ( transfer === SRGBTransfer ) ? _gl.SRGB8_ALPHA8 : _gl.RGBA8;\n\t\t\tif ( glType === _gl.UNSIGNED_SHORT_4_4_4_4 ) internalFormat = _gl.RGBA4;\n\t\t\tif ( glType === _gl.UNSIGNED_SHORT_5_5_5_1 ) internalFormat = _gl.RGB5_A1;\n\n\t\t}\n\n\t\tif ( internalFormat === _gl.R16F || internalFormat === _gl.R32F ||\n\t\t\tinternalFormat === _gl.RG16F || internalFormat === _gl.RG32F ||\n\t\t\tinternalFormat === _gl.RGBA16F || internalFormat === _gl.RGBA32F ) {\n\n\t\t\textensions.get( 'EXT_color_buffer_float' );\n\n\t\t}\n\n\t\treturn internalFormat;\n\n\t}\n\n\tfunction getMipLevels( texture, image, supportsMips ) {\n\n\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) === true || ( texture.isFramebufferTexture && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) ) {\n\n\t\t\treturn Math.log2( Math.max( image.width, image.height ) ) + 1;\n\n\t\t} else if ( texture.mipmaps !== undefined && texture.mipmaps.length > 0 ) {\n\n\t\t\t// user-defined mipmaps\n\n\t\t\treturn texture.mipmaps.length;\n\n\t\t} else if ( texture.isCompressedTexture && Array.isArray( texture.image ) ) {\n\n\t\t\treturn image.mipmaps.length;\n\n\t\t} else {\n\n\t\t\t// texture without mipmaps (only base level)\n\n\t\t\treturn 1;\n\n\t\t}\n\n\t}\n\n\t// Fallback filters for non-power-of-2 textures\n\n\tfunction filterFallback( f ) {\n\n\t\tif ( f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter ) {\n\n\t\t\treturn _gl.NEAREST;\n\n\t\t}\n\n\t\treturn _gl.LINEAR;\n\n\t}\n\n\t//\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tdeallocateTexture( texture );\n\n\t\tif ( texture.isVideoTexture ) {\n\n\t\t\t_videoTextures.delete( texture );\n\n\t\t}\n\n\t}\n\n\tfunction onRenderTargetDispose( event ) {\n\n\t\tconst renderTarget = event.target;\n\n\t\trenderTarget.removeEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tdeallocateRenderTarget( renderTarget );\n\n\t}\n\n\t//\n\n\tfunction deallocateTexture( texture ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( textureProperties.__webglInit === undefined ) return;\n\n\t\t// check if it's necessary to remove the WebGLTexture object\n\n\t\tconst source = texture.source;\n\t\tconst webglTextures = _sources.get( source );\n\n\t\tif ( webglTextures ) {\n\n\t\t\tconst webglTexture = webglTextures[ textureProperties.__cacheKey ];\n\t\t\twebglTexture.usedTimes --;\n\n\t\t\t// the WebGLTexture object is not used anymore, remove it\n\n\t\t\tif ( webglTexture.usedTimes === 0 ) {\n\n\t\t\t\tdeleteTexture( texture );\n\n\t\t\t}\n\n\t\t\t// remove the weak map entry if no WebGLTexture uses the source anymore\n\n\t\t\tif ( Object.keys( webglTextures ).length === 0 ) {\n\n\t\t\t\t_sources.delete( source );\n\n\t\t\t}\n\n\t\t}\n\n\t\tproperties.remove( texture );\n\n\t}\n\n\tfunction deleteTexture( texture ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\tconst source = texture.source;\n\t\tconst webglTextures = _sources.get( source );\n\t\tdelete webglTextures[ textureProperties.__cacheKey ];\n\n\t\tinfo.memory.textures --;\n\n\t}\n\n\tfunction deallocateRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( textureProperties.__webglTexture !== undefined ) {\n\n\t\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\t\tinfo.memory.textures --;\n\n\t\t}\n\n\t\tif ( renderTarget.depthTexture ) {\n\n\t\t\trenderTarget.depthTexture.dispose();\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( Array.isArray( renderTargetProperties.__webglFramebuffer[ i ] ) ) {\n\n\t\t\t\t\tfor ( let level = 0; level < renderTargetProperties.__webglFramebuffer[ i ].length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ][ level ] );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( Array.isArray( renderTargetProperties.__webglFramebuffer ) ) {\n\n\t\t\t\tfor ( let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ level ] );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer );\n\n\t\t\t}\n\n\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer );\n\t\t\tif ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\tif ( renderTargetProperties.__webglColorRenderbuffer ) {\n\n\t\t\t\tfor ( let i = 0; i < renderTargetProperties.__webglColorRenderbuffer.length; i ++ ) {\n\n\t\t\t\t\tif ( renderTargetProperties.__webglColorRenderbuffer[ i ] ) _gl.deleteRenderbuffer( renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( renderTargetProperties.__webglDepthRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthRenderbuffer );\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\tfor ( let i = 0, il = texture.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachmentProperties = properties.get( texture[ i ] );\n\n\t\t\t\tif ( attachmentProperties.__webglTexture ) {\n\n\t\t\t\t\t_gl.deleteTexture( attachmentProperties.__webglTexture );\n\n\t\t\t\t\tinfo.memory.textures --;\n\n\t\t\t\t}\n\n\t\t\t\tproperties.remove( texture[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tproperties.remove( texture );\n\t\tproperties.remove( renderTarget );\n\n\t}\n\n\t//\n\n\tlet textureUnits = 0;\n\n\tfunction resetTextureUnits() {\n\n\t\ttextureUnits = 0;\n\n\t}\n\n\tfunction allocateTextureUnit() {\n\n\t\tconst textureUnit = textureUnits;\n\n\t\tif ( textureUnit >= maxTextures ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures );\n\n\t\t}\n\n\t\ttextureUnits += 1;\n\n\t\treturn textureUnit;\n\n\t}\n\n\tfunction getTextureCacheKey( texture ) {\n\n\t\tconst array = [];\n\n\t\tarray.push( texture.wrapS );\n\t\tarray.push( texture.wrapT );\n\t\tarray.push( texture.wrapR || 0 );\n\t\tarray.push( texture.magFilter );\n\t\tarray.push( texture.minFilter );\n\t\tarray.push( texture.anisotropy );\n\t\tarray.push( texture.internalFormat );\n\t\tarray.push( texture.format );\n\t\tarray.push( texture.type );\n\t\tarray.push( texture.generateMipmaps );\n\t\tarray.push( texture.premultiplyAlpha );\n\t\tarray.push( texture.flipY );\n\t\tarray.push( texture.unpackAlignment );\n\t\tarray.push( texture.colorSpace );\n\n\t\treturn array.join();\n\n\t}\n\n\t//\n\n\tfunction setTexture2D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.isVideoTexture ) updateVideoTexture( texture );\n\n\t\tif ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tconst image = texture.image;\n\n\t\t\tif ( image === null ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but no image data found.' );\n\n\t\t\t} else if ( image.complete === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' );\n\n\t\t\t} else {\n\n\t\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tfunction setTexture2DArray( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tfunction setTexture3D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_3D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tfunction setTextureCube( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadCubeTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t}\n\n\tconst wrappingToGL = {\n\t\t[ RepeatWrapping ]: _gl.REPEAT,\n\t\t[ ClampToEdgeWrapping ]: _gl.CLAMP_TO_EDGE,\n\t\t[ MirroredRepeatWrapping ]: _gl.MIRRORED_REPEAT\n\t};\n\n\tconst filterToGL = {\n\t\t[ NearestFilter ]: _gl.NEAREST,\n\t\t[ NearestMipmapNearestFilter ]: _gl.NEAREST_MIPMAP_NEAREST,\n\t\t[ NearestMipmapLinearFilter ]: _gl.NEAREST_MIPMAP_LINEAR,\n\n\t\t[ LinearFilter ]: _gl.LINEAR,\n\t\t[ LinearMipmapNearestFilter ]: _gl.LINEAR_MIPMAP_NEAREST,\n\t\t[ LinearMipmapLinearFilter ]: _gl.LINEAR_MIPMAP_LINEAR\n\t};\n\n\tconst compareToGL = {\n\t\t[ NeverCompare ]: _gl.NEVER,\n\t\t[ AlwaysCompare ]: _gl.ALWAYS,\n\t\t[ LessCompare ]: _gl.LESS,\n\t\t[ LessEqualCompare ]: _gl.LEQUAL,\n\t\t[ EqualCompare ]: _gl.EQUAL,\n\t\t[ GreaterEqualCompare ]: _gl.GEQUAL,\n\t\t[ GreaterCompare ]: _gl.GREATER,\n\t\t[ NotEqualCompare ]: _gl.NOTEQUAL\n\t};\n\n\tfunction setTextureParameters( textureType, texture, supportsMips ) {\n\n\t\tif ( supportsMips ) {\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[ texture.wrapS ] );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[ texture.wrapT ] );\n\n\t\t\tif ( textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[ texture.wrapR ] );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MAG_FILTER, filterToGL[ texture.magFilter ] );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MIN_FILTER, filterToGL[ texture.minFilter ] );\n\n\t\t} else {\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE );\n\n\t\t\tif ( textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, _gl.CLAMP_TO_EDGE );\n\n\t\t\t}\n\n\t\t\tif ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.' );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MAG_FILTER, filterFallback( texture.magFilter ) );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_MIN_FILTER, filterFallback( texture.minFilter ) );\n\n\t\t\tif ( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( texture.compareFunction ) {\n\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_MODE, _gl.COMPARE_REF_TO_TEXTURE );\n\t\t\t_gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_FUNC, compareToGL[ texture.compareFunction ] );\n\n\t\t}\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tif ( texture.magFilter === NearestFilter ) return;\n\t\t\tif ( texture.minFilter !== NearestMipmapLinearFilter && texture.minFilter !== LinearMipmapLinearFilter ) return;\n\t\t\tif ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension for WebGL 1 and WebGL 2\n\t\t\tif ( isWebGL2 === false && ( texture.type === HalfFloatType && extensions.has( 'OES_texture_half_float_linear' ) === false ) ) return; // verify extension for WebGL 1 only\n\n\t\t\tif ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) {\n\n\t\t\t\t_gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, capabilities.getMaxAnisotropy() ) );\n\t\t\t\tproperties.get( texture ).__currentAnisotropy = texture.anisotropy;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction initTexture( textureProperties, texture ) {\n\n\t\tlet forceUpload = false;\n\n\t\tif ( textureProperties.__webglInit === undefined ) {\n\n\t\t\ttextureProperties.__webglInit = true;\n\n\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t}\n\n\t\t// create Source <-> WebGLTextures mapping if necessary\n\n\t\tconst source = texture.source;\n\t\tlet webglTextures = _sources.get( source );\n\n\t\tif ( webglTextures === undefined ) {\n\n\t\t\twebglTextures = {};\n\t\t\t_sources.set( source, webglTextures );\n\n\t\t}\n\n\t\t// check if there is already a WebGLTexture object for the given texture parameters\n\n\t\tconst textureCacheKey = getTextureCacheKey( texture );\n\n\t\tif ( textureCacheKey !== textureProperties.__cacheKey ) {\n\n\t\t\t// if not, create a new instance of WebGLTexture\n\n\t\t\tif ( webglTextures[ textureCacheKey ] === undefined ) {\n\n\t\t\t\t// create new entry\n\n\t\t\t\twebglTextures[ textureCacheKey ] = {\n\t\t\t\t\ttexture: _gl.createTexture(),\n\t\t\t\t\tusedTimes: 0\n\t\t\t\t};\n\n\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t// when a new instance of WebGLTexture was created, a texture upload is required\n\t\t\t\t// even if the image contents are identical\n\n\t\t\t\tforceUpload = true;\n\n\t\t\t}\n\n\t\t\twebglTextures[ textureCacheKey ].usedTimes ++;\n\n\t\t\t// every time the texture cache key changes, it's necessary to check if an instance of\n\t\t\t// WebGLTexture can be deleted in order to avoid a memory leak.\n\n\t\t\tconst webglTexture = webglTextures[ textureProperties.__cacheKey ];\n\n\t\t\tif ( webglTexture !== undefined ) {\n\n\t\t\t\twebglTextures[ textureProperties.__cacheKey ].usedTimes --;\n\n\t\t\t\tif ( webglTexture.usedTimes === 0 ) {\n\n\t\t\t\t\tdeleteTexture( texture );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// store references to cache key and WebGLTexture object\n\n\t\t\ttextureProperties.__cacheKey = textureCacheKey;\n\t\t\ttextureProperties.__webglTexture = webglTextures[ textureCacheKey ].texture;\n\n\t\t}\n\n\t\treturn forceUpload;\n\n\t}\n\n\tfunction uploadTexture( textureProperties, texture, slot ) {\n\n\t\tlet textureType = _gl.TEXTURE_2D;\n\n\t\tif ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) textureType = _gl.TEXTURE_2D_ARRAY;\n\t\tif ( texture.isData3DTexture ) textureType = _gl.TEXTURE_3D;\n\n\t\tconst forceUpload = initTexture( textureProperties, texture );\n\t\tconst source = texture.source;\n\n\t\tstate.bindTexture( textureType, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t\tconst sourceProperties = properties.get( source );\n\n\t\tif ( source.version !== sourceProperties.__version || forceUpload === true ) {\n\n\t\t\tstate.activeTexture( _gl.TEXTURE0 + slot );\n\n\t\t\tconst workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace );\n\t\t\tconst texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace );\n\t\t\tconst unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion );\n\n\t\t\tconst needsPowerOfTwo = textureNeedsPowerOfTwo( texture ) && isPowerOfTwo$1( texture.image ) === false;\n\t\t\tlet image = resizeImage( texture.image, needsPowerOfTwo, false, maxTextureSize );\n\t\t\timage = verifyColorSpace( texture, image );\n\n\t\t\tconst supportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\t\tglFormat = utils.convert( texture.format, texture.colorSpace );\n\n\t\t\tlet glType = utils.convert( texture.type ),\n\t\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, texture.isVideoTexture );\n\n\t\t\tsetTextureParameters( textureType, texture, supportsMips );\n\n\t\t\tlet mipmap;\n\t\t\tconst mipmaps = texture.mipmaps;\n\n\t\t\tconst useTexStorage = ( isWebGL2 && texture.isVideoTexture !== true );\n\t\t\tconst allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true );\n\t\t\tconst levels = getMipLevels( texture, image, supportsMips );\n\n\t\t\tif ( texture.isDepthTexture ) {\n\n\t\t\t\t// populate depth texture with dummy data\n\n\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT;\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT32F;\n\n\t\t\t\t\t} else if ( texture.type === UnsignedIntType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT24;\n\n\t\t\t\t\t} else if ( texture.type === UnsignedInt248Type ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH24_STENCIL8;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT16; // WebGL2 requires sized internalformat for glTexImage2D\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\t\tconsole.error( 'WebGLRenderer: Floating point depth texture requires WebGL2.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// validation checks for WebGL 1\n\n\t\t\t\tif ( texture.format === DepthFormat && glInternalFormat === _gl.DEPTH_COMPONENT ) {\n\n\t\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tif ( texture.type !== UnsignedShortType && texture.type !== UnsignedIntType ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.' );\n\n\t\t\t\t\t\ttexture.type = UnsignedIntType;\n\t\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( texture.format === DepthStencilFormat && glInternalFormat === _gl.DEPTH_COMPONENT ) {\n\n\t\t\t\t\t// Depth stencil textures need the DEPTH_STENCIL internal format\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tglInternalFormat = _gl.DEPTH_STENCIL;\n\n\t\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tif ( texture.type !== UnsignedInt248Type ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.' );\n\n\t\t\t\t\t\ttexture.type = UnsignedInt248Type;\n\t\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t//\n\n\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, 1, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isDataTexture ) {\n\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, glFormat, glType, image.data );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isCompressedTexture ) {\n\n\t\t\t\tif ( texture.isCompressedArrayTexture ) {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height, image.depth );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( texture.format !== RGBAFormat ) {\n\n\t\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data, 0, 0 );\n\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, mipmap.data, 0, 0 );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( texture.format !== RGBAFormat ) {\n\n\t\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data );\n\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isDataArrayTexture ) {\n\n\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, image.width, image.height, image.depth );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.texSubImage3D( _gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage3D( _gl.TEXTURE_2D_ARRAY, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isData3DTexture ) {\n\n\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage3D( _gl.TEXTURE_3D, levels, glInternalFormat, image.width, image.height, image.depth );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.texSubImage3D( _gl.TEXTURE_3D, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\n\t\t\t\t}\n\n\t\t\t} else if ( texture.isFramebufferTexture ) {\n\n\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tlet width = image.width, height = image.height;\n\n\t\t\t\t\t\tfor ( let i = 0; i < levels; i ++ ) {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, width, height, 0, glFormat, glType, null );\n\n\t\t\t\t\t\t\twidth >>= 1;\n\t\t\t\t\t\t\theight >>= 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// regular Texture (image, video, canvas)\n\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, glFormat, glType, mipmap );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, glFormat, glType, mipmap );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\tif ( allocateMemory ) {\n\n\t\t\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, glFormat, glType, image );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, glFormat, glType, image );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( textureType );\n\n\t\t\t}\n\n\t\t\tsourceProperties.__version = source.version;\n\n\t\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t}\n\n\tfunction uploadCubeTexture( textureProperties, texture, slot ) {\n\n\t\tif ( texture.image.length !== 6 ) return;\n\n\t\tconst forceUpload = initTexture( textureProperties, texture );\n\t\tconst source = texture.source;\n\n\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );\n\n\t\tconst sourceProperties = properties.get( source );\n\n\t\tif ( source.version !== sourceProperties.__version || forceUpload === true ) {\n\n\t\t\tstate.activeTexture( _gl.TEXTURE0 + slot );\n\n\t\t\tconst workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace );\n\t\t\tconst texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace );\n\t\t\tconst unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion );\n\n\t\t\tconst isCompressed = ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture );\n\t\t\tconst isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );\n\n\t\t\tconst cubeImage = [];\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( ! isCompressed && ! isDataTexture ) {\n\n\t\t\t\t\tcubeImage[ i ] = resizeImage( texture.image[ i ], false, true, maxCubemapSize );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tcubeImage[ i ] = isDataTexture ? texture.image[ i ].image : texture.image[ i ];\n\n\t\t\t\t}\n\n\t\t\t\tcubeImage[ i ] = verifyColorSpace( texture, cubeImage[ i ] );\n\n\t\t\t}\n\n\t\t\tconst image = cubeImage[ 0 ],\n\t\t\t\tsupportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\t\tglFormat = utils.convert( texture.format, texture.colorSpace ),\n\t\t\t\tglType = utils.convert( texture.type ),\n\t\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\n\t\t\tconst useTexStorage = ( isWebGL2 && texture.isVideoTexture !== true );\n\t\t\tconst allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true );\n\t\t\tlet levels = getMipLevels( texture, image, supportsMips );\n\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, supportsMips );\n\n\t\t\tlet mipmaps;\n\n\t\t\tif ( isCompressed ) {\n\n\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, image.width, image.height );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tmipmaps = cubeImage[ i ].mipmaps;\n\n\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\t\tif ( texture.format !== RGBAFormat ) {\n\n\t\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data );\n\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tstate.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tmipmaps = texture.mipmaps;\n\n\t\t\t\tif ( useTexStorage && allocateMemory ) {\n\n\t\t\t\t\t// TODO: Uniformly handle mipmap definitions\n\t\t\t\t\t// Normal textures and compressed cube textures define base level + mips with their mipmap array\n\t\t\t\t\t// Uncompressed cube textures use their mipmap array only for mips (no base level)\n\n\t\t\t\t\tif ( mipmaps.length > 0 ) levels ++;\n\n\t\t\t\t\tstate.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, cubeImage[ 0 ].width, cubeImage[ 0 ].height );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tif ( isDataTexture ) {\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, cubeImage[ i ].width, cubeImage[ i ].height, glFormat, glType, cubeImage[ i ].data );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\t\t\t\t\t\t\tconst mipmapImage = mipmap.image[ i ].image;\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, mipmapImage.width, mipmapImage.height, glFormat, glType, mipmapImage.data );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, glFormat, glType, cubeImage[ i ] );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, glFormat, glType, cubeImage[ i ] );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\t\t\tif ( useTexStorage ) {\n\n\t\t\t\t\t\t\t\tstate.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, glFormat, glType, mipmap.image[ i ] );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstate.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[ i ] );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\t// We assume images for cube map have the same size.\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP );\n\n\t\t\t}\n\n\t\t\tsourceProperties.__version = source.version;\n\n\t\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t}\n\n\t// Render targets\n\n\t// Setup storage for target texture and bind it to correct framebuffer\n\tfunction setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) {\n\n\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\tconst glType = utils.convert( texture.type );\n\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tif ( ! renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\tconst width = Math.max( 1, renderTarget.width >> level );\n\t\t\tconst height = Math.max( 1, renderTarget.height >> level );\n\n\t\t\tif ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) {\n\n\t\t\t\tstate.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null );\n\n\t\t\t} else {\n\n\t\t\t\tstate.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) );\n\n\t\t} else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753\n\n\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level );\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}\n\n\n\t// Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n\tfunction setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) {\n\n\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderbuffer );\n\n\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\tlet glInternalFormat = ( isWebGL2 === true ) ? _gl.DEPTH_COMPONENT24 : _gl.DEPTH_COMPONENT16;\n\n\t\t\tif ( isMultisample || useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tconst depthTexture = renderTarget.depthTexture;\n\n\t\t\t\tif ( depthTexture && depthTexture.isDepthTexture ) {\n\n\t\t\t\t\tif ( depthTexture.type === FloatType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT32F;\n\n\t\t\t\t\t} else if ( depthTexture.type === UnsignedIntType ) {\n\n\t\t\t\t\t\tglInternalFormat = _gl.DEPTH_COMPONENT24;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\t\tmultisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\n\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\tif ( isMultisample && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height );\n\n\t\t\t} else if ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tmultisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\n\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer );\n\n\t\t} else {\n\n\t\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [ renderTarget.texture ];\n\n\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\tconst texture = textures[ i ];\n\n\t\t\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\tif ( isMultisample && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else if ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\t\tmultisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t}\n\n\t// Setup resources for a Depth Texture for a FBO (needs an extension)\n\tfunction setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\tconst isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget );\n\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t}\n\n\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\tconst webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t}\n\n\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\tif ( useMultisampledRTT( renderTarget ) ) {\n\n\t\t\t\tmultisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t}\n\n\t}\n\n\t// Setup GL resources for a non-texture depth buffer\n\tfunction setupDepthRenderbuffer( renderTarget ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\n\t\tif ( renderTarget.depthTexture && ! renderTargetProperties.__autoAllocateDepthBuffer ) {\n\n\t\t\tif ( isCube ) throw new Error( 'target.depthTexture not supported in Cube render targets' );\n\n\t\t\tsetupDepthTexture( renderTargetProperties.__webglFramebuffer, renderTarget );\n\n\t\t} else {\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = [];\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[ i ] );\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer[ i ] = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer[ i ], renderTarget, false );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer, renderTarget, false );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t}\n\n\t// rebind framebuffer with external textures\n\tfunction rebindTextures( renderTarget, colorTexture, depthTexture ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tif ( colorTexture !== undefined ) {\n\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 );\n\n\t\t}\n\n\t\tif ( depthTexture !== undefined ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}\n\n\t// Set up GL resources for the render target\n\tfunction setupRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets !== true ) {\n\n\t\t\tif ( textureProperties.__webglTexture === undefined ) {\n\n\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t}\n\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tinfo.memory.textures ++;\n\n\t\t}\n\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = [];\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer();\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tif ( capabilities.drawBuffers ) {\n\n\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst attachmentProperties = properties.get( textures[ i ] );\n\n\t\t\t\t\t\tif ( attachmentProperties.__webglTexture === undefined ) {\n\n\t\t\t\t\t\t\tattachmentProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ( isWebGL2 && renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\tconst textures = isMultipleRenderTargets ? texture : [ texture ];\n\n\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = [];\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\tconst texture = textures[ i ];\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer[ i ] = _gl.createRenderbuffer();\n\n\t\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t\tconst glFormat = utils.convert( texture.format, texture.colorSpace );\n\t\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true );\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t_gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, null );\n\n\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t}\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( _gl.TEXTURE_CUBE_MAP, texture, supportsMips );\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( _gl.TEXTURE_CUBE_MAP );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t} else if ( isMultipleRenderTargets ) {\n\n\t\t\tconst textures = renderTarget.texture;\n\n\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachment = textures[ i ];\n\t\t\t\tconst attachmentProperties = properties.get( attachment );\n\n\t\t\t\tstate.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( _gl.TEXTURE_2D, attachment, supportsMips );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( _gl.TEXTURE_2D );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t} else {\n\n\t\t\tlet glTextureType = _gl.TEXTURE_2D;\n\n\t\t\tif ( renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\tglTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( glTextureType, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( glTextureType, texture, supportsMips );\n\n\t\t\tif ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {\n\n\t\t\t\tfor ( let level = 0; level < texture.mipmaps.length; level ++ ) {\n\n\t\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( glTextureType );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}\n\n\tfunction updateRenderTargetMipmap( renderTarget ) {\n\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [ renderTarget.texture ];\n\n\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\tconst texture = textures[ i ];\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tconst target = renderTarget.isWebGLCubeRenderTarget ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D;\n\t\t\t\tconst webglTexture = properties.get( texture ).__webglTexture;\n\n\t\t\t\tstate.bindTexture( target, webglTexture );\n\t\t\t\tgenerateMipmap( target );\n\t\t\t\tstate.unbindTexture();\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateMultisampleRenderTarget( renderTarget ) {\n\n\t\tif ( ( isWebGL2 && renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets ? renderTarget.texture : [ renderTarget.texture ];\n\t\t\tconst width = renderTarget.width;\n\t\t\tconst height = renderTarget.height;\n\t\t\tlet mask = _gl.COLOR_BUFFER_BIT;\n\t\t\tconst invalidationArray = [];\n\t\t\tconst depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT;\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\n\t\t\t// If MRT we need to remove FBO attachments\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, null );\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, null, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.READ_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\tstate.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\n\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\tinvalidationArray.push( _gl.COLOR_ATTACHMENT0 + i );\n\n\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\tinvalidationArray.push( depthStyle );\n\n\t\t\t\t}\n\n\t\t\t\tconst ignoreDepthValues = ( renderTargetProperties.__ignoreDepthValues !== undefined ) ? renderTargetProperties.__ignoreDepthValues : false;\n\n\t\t\t\tif ( ignoreDepthValues === false ) {\n\n\t\t\t\t\tif ( renderTarget.depthBuffer ) mask |= _gl.DEPTH_BUFFER_BIT;\n\t\t\t\t\tif ( renderTarget.stencilBuffer ) mask |= _gl.STENCIL_BUFFER_BIT;\n\n\t\t\t\t}\n\n\t\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.READ_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( ignoreDepthValues === true ) {\n\n\t\t\t\t\t_gl.invalidateFramebuffer( _gl.READ_FRAMEBUFFER, [ depthStyle ] );\n\t\t\t\t\t_gl.invalidateFramebuffer( _gl.DRAW_FRAMEBUFFER, [ depthStyle ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\t\tconst webglTexture = properties.get( textures[ i ] ).__webglTexture;\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, webglTexture, 0 );\n\n\t\t\t\t}\n\n\t\t\t\t_gl.blitFramebuffer( 0, 0, width, height, 0, 0, width, height, mask, _gl.NEAREST );\n\n\t\t\t\tif ( supportsInvalidateFramebuffer ) {\n\n\t\t\t\t\t_gl.invalidateFramebuffer( _gl.READ_FRAMEBUFFER, invalidationArray );\n\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.READ_FRAMEBUFFER, null );\n\t\t\tstate.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, null );\n\n\t\t\t// If MRT since pre-blit we removed the FBO we need to reconstruct the attachments\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tfor ( let i = 0; i < textures.length; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] );\n\n\t\t\t\t\tconst webglTexture = properties.get( textures[ i ] ).__webglTexture;\n\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer );\n\t\t\t\t\t_gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, webglTexture, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t}\n\n\t}\n\n\tfunction getRenderTargetSamples( renderTarget ) {\n\n\t\treturn Math.min( maxSamples, renderTarget.samples );\n\n\t}\n\n\tfunction useMultisampledRTT( renderTarget ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\treturn isWebGL2 && renderTarget.samples > 0 && extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true && renderTargetProperties.__useRenderToTexture !== false;\n\n\t}\n\n\tfunction updateVideoTexture( texture ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\t// Check the last frame we updated the VideoTexture\n\n\t\tif ( _videoTextures.get( texture ) !== frame ) {\n\n\t\t\t_videoTextures.set( texture, frame );\n\t\t\ttexture.update();\n\n\t\t}\n\n\t}\n\n\tfunction verifyColorSpace( texture, image ) {\n\n\t\tconst colorSpace = texture.colorSpace;\n\t\tconst format = texture.format;\n\t\tconst type = texture.type;\n\n\t\tif ( texture.isCompressedTexture === true || texture.isVideoTexture === true || texture.format === _SRGBAFormat ) return image;\n\n\t\tif ( colorSpace !== LinearSRGBColorSpace && colorSpace !== NoColorSpace ) {\n\n\t\t\t// sRGB\n\n\t\t\tif ( ColorManagement.getTransfer( colorSpace ) === SRGBTransfer ) {\n\n\t\t\t\tif ( isWebGL2 === false ) {\n\n\t\t\t\t\t// in WebGL 1, try to use EXT_sRGB extension and unsized formats\n\n\t\t\t\t\tif ( extensions.has( 'EXT_sRGB' ) === true && format === RGBAFormat ) {\n\n\t\t\t\t\t\ttexture.format = _SRGBAFormat;\n\n\t\t\t\t\t\t// it's not possible to generate mips in WebGL 1 with this extension\n\n\t\t\t\t\t\ttexture.minFilter = LinearFilter;\n\t\t\t\t\t\ttexture.generateMipmaps = false;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// slow fallback (CPU decode)\n\n\t\t\t\t\t\timage = ImageUtils.sRGBToLinear( image );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// in WebGL 2 uncompressed textures can only be sRGB encoded if they have the RGBA8 format\n\n\t\t\t\t\tif ( format !== RGBAFormat || type !== UnsignedByteType ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconsole.error( 'THREE.WebGLTextures: Unsupported texture color space:', colorSpace );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn image;\n\n\t}\n\n\t//\n\n\tthis.allocateTextureUnit = allocateTextureUnit;\n\tthis.resetTextureUnits = resetTextureUnits;\n\n\tthis.setTexture2D = setTexture2D;\n\tthis.setTexture2DArray = setTexture2DArray;\n\tthis.setTexture3D = setTexture3D;\n\tthis.setTextureCube = setTextureCube;\n\tthis.rebindTextures = rebindTextures;\n\tthis.setupRenderTarget = setupRenderTarget;\n\tthis.updateRenderTargetMipmap = updateRenderTargetMipmap;\n\tthis.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n\tthis.setupDepthRenderbuffer = setupDepthRenderbuffer;\n\tthis.setupFrameBufferTexture = setupFrameBufferTexture;\n\tthis.useMultisampledRTT = useMultisampledRTT;\n\n}\n\nfunction WebGLUtils( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction convert( p, colorSpace = NoColorSpace ) {\n\n\t\tlet extension;\n\n\t\tconst transfer = ColorManagement.getTransfer( colorSpace );\n\n\t\tif ( p === UnsignedByteType ) return gl.UNSIGNED_BYTE;\n\t\tif ( p === UnsignedShort4444Type ) return gl.UNSIGNED_SHORT_4_4_4_4;\n\t\tif ( p === UnsignedShort5551Type ) return gl.UNSIGNED_SHORT_5_5_5_1;\n\n\t\tif ( p === ByteType ) return gl.BYTE;\n\t\tif ( p === ShortType ) return gl.SHORT;\n\t\tif ( p === UnsignedShortType ) return gl.UNSIGNED_SHORT;\n\t\tif ( p === IntType ) return gl.INT;\n\t\tif ( p === UnsignedIntType ) return gl.UNSIGNED_INT;\n\t\tif ( p === FloatType ) return gl.FLOAT;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\tif ( isWebGL2 ) return gl.HALF_FLOAT;\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.HALF_FLOAT_OES;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return gl.ALPHA;\n\t\tif ( p === RGBAFormat ) return gl.RGBA;\n\t\tif ( p === LuminanceFormat ) return gl.LUMINANCE;\n\t\tif ( p === LuminanceAlphaFormat ) return gl.LUMINANCE_ALPHA;\n\t\tif ( p === DepthFormat ) return gl.DEPTH_COMPONENT;\n\t\tif ( p === DepthStencilFormat ) return gl.DEPTH_STENCIL;\n\n\t\t// WebGL 1 sRGB fallback\n\n\t\tif ( p === _SRGBAFormat ) {\n\n\t\t\textension = extensions.get( 'EXT_sRGB' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.SRGB_ALPHA_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// WebGL2 formats.\n\n\t\tif ( p === RedFormat ) return gl.RED;\n\t\tif ( p === RedIntegerFormat ) return gl.RED_INTEGER;\n\t\tif ( p === RGFormat ) return gl.RG;\n\t\tif ( p === RGIntegerFormat ) return gl.RG_INTEGER;\n\t\tif ( p === RGBAIntegerFormat ) return gl.RGBA_INTEGER;\n\n\t\t// S3TC\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\tif ( transfer === SRGBTransfer ) {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc_srgb' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\t\tif ( extension !== null ) {\n\n\t\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// PVRTC\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// ETC1\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// ETC2\n\n\t\tif ( p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_ETC2_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2;\n\t\t\t\tif ( p === RGBA_ETC2_EAC_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// ASTC\n\n\t\tif ( p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format ||\n\t\t\tp === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format ||\n\t\t\tp === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format ||\n\t\t\tp === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format ||\n\t\t\tp === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_astc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGBA_ASTC_4x4_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_5x4_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_5x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_6x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_6x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_8x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_8x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_8x8_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x8_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_10x10_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_12x10_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR;\n\t\t\t\tif ( p === RGBA_ASTC_12x12_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// BPTC\n\n\t\tif ( p === RGBA_BPTC_Format || p === RGB_BPTC_SIGNED_Format || p === RGB_BPTC_UNSIGNED_Format ) {\n\n\t\t\textension = extensions.get( 'EXT_texture_compression_bptc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGBA_BPTC_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;\n\t\t\t\tif ( p === RGB_BPTC_SIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;\n\t\t\t\tif ( p === RGB_BPTC_UNSIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// RGTC\n\n\t\tif ( p === RED_RGTC1_Format || p === SIGNED_RED_RGTC1_Format || p === RED_GREEN_RGTC2_Format || p === SIGNED_RED_GREEN_RGTC2_Format ) {\n\n\t\t\textension = extensions.get( 'EXT_texture_compression_rgtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGBA_BPTC_Format ) return extension.COMPRESSED_RED_RGTC1_EXT;\n\t\t\t\tif ( p === SIGNED_RED_RGTC1_Format ) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;\n\t\t\t\tif ( p === RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;\n\t\t\t\tif ( p === SIGNED_RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\tif ( isWebGL2 ) return gl.UNSIGNED_INT_24_8;\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// if \"p\" can't be resolved, assume the user defines a WebGL constant as a string (fallback/workaround for packed RGB formats)\n\n\t\treturn ( gl[ p ] !== undefined ) ? gl[ p ] : null;\n\n\t}\n\n\treturn { convert: convert };\n\n}\n\nclass ArrayCamera extends PerspectiveCamera {\n\n\tconstructor( array = [] ) {\n\n\t\tsuper();\n\n\t\tthis.isArrayCamera = true;\n\n\t\tthis.cameras = array;\n\n\t}\n\n}\n\nclass Group extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isGroup = true;\n\n\t\tthis.type = 'Group';\n\n\t}\n\n}\n\nconst _moveEvent = { type: 'move' };\n\nclass WebXRController {\n\n\tconstructor() {\n\n\t\tthis._targetRay = null;\n\t\tthis._grip = null;\n\t\tthis._hand = null;\n\n\t}\n\n\tgetHandSpace() {\n\n\t\tif ( this._hand === null ) {\n\n\t\t\tthis._hand = new Group();\n\t\t\tthis._hand.matrixAutoUpdate = false;\n\t\t\tthis._hand.visible = false;\n\n\t\t\tthis._hand.joints = {};\n\t\t\tthis._hand.inputState = { pinching: false };\n\n\t\t}\n\n\t\treturn this._hand;\n\n\t}\n\n\tgetTargetRaySpace() {\n\n\t\tif ( this._targetRay === null ) {\n\n\t\t\tthis._targetRay = new Group();\n\t\t\tthis._targetRay.matrixAutoUpdate = false;\n\t\t\tthis._targetRay.visible = false;\n\t\t\tthis._targetRay.hasLinearVelocity = false;\n\t\t\tthis._targetRay.linearVelocity = new Vector3();\n\t\t\tthis._targetRay.hasAngularVelocity = false;\n\t\t\tthis._targetRay.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._targetRay;\n\n\t}\n\n\tgetGripSpace() {\n\n\t\tif ( this._grip === null ) {\n\n\t\t\tthis._grip = new Group();\n\t\t\tthis._grip.matrixAutoUpdate = false;\n\t\t\tthis._grip.visible = false;\n\t\t\tthis._grip.hasLinearVelocity = false;\n\t\t\tthis._grip.linearVelocity = new Vector3();\n\t\t\tthis._grip.hasAngularVelocity = false;\n\t\t\tthis._grip.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._grip;\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.dispatchEvent( event );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tconnect( inputSource ) {\n\n\t\tif ( inputSource && inputSource.hand ) {\n\n\t\t\tconst hand = this._hand;\n\n\t\t\tif ( hand ) {\n\n\t\t\t\tfor ( const inputjoint of inputSource.hand.values() ) {\n\n\t\t\t\t\t// Initialize hand with joints when connected\n\t\t\t\t\tthis._getHandJoint( hand, inputjoint );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.dispatchEvent( { type: 'connected', data: inputSource } );\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect( inputSource ) {\n\n\t\tthis.dispatchEvent( { type: 'disconnected', data: inputSource } );\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.visible = false;\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.visible = false;\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.visible = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tupdate( inputSource, frame, referenceSpace ) {\n\n\t\tlet inputPose = null;\n\t\tlet gripPose = null;\n\t\tlet handPose = null;\n\n\t\tconst targetRay = this._targetRay;\n\t\tconst grip = this._grip;\n\t\tconst hand = this._hand;\n\n\t\tif ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) {\n\n\t\t\tif ( hand && inputSource.hand ) {\n\n\t\t\t\thandPose = true;\n\n\t\t\t\tfor ( const inputjoint of inputSource.hand.values() ) {\n\n\t\t\t\t\t// Update the joints groups with the XRJoint poses\n\t\t\t\t\tconst jointPose = frame.getJointPose( inputjoint, referenceSpace );\n\n\t\t\t\t\t// The transform of this joint will be updated with the joint pose on each frame\n\t\t\t\t\tconst joint = this._getHandJoint( hand, inputjoint );\n\n\t\t\t\t\tif ( jointPose !== null ) {\n\n\t\t\t\t\t\tjoint.matrix.fromArray( jointPose.transform.matrix );\n\t\t\t\t\t\tjoint.matrix.decompose( joint.position, joint.rotation, joint.scale );\n\t\t\t\t\t\tjoint.matrixWorldNeedsUpdate = true;\n\t\t\t\t\t\tjoint.jointRadius = jointPose.radius;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tjoint.visible = jointPose !== null;\n\n\t\t\t\t}\n\n\t\t\t\t// Custom events\n\n\t\t\t\t// Check pinchz\n\t\t\t\tconst indexTip = hand.joints[ 'index-finger-tip' ];\n\t\t\t\tconst thumbTip = hand.joints[ 'thumb-tip' ];\n\t\t\t\tconst distance = indexTip.position.distanceTo( thumbTip.position );\n\n\t\t\t\tconst distanceToPinch = 0.02;\n\t\t\t\tconst threshold = 0.005;\n\n\t\t\t\tif ( hand.inputState.pinching && distance > distanceToPinch + threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = false;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchend',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t} else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = true;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchstart',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( grip !== null && inputSource.gripSpace ) {\n\n\t\t\t\t\tgripPose = frame.getPose( inputSource.gripSpace, referenceSpace );\n\n\t\t\t\t\tif ( gripPose !== null ) {\n\n\t\t\t\t\t\tgrip.matrix.fromArray( gripPose.transform.matrix );\n\t\t\t\t\t\tgrip.matrix.decompose( grip.position, grip.rotation, grip.scale );\n\t\t\t\t\t\tgrip.matrixWorldNeedsUpdate = true;\n\n\t\t\t\t\t\tif ( gripPose.linearVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = true;\n\t\t\t\t\t\t\tgrip.linearVelocity.copy( gripPose.linearVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( gripPose.angularVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = true;\n\t\t\t\t\t\t\tgrip.angularVelocity.copy( gripPose.angularVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( targetRay !== null ) {\n\n\t\t\t\tinputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );\n\n\t\t\t\t// Some runtimes (namely Vive Cosmos with Vive OpenXR Runtime) have only grip space and ray space is equal to it\n\t\t\t\tif ( inputPose === null && gripPose !== null ) {\n\n\t\t\t\t\tinputPose = gripPose;\n\n\t\t\t\t}\n\n\t\t\t\tif ( inputPose !== null ) {\n\n\t\t\t\t\ttargetRay.matrix.fromArray( inputPose.transform.matrix );\n\t\t\t\t\ttargetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );\n\t\t\t\t\ttargetRay.matrixWorldNeedsUpdate = true;\n\n\t\t\t\t\tif ( inputPose.linearVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = true;\n\t\t\t\t\t\ttargetRay.linearVelocity.copy( inputPose.linearVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( inputPose.angularVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = true;\n\t\t\t\t\t\ttargetRay.angularVelocity.copy( inputPose.angularVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.dispatchEvent( _moveEvent );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tif ( targetRay !== null ) {\n\n\t\t\ttargetRay.visible = ( inputPose !== null );\n\n\t\t}\n\n\t\tif ( grip !== null ) {\n\n\t\t\tgrip.visible = ( gripPose !== null );\n\n\t\t}\n\n\t\tif ( hand !== null ) {\n\n\t\t\thand.visible = ( handPose !== null );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// private method\n\n\t_getHandJoint( hand, inputjoint ) {\n\n\t\tif ( hand.joints[ inputjoint.jointName ] === undefined ) {\n\n\t\t\tconst joint = new Group();\n\t\t\tjoint.matrixAutoUpdate = false;\n\t\t\tjoint.visible = false;\n\t\t\thand.joints[ inputjoint.jointName ] = joint;\n\n\t\t\thand.add( joint );\n\n\t\t}\n\n\t\treturn hand.joints[ inputjoint.jointName ];\n\n\t}\n\n}\n\nclass DepthTexture extends Texture {\n\n\tconstructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {\n\n\t\tformat = format !== undefined ? format : DepthFormat;\n\n\t\tif ( format !== DepthFormat && format !== DepthStencilFormat ) {\n\n\t\t\tthrow new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' );\n\n\t\t}\n\n\t\tif ( type === undefined && format === DepthFormat ) type = UnsignedIntType;\n\t\tif ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type;\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.isDepthTexture = true;\n\n\t\tthis.image = { width: width, height: height };\n\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\n\t\tthis.flipY = false;\n\t\tthis.generateMipmaps = false;\n\n\t\tthis.compareFunction = null;\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.compareFunction = source.compareFunction;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.compareFunction !== null ) data.compareFunction = this.compareFunction;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass WebXRManager extends EventDispatcher {\n\n\tconstructor( renderer, gl ) {\n\n\t\tsuper();\n\n\t\tconst scope = this;\n\n\t\tlet session = null;\n\n\t\tlet framebufferScaleFactor = 1.0;\n\n\t\tlet referenceSpace = null;\n\t\tlet referenceSpaceType = 'local-floor';\n\t\t// Set default foveation to maximum.\n\t\tlet foveation = 1.0;\n\t\tlet customReferenceSpace = null;\n\n\t\tlet pose = null;\n\t\tlet glBinding = null;\n\t\tlet glProjLayer = null;\n\t\tlet glBaseLayer = null;\n\t\tlet xrFrame = null;\n\t\tconst attributes = gl.getContextAttributes();\n\t\tlet initialRenderTarget = null;\n\t\tlet newRenderTarget = null;\n\n\t\tconst controllers = [];\n\t\tconst controllerInputSources = [];\n\n\t\t//\n\n\t\tconst cameraL = new PerspectiveCamera();\n\t\tcameraL.layers.enable( 1 );\n\t\tcameraL.viewport = new Vector4();\n\n\t\tconst cameraR = new PerspectiveCamera();\n\t\tcameraR.layers.enable( 2 );\n\t\tcameraR.viewport = new Vector4();\n\n\t\tconst cameras = [ cameraL, cameraR ];\n\n\t\tconst cameraXR = new ArrayCamera();\n\t\tcameraXR.layers.enable( 1 );\n\t\tcameraXR.layers.enable( 2 );\n\n\t\tlet _currentDepthNear = null;\n\t\tlet _currentDepthFar = null;\n\n\t\t//\n\n\t\tthis.cameraAutoUpdate = true;\n\t\tthis.enabled = false;\n\n\t\tthis.isPresenting = false;\n\n\t\tthis.getController = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getTargetRaySpace();\n\n\t\t};\n\n\t\tthis.getControllerGrip = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getGripSpace();\n\n\t\t};\n\n\t\tthis.getHand = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getHandSpace();\n\n\t\t};\n\n\t\t//\n\n\t\tfunction onSessionEvent( event ) {\n\n\t\t\tconst controllerIndex = controllerInputSources.indexOf( event.inputSource );\n\n\t\t\tif ( controllerIndex === - 1 ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst controller = controllers[ controllerIndex ];\n\n\t\t\tif ( controller !== undefined ) {\n\n\t\t\t\tcontroller.update( event.inputSource, event.frame, customReferenceSpace || referenceSpace );\n\t\t\t\tcontroller.dispatchEvent( { type: event.type, data: event.inputSource } );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onSessionEnd() {\n\n\t\t\tsession.removeEventListener( 'select', onSessionEvent );\n\t\t\tsession.removeEventListener( 'selectstart', onSessionEvent );\n\t\t\tsession.removeEventListener( 'selectend', onSessionEvent );\n\t\t\tsession.removeEventListener( 'squeeze', onSessionEvent );\n\t\t\tsession.removeEventListener( 'squeezestart', onSessionEvent );\n\t\t\tsession.removeEventListener( 'squeezeend', onSessionEvent );\n\t\t\tsession.removeEventListener( 'end', onSessionEnd );\n\t\t\tsession.removeEventListener( 'inputsourceschange', onInputSourcesChange );\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tconst inputSource = controllerInputSources[ i ];\n\n\t\t\t\tif ( inputSource === null ) continue;\n\n\t\t\t\tcontrollerInputSources[ i ] = null;\n\n\t\t\t\tcontrollers[ i ].disconnect( inputSource );\n\n\t\t\t}\n\n\t\t\t_currentDepthNear = null;\n\t\t\t_currentDepthFar = null;\n\n\t\t\t// restore framebuffer/rendering state\n\n\t\t\trenderer.setRenderTarget( initialRenderTarget );\n\n\t\t\tglBaseLayer = null;\n\t\t\tglProjLayer = null;\n\t\t\tglBinding = null;\n\t\t\tsession = null;\n\t\t\tnewRenderTarget = null;\n\n\t\t\t//\n\n\t\t\tanimation.stop();\n\n\t\t\tscope.isPresenting = false;\n\n\t\t\tscope.dispatchEvent( { type: 'sessionend' } );\n\n\t\t}\n\n\t\tthis.setFramebufferScaleFactor = function ( value ) {\n\n\t\t\tframebufferScaleFactor = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change framebuffer scale while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function ( value ) {\n\n\t\t\treferenceSpaceType = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change reference space type while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getReferenceSpace = function () {\n\n\t\t\treturn customReferenceSpace || referenceSpace;\n\n\t\t};\n\n\t\tthis.setReferenceSpace = function ( space ) {\n\n\t\t\tcustomReferenceSpace = space;\n\n\t\t};\n\n\t\tthis.getBaseLayer = function () {\n\n\t\t\treturn glProjLayer !== null ? glProjLayer : glBaseLayer;\n\n\t\t};\n\n\t\tthis.getBinding = function () {\n\n\t\t\treturn glBinding;\n\n\t\t};\n\n\t\tthis.getFrame = function () {\n\n\t\t\treturn xrFrame;\n\n\t\t};\n\n\t\tthis.getSession = function () {\n\n\t\t\treturn session;\n\n\t\t};\n\n\t\tthis.setSession = async function ( value ) {\n\n\t\t\tsession = value;\n\n\t\t\tif ( session !== null ) {\n\n\t\t\t\tinitialRenderTarget = renderer.getRenderTarget();\n\n\t\t\t\tsession.addEventListener( 'select', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectstart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeeze', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezestart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezeend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'end', onSessionEnd );\n\t\t\t\tsession.addEventListener( 'inputsourceschange', onInputSourcesChange );\n\n\t\t\t\tif ( attributes.xrCompatible !== true ) {\n\n\t\t\t\t\tawait gl.makeXRCompatible();\n\n\t\t\t\t}\n\n\t\t\t\tif ( ( session.renderState.layers === undefined ) || ( renderer.capabilities.isWebGL2 === false ) ) {\n\n\t\t\t\t\tconst layerInit = {\n\t\t\t\t\t\tantialias: ( session.renderState.layers === undefined ) ? attributes.antialias : true,\n\t\t\t\t\t\talpha: true,\n\t\t\t\t\t\tdepth: attributes.depth,\n\t\t\t\t\t\tstencil: attributes.stencil,\n\t\t\t\t\t\tframebufferScaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\tglBaseLayer = new XRWebGLLayer( session, gl, layerInit );\n\n\t\t\t\t\tsession.updateRenderState( { baseLayer: glBaseLayer } );\n\n\t\t\t\t\tnewRenderTarget = new WebGLRenderTarget(\n\t\t\t\t\t\tglBaseLayer.framebufferWidth,\n\t\t\t\t\t\tglBaseLayer.framebufferHeight,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tformat: RGBAFormat,\n\t\t\t\t\t\t\ttype: UnsignedByteType,\n\t\t\t\t\t\t\tcolorSpace: renderer.outputColorSpace,\n\t\t\t\t\t\t\tstencilBuffer: attributes.stencil\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tlet depthFormat = null;\n\t\t\t\t\tlet depthType = null;\n\t\t\t\t\tlet glDepthFormat = null;\n\n\t\t\t\t\tif ( attributes.depth ) {\n\n\t\t\t\t\t\tglDepthFormat = attributes.stencil ? gl.DEPTH24_STENCIL8 : gl.DEPTH_COMPONENT24;\n\t\t\t\t\t\tdepthFormat = attributes.stencil ? DepthStencilFormat : DepthFormat;\n\t\t\t\t\t\tdepthType = attributes.stencil ? UnsignedInt248Type : UnsignedIntType;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst projectionlayerInit = {\n\t\t\t\t\t\tcolorFormat: gl.RGBA8,\n\t\t\t\t\t\tdepthFormat: glDepthFormat,\n\t\t\t\t\t\tscaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\tglBinding = new XRWebGLBinding( session, gl );\n\n\t\t\t\t\tglProjLayer = glBinding.createProjectionLayer( projectionlayerInit );\n\n\t\t\t\t\tsession.updateRenderState( { layers: [ glProjLayer ] } );\n\n\t\t\t\t\tnewRenderTarget = new WebGLRenderTarget(\n\t\t\t\t\t\tglProjLayer.textureWidth,\n\t\t\t\t\t\tglProjLayer.textureHeight,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tformat: RGBAFormat,\n\t\t\t\t\t\t\ttype: UnsignedByteType,\n\t\t\t\t\t\t\tdepthTexture: new DepthTexture( glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat ),\n\t\t\t\t\t\t\tstencilBuffer: attributes.stencil,\n\t\t\t\t\t\t\tcolorSpace: renderer.outputColorSpace,\n\t\t\t\t\t\t\tsamples: attributes.antialias ? 4 : 0\n\t\t\t\t\t\t} );\n\n\t\t\t\t\tconst renderTargetProperties = renderer.properties.get( newRenderTarget );\n\t\t\t\t\trenderTargetProperties.__ignoreDepthValues = glProjLayer.ignoreDepthValues;\n\n\t\t\t\t}\n\n\t\t\t\tnewRenderTarget.isXRRenderTarget = true; // TODO Remove this when possible, see #23278\n\n\t\t\t\tthis.setFoveation( foveation );\n\n\t\t\t\tcustomReferenceSpace = null;\n\t\t\t\treferenceSpace = await session.requestReferenceSpace( referenceSpaceType );\n\n\t\t\t\tanimation.setContext( session );\n\t\t\t\tanimation.start();\n\n\t\t\t\tscope.isPresenting = true;\n\n\t\t\t\tscope.dispatchEvent( { type: 'sessionstart' } );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getEnvironmentBlendMode = function () {\n\n\t\t\tif ( session !== null ) {\n\n\t\t\t\treturn session.environmentBlendMode;\n\n\t\t\t}\n\n\t\t};\n\n\t\tfunction onInputSourcesChange( event ) {\n\n\t\t\t// Notify disconnected\n\n\t\t\tfor ( let i = 0; i < event.removed.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.removed[ i ];\n\t\t\t\tconst index = controllerInputSources.indexOf( inputSource );\n\n\t\t\t\tif ( index >= 0 ) {\n\n\t\t\t\t\tcontrollerInputSources[ index ] = null;\n\t\t\t\t\tcontrollers[ index ].disconnect( inputSource );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Notify connected\n\n\t\t\tfor ( let i = 0; i < event.added.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.added[ i ];\n\n\t\t\t\tlet controllerIndex = controllerInputSources.indexOf( inputSource );\n\n\t\t\t\tif ( controllerIndex === - 1 ) {\n\n\t\t\t\t\t// Assign input source a controller that currently has no input source\n\n\t\t\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\t\t\tif ( i >= controllerInputSources.length ) {\n\n\t\t\t\t\t\t\tcontrollerInputSources.push( inputSource );\n\t\t\t\t\t\t\tcontrollerIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t} else if ( controllerInputSources[ i ] === null ) {\n\n\t\t\t\t\t\t\tcontrollerInputSources[ i ] = inputSource;\n\t\t\t\t\t\t\tcontrollerIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// If all controllers do currently receive input we ignore new ones\n\n\t\t\t\t\tif ( controllerIndex === - 1 ) break;\n\n\t\t\t\t}\n\n\t\t\t\tconst controller = controllers[ controllerIndex ];\n\n\t\t\t\tif ( controller ) {\n\n\t\t\t\t\tcontroller.connect( inputSource );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tconst cameraLPos = new Vector3();\n\t\tconst cameraRPos = new Vector3();\n\n\t\t/**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */\n\t\tfunction setProjectionFromUnion( camera, cameraL, cameraR ) {\n\n\t\t\tcameraLPos.setFromMatrixPosition( cameraL.matrixWorld );\n\t\t\tcameraRPos.setFromMatrixPosition( cameraR.matrixWorld );\n\n\t\t\tconst ipd = cameraLPos.distanceTo( cameraRPos );\n\n\t\t\tconst projL = cameraL.projectionMatrix.elements;\n\t\t\tconst projR = cameraR.projectionMatrix.elements;\n\n\t\t\t// VR systems will have identical far and near planes, and\n\t\t\t// most likely identical top and bottom frustum extents.\n\t\t\t// Use the left camera for these values.\n\t\t\tconst near = projL[ 14 ] / ( projL[ 10 ] - 1 );\n\t\t\tconst far = projL[ 14 ] / ( projL[ 10 ] + 1 );\n\t\t\tconst topFov = ( projL[ 9 ] + 1 ) / projL[ 5 ];\n\t\t\tconst bottomFov = ( projL[ 9 ] - 1 ) / projL[ 5 ];\n\n\t\t\tconst leftFov = ( projL[ 8 ] - 1 ) / projL[ 0 ];\n\t\t\tconst rightFov = ( projR[ 8 ] + 1 ) / projR[ 0 ];\n\t\t\tconst left = near * leftFov;\n\t\t\tconst right = near * rightFov;\n\n\t\t\t// Calculate the new camera's position offset from the\n\t\t\t// left camera. xOffset should be roughly half `ipd`.\n\t\t\tconst zOffset = ipd / ( - leftFov + rightFov );\n\t\t\tconst xOffset = zOffset * - leftFov;\n\n\t\t\t// TODO: Better way to apply this offset?\n\t\t\tcameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.translateX( xOffset );\n\t\t\tcamera.translateZ( zOffset );\n\t\t\tcamera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t\t// Find the union of the frustum values of the cameras and scale\n\t\t\t// the values so that the near plane's position does not change in world space,\n\t\t\t// although must now be relative to the new union camera.\n\t\t\tconst near2 = near + zOffset;\n\t\t\tconst far2 = far + zOffset;\n\t\t\tconst left2 = left - xOffset;\n\t\t\tconst right2 = right + ( ipd - xOffset );\n\t\t\tconst top2 = topFov * far / far2 * near2;\n\t\t\tconst bottom2 = bottomFov * far / far2 * near2;\n\n\t\t\tcamera.projectionMatrix.makePerspective( left2, right2, top2, bottom2, near2, far2 );\n\t\t\tcamera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert();\n\n\t\t}\n\n\t\tfunction updateCamera( camera, parent ) {\n\n\t\t\tif ( parent === null ) {\n\n\t\t\t\tcamera.matrixWorld.copy( camera.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tcamera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix );\n\n\t\t\t}\n\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t}\n\n\t\tthis.updateCamera = function ( camera ) {\n\n\t\t\tif ( session === null ) return;\n\n\t\t\tcameraXR.near = cameraR.near = cameraL.near = camera.near;\n\t\t\tcameraXR.far = cameraR.far = cameraL.far = camera.far;\n\n\t\t\tif ( _currentDepthNear !== cameraXR.near || _currentDepthFar !== cameraXR.far ) {\n\n\t\t\t\t// Note that the new renderState won't apply until the next frame. See #18320\n\n\t\t\t\tsession.updateRenderState( {\n\t\t\t\t\tdepthNear: cameraXR.near,\n\t\t\t\t\tdepthFar: cameraXR.far\n\t\t\t\t} );\n\n\t\t\t\t_currentDepthNear = cameraXR.near;\n\t\t\t\t_currentDepthFar = cameraXR.far;\n\n\t\t\t}\n\n\t\t\tconst parent = camera.parent;\n\t\t\tconst cameras = cameraXR.cameras;\n\n\t\t\tupdateCamera( cameraXR, parent );\n\n\t\t\tfor ( let i = 0; i < cameras.length; i ++ ) {\n\n\t\t\t\tupdateCamera( cameras[ i ], parent );\n\n\t\t\t}\n\n\t\t\t// update projection matrix for proper view frustum culling\n\n\t\t\tif ( cameras.length === 2 ) {\n\n\t\t\t\tsetProjectionFromUnion( cameraXR, cameraL, cameraR );\n\n\t\t\t} else {\n\n\t\t\t\t// assume single camera setup (AR)\n\n\t\t\t\tcameraXR.projectionMatrix.copy( cameraL.projectionMatrix );\n\n\t\t\t}\n\n\t\t\t// update user camera and its children\n\n\t\t\tupdateUserCamera( camera, cameraXR, parent );\n\n\t\t};\n\n\t\tfunction updateUserCamera( camera, cameraXR, parent ) {\n\n\t\t\tif ( parent === null ) {\n\n\t\t\t\tcamera.matrix.copy( cameraXR.matrixWorld );\n\n\t\t\t} else {\n\n\t\t\t\tcamera.matrix.copy( parent.matrixWorld );\n\t\t\t\tcamera.matrix.invert();\n\t\t\t\tcamera.matrix.multiply( cameraXR.matrixWorld );\n\n\t\t\t}\n\n\t\t\tcamera.matrix.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.updateMatrixWorld( true );\n\n\t\t\tcamera.projectionMatrix.copy( cameraXR.projectionMatrix );\n\t\t\tcamera.projectionMatrixInverse.copy( cameraXR.projectionMatrixInverse );\n\n\t\t\tif ( camera.isPerspectiveCamera ) {\n\n\t\t\t\tcamera.fov = RAD2DEG * 2 * Math.atan( 1 / camera.projectionMatrix.elements[ 5 ] );\n\t\t\t\tcamera.zoom = 1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.getCamera = function () {\n\n\t\t\treturn cameraXR;\n\n\t\t};\n\n\t\tthis.getFoveation = function () {\n\n\t\t\tif ( glProjLayer === null && glBaseLayer === null ) {\n\n\t\t\t\treturn undefined;\n\n\t\t\t}\n\n\t\t\treturn foveation;\n\n\t\t};\n\n\t\tthis.setFoveation = function ( value ) {\n\n\t\t\t// 0 = no foveation = full resolution\n\t\t\t// 1 = maximum foveation = the edges render at lower resolution\n\n\t\t\tfoveation = value;\n\n\t\t\tif ( glProjLayer !== null ) {\n\n\t\t\t\tglProjLayer.fixedFoveation = value;\n\n\t\t\t}\n\n\t\t\tif ( glBaseLayer !== null && glBaseLayer.fixedFoveation !== undefined ) {\n\n\t\t\t\tglBaseLayer.fixedFoveation = value;\n\n\t\t\t}\n\n\t\t};\n\n\t\t// Animation Loop\n\n\t\tlet onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame( time, frame ) {\n\n\t\t\tpose = frame.getViewerPose( customReferenceSpace || referenceSpace );\n\t\t\txrFrame = frame;\n\n\t\t\tif ( pose !== null ) {\n\n\t\t\t\tconst views = pose.views;\n\n\t\t\t\tif ( glBaseLayer !== null ) {\n\n\t\t\t\t\trenderer.setRenderTargetFramebuffer( newRenderTarget, glBaseLayer.framebuffer );\n\t\t\t\t\trenderer.setRenderTarget( newRenderTarget );\n\n\t\t\t\t}\n\n\t\t\t\tlet cameraXRNeedsUpdate = false;\n\n\t\t\t\t// check if it's necessary to rebuild cameraXR's camera list\n\n\t\t\t\tif ( views.length !== cameraXR.cameras.length ) {\n\n\t\t\t\t\tcameraXR.cameras.length = 0;\n\t\t\t\t\tcameraXRNeedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < views.length; i ++ ) {\n\n\t\t\t\t\tconst view = views[ i ];\n\n\t\t\t\t\tlet viewport = null;\n\n\t\t\t\t\tif ( glBaseLayer !== null ) {\n\n\t\t\t\t\t\tviewport = glBaseLayer.getViewport( view );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst glSubImage = glBinding.getViewSubImage( glProjLayer, view );\n\t\t\t\t\t\tviewport = glSubImage.viewport;\n\n\t\t\t\t\t\t// For side-by-side projection, we only produce a single texture for both eyes.\n\t\t\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\t\t\trenderer.setRenderTargetTextures(\n\t\t\t\t\t\t\t\tnewRenderTarget,\n\t\t\t\t\t\t\t\tglSubImage.colorTexture,\n\t\t\t\t\t\t\t\tglProjLayer.ignoreDepthValues ? undefined : glSubImage.depthStencilTexture );\n\n\t\t\t\t\t\t\trenderer.setRenderTarget( newRenderTarget );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlet camera = cameras[ i ];\n\n\t\t\t\t\tif ( camera === undefined ) {\n\n\t\t\t\t\t\tcamera = new PerspectiveCamera();\n\t\t\t\t\t\tcamera.layers.enable( i );\n\t\t\t\t\t\tcamera.viewport = new Vector4();\n\t\t\t\t\t\tcameras[ i ] = camera;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcamera.matrix.fromArray( view.transform.matrix );\n\t\t\t\t\tcamera.matrix.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\t\t\tcamera.projectionMatrix.fromArray( view.projectionMatrix );\n\t\t\t\t\tcamera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert();\n\t\t\t\t\tcamera.viewport.set( viewport.x, viewport.y, viewport.width, viewport.height );\n\n\t\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\t\tcameraXR.matrix.copy( camera.matrix );\n\t\t\t\t\t\tcameraXR.matrix.decompose( cameraXR.position, cameraXR.quaternion, cameraXR.scale );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( cameraXRNeedsUpdate === true ) {\n\n\t\t\t\t\t\tcameraXR.cameras.push( camera );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tconst inputSource = controllerInputSources[ i ];\n\t\t\t\tconst controller = controllers[ i ];\n\n\t\t\t\tif ( inputSource !== null && controller !== undefined ) {\n\n\t\t\t\t\tcontroller.update( inputSource, frame, customReferenceSpace || referenceSpace );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame );\n\n\t\t\tif ( frame.detectedPlanes ) {\n\n\t\t\t\tscope.dispatchEvent( { type: 'planesdetected', data: frame } );\n\n\t\t\t}\n\n\t\t\txrFrame = null;\n\n\t\t}\n\n\t\tconst animation = new WebGLAnimation();\n\n\t\tanimation.setAnimationLoop( onAnimationFrame );\n\n\t\tthis.setAnimationLoop = function ( callback ) {\n\n\t\t\tonAnimationFrameCallback = callback;\n\n\t\t};\n\n\t\tthis.dispose = function () {};\n\n\t}\n\n}\n\nfunction WebGLMaterials( renderer, properties ) {\n\n\tfunction refreshTransformUniform( map, uniform ) {\n\n\t\tif ( map.matrixAutoUpdate === true ) {\n\n\t\t\tmap.updateMatrix();\n\n\t\t}\n\n\t\tuniform.value.copy( map.matrix );\n\n\t}\n\n\tfunction refreshFogUniforms( uniforms, fog ) {\n\n\t\tfog.color.getRGB( uniforms.fogColor.value, getUnlitUniformColorSpace( renderer ) );\n\n\t\tif ( fog.isFog ) {\n\n\t\t\tuniforms.fogNear.value = fog.near;\n\t\t\tuniforms.fogFar.value = fog.far;\n\n\t\t} else if ( fog.isFogExp2 ) {\n\n\t\t\tuniforms.fogDensity.value = fog.density;\n\n\t\t}\n\n\t}\n\n\tfunction refreshMaterialUniforms( uniforms, material, pixelRatio, height, transmissionRenderTarget ) {\n\n\t\tif ( material.isMeshBasicMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshLambertMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshToonMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsToon( uniforms, material );\n\n\t\t} else if ( material.isMeshPhongMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsPhong( uniforms, material );\n\n\t\t} else if ( material.isMeshStandardMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsStandard( uniforms, material );\n\n\t\t\tif ( material.isMeshPhysicalMaterial ) {\n\n\t\t\t\trefreshUniformsPhysical( uniforms, material, transmissionRenderTarget );\n\n\t\t\t}\n\n\t\t} else if ( material.isMeshMatcapMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsMatcap( uniforms, material );\n\n\t\t} else if ( material.isMeshDepthMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshDistanceMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsDistance( uniforms, material );\n\n\t\t} else if ( material.isMeshNormalMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isLineBasicMaterial ) {\n\n\t\t\trefreshUniformsLine( uniforms, material );\n\n\t\t\tif ( material.isLineDashedMaterial ) {\n\n\t\t\t\trefreshUniformsDash( uniforms, material );\n\n\t\t\t}\n\n\t\t} else if ( material.isPointsMaterial ) {\n\n\t\t\trefreshUniformsPoints( uniforms, material, pixelRatio, height );\n\n\t\t} else if ( material.isSpriteMaterial ) {\n\n\t\t\trefreshUniformsSprites( uniforms, material );\n\n\t\t} else if ( material.isShadowMaterial ) {\n\n\t\t\tuniforms.color.value.copy( material.color );\n\t\t\tuniforms.opacity.value = material.opacity;\n\n\t\t} else if ( material.isShaderMaterial ) {\n\n\t\t\tmaterial.uniformsNeedUpdate = false; // #15581\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsCommon( uniforms, material ) {\n\n\t\tuniforms.opacity.value = material.opacity;\n\n\t\tif ( material.color ) {\n\n\t\t\tuniforms.diffuse.value.copy( material.color );\n\n\t\t}\n\n\t\tif ( material.emissive ) {\n\n\t\t\tuniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity );\n\n\t\t}\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.mapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t\trefreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform );\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\n\t\t\trefreshTransformUniform( material.bumpMap, uniforms.bumpMapTransform );\n\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\n\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\tuniforms.bumpScale.value *= - 1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\n\t\t\trefreshTransformUniform( material.normalMap, uniforms.normalMapTransform );\n\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\n\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\tuniforms.normalScale.value.negate();\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\n\t\t\trefreshTransformUniform( material.displacementMap, uniforms.displacementMapTransform );\n\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t\trefreshTransformUniform( material.emissiveMap, uniforms.emissiveMapTransform );\n\n\t\t}\n\n\t\tif ( material.specularMap ) {\n\n\t\t\tuniforms.specularMap.value = material.specularMap;\n\n\t\t\trefreshTransformUniform( material.specularMap, uniforms.specularMapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaTest > 0 ) {\n\n\t\t\tuniforms.alphaTest.value = material.alphaTest;\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\tuniforms.envMap.value = envMap;\n\n\t\t\tuniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1;\n\n\t\t\tuniforms.reflectivity.value = material.reflectivity;\n\t\t\tuniforms.ior.value = material.ior;\n\t\t\tuniforms.refractionRatio.value = material.refractionRatio;\n\n\t\t}\n\n\t\tif ( material.lightMap ) {\n\n\t\t\tuniforms.lightMap.value = material.lightMap;\n\n\t\t\t// artist-friendly light intensity scaling factor\n\t\t\tconst scaleFactor = ( renderer._useLegacyLights === true ) ? Math.PI : 1;\n\n\t\t\tuniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor;\n\n\t\t\trefreshTransformUniform( material.lightMap, uniforms.lightMapTransform );\n\n\t\t}\n\n\t\tif ( material.aoMap ) {\n\n\t\t\tuniforms.aoMap.value = material.aoMap;\n\t\t\tuniforms.aoMapIntensity.value = material.aoMapIntensity;\n\n\t\t\trefreshTransformUniform( material.aoMap, uniforms.aoMapTransform );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsLine( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.mapTransform );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDash( uniforms, material ) {\n\n\t\tuniforms.dashSize.value = material.dashSize;\n\t\tuniforms.totalSize.value = material.dashSize + material.gapSize;\n\t\tuniforms.scale.value = material.scale;\n\n\t}\n\n\tfunction refreshUniformsPoints( uniforms, material, pixelRatio, height ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.size.value = material.size * pixelRatio;\n\t\tuniforms.scale.value = height * 0.5;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.uvTransform );\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t\trefreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaTest > 0 ) {\n\n\t\t\tuniforms.alphaTest.value = material.alphaTest;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsSprites( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.rotation.value = material.rotation;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t\trefreshTransformUniform( material.map, uniforms.mapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t\trefreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform );\n\n\t\t}\n\n\t\tif ( material.alphaTest > 0 ) {\n\n\t\t\tuniforms.alphaTest.value = material.alphaTest;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhong( uniforms, material ) {\n\n\t\tuniforms.specular.value.copy( material.specular );\n\t\tuniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 )\n\n\t}\n\n\tfunction refreshUniformsToon( uniforms, material ) {\n\n\t\tif ( material.gradientMap ) {\n\n\t\t\tuniforms.gradientMap.value = material.gradientMap;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsStandard( uniforms, material ) {\n\n\t\tuniforms.metalness.value = material.metalness;\n\n\t\tif ( material.metalnessMap ) {\n\n\t\t\tuniforms.metalnessMap.value = material.metalnessMap;\n\n\t\t\trefreshTransformUniform( material.metalnessMap, uniforms.metalnessMapTransform );\n\n\t\t}\n\n\t\tuniforms.roughness.value = material.roughness;\n\n\t\tif ( material.roughnessMap ) {\n\n\t\t\tuniforms.roughnessMap.value = material.roughnessMap;\n\n\t\t\trefreshTransformUniform( material.roughnessMap, uniforms.roughnessMapTransform );\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\t//uniforms.envMap.value = material.envMap; // part of uniforms common\n\t\t\tuniforms.envMapIntensity.value = material.envMapIntensity;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ) {\n\n\t\tuniforms.ior.value = material.ior; // also part of uniforms common\n\n\t\tif ( material.sheen > 0 ) {\n\n\t\t\tuniforms.sheenColor.value.copy( material.sheenColor ).multiplyScalar( material.sheen );\n\n\t\t\tuniforms.sheenRoughness.value = material.sheenRoughness;\n\n\t\t\tif ( material.sheenColorMap ) {\n\n\t\t\t\tuniforms.sheenColorMap.value = material.sheenColorMap;\n\n\t\t\t\trefreshTransformUniform( material.sheenColorMap, uniforms.sheenColorMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.sheenRoughnessMap ) {\n\n\t\t\t\tuniforms.sheenRoughnessMap.value = material.sheenRoughnessMap;\n\n\t\t\t\trefreshTransformUniform( material.sheenRoughnessMap, uniforms.sheenRoughnessMapTransform );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.clearcoat > 0 ) {\n\n\t\t\tuniforms.clearcoat.value = material.clearcoat;\n\t\t\tuniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n\n\t\t\tif ( material.clearcoatMap ) {\n\n\t\t\t\tuniforms.clearcoatMap.value = material.clearcoatMap;\n\n\t\t\t\trefreshTransformUniform( material.clearcoatMap, uniforms.clearcoatMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.clearcoatRoughnessMap ) {\n\n\t\t\t\tuniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n\n\t\t\t\trefreshTransformUniform( material.clearcoatRoughnessMap, uniforms.clearcoatRoughnessMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.clearcoatNormalMap ) {\n\n\t\t\t\tuniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n\n\t\t\t\trefreshTransformUniform( material.clearcoatNormalMap, uniforms.clearcoatNormalMapTransform );\n\n\t\t\t\tuniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale );\n\n\t\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\t\tuniforms.clearcoatNormalScale.value.negate();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.iridescence > 0 ) {\n\n\t\t\tuniforms.iridescence.value = material.iridescence;\n\t\t\tuniforms.iridescenceIOR.value = material.iridescenceIOR;\n\t\t\tuniforms.iridescenceThicknessMinimum.value = material.iridescenceThicknessRange[ 0 ];\n\t\t\tuniforms.iridescenceThicknessMaximum.value = material.iridescenceThicknessRange[ 1 ];\n\n\t\t\tif ( material.iridescenceMap ) {\n\n\t\t\t\tuniforms.iridescenceMap.value = material.iridescenceMap;\n\n\t\t\t\trefreshTransformUniform( material.iridescenceMap, uniforms.iridescenceMapTransform );\n\n\t\t\t}\n\n\t\t\tif ( material.iridescenceThicknessMap ) {\n\n\t\t\t\tuniforms.iridescenceThicknessMap.value = material.iridescenceThicknessMap;\n\n\t\t\t\trefreshTransformUniform( material.iridescenceThicknessMap, uniforms.iridescenceThicknessMapTransform );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.transmission > 0 ) {\n\n\t\t\tuniforms.transmission.value = material.transmission;\n\t\t\tuniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;\n\t\t\tuniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height );\n\n\t\t\tif ( material.transmissionMap ) {\n\n\t\t\t\tuniforms.transmissionMap.value = material.transmissionMap;\n\n\t\t\t\trefreshTransformUniform( material.transmissionMap, uniforms.transmissionMapTransform );\n\n\t\t\t}\n\n\t\t\tuniforms.thickness.value = material.thickness;\n\n\t\t\tif ( material.thicknessMap ) {\n\n\t\t\t\tuniforms.thicknessMap.value = material.thicknessMap;\n\n\t\t\t\trefreshTransformUniform( material.thicknessMap, uniforms.thicknessMapTransform );\n\n\t\t\t}\n\n\t\t\tuniforms.attenuationDistance.value = material.attenuationDistance;\n\t\t\tuniforms.attenuationColor.value.copy( material.attenuationColor );\n\n\t\t}\n\n\t\tif ( material.anisotropy > 0 ) {\n\n\t\t\tuniforms.anisotropyVector.value.set( material.anisotropy * Math.cos( material.anisotropyRotation ), material.anisotropy * Math.sin( material.anisotropyRotation ) );\n\n\t\t\tif ( material.anisotropyMap ) {\n\n\t\t\t\tuniforms.anisotropyMap.value = material.anisotropyMap;\n\n\t\t\t\trefreshTransformUniform( material.anisotropyMap, uniforms.anisotropyMapTransform );\n\n\t\t\t}\n\n\t\t}\n\n\t\tuniforms.specularIntensity.value = material.specularIntensity;\n\t\tuniforms.specularColor.value.copy( material.specularColor );\n\n\t\tif ( material.specularColorMap ) {\n\n\t\t\tuniforms.specularColorMap.value = material.specularColorMap;\n\n\t\t\trefreshTransformUniform( material.specularColorMap, uniforms.specularColorMapTransform );\n\n\t\t}\n\n\t\tif ( material.specularIntensityMap ) {\n\n\t\t\tuniforms.specularIntensityMap.value = material.specularIntensityMap;\n\n\t\t\trefreshTransformUniform( material.specularIntensityMap, uniforms.specularIntensityMapTransform );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsMatcap( uniforms, material ) {\n\n\t\tif ( material.matcap ) {\n\n\t\t\tuniforms.matcap.value = material.matcap;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDistance( uniforms, material ) {\n\n\t\tconst light = properties.get( material ).light;\n\n\t\tuniforms.referencePosition.value.setFromMatrixPosition( light.matrixWorld );\n\t\tuniforms.nearDistance.value = light.shadow.camera.near;\n\t\tuniforms.farDistance.value = light.shadow.camera.far;\n\n\t}\n\n\treturn {\n\t\trefreshFogUniforms: refreshFogUniforms,\n\t\trefreshMaterialUniforms: refreshMaterialUniforms\n\t};\n\n}\n\nfunction WebGLUniformsGroups( gl, info, capabilities, state ) {\n\n\tlet buffers = {};\n\tlet updateList = {};\n\tlet allocatedBindingPoints = [];\n\n\tconst maxBindingPoints = ( capabilities.isWebGL2 ) ? gl.getParameter( gl.MAX_UNIFORM_BUFFER_BINDINGS ) : 0; // binding points are global whereas block indices are per shader program\n\n\tfunction bind( uniformsGroup, program ) {\n\n\t\tconst webglProgram = program.program;\n\t\tstate.uniformBlockBinding( uniformsGroup, webglProgram );\n\n\t}\n\n\tfunction update( uniformsGroup, program ) {\n\n\t\tlet buffer = buffers[ uniformsGroup.id ];\n\n\t\tif ( buffer === undefined ) {\n\n\t\t\tprepareUniformsGroup( uniformsGroup );\n\n\t\t\tbuffer = createBuffer( uniformsGroup );\n\t\t\tbuffers[ uniformsGroup.id ] = buffer;\n\n\t\t\tuniformsGroup.addEventListener( 'dispose', onUniformsGroupsDispose );\n\n\t\t}\n\n\t\t// ensure to update the binding points/block indices mapping for this program\n\n\t\tconst webglProgram = program.program;\n\t\tstate.updateUBOMapping( uniformsGroup, webglProgram );\n\n\t\t// update UBO once per frame\n\n\t\tconst frame = info.render.frame;\n\n\t\tif ( updateList[ uniformsGroup.id ] !== frame ) {\n\n\t\t\tupdateBufferData( uniformsGroup );\n\n\t\t\tupdateList[ uniformsGroup.id ] = frame;\n\n\t\t}\n\n\t}\n\n\tfunction createBuffer( uniformsGroup ) {\n\n\t\t// the setup of an UBO is independent of a particular shader program but global\n\n\t\tconst bindingPointIndex = allocateBindingPointIndex();\n\t\tuniformsGroup.__bindingPointIndex = bindingPointIndex;\n\n\t\tconst buffer = gl.createBuffer();\n\t\tconst size = uniformsGroup.__size;\n\t\tconst usage = uniformsGroup.usage;\n\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, buffer );\n\t\tgl.bufferData( gl.UNIFORM_BUFFER, size, usage );\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, null );\n\t\tgl.bindBufferBase( gl.UNIFORM_BUFFER, bindingPointIndex, buffer );\n\n\t\treturn buffer;\n\n\t}\n\n\tfunction allocateBindingPointIndex() {\n\n\t\tfor ( let i = 0; i < maxBindingPoints; i ++ ) {\n\n\t\t\tif ( allocatedBindingPoints.indexOf( i ) === - 1 ) {\n\n\t\t\t\tallocatedBindingPoints.push( i );\n\t\t\t\treturn i;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconsole.error( 'THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.' );\n\n\t\treturn 0;\n\n\t}\n\n\tfunction updateBufferData( uniformsGroup ) {\n\n\t\tconst buffer = buffers[ uniformsGroup.id ];\n\t\tconst uniforms = uniformsGroup.uniforms;\n\t\tconst cache = uniformsGroup.__cache;\n\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, buffer );\n\n\t\tfor ( let i = 0, il = uniforms.length; i < il; i ++ ) {\n\n\t\t\tconst uniform = uniforms[ i ];\n\n\t\t\t// partly update the buffer if necessary\n\n\t\t\tif ( hasUniformChanged( uniform, i, cache ) === true ) {\n\n\t\t\t\tconst offset = uniform.__offset;\n\n\t\t\t\tconst values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ];\n\n\t\t\t\tlet arrayOffset = 0;\n\n\t\t\t\tfor ( let i = 0; i < values.length; i ++ ) {\n\n\t\t\t\t\tconst value = values[ i ];\n\n\t\t\t\t\tconst info = getUniformSize( value );\n\n\t\t\t\t\tif ( typeof value === 'number' ) {\n\n\t\t\t\t\t\tuniform.__data[ 0 ] = value;\n\t\t\t\t\t\tgl.bufferSubData( gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data );\n\n\t\t\t\t\t} else if ( value.isMatrix3 ) {\n\n\t\t\t\t\t\t// manually converting 3x3 to 3x4\n\n\t\t\t\t\t\tuniform.__data[ 0 ] = value.elements[ 0 ];\n\t\t\t\t\t\tuniform.__data[ 1 ] = value.elements[ 1 ];\n\t\t\t\t\t\tuniform.__data[ 2 ] = value.elements[ 2 ];\n\t\t\t\t\t\tuniform.__data[ 3 ] = value.elements[ 0 ];\n\t\t\t\t\t\tuniform.__data[ 4 ] = value.elements[ 3 ];\n\t\t\t\t\t\tuniform.__data[ 5 ] = value.elements[ 4 ];\n\t\t\t\t\t\tuniform.__data[ 6 ] = value.elements[ 5 ];\n\t\t\t\t\t\tuniform.__data[ 7 ] = value.elements[ 0 ];\n\t\t\t\t\t\tuniform.__data[ 8 ] = value.elements[ 6 ];\n\t\t\t\t\t\tuniform.__data[ 9 ] = value.elements[ 7 ];\n\t\t\t\t\t\tuniform.__data[ 10 ] = value.elements[ 8 ];\n\t\t\t\t\t\tuniform.__data[ 11 ] = value.elements[ 0 ];\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tvalue.toArray( uniform.__data, arrayOffset );\n\n\t\t\t\t\t\tarrayOffset += info.storage / Float32Array.BYTES_PER_ELEMENT;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tgl.bufferSubData( gl.UNIFORM_BUFFER, offset, uniform.__data );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgl.bindBuffer( gl.UNIFORM_BUFFER, null );\n\n\t}\n\n\tfunction hasUniformChanged( uniform, index, cache ) {\n\n\t\tconst value = uniform.value;\n\n\t\tif ( cache[ index ] === undefined ) {\n\n\t\t\t// cache entry does not exist so far\n\n\t\t\tif ( typeof value === 'number' ) {\n\n\t\t\t\tcache[ index ] = value;\n\n\t\t\t} else {\n\n\t\t\t\tconst values = Array.isArray( value ) ? value : [ value ];\n\n\t\t\t\tconst tempValues = [];\n\n\t\t\t\tfor ( let i = 0; i < values.length; i ++ ) {\n\n\t\t\t\t\ttempValues.push( values[ i ].clone() );\n\n\t\t\t\t}\n\n\t\t\t\tcache[ index ] = tempValues;\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\t// compare current value with cached entry\n\n\t\t\tif ( typeof value === 'number' ) {\n\n\t\t\t\tif ( cache[ index ] !== value ) {\n\n\t\t\t\t\tcache[ index ] = value;\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst cachedObjects = Array.isArray( cache[ index ] ) ? cache[ index ] : [ cache[ index ] ];\n\t\t\t\tconst values = Array.isArray( value ) ? value : [ value ];\n\n\t\t\t\tfor ( let i = 0; i < cachedObjects.length; i ++ ) {\n\n\t\t\t\t\tconst cachedObject = cachedObjects[ i ];\n\n\t\t\t\t\tif ( cachedObject.equals( values[ i ] ) === false ) {\n\n\t\t\t\t\t\tcachedObject.copy( values[ i ] );\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tfunction prepareUniformsGroup( uniformsGroup ) {\n\n\t\t// determine total buffer size according to the STD140 layout\n\t\t// Hint: STD140 is the only supported layout in WebGL 2\n\n\t\tconst uniforms = uniformsGroup.uniforms;\n\n\t\tlet offset = 0; // global buffer offset in bytes\n\t\tconst chunkSize = 16; // size of a chunk in bytes\n\t\tlet chunkOffset = 0; // offset within a single chunk in bytes\n\n\t\tfor ( let i = 0, l = uniforms.length; i < l; i ++ ) {\n\n\t\t\tconst uniform = uniforms[ i ];\n\n\t\t\tconst infos = {\n\t\t\t\tboundary: 0, // bytes\n\t\t\t\tstorage: 0 // bytes\n\t\t\t};\n\n\t\t\tconst values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ];\n\n\t\t\tfor ( let j = 0, jl = values.length; j < jl; j ++ ) {\n\n\t\t\t\tconst value = values[ j ];\n\n\t\t\t\tconst info = getUniformSize( value );\n\n\t\t\t\tinfos.boundary += info.boundary;\n\t\t\t\tinfos.storage += info.storage;\n\n\t\t\t}\n\n\t\t\t// the following two properties will be used for partial buffer updates\n\n\t\t\tuniform.__data = new Float32Array( infos.storage / Float32Array.BYTES_PER_ELEMENT );\n\t\t\tuniform.__offset = offset;\n\n\t\t\t//\n\n\t\t\tif ( i > 0 ) {\n\n\t\t\t\tchunkOffset = offset % chunkSize;\n\n\t\t\t\tconst remainingSizeInChunk = chunkSize - chunkOffset;\n\n\t\t\t\t// check for chunk overflow\n\n\t\t\t\tif ( chunkOffset !== 0 && ( remainingSizeInChunk - infos.boundary ) < 0 ) {\n\n\t\t\t\t\t// add padding and adjust offset\n\n\t\t\t\t\toffset += ( chunkSize - chunkOffset );\n\t\t\t\t\tuniform.__offset = offset;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\toffset += infos.storage;\n\n\t\t}\n\n\t\t// ensure correct final padding\n\n\t\tchunkOffset = offset % chunkSize;\n\n\t\tif ( chunkOffset > 0 ) offset += ( chunkSize - chunkOffset );\n\n\t\t//\n\n\t\tuniformsGroup.__size = offset;\n\t\tuniformsGroup.__cache = {};\n\n\t\treturn this;\n\n\t}\n\n\tfunction getUniformSize( value ) {\n\n\t\tconst info = {\n\t\t\tboundary: 0, // bytes\n\t\t\tstorage: 0 // bytes\n\t\t};\n\n\t\t// determine sizes according to STD140\n\n\t\tif ( typeof value === 'number' ) {\n\n\t\t\t// float/int\n\n\t\t\tinfo.boundary = 4;\n\t\t\tinfo.storage = 4;\n\n\t\t} else if ( value.isVector2 ) {\n\n\t\t\t// vec2\n\n\t\t\tinfo.boundary = 8;\n\t\t\tinfo.storage = 8;\n\n\t\t} else if ( value.isVector3 || value.isColor ) {\n\n\t\t\t// vec3\n\n\t\t\tinfo.boundary = 16;\n\t\t\tinfo.storage = 12; // evil: vec3 must start on a 16-byte boundary but it only consumes 12 bytes\n\n\t\t} else if ( value.isVector4 ) {\n\n\t\t\t// vec4\n\n\t\t\tinfo.boundary = 16;\n\t\t\tinfo.storage = 16;\n\n\t\t} else if ( value.isMatrix3 ) {\n\n\t\t\t// mat3 (in STD140 a 3x3 matrix is represented as 3x4)\n\n\t\t\tinfo.boundary = 48;\n\t\t\tinfo.storage = 48;\n\n\t\t} else if ( value.isMatrix4 ) {\n\n\t\t\t// mat4\n\n\t\t\tinfo.boundary = 64;\n\t\t\tinfo.storage = 64;\n\n\t\t} else if ( value.isTexture ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.' );\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Unsupported uniform value type.', value );\n\n\t\t}\n\n\t\treturn info;\n\n\t}\n\n\tfunction onUniformsGroupsDispose( event ) {\n\n\t\tconst uniformsGroup = event.target;\n\n\t\tuniformsGroup.removeEventListener( 'dispose', onUniformsGroupsDispose );\n\n\t\tconst index = allocatedBindingPoints.indexOf( uniformsGroup.__bindingPointIndex );\n\t\tallocatedBindingPoints.splice( index, 1 );\n\n\t\tgl.deleteBuffer( buffers[ uniformsGroup.id ] );\n\n\t\tdelete buffers[ uniformsGroup.id ];\n\t\tdelete updateList[ uniformsGroup.id ];\n\n\t}\n\n\tfunction dispose() {\n\n\t\tfor ( const id in buffers ) {\n\n\t\t\tgl.deleteBuffer( buffers[ id ] );\n\n\t\t}\n\n\t\tallocatedBindingPoints = [];\n\t\tbuffers = {};\n\t\tupdateList = {};\n\n\t}\n\n\treturn {\n\n\t\tbind: bind,\n\t\tupdate: update,\n\n\t\tdispose: dispose\n\n\t};\n\n}\n\nclass WebGLRenderer {\n\n\tconstructor( parameters = {} ) {\n\n\t\tconst {\n\t\t\tcanvas = createCanvasElement(),\n\t\t\tcontext = null,\n\t\t\tdepth = true,\n\t\t\tstencil = true,\n\t\t\talpha = false,\n\t\t\tantialias = false,\n\t\t\tpremultipliedAlpha = true,\n\t\t\tpreserveDrawingBuffer = false,\n\t\t\tpowerPreference = 'default',\n\t\t\tfailIfMajorPerformanceCaveat = false,\n\t\t} = parameters;\n\n\t\tthis.isWebGLRenderer = true;\n\n\t\tlet _alpha;\n\n\t\tif ( context !== null ) {\n\n\t\t\t_alpha = context.getContextAttributes().alpha;\n\n\t\t} else {\n\n\t\t\t_alpha = alpha;\n\n\t\t}\n\n\t\tconst uintClearColor = new Uint32Array( 4 );\n\t\tconst intClearColor = new Int32Array( 4 );\n\n\t\tlet currentRenderList = null;\n\t\tlet currentRenderState = null;\n\n\t\t// render() can be called from within a callback triggered by another render.\n\t\t// We track this so that the nested render call gets its list and state isolated from the parent render call.\n\n\t\tconst renderListStack = [];\n\t\tconst renderStateStack = [];\n\n\t\t// public properties\n\n\t\tthis.domElement = canvas;\n\n\t\t// Debug configuration container\n\t\tthis.debug = {\n\n\t\t\t/**\n\t\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tcheckShaderErrors: true,\n\t\t\t/**\n\t\t\t * Callback for custom error reporting.\n\t\t\t * @type {?Function}\n\t\t\t */\n\t\t\tonShaderError: null\n\t\t};\n\n\t\t// clearing\n\n\t\tthis.autoClear = true;\n\t\tthis.autoClearColor = true;\n\t\tthis.autoClearDepth = true;\n\t\tthis.autoClearStencil = true;\n\n\t\t// scene graph\n\n\t\tthis.sortObjects = true;\n\n\t\t// user-defined clipping\n\n\t\tthis.clippingPlanes = [];\n\t\tthis.localClippingEnabled = false;\n\n\t\t// physically based shading\n\n\t\tthis._outputColorSpace = SRGBColorSpace;\n\n\t\t// physical lights\n\n\t\tthis._useLegacyLights = false;\n\n\t\t// tone mapping\n\n\t\tthis.toneMapping = NoToneMapping;\n\t\tthis.toneMappingExposure = 1.0;\n\n\t\t// internal properties\n\n\t\tconst _this = this;\n\n\t\tlet _isContextLost = false;\n\n\t\t// internal state cache\n\n\t\tlet _currentActiveCubeFace = 0;\n\t\tlet _currentActiveMipmapLevel = 0;\n\t\tlet _currentRenderTarget = null;\n\t\tlet _currentMaterialId = - 1;\n\n\t\tlet _currentCamera = null;\n\n\t\tconst _currentViewport = new Vector4();\n\t\tconst _currentScissor = new Vector4();\n\t\tlet _currentScissorTest = null;\n\n\t\tconst _currentClearColor = new Color( 0x000000 );\n\t\tlet _currentClearAlpha = 0;\n\n\t\t//\n\n\t\tlet _width = canvas.width;\n\t\tlet _height = canvas.height;\n\n\t\tlet _pixelRatio = 1;\n\t\tlet _opaqueSort = null;\n\t\tlet _transparentSort = null;\n\n\t\tconst _viewport = new Vector4( 0, 0, _width, _height );\n\t\tconst _scissor = new Vector4( 0, 0, _width, _height );\n\t\tlet _scissorTest = false;\n\n\t\t// frustum\n\n\t\tconst _frustum = new Frustum();\n\n\t\t// clipping\n\n\t\tlet _clippingEnabled = false;\n\t\tlet _localClippingEnabled = false;\n\n\t\t// transmission\n\n\t\tlet _transmissionRenderTarget = null;\n\n\t\t// camera matrices cache\n\n\t\tconst _projScreenMatrix = new Matrix4();\n\n\t\tconst _vector2 = new Vector2();\n\t\tconst _vector3 = new Vector3();\n\n\t\tconst _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };\n\n\t\tfunction getTargetPixelRatio() {\n\n\t\t\treturn _currentRenderTarget === null ? _pixelRatio : 1;\n\n\t\t}\n\n\t\t// initialize\n\n\t\tlet _gl = context;\n\n\t\tfunction getContext( contextNames, contextAttributes ) {\n\n\t\t\tfor ( let i = 0; i < contextNames.length; i ++ ) {\n\n\t\t\t\tconst contextName = contextNames[ i ];\n\t\t\t\tconst context = canvas.getContext( contextName, contextAttributes );\n\t\t\t\tif ( context !== null ) return context;\n\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tconst contextAttributes = {\n\t\t\t\talpha: true,\n\t\t\t\tdepth,\n\t\t\t\tstencil,\n\t\t\t\tantialias,\n\t\t\t\tpremultipliedAlpha,\n\t\t\t\tpreserveDrawingBuffer,\n\t\t\t\tpowerPreference,\n\t\t\t\tfailIfMajorPerformanceCaveat,\n\t\t\t};\n\n\t\t\t// OffscreenCanvas does not have setAttribute, see #22811\n\t\t\tif ( 'setAttribute' in canvas ) canvas.setAttribute( 'data-engine', `three.js r${REVISION}` );\n\n\t\t\t// event listeners must be registered before WebGL context is created, see #12753\n\t\t\tcanvas.addEventListener( 'webglcontextlost', onContextLost, false );\n\t\t\tcanvas.addEventListener( 'webglcontextrestored', onContextRestore, false );\n\t\t\tcanvas.addEventListener( 'webglcontextcreationerror', onContextCreationError, false );\n\n\t\t\tif ( _gl === null ) {\n\n\t\t\t\tconst contextNames = [ 'webgl2', 'webgl', 'experimental-webgl' ];\n\n\t\t\t\tif ( _this.isWebGL1Renderer === true ) {\n\n\t\t\t\t\tcontextNames.shift();\n\n\t\t\t\t}\n\n\t\t\t\t_gl = getContext( contextNames, contextAttributes );\n\n\t\t\t\tif ( _gl === null ) {\n\n\t\t\t\t\tif ( getContext( contextNames ) ) {\n\n\t\t\t\t\t\tthrow new Error( 'Error creating WebGL context with your selected attributes.' );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthrow new Error( 'Error creating WebGL context.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( typeof WebGLRenderingContext !== 'undefined' && _gl instanceof WebGLRenderingContext ) { // @deprecated, r153\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163.' );\n\n\t\t\t}\n\n\t\t\t// Some experimental-webgl implementations do not have getShaderPrecisionFormat\n\n\t\t\tif ( _gl.getShaderPrecisionFormat === undefined ) {\n\n\t\t\t\t_gl.getShaderPrecisionFormat = function () {\n\n\t\t\t\t\treturn { 'rangeMin': 1, 'rangeMax': 1, 'precision': 1 };\n\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer: ' + error.message );\n\t\t\tthrow error;\n\n\t\t}\n\n\t\tlet extensions, capabilities, state, info;\n\t\tlet properties, textures, cubemaps, cubeuvmaps, attributes, geometries, objects;\n\t\tlet programCache, materials, renderLists, renderStates, clipping, shadowMap;\n\n\t\tlet background, morphtargets, bufferRenderer, indexedBufferRenderer;\n\n\t\tlet utils, bindingStates, uniformsGroups;\n\n\t\tfunction initGLContext() {\n\n\t\t\textensions = new WebGLExtensions( _gl );\n\n\t\t\tcapabilities = new WebGLCapabilities( _gl, extensions, parameters );\n\n\t\t\textensions.init( capabilities );\n\n\t\t\tutils = new WebGLUtils( _gl, extensions, capabilities );\n\n\t\t\tstate = new WebGLState( _gl, extensions, capabilities );\n\n\t\t\tinfo = new WebGLInfo( _gl );\n\t\t\tproperties = new WebGLProperties();\n\t\t\ttextures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );\n\t\t\tcubemaps = new WebGLCubeMaps( _this );\n\t\t\tcubeuvmaps = new WebGLCubeUVMaps( _this );\n\t\t\tattributes = new WebGLAttributes( _gl, capabilities );\n\t\t\tbindingStates = new WebGLBindingStates( _gl, extensions, attributes, capabilities );\n\t\t\tgeometries = new WebGLGeometries( _gl, attributes, info, bindingStates );\n\t\t\tobjects = new WebGLObjects( _gl, geometries, attributes, info );\n\t\t\tmorphtargets = new WebGLMorphtargets( _gl, capabilities, textures );\n\t\t\tclipping = new WebGLClipping( properties );\n\t\t\tprogramCache = new WebGLPrograms( _this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping );\n\t\t\tmaterials = new WebGLMaterials( _this, properties );\n\t\t\trenderLists = new WebGLRenderLists();\n\t\t\trenderStates = new WebGLRenderStates( extensions, capabilities );\n\t\t\tbackground = new WebGLBackground( _this, cubemaps, cubeuvmaps, state, objects, _alpha, premultipliedAlpha );\n\t\t\tshadowMap = new WebGLShadowMap( _this, objects, capabilities );\n\t\t\tuniformsGroups = new WebGLUniformsGroups( _gl, info, capabilities, state );\n\n\t\t\tbufferRenderer = new WebGLBufferRenderer( _gl, extensions, info, capabilities );\n\t\t\tindexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info, capabilities );\n\n\t\t\tinfo.programs = programCache.programs;\n\n\t\t\t_this.capabilities = capabilities;\n\t\t\t_this.extensions = extensions;\n\t\t\t_this.properties = properties;\n\t\t\t_this.renderLists = renderLists;\n\t\t\t_this.shadowMap = shadowMap;\n\t\t\t_this.state = state;\n\t\t\t_this.info = info;\n\n\t\t}\n\n\t\tinitGLContext();\n\n\t\t// xr\n\n\t\tconst xr = new WebXRManager( _this, _gl );\n\n\t\tthis.xr = xr;\n\n\t\t// API\n\n\t\tthis.getContext = function () {\n\n\t\t\treturn _gl;\n\n\t\t};\n\n\t\tthis.getContextAttributes = function () {\n\n\t\t\treturn _gl.getContextAttributes();\n\n\t\t};\n\n\t\tthis.forceContextLoss = function () {\n\n\t\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\t\tif ( extension ) extension.loseContext();\n\n\t\t};\n\n\t\tthis.forceContextRestore = function () {\n\n\t\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\t\tif ( extension ) extension.restoreContext();\n\n\t\t};\n\n\t\tthis.getPixelRatio = function () {\n\n\t\t\treturn _pixelRatio;\n\n\t\t};\n\n\t\tthis.setPixelRatio = function ( value ) {\n\n\t\t\tif ( value === undefined ) return;\n\n\t\t\t_pixelRatio = value;\n\n\t\t\tthis.setSize( _width, _height, false );\n\n\t\t};\n\n\t\tthis.getSize = function ( target ) {\n\n\t\t\treturn target.set( _width, _height );\n\n\t\t};\n\n\t\tthis.setSize = function ( width, height, updateStyle = true ) {\n\n\t\t\tif ( xr.isPresenting ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Can\\'t change size while VR device is presenting.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t_width = width;\n\t\t\t_height = height;\n\n\t\t\tcanvas.width = Math.floor( width * _pixelRatio );\n\t\t\tcanvas.height = Math.floor( height * _pixelRatio );\n\n\t\t\tif ( updateStyle === true ) {\n\n\t\t\t\tcanvas.style.width = width + 'px';\n\t\t\t\tcanvas.style.height = height + 'px';\n\n\t\t\t}\n\n\t\t\tthis.setViewport( 0, 0, width, height );\n\n\t\t};\n\n\t\tthis.getDrawingBufferSize = function ( target ) {\n\n\t\t\treturn target.set( _width * _pixelRatio, _height * _pixelRatio ).floor();\n\n\t\t};\n\n\t\tthis.setDrawingBufferSize = function ( width, height, pixelRatio ) {\n\n\t\t\t_width = width;\n\t\t\t_height = height;\n\n\t\t\t_pixelRatio = pixelRatio;\n\n\t\t\tcanvas.width = Math.floor( width * pixelRatio );\n\t\t\tcanvas.height = Math.floor( height * pixelRatio );\n\n\t\t\tthis.setViewport( 0, 0, width, height );\n\n\t\t};\n\n\t\tthis.getCurrentViewport = function ( target ) {\n\n\t\t\treturn target.copy( _currentViewport );\n\n\t\t};\n\n\t\tthis.getViewport = function ( target ) {\n\n\t\t\treturn target.copy( _viewport );\n\n\t\t};\n\n\t\tthis.setViewport = function ( x, y, width, height ) {\n\n\t\t\tif ( x.isVector4 ) {\n\n\t\t\t\t_viewport.set( x.x, x.y, x.z, x.w );\n\n\t\t\t} else {\n\n\t\t\t\t_viewport.set( x, y, width, height );\n\n\t\t\t}\n\n\t\t\tstate.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );\n\n\t\t};\n\n\t\tthis.getScissor = function ( target ) {\n\n\t\t\treturn target.copy( _scissor );\n\n\t\t};\n\n\t\tthis.setScissor = function ( x, y, width, height ) {\n\n\t\t\tif ( x.isVector4 ) {\n\n\t\t\t\t_scissor.set( x.x, x.y, x.z, x.w );\n\n\t\t\t} else {\n\n\t\t\t\t_scissor.set( x, y, width, height );\n\n\t\t\t}\n\n\t\t\tstate.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );\n\n\t\t};\n\n\t\tthis.getScissorTest = function () {\n\n\t\t\treturn _scissorTest;\n\n\t\t};\n\n\t\tthis.setScissorTest = function ( boolean ) {\n\n\t\t\tstate.setScissorTest( _scissorTest = boolean );\n\n\t\t};\n\n\t\tthis.setOpaqueSort = function ( method ) {\n\n\t\t\t_opaqueSort = method;\n\n\t\t};\n\n\t\tthis.setTransparentSort = function ( method ) {\n\n\t\t\t_transparentSort = method;\n\n\t\t};\n\n\t\t// Clearing\n\n\t\tthis.getClearColor = function ( target ) {\n\n\t\t\treturn target.copy( background.getClearColor() );\n\n\t\t};\n\n\t\tthis.setClearColor = function () {\n\n\t\t\tbackground.setClearColor.apply( background, arguments );\n\n\t\t};\n\n\t\tthis.getClearAlpha = function () {\n\n\t\t\treturn background.getClearAlpha();\n\n\t\t};\n\n\t\tthis.setClearAlpha = function () {\n\n\t\t\tbackground.setClearAlpha.apply( background, arguments );\n\n\t\t};\n\n\t\tthis.clear = function ( color = true, depth = true, stencil = true ) {\n\n\t\t\tlet bits = 0;\n\n\t\t\tif ( color ) {\n\n\t\t\t\t// check if we're trying to clear an integer target\n\t\t\t\tlet isIntegerFormat = false;\n\t\t\t\tif ( _currentRenderTarget !== null ) {\n\n\t\t\t\t\tconst targetFormat = _currentRenderTarget.texture.format;\n\t\t\t\t\tisIntegerFormat = targetFormat === RGBAIntegerFormat ||\n\t\t\t\t\t\ttargetFormat === RGIntegerFormat ||\n\t\t\t\t\t\ttargetFormat === RedIntegerFormat;\n\n\t\t\t\t}\n\n\t\t\t\t// use the appropriate clear functions to clear the target if it's a signed\n\t\t\t\t// or unsigned integer target\n\t\t\t\tif ( isIntegerFormat ) {\n\n\t\t\t\t\tconst targetType = _currentRenderTarget.texture.type;\n\t\t\t\t\tconst isUnsignedType = targetType === UnsignedByteType ||\n\t\t\t\t\t\ttargetType === UnsignedIntType ||\n\t\t\t\t\t\ttargetType === UnsignedShortType ||\n\t\t\t\t\t\ttargetType === UnsignedInt248Type ||\n\t\t\t\t\t\ttargetType === UnsignedShort4444Type ||\n\t\t\t\t\t\ttargetType === UnsignedShort5551Type;\n\n\t\t\t\t\tconst clearColor = background.getClearColor();\n\t\t\t\t\tconst a = background.getClearAlpha();\n\t\t\t\t\tconst r = clearColor.r;\n\t\t\t\t\tconst g = clearColor.g;\n\t\t\t\t\tconst b = clearColor.b;\n\n\t\t\t\t\tif ( isUnsignedType ) {\n\n\t\t\t\t\t\tuintClearColor[ 0 ] = r;\n\t\t\t\t\t\tuintClearColor[ 1 ] = g;\n\t\t\t\t\t\tuintClearColor[ 2 ] = b;\n\t\t\t\t\t\tuintClearColor[ 3 ] = a;\n\t\t\t\t\t\t_gl.clearBufferuiv( _gl.COLOR, 0, uintClearColor );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tintClearColor[ 0 ] = r;\n\t\t\t\t\t\tintClearColor[ 1 ] = g;\n\t\t\t\t\t\tintClearColor[ 2 ] = b;\n\t\t\t\t\t\tintClearColor[ 3 ] = a;\n\t\t\t\t\t\t_gl.clearBufferiv( _gl.COLOR, 0, intClearColor );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbits |= _gl.COLOR_BUFFER_BIT;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( depth ) bits |= _gl.DEPTH_BUFFER_BIT;\n\t\t\tif ( stencil ) {\n\n\t\t\t\tbits |= _gl.STENCIL_BUFFER_BIT;\n\t\t\t\tthis.state.buffers.stencil.setMask( 0xffffffff );\n\n\t\t\t}\n\n\t\t\t_gl.clear( bits );\n\n\t\t};\n\n\t\tthis.clearColor = function () {\n\n\t\t\tthis.clear( true, false, false );\n\n\t\t};\n\n\t\tthis.clearDepth = function () {\n\n\t\t\tthis.clear( false, true, false );\n\n\t\t};\n\n\t\tthis.clearStencil = function () {\n\n\t\t\tthis.clear( false, false, true );\n\n\t\t};\n\n\t\t//\n\n\t\tthis.dispose = function () {\n\n\t\t\tcanvas.removeEventListener( 'webglcontextlost', onContextLost, false );\n\t\t\tcanvas.removeEventListener( 'webglcontextrestored', onContextRestore, false );\n\t\t\tcanvas.removeEventListener( 'webglcontextcreationerror', onContextCreationError, false );\n\n\t\t\trenderLists.dispose();\n\t\t\trenderStates.dispose();\n\t\t\tproperties.dispose();\n\t\t\tcubemaps.dispose();\n\t\t\tcubeuvmaps.dispose();\n\t\t\tobjects.dispose();\n\t\t\tbindingStates.dispose();\n\t\t\tuniformsGroups.dispose();\n\t\t\tprogramCache.dispose();\n\n\t\t\txr.dispose();\n\n\t\t\txr.removeEventListener( 'sessionstart', onXRSessionStart );\n\t\t\txr.removeEventListener( 'sessionend', onXRSessionEnd );\n\n\t\t\tif ( _transmissionRenderTarget ) {\n\n\t\t\t\t_transmissionRenderTarget.dispose();\n\t\t\t\t_transmissionRenderTarget = null;\n\n\t\t\t}\n\n\t\t\tanimation.stop();\n\n\t\t};\n\n\t\t// Events\n\n\t\tfunction onContextLost( event ) {\n\n\t\t\tevent.preventDefault();\n\n\t\t\tconsole.log( 'THREE.WebGLRenderer: Context Lost.' );\n\n\t\t\t_isContextLost = true;\n\n\t\t}\n\n\t\tfunction onContextRestore( /* event */ ) {\n\n\t\t\tconsole.log( 'THREE.WebGLRenderer: Context Restored.' );\n\n\t\t\t_isContextLost = false;\n\n\t\t\tconst infoAutoReset = info.autoReset;\n\t\t\tconst shadowMapEnabled = shadowMap.enabled;\n\t\t\tconst shadowMapAutoUpdate = shadowMap.autoUpdate;\n\t\t\tconst shadowMapNeedsUpdate = shadowMap.needsUpdate;\n\t\t\tconst shadowMapType = shadowMap.type;\n\n\t\t\tinitGLContext();\n\n\t\t\tinfo.autoReset = infoAutoReset;\n\t\t\tshadowMap.enabled = shadowMapEnabled;\n\t\t\tshadowMap.autoUpdate = shadowMapAutoUpdate;\n\t\t\tshadowMap.needsUpdate = shadowMapNeedsUpdate;\n\t\t\tshadowMap.type = shadowMapType;\n\n\t\t}\n\n\t\tfunction onContextCreationError( event ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer: A WebGL context could not be created. Reason: ', event.statusMessage );\n\n\t\t}\n\n\t\tfunction onMaterialDispose( event ) {\n\n\t\t\tconst material = event.target;\n\n\t\t\tmaterial.removeEventListener( 'dispose', onMaterialDispose );\n\n\t\t\tdeallocateMaterial( material );\n\n\t\t}\n\n\t\t// Buffer deallocation\n\n\t\tfunction deallocateMaterial( material ) {\n\n\t\t\treleaseMaterialProgramReferences( material );\n\n\t\t\tproperties.remove( material );\n\n\t\t}\n\n\n\t\tfunction releaseMaterialProgramReferences( material ) {\n\n\t\t\tconst programs = properties.get( material ).programs;\n\n\t\t\tif ( programs !== undefined ) {\n\n\t\t\t\tprograms.forEach( function ( program ) {\n\n\t\t\t\t\tprogramCache.releaseProgram( program );\n\n\t\t\t\t} );\n\n\t\t\t\tif ( material.isShaderMaterial ) {\n\n\t\t\t\t\tprogramCache.releaseShaderCache( material );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Buffer rendering\n\n\t\tthis.renderBufferDirect = function ( camera, scene, geometry, material, object, group ) {\n\n\t\t\tif ( scene === null ) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n\n\t\t\tconst frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 );\n\n\t\t\tconst program = setProgram( camera, scene, geometry, material, object );\n\n\t\t\tstate.setMaterial( material, frontFaceCW );\n\n\t\t\t//\n\n\t\t\tlet index = geometry.index;\n\t\t\tlet rangeFactor = 1;\n\n\t\t\tif ( material.wireframe === true ) {\n\n\t\t\t\tindex = geometries.getWireframeAttribute( geometry );\n\n\t\t\t\tif ( index === undefined ) return;\n\n\t\t\t\trangeFactor = 2;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tconst drawRange = geometry.drawRange;\n\t\t\tconst position = geometry.attributes.position;\n\n\t\t\tlet drawStart = drawRange.start * rangeFactor;\n\t\t\tlet drawEnd = ( drawRange.start + drawRange.count ) * rangeFactor;\n\n\t\t\tif ( group !== null ) {\n\n\t\t\t\tdrawStart = Math.max( drawStart, group.start * rangeFactor );\n\t\t\t\tdrawEnd = Math.min( drawEnd, ( group.start + group.count ) * rangeFactor );\n\n\t\t\t}\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tdrawStart = Math.max( drawStart, 0 );\n\t\t\t\tdrawEnd = Math.min( drawEnd, index.count );\n\n\t\t\t} else if ( position !== undefined && position !== null ) {\n\n\t\t\t\tdrawStart = Math.max( drawStart, 0 );\n\t\t\t\tdrawEnd = Math.min( drawEnd, position.count );\n\n\t\t\t}\n\n\t\t\tconst drawCount = drawEnd - drawStart;\n\n\t\t\tif ( drawCount < 0 || drawCount === Infinity ) return;\n\n\t\t\t//\n\n\t\t\tbindingStates.setup( object, material, program, geometry, index );\n\n\t\t\tlet attribute;\n\t\t\tlet renderer = bufferRenderer;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tattribute = attributes.get( index );\n\n\t\t\t\trenderer = indexedBufferRenderer;\n\t\t\t\trenderer.setIndex( attribute );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tif ( object.isMesh ) {\n\n\t\t\t\tif ( material.wireframe === true ) {\n\n\t\t\t\t\tstate.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() );\n\t\t\t\t\trenderer.setMode( _gl.LINES );\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderer.setMode( _gl.TRIANGLES );\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isLine ) {\n\n\t\t\t\tlet lineWidth = material.linewidth;\n\n\t\t\t\tif ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material\n\n\t\t\t\tstate.setLineWidth( lineWidth * getTargetPixelRatio() );\n\n\t\t\t\tif ( object.isLineSegments ) {\n\n\t\t\t\t\trenderer.setMode( _gl.LINES );\n\n\t\t\t\t} else if ( object.isLineLoop ) {\n\n\t\t\t\t\trenderer.setMode( _gl.LINE_LOOP );\n\n\t\t\t\t} else {\n\n\t\t\t\t\trenderer.setMode( _gl.LINE_STRIP );\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isPoints ) {\n\n\t\t\t\trenderer.setMode( _gl.POINTS );\n\n\t\t\t} else if ( object.isSprite ) {\n\n\t\t\t\trenderer.setMode( _gl.TRIANGLES );\n\n\t\t\t}\n\n\t\t\tif ( object.isInstancedMesh ) {\n\n\t\t\t\trenderer.renderInstances( drawStart, drawCount, object.count );\n\n\t\t\t} else if ( geometry.isInstancedBufferGeometry ) {\n\n\t\t\t\tconst maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;\n\t\t\t\tconst instanceCount = Math.min( geometry.instanceCount, maxInstanceCount );\n\n\t\t\t\trenderer.renderInstances( drawStart, drawCount, instanceCount );\n\n\t\t\t} else {\n\n\t\t\t\trenderer.render( drawStart, drawCount );\n\n\t\t\t}\n\n\t\t};\n\n\t\t// Compile\n\n\t\tfunction prepareMaterial( material, scene, object ) {\n\n\t\t\tif ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) {\n\n\t\t\t\tmaterial.side = BackSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t\tmaterial.side = FrontSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t\tmaterial.side = DoubleSide;\n\n\t\t\t} else {\n\n\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.compile = function ( scene, camera, targetScene = null ) {\n\n\t\t\tif ( targetScene === null ) targetScene = scene;\n\n\t\t\tcurrentRenderState = renderStates.get( targetScene );\n\t\t\tcurrentRenderState.init();\n\n\t\t\trenderStateStack.push( currentRenderState );\n\n\t\t\t// gather lights from both the target scene and the new object that will be added to the scene.\n\n\t\t\ttargetScene.traverseVisible( function ( object ) {\n\n\t\t\t\tif ( object.isLight && object.layers.test( camera.layers ) ) {\n\n\t\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tif ( scene !== targetScene ) {\n\n\t\t\t\tscene.traverseVisible( function ( object ) {\n\n\t\t\t\t\tif ( object.isLight && object.layers.test( camera.layers ) ) {\n\n\t\t\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tcurrentRenderState.setupLights( _this._useLegacyLights );\n\n\t\t\t// Only initialize materials in the new scene, not the targetScene.\n\n\t\t\tconst materials = new Set();\n\n\t\t\tscene.traverse( function ( object ) {\n\n\t\t\t\tconst material = object.material;\n\n\t\t\t\tif ( material ) {\n\n\t\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\t\tfor ( let i = 0; i < material.length; i ++ ) {\n\n\t\t\t\t\t\t\tconst material2 = material[ i ];\n\n\t\t\t\t\t\t\tprepareMaterial( material2, targetScene, object );\n\t\t\t\t\t\t\tmaterials.add( material2 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tprepareMaterial( material, targetScene, object );\n\t\t\t\t\t\tmaterials.add( material );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\trenderStateStack.pop();\n\t\t\tcurrentRenderState = null;\n\n\t\t\treturn materials;\n\n\t\t};\n\n\t\t// compileAsync\n\n\t\tthis.compileAsync = function ( scene, camera, targetScene = null ) {\n\n\t\t\tconst materials = this.compile( scene, camera, targetScene );\n\n\t\t\t// Wait for all the materials in the new object to indicate that they're\n\t\t\t// ready to be used before resolving the promise.\n\n\t\t\treturn new Promise( ( resolve ) => {\n\n\t\t\t\tfunction checkMaterialsReady() {\n\n\t\t\t\t\tmaterials.forEach( function ( material ) {\n\n\t\t\t\t\t\tconst materialProperties = properties.get( material );\n\t\t\t\t\t\tconst program = materialProperties.currentProgram;\n\n\t\t\t\t\t\tif ( program.isReady() ) {\n\n\t\t\t\t\t\t\t// remove any programs that report they're ready to use from the list\n\t\t\t\t\t\t\tmaterials.delete( material );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t\t// once the list of compiling materials is empty, call the callback\n\n\t\t\t\t\tif ( materials.size === 0 ) {\n\n\t\t\t\t\t\tresolve( scene );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// if some materials are still not ready, wait a bit and check again\n\n\t\t\t\t\tsetTimeout( checkMaterialsReady, 10 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( extensions.get( 'KHR_parallel_shader_compile' ) !== null ) {\n\n\t\t\t\t\t// If we can check the compilation status of the materials without\n\t\t\t\t\t// blocking then do so right away.\n\n\t\t\t\t\tcheckMaterialsReady();\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Otherwise start by waiting a bit to give the materials we just\n\t\t\t\t\t// initialized a chance to finish.\n\n\t\t\t\t\tsetTimeout( checkMaterialsReady, 10 );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t};\n\n\t\t// Animation Loop\n\n\t\tlet onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame( time ) {\n\n\t\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time );\n\n\t\t}\n\n\t\tfunction onXRSessionStart() {\n\n\t\t\tanimation.stop();\n\n\t\t}\n\n\t\tfunction onXRSessionEnd() {\n\n\t\t\tanimation.start();\n\n\t\t}\n\n\t\tconst animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop( onAnimationFrame );\n\n\t\tif ( typeof self !== 'undefined' ) animation.setContext( self );\n\n\t\tthis.setAnimationLoop = function ( callback ) {\n\n\t\t\tonAnimationFrameCallback = callback;\n\t\t\txr.setAnimationLoop( callback );\n\n\t\t\t( callback === null ) ? animation.stop() : animation.start();\n\n\t\t};\n\n\t\txr.addEventListener( 'sessionstart', onXRSessionStart );\n\t\txr.addEventListener( 'sessionend', onXRSessionEnd );\n\n\t\t// Rendering\n\n\t\tthis.render = function ( scene, camera ) {\n\n\t\t\tif ( camera !== undefined && camera.isCamera !== true ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif ( _isContextLost === true ) return;\n\n\t\t\t// update scene graph\n\n\t\t\tif ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld();\n\n\t\t\t// update camera matrices and frustum\n\n\t\t\tif ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld();\n\n\t\t\tif ( xr.enabled === true && xr.isPresenting === true ) {\n\n\t\t\t\tif ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );\n\n\t\t\t\tcamera = xr.getCamera(); // use XR camera for rendering\n\n\t\t\t}\n\n\t\t\t//\n\t\t\tif ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, _currentRenderTarget );\n\n\t\t\tcurrentRenderState = renderStates.get( scene, renderStateStack.length );\n\t\t\tcurrentRenderState.init();\n\n\t\t\trenderStateStack.push( currentRenderState );\n\n\t\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\t\t_frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t\t\t_localClippingEnabled = this.localClippingEnabled;\n\t\t\t_clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled );\n\n\t\t\tcurrentRenderList = renderLists.get( scene, renderListStack.length );\n\t\t\tcurrentRenderList.init();\n\n\t\t\trenderListStack.push( currentRenderList );\n\n\t\t\tprojectObject( scene, camera, 0, _this.sortObjects );\n\n\t\t\tcurrentRenderList.finish();\n\n\t\t\tif ( _this.sortObjects === true ) {\n\n\t\t\t\tcurrentRenderList.sort( _opaqueSort, _transparentSort );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tthis.info.render.frame ++;\n\n\t\t\tif ( _clippingEnabled === true ) clipping.beginShadows();\n\n\t\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\t\tshadowMap.render( shadowsArray, scene, camera );\n\n\t\t\tif ( _clippingEnabled === true ) clipping.endShadows();\n\n\t\t\t//\n\n\t\t\tif ( this.info.autoReset === true ) this.info.reset();\n\n\n\t\t\t//\n\n\t\t\tbackground.render( currentRenderList, scene );\n\n\t\t\t// render scene\n\n\t\t\tcurrentRenderState.setupLights( _this._useLegacyLights );\n\n\t\t\tif ( camera.isArrayCamera ) {\n\n\t\t\t\tconst cameras = camera.cameras;\n\n\t\t\t\tfor ( let i = 0, l = cameras.length; i < l; i ++ ) {\n\n\t\t\t\t\tconst camera2 = cameras[ i ];\n\n\t\t\t\t\trenderScene( currentRenderList, scene, camera2, camera2.viewport );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderScene( currentRenderList, scene, camera );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tif ( _currentRenderTarget !== null ) {\n\n\t\t\t\t// resolve multisample renderbuffers to a single-sample texture if necessary\n\n\t\t\t\ttextures.updateMultisampleRenderTarget( _currentRenderTarget );\n\n\t\t\t\t// Generate mipmap if we're using any kind of mipmap filtering\n\n\t\t\t\ttextures.updateRenderTargetMipmap( _currentRenderTarget );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tif ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );\n\n\t\t\t// _gl.finish();\n\n\t\t\tbindingStates.resetDefaultState();\n\t\t\t_currentMaterialId = - 1;\n\t\t\t_currentCamera = null;\n\n\t\t\trenderStateStack.pop();\n\n\t\t\tif ( renderStateStack.length > 0 ) {\n\n\t\t\t\tcurrentRenderState = renderStateStack[ renderStateStack.length - 1 ];\n\n\t\t\t} else {\n\n\t\t\t\tcurrentRenderState = null;\n\n\t\t\t}\n\n\t\t\trenderListStack.pop();\n\n\t\t\tif ( renderListStack.length > 0 ) {\n\n\t\t\t\tcurrentRenderList = renderListStack[ renderListStack.length - 1 ];\n\n\t\t\t} else {\n\n\t\t\t\tcurrentRenderList = null;\n\n\t\t\t}\n\n\t\t};\n\n\t\tfunction projectObject( object, camera, groupOrder, sortObjects ) {\n\n\t\t\tif ( object.visible === false ) return;\n\n\t\t\tconst visible = object.layers.test( camera.layers );\n\n\t\t\tif ( visible ) {\n\n\t\t\t\tif ( object.isGroup ) {\n\n\t\t\t\t\tgroupOrder = object.renderOrder;\n\n\t\t\t\t} else if ( object.isLOD ) {\n\n\t\t\t\t\tif ( object.autoUpdate === true ) object.update( camera );\n\n\t\t\t\t} else if ( object.isLight ) {\n\n\t\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( object.isSprite ) {\n\n\t\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) {\n\n\t\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\t\tif ( material.visible ) {\n\n\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( object.isMesh || object.isLine || object.isPoints ) {\n\n\t\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) {\n\n\t\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t\tif ( object.boundingSphere !== undefined ) {\n\n\t\t\t\t\t\t\t\tif ( object.boundingSphere === null ) object.computeBoundingSphere();\n\t\t\t\t\t\t\t\t_vector3.copy( object.boundingSphere.center );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\t\t\t\t\t\t\t\t_vector3.copy( geometry.boundingSphere.center );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_vector3\n\t\t\t\t\t\t\t\t.applyMatrix4( object.matrixWorld )\n\t\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\t\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst children = object.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tprojectObject( children[ i ], camera, groupOrder, sortObjects );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction renderScene( currentRenderList, scene, camera, viewport ) {\n\n\t\t\tconst opaqueObjects = currentRenderList.opaque;\n\t\t\tconst transmissiveObjects = currentRenderList.transmissive;\n\t\t\tconst transparentObjects = currentRenderList.transparent;\n\n\t\t\tcurrentRenderState.setupLightsView( camera );\n\n\t\t\tif ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, camera );\n\n\t\t\tif ( transmissiveObjects.length > 0 ) renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera );\n\n\t\t\tif ( viewport ) state.viewport( _currentViewport.copy( viewport ) );\n\n\t\t\tif ( opaqueObjects.length > 0 ) renderObjects( opaqueObjects, scene, camera );\n\t\t\tif ( transmissiveObjects.length > 0 ) renderObjects( transmissiveObjects, scene, camera );\n\t\t\tif ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera );\n\n\t\t\t// Ensure depth buffer writing is enabled so it can be cleared on next render\n\n\t\t\tstate.buffers.depth.setTest( true );\n\t\t\tstate.buffers.depth.setMask( true );\n\t\t\tstate.buffers.color.setMask( true );\n\n\t\t\tstate.setPolygonOffset( false );\n\n\t\t}\n\n\t\tfunction renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) {\n\n\t\t\tconst overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n\n\t\t\tif ( overrideMaterial !== null ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst isWebGL2 = capabilities.isWebGL2;\n\n\t\t\tif ( _transmissionRenderTarget === null ) {\n\n\t\t\t\t_transmissionRenderTarget = new WebGLRenderTarget( 1, 1, {\n\t\t\t\t\tgenerateMipmaps: true,\n\t\t\t\t\ttype: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,\n\t\t\t\t\tminFilter: LinearMipmapLinearFilter,\n\t\t\t\t\tsamples: ( isWebGL2 ) ? 4 : 0\n\t\t\t\t} );\n\n\t\t\t\t// debug\n\n\t\t\t\t/*\n\t\t\t\tconst geometry = new PlaneGeometry();\n\t\t\t\tconst material = new MeshBasicMaterial( { map: _transmissionRenderTarget.texture } );\n\n\t\t\t\tconst mesh = new Mesh( geometry, material );\n\t\t\t\tscene.add( mesh );\n\t\t\t\t*/\n\n\t\t\t}\n\n\t\t\t_this.getDrawingBufferSize( _vector2 );\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t_transmissionRenderTarget.setSize( _vector2.x, _vector2.y );\n\n\t\t\t} else {\n\n\t\t\t\t_transmissionRenderTarget.setSize( floorPowerOfTwo( _vector2.x ), floorPowerOfTwo( _vector2.y ) );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tconst currentRenderTarget = _this.getRenderTarget();\n\t\t\t_this.setRenderTarget( _transmissionRenderTarget );\n\n\t\t\t_this.getClearColor( _currentClearColor );\n\t\t\t_currentClearAlpha = _this.getClearAlpha();\n\t\t\tif ( _currentClearAlpha < 1 ) _this.setClearColor( 0xffffff, 0.5 );\n\n\t\t\t_this.clear();\n\n\t\t\t// Turn off the features which can affect the frag color for opaque objects pass.\n\t\t\t// Otherwise they are applied twice in opaque objects pass and transmission objects pass.\n\t\t\tconst currentToneMapping = _this.toneMapping;\n\t\t\t_this.toneMapping = NoToneMapping;\n\n\t\t\trenderObjects( opaqueObjects, scene, camera );\n\n\t\t\ttextures.updateMultisampleRenderTarget( _transmissionRenderTarget );\n\t\t\ttextures.updateRenderTargetMipmap( _transmissionRenderTarget );\n\n\t\t\tlet renderTargetNeedsUpdate = false;\n\n\t\t\tfor ( let i = 0, l = transmissiveObjects.length; i < l; i ++ ) {\n\n\t\t\t\tconst renderItem = transmissiveObjects[ i ];\n\n\t\t\t\tconst object = renderItem.object;\n\t\t\t\tconst geometry = renderItem.geometry;\n\t\t\t\tconst material = renderItem.material;\n\t\t\t\tconst group = renderItem.group;\n\n\t\t\t\tif ( material.side === DoubleSide && object.layers.test( camera.layers ) ) {\n\n\t\t\t\t\tconst currentSide = material.side;\n\n\t\t\t\t\tmaterial.side = BackSide;\n\t\t\t\t\tmaterial.needsUpdate = true;\n\n\t\t\t\t\trenderObject( object, scene, camera, geometry, material, group );\n\n\t\t\t\t\tmaterial.side = currentSide;\n\t\t\t\t\tmaterial.needsUpdate = true;\n\n\t\t\t\t\trenderTargetNeedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( renderTargetNeedsUpdate === true ) {\n\n\t\t\t\ttextures.updateMultisampleRenderTarget( _transmissionRenderTarget );\n\t\t\t\ttextures.updateRenderTargetMipmap( _transmissionRenderTarget );\n\n\t\t\t}\n\n\t\t\t_this.setRenderTarget( currentRenderTarget );\n\n\t\t\t_this.setClearColor( _currentClearColor, _currentClearAlpha );\n\n\t\t\t_this.toneMapping = currentToneMapping;\n\n\t\t}\n\n\t\tfunction renderObjects( renderList, scene, camera ) {\n\n\t\t\tconst overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n\n\t\t\tfor ( let i = 0, l = renderList.length; i < l; i ++ ) {\n\n\t\t\t\tconst renderItem = renderList[ i ];\n\n\t\t\t\tconst object = renderItem.object;\n\t\t\t\tconst geometry = renderItem.geometry;\n\t\t\t\tconst material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n\t\t\t\tconst group = renderItem.group;\n\n\t\t\t\tif ( object.layers.test( camera.layers ) ) {\n\n\t\t\t\t\trenderObject( object, scene, camera, geometry, material, group );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction renderObject( object, scene, camera, geometry, material, group ) {\n\n\t\t\tobject.onBeforeRender( _this, scene, camera, geometry, material, group );\n\n\t\t\tobject.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );\n\t\t\tobject.normalMatrix.getNormalMatrix( object.modelViewMatrix );\n\n\t\t\tmaterial.onBeforeRender( _this, scene, camera, geometry, object, group );\n\n\t\t\tif ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) {\n\n\t\t\t\tmaterial.side = BackSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = FrontSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = DoubleSide;\n\n\t\t\t} else {\n\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t}\n\n\t\t\tobject.onAfterRender( _this, scene, camera, geometry, material, group );\n\n\t\t}\n\n\t\tfunction getProgram( material, scene, object ) {\n\n\t\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\tconst materialProperties = properties.get( material );\n\n\t\t\tconst lights = currentRenderState.state.lights;\n\t\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\t\tconst lightsStateVersion = lights.state.version;\n\n\t\t\tconst parameters = programCache.getParameters( material, lights.state, shadowsArray, scene, object );\n\t\t\tconst programCacheKey = programCache.getProgramCacheKey( parameters );\n\n\t\t\tlet programs = materialProperties.programs;\n\n\t\t\t// always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change\n\n\t\t\tmaterialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tmaterialProperties.fog = scene.fog;\n\t\t\tmaterialProperties.envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || materialProperties.environment );\n\n\t\t\tif ( programs === undefined ) {\n\n\t\t\t\t// new material\n\n\t\t\t\tmaterial.addEventListener( 'dispose', onMaterialDispose );\n\n\t\t\t\tprograms = new Map();\n\t\t\t\tmaterialProperties.programs = programs;\n\n\t\t\t}\n\n\t\t\tlet program = programs.get( programCacheKey );\n\n\t\t\tif ( program !== undefined ) {\n\n\t\t\t\t// early out if program and light state is identical\n\n\t\t\t\tif ( materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion ) {\n\n\t\t\t\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t\t\t\treturn program;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tparameters.uniforms = programCache.getUniforms( material );\n\n\t\t\t\tmaterial.onBuild( object, parameters, _this );\n\n\t\t\t\tmaterial.onBeforeCompile( parameters, _this );\n\n\t\t\t\tprogram = programCache.acquireProgram( parameters, programCacheKey );\n\t\t\t\tprograms.set( programCacheKey, program );\n\n\t\t\t\tmaterialProperties.uniforms = parameters.uniforms;\n\n\t\t\t}\n\n\t\t\tconst uniforms = materialProperties.uniforms;\n\n\t\t\tif ( ( ! material.isShaderMaterial && ! material.isRawShaderMaterial ) || material.clipping === true ) {\n\n\t\t\t\tuniforms.clippingPlanes = clipping.uniform;\n\n\t\t\t}\n\n\t\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t\t// store the light setup it was created for\n\n\t\t\tmaterialProperties.needsLights = materialNeedsLights( material );\n\t\t\tmaterialProperties.lightsStateVersion = lightsStateVersion;\n\n\t\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t\t// wire up the material to this renderer's lighting state\n\n\t\t\t\tuniforms.ambientLightColor.value = lights.state.ambient;\n\t\t\t\tuniforms.lightProbe.value = lights.state.probe;\n\t\t\t\tuniforms.directionalLights.value = lights.state.directional;\n\t\t\t\tuniforms.directionalLightShadows.value = lights.state.directionalShadow;\n\t\t\t\tuniforms.spotLights.value = lights.state.spot;\n\t\t\t\tuniforms.spotLightShadows.value = lights.state.spotShadow;\n\t\t\t\tuniforms.rectAreaLights.value = lights.state.rectArea;\n\t\t\t\tuniforms.ltc_1.value = lights.state.rectAreaLTC1;\n\t\t\t\tuniforms.ltc_2.value = lights.state.rectAreaLTC2;\n\t\t\t\tuniforms.pointLights.value = lights.state.point;\n\t\t\t\tuniforms.pointLightShadows.value = lights.state.pointShadow;\n\t\t\t\tuniforms.hemisphereLights.value = lights.state.hemi;\n\n\t\t\t\tuniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n\t\t\t\tuniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n\t\t\t\tuniforms.spotShadowMap.value = lights.state.spotShadowMap;\n\t\t\t\tuniforms.spotLightMatrix.value = lights.state.spotLightMatrix;\n\t\t\t\tuniforms.spotLightMap.value = lights.state.spotLightMap;\n\t\t\t\tuniforms.pointShadowMap.value = lights.state.pointShadowMap;\n\t\t\t\tuniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;\n\t\t\t\t// TODO (abelnation): add area lights shadow info to uniforms\n\n\t\t\t}\n\n\t\t\tmaterialProperties.currentProgram = program;\n\t\t\tmaterialProperties.uniformsList = null;\n\n\t\t\treturn program;\n\n\t\t}\n\n\t\tfunction getUniformList( materialProperties ) {\n\n\t\t\tif ( materialProperties.uniformsList === null ) {\n\n\t\t\t\tconst progUniforms = materialProperties.currentProgram.getUniforms();\n\t\t\t\tmaterialProperties.uniformsList = WebGLUniforms.seqWithValue( progUniforms.seq, materialProperties.uniforms );\n\n\t\t\t}\n\n\t\t\treturn materialProperties.uniformsList;\n\n\t\t}\n\n\t\tfunction updateCommonMaterialProperties( material, parameters ) {\n\n\t\t\tconst materialProperties = properties.get( material );\n\n\t\t\tmaterialProperties.outputColorSpace = parameters.outputColorSpace;\n\t\t\tmaterialProperties.instancing = parameters.instancing;\n\t\t\tmaterialProperties.instancingColor = parameters.instancingColor;\n\t\t\tmaterialProperties.skinning = parameters.skinning;\n\t\t\tmaterialProperties.morphTargets = parameters.morphTargets;\n\t\t\tmaterialProperties.morphNormals = parameters.morphNormals;\n\t\t\tmaterialProperties.morphColors = parameters.morphColors;\n\t\t\tmaterialProperties.morphTargetsCount = parameters.morphTargetsCount;\n\t\t\tmaterialProperties.numClippingPlanes = parameters.numClippingPlanes;\n\t\t\tmaterialProperties.numIntersection = parameters.numClipIntersection;\n\t\t\tmaterialProperties.vertexAlphas = parameters.vertexAlphas;\n\t\t\tmaterialProperties.vertexTangents = parameters.vertexTangents;\n\t\t\tmaterialProperties.toneMapping = parameters.toneMapping;\n\n\t\t}\n\n\t\tfunction setProgram( camera, scene, geometry, material, object ) {\n\n\t\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\ttextures.resetTextureUnits();\n\n\t\t\tconst fog = scene.fog;\n\t\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tconst colorSpace = ( _currentRenderTarget === null ) ? _this.outputColorSpace : ( _currentRenderTarget.isXRRenderTarget === true ? _currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace );\n\t\t\tconst envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment );\n\t\t\tconst vertexAlphas = material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4;\n\t\t\tconst vertexTangents = !! geometry.attributes.tangent && ( !! material.normalMap || material.anisotropy > 0 );\n\t\t\tconst morphTargets = !! geometry.morphAttributes.position;\n\t\t\tconst morphNormals = !! geometry.morphAttributes.normal;\n\t\t\tconst morphColors = !! geometry.morphAttributes.color;\n\n\t\t\tlet toneMapping = NoToneMapping;\n\n\t\t\tif ( material.toneMapped ) {\n\n\t\t\t\tif ( _currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true ) {\n\n\t\t\t\t\ttoneMapping = _this.toneMapping;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;\n\t\t\tconst morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;\n\n\t\t\tconst materialProperties = properties.get( material );\n\t\t\tconst lights = currentRenderState.state.lights;\n\n\t\t\tif ( _clippingEnabled === true ) {\n\n\t\t\t\tif ( _localClippingEnabled === true || camera !== _currentCamera ) {\n\n\t\t\t\t\tconst useCache =\n\t\t\t\t\t\tcamera === _currentCamera &&\n\t\t\t\t\t\tmaterial.id === _currentMaterialId;\n\n\t\t\t\t\t// we might want to call this function with some ClippingGroup\n\t\t\t\t\t// object instead of the material, once it becomes feasible\n\t\t\t\t\t// (#8465, #8379)\n\t\t\t\t\tclipping.setState( material, camera, useCache );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet needsProgramChange = false;\n\n\t\t\tif ( material.version === materialProperties.__version ) {\n\n\t\t\t\tif ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.outputColorSpace !== colorSpace ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancing === false ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( ! object.isInstancedMesh && materialProperties.instancing === true ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isSkinnedMesh && materialProperties.skinning === false ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( ! object.isSkinnedMesh && materialProperties.skinning === true ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.envMap !== envMap ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( material.fog === true && materialProperties.fog !== fog ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.numClippingPlanes !== undefined &&\n\t\t\t\t\t( materialProperties.numClippingPlanes !== clipping.numPlanes ||\n\t\t\t\t\tmaterialProperties.numIntersection !== clipping.numIntersection ) ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.vertexAlphas !== vertexAlphas ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.vertexTangents !== vertexTangents ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.morphTargets !== morphTargets ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.morphNormals !== morphNormals ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.morphColors !== morphColors ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( materialProperties.toneMapping !== toneMapping ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t} else if ( capabilities.isWebGL2 === true && materialProperties.morphTargetsCount !== morphTargetsCount ) {\n\n\t\t\t\t\tneedsProgramChange = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tneedsProgramChange = true;\n\t\t\t\tmaterialProperties.__version = material.version;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet program = materialProperties.currentProgram;\n\n\t\t\tif ( needsProgramChange === true ) {\n\n\t\t\t\tprogram = getProgram( material, scene, object );\n\n\t\t\t}\n\n\t\t\tlet refreshProgram = false;\n\t\t\tlet refreshMaterial = false;\n\t\t\tlet refreshLights = false;\n\n\t\t\tconst p_uniforms = program.getUniforms(),\n\t\t\t\tm_uniforms = materialProperties.uniforms;\n\n\t\t\tif ( state.useProgram( program.program ) ) {\n\n\t\t\t\trefreshProgram = true;\n\t\t\t\trefreshMaterial = true;\n\t\t\t\trefreshLights = true;\n\n\t\t\t}\n\n\t\t\tif ( material.id !== _currentMaterialId ) {\n\n\t\t\t\t_currentMaterialId = material.id;\n\n\t\t\t\trefreshMaterial = true;\n\n\t\t\t}\n\n\t\t\tif ( refreshProgram || _currentCamera !== camera ) {\n\n\t\t\t\t// common camera uniforms\n\n\t\t\t\tp_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix );\n\t\t\t\tp_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse );\n\n\t\t\t\tconst uCamPos = p_uniforms.map.cameraPosition;\n\n\t\t\t\tif ( uCamPos !== undefined ) {\n\n\t\t\t\t\tuCamPos.setValue( _gl, _vector3.setFromMatrixPosition( camera.matrixWorld ) );\n\n\t\t\t\t}\n\n\t\t\t\tif ( capabilities.logarithmicDepthBuffer ) {\n\n\t\t\t\t\tp_uniforms.setValue( _gl, 'logDepthBufFC',\n\t\t\t\t\t\t2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) );\n\n\t\t\t\t}\n\n\t\t\t\t// consider moving isOrthographic to UniformLib and WebGLMaterials, see https://github.com/mrdoob/three.js/pull/26467#issuecomment-1645185067\n\n\t\t\t\tif ( material.isMeshPhongMaterial ||\n\t\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\t\tmaterial.isMeshLambertMaterial ||\n\t\t\t\t\tmaterial.isMeshBasicMaterial ||\n\t\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\t\tmaterial.isShaderMaterial ) {\n\n\t\t\t\t\tp_uniforms.setValue( _gl, 'isOrthographic', camera.isOrthographicCamera === true );\n\n\t\t\t\t}\n\n\t\t\t\tif ( _currentCamera !== camera ) {\n\n\t\t\t\t\t_currentCamera = camera;\n\n\t\t\t\t\t// lighting uniforms depend on the camera so enforce an update\n\t\t\t\t\t// now, in case this material supports lights - or later, when\n\t\t\t\t\t// the next material that does gets activated:\n\n\t\t\t\t\trefreshMaterial = true;\t\t// set to true on material change\n\t\t\t\t\trefreshLights = true;\t\t// remains set until update done\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// skinning and morph target uniforms must be set even if material didn't change\n\t\t\t// auto-setting of texture unit for bone and morph texture must go before other textures\n\t\t\t// otherwise textures used for skinning and morphing can take over texture units reserved for other material textures\n\n\t\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrix' );\n\t\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrixInverse' );\n\n\t\t\t\tconst skeleton = object.skeleton;\n\n\t\t\t\tif ( skeleton ) {\n\n\t\t\t\t\tif ( capabilities.floatVertexTextures ) {\n\n\t\t\t\t\t\tif ( skeleton.boneTexture === null ) skeleton.computeBoneTexture();\n\n\t\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTexture', skeleton.boneTexture, textures );\n\t\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTextureSize', skeleton.boneTextureSize );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\n\t\t\tif ( morphAttributes.position !== undefined || morphAttributes.normal !== undefined || ( morphAttributes.color !== undefined && capabilities.isWebGL2 === true ) ) {\n\n\t\t\t\tmorphtargets.update( object, geometry, program );\n\n\t\t\t}\n\n\t\t\tif ( refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow ) {\n\n\t\t\t\tmaterialProperties.receiveShadow = object.receiveShadow;\n\t\t\t\tp_uniforms.setValue( _gl, 'receiveShadow', object.receiveShadow );\n\n\t\t\t}\n\n\t\t\t// https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512\n\n\t\t\tif ( material.isMeshGouraudMaterial && material.envMap !== null ) {\n\n\t\t\t\tm_uniforms.envMap.value = envMap;\n\n\t\t\t\tm_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1;\n\n\t\t\t}\n\n\t\t\tif ( refreshMaterial ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );\n\n\t\t\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t\t\t// the current material requires lighting info\n\n\t\t\t\t\t// note: all lighting uniforms are always set correctly\n\t\t\t\t\t// they simply reference the renderer's state for their\n\t\t\t\t\t// values\n\t\t\t\t\t//\n\t\t\t\t\t// use the current material's .needsUpdate flags to set\n\t\t\t\t\t// the GL state when required\n\n\t\t\t\t\tmarkUniformsLightsNeedsUpdate( m_uniforms, refreshLights );\n\n\t\t\t\t}\n\n\t\t\t\t// refresh uniforms common to several materials\n\n\t\t\t\tif ( fog && material.fog === true ) {\n\n\t\t\t\t\tmaterials.refreshFogUniforms( m_uniforms, fog );\n\n\t\t\t\t}\n\n\t\t\t\tmaterials.refreshMaterialUniforms( m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget );\n\n\t\t\t\tWebGLUniforms.upload( _gl, getUniformList( materialProperties ), m_uniforms, textures );\n\n\t\t\t}\n\n\t\t\tif ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) {\n\n\t\t\t\tWebGLUniforms.upload( _gl, getUniformList( materialProperties ), m_uniforms, textures );\n\t\t\t\tmaterial.uniformsNeedUpdate = false;\n\n\t\t\t}\n\n\t\t\tif ( material.isSpriteMaterial ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'center', object.center );\n\n\t\t\t}\n\n\t\t\t// common matrices\n\n\t\t\tp_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix );\n\t\t\tp_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix );\n\t\t\tp_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld );\n\n\t\t\t// UBOs\n\n\t\t\tif ( material.isShaderMaterial || material.isRawShaderMaterial ) {\n\n\t\t\t\tconst groups = material.uniformsGroups;\n\n\t\t\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t\t\tconst group = groups[ i ];\n\n\t\t\t\t\t\tuniformsGroups.update( group, program );\n\t\t\t\t\t\tuniformsGroups.bind( group, program );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn program;\n\n\t\t}\n\n\t\t// If uniforms are marked as clean, they don't need to be loaded to the GPU.\n\n\t\tfunction markUniformsLightsNeedsUpdate( uniforms, value ) {\n\n\t\t\tuniforms.ambientLightColor.needsUpdate = value;\n\t\t\tuniforms.lightProbe.needsUpdate = value;\n\n\t\t\tuniforms.directionalLights.needsUpdate = value;\n\t\t\tuniforms.directionalLightShadows.needsUpdate = value;\n\t\t\tuniforms.pointLights.needsUpdate = value;\n\t\t\tuniforms.pointLightShadows.needsUpdate = value;\n\t\t\tuniforms.spotLights.needsUpdate = value;\n\t\t\tuniforms.spotLightShadows.needsUpdate = value;\n\t\t\tuniforms.rectAreaLights.needsUpdate = value;\n\t\t\tuniforms.hemisphereLights.needsUpdate = value;\n\n\t\t}\n\n\t\tfunction materialNeedsLights( material ) {\n\n\t\t\treturn material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial || material.isShadowMaterial ||\n\t\t\t\t( material.isShaderMaterial && material.lights === true );\n\n\t\t}\n\n\t\tthis.getActiveCubeFace = function () {\n\n\t\t\treturn _currentActiveCubeFace;\n\n\t\t};\n\n\t\tthis.getActiveMipmapLevel = function () {\n\n\t\t\treturn _currentActiveMipmapLevel;\n\n\t\t};\n\n\t\tthis.getRenderTarget = function () {\n\n\t\t\treturn _currentRenderTarget;\n\n\t\t};\n\n\t\tthis.setRenderTargetTextures = function ( renderTarget, colorTexture, depthTexture ) {\n\n\t\t\tproperties.get( renderTarget.texture ).__webglTexture = colorTexture;\n\t\t\tproperties.get( renderTarget.depthTexture ).__webglTexture = depthTexture;\n\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\trenderTargetProperties.__hasExternalTextures = true;\n\n\t\t\tif ( renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\t\trenderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined;\n\n\t\t\t\tif ( ! renderTargetProperties.__autoAllocateDepthBuffer ) {\n\n\t\t\t\t\t// The multisample_render_to_texture extension doesn't work properly if there\n\t\t\t\t\t// are midframe flushes and an external depth buffer. Disable use of the extension.\n\t\t\t\t\tif ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided' );\n\t\t\t\t\t\trenderTargetProperties.__useRenderToTexture = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setRenderTargetFramebuffer = function ( renderTarget, defaultFramebuffer ) {\n\n\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\t\trenderTargetProperties.__webglFramebuffer = defaultFramebuffer;\n\t\t\trenderTargetProperties.__useDefaultFramebuffer = defaultFramebuffer === undefined;\n\n\t\t};\n\n\t\tthis.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {\n\n\t\t\t_currentRenderTarget = renderTarget;\n\t\t\t_currentActiveCubeFace = activeCubeFace;\n\t\t\t_currentActiveMipmapLevel = activeMipmapLevel;\n\n\t\t\tlet useDefaultFramebuffer = true;\n\t\t\tlet framebuffer = null;\n\t\t\tlet isCube = false;\n\t\t\tlet isRenderTarget3D = false;\n\n\t\t\tif ( renderTarget ) {\n\n\t\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\t\t\tif ( renderTargetProperties.__useDefaultFramebuffer !== undefined ) {\n\n\t\t\t\t\t// We need to make sure to rebind the framebuffer.\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, null );\n\t\t\t\t\tuseDefaultFramebuffer = false;\n\n\t\t\t\t} else if ( renderTargetProperties.__webglFramebuffer === undefined ) {\n\n\t\t\t\t\ttextures.setupRenderTarget( renderTarget );\n\n\t\t\t\t} else if ( renderTargetProperties.__hasExternalTextures ) {\n\n\t\t\t\t\t// Color and depth texture must be rebound in order for the swapchain to update.\n\t\t\t\t\ttextures.rebindTextures( renderTarget, properties.get( renderTarget.texture ).__webglTexture, properties.get( renderTarget.depthTexture ).__webglTexture );\n\n\t\t\t\t}\n\n\t\t\t\tconst texture = renderTarget.texture;\n\n\t\t\t\tif ( texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {\n\n\t\t\t\t\tisRenderTarget3D = true;\n\n\t\t\t\t}\n\n\t\t\t\tconst __webglFramebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\t\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\t\t\tif ( Array.isArray( __webglFramebuffer[ activeCubeFace ] ) ) {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer[ activeCubeFace ][ activeMipmapLevel ];\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer[ activeCubeFace ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\tisCube = true;\n\n\t\t\t\t} else if ( ( capabilities.isWebGL2 && renderTarget.samples > 0 ) && textures.useMultisampledRTT( renderTarget ) === false ) {\n\n\t\t\t\t\tframebuffer = properties.get( renderTarget ).__webglMultisampledFramebuffer;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Array.isArray( __webglFramebuffer ) ) {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer[ activeMipmapLevel ];\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tframebuffer = __webglFramebuffer;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t_currentViewport.copy( renderTarget.viewport );\n\t\t\t\t_currentScissor.copy( renderTarget.scissor );\n\t\t\t\t_currentScissorTest = renderTarget.scissorTest;\n\n\t\t\t} else {\n\n\t\t\t\t_currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t\t_currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t\t_currentScissorTest = _scissorTest;\n\n\t\t\t}\n\n\t\t\tconst framebufferBound = state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\tif ( framebufferBound && capabilities.drawBuffers && useDefaultFramebuffer ) {\n\n\t\t\t\tstate.drawBuffers( renderTarget, framebuffer );\n\n\t\t\t}\n\n\t\t\tstate.viewport( _currentViewport );\n\t\t\tstate.scissor( _currentScissor );\n\t\t\tstate.setScissorTest( _currentScissorTest );\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\t\t_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel );\n\n\t\t\t} else if ( isRenderTarget3D ) {\n\n\t\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\t\tconst layer = activeCubeFace || 0;\n\t\t\t\t_gl.framebufferTextureLayer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer );\n\n\t\t\t}\n\n\t\t\t_currentMaterialId = - 1; // reset current material to ensure correct uniform bindings\n\n\t\t};\n\n\t\tthis.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) {\n\n\t\t\tif ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tlet framebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\t\tif ( renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined ) {\n\n\t\t\t\tframebuffer = framebuffer[ activeCubeFaceIndex ];\n\n\t\t\t}\n\n\t\t\tif ( framebuffer ) {\n\n\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\t\ttry {\n\n\t\t\t\t\tconst texture = renderTarget.texture;\n\t\t\t\t\tconst textureFormat = texture.format;\n\t\t\t\t\tconst textureType = texture.type;\n\n\t\t\t\t\tif ( textureFormat !== RGBAFormat && utils.convert( textureFormat ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.has( 'EXT_color_buffer_float' ) ) );\n\n\t\t\t\t\tif ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // Edge and Chrome Mac < 52 (#9513)\n\t\t\t\t\t\t! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float' ) || extensions.has( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox\n\t\t\t\t\t\t! halfFloatSupportedByExt ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n\n\t\t\t\t\tif ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {\n\n\t\t\t\t\t\t_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer );\n\n\t\t\t\t\t}\n\n\t\t\t\t} finally {\n\n\t\t\t\t\t// restore framebuffer of current render target if necessary\n\n\t\t\t\t\tconst framebuffer = ( _currentRenderTarget !== null ) ? properties.get( _currentRenderTarget ).__webglFramebuffer : null;\n\t\t\t\t\tstate.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.copyFramebufferToTexture = function ( position, texture, level = 0 ) {\n\n\t\t\tconst levelScale = Math.pow( 2, - level );\n\t\t\tconst width = Math.floor( texture.image.width * levelScale );\n\t\t\tconst height = Math.floor( texture.image.height * levelScale );\n\n\t\t\ttextures.setTexture2D( texture, 0 );\n\n\t\t\t_gl.copyTexSubImage2D( _gl.TEXTURE_2D, level, 0, 0, position.x, position.y, width, height );\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) {\n\n\t\t\tconst width = srcTexture.image.width;\n\t\t\tconst height = srcTexture.image.height;\n\t\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\t\tconst glType = utils.convert( dstTexture.type );\n\n\t\t\ttextures.setTexture2D( dstTexture, 0 );\n\n\t\t\t// As another texture upload may have changed pixelStorei\n\t\t\t// parameters, make sure they are correct for the dstTexture\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment );\n\n\t\t\tif ( srcTexture.isDataTexture ) {\n\n\t\t\t\t_gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data );\n\n\t\t\t} else {\n\n\t\t\t\tif ( srcTexture.isCompressedTexture ) {\n\n\t\t\t\t\t_gl.compressedTexSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Generate mipmaps only when copying level 0\n\t\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( _gl.TEXTURE_2D );\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.copyTextureToTexture3D = function ( sourceBox, position, srcTexture, dstTexture, level = 0 ) {\n\n\t\t\tif ( _this.isWebGL1Renderer ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst width = sourceBox.max.x - sourceBox.min.x + 1;\n\t\t\tconst height = sourceBox.max.y - sourceBox.min.y + 1;\n\t\t\tconst depth = sourceBox.max.z - sourceBox.min.z + 1;\n\t\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\t\tconst glType = utils.convert( dstTexture.type );\n\t\t\tlet glTarget;\n\n\t\t\tif ( dstTexture.isData3DTexture ) {\n\n\t\t\t\ttextures.setTexture3D( dstTexture, 0 );\n\t\t\t\tglTarget = _gl.TEXTURE_3D;\n\n\t\t\t} else if ( dstTexture.isDataArrayTexture ) {\n\n\t\t\t\ttextures.setTexture2DArray( dstTexture, 0 );\n\t\t\t\tglTarget = _gl.TEXTURE_2D_ARRAY;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment );\n\n\t\t\tconst unpackRowLen = _gl.getParameter( _gl.UNPACK_ROW_LENGTH );\n\t\t\tconst unpackImageHeight = _gl.getParameter( _gl.UNPACK_IMAGE_HEIGHT );\n\t\t\tconst unpackSkipPixels = _gl.getParameter( _gl.UNPACK_SKIP_PIXELS );\n\t\t\tconst unpackSkipRows = _gl.getParameter( _gl.UNPACK_SKIP_ROWS );\n\t\t\tconst unpackSkipImages = _gl.getParameter( _gl.UNPACK_SKIP_IMAGES );\n\n\t\t\tconst image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[ 0 ] : srcTexture.image;\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, image.width );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, image.height );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, sourceBox.min.x );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, sourceBox.min.y );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, sourceBox.min.z );\n\n\t\t\tif ( srcTexture.isDataTexture || srcTexture.isData3DTexture ) {\n\n\t\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data );\n\n\t\t\t} else {\n\n\t\t\t\tif ( srcTexture.isCompressedArrayTexture ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.' );\n\t\t\t\t\t_gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t_gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, unpackRowLen );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, unpackImageHeight );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, unpackSkipPixels );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, unpackSkipRows );\n\t\t\t_gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, unpackSkipImages );\n\n\t\t\t// Generate mipmaps only when copying level 0\n\t\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( glTarget );\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.initTexture = function ( texture ) {\n\n\t\t\tif ( texture.isCubeTexture ) {\n\n\t\t\t\ttextures.setTextureCube( texture, 0 );\n\n\t\t\t} else if ( texture.isData3DTexture ) {\n\n\t\t\t\ttextures.setTexture3D( texture, 0 );\n\n\t\t\t} else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {\n\n\t\t\t\ttextures.setTexture2DArray( texture, 0 );\n\n\t\t\t} else {\n\n\t\t\t\ttextures.setTexture2D( texture, 0 );\n\n\t\t\t}\n\n\t\t\tstate.unbindTexture();\n\n\t\t};\n\n\t\tthis.resetState = function () {\n\n\t\t\t_currentActiveCubeFace = 0;\n\t\t\t_currentActiveMipmapLevel = 0;\n\t\t\t_currentRenderTarget = null;\n\n\t\t\tstate.reset();\n\t\t\tbindingStates.reset();\n\n\t\t};\n\n\t\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );\n\n\t\t}\n\n\t}\n\n\tget coordinateSystem() {\n\n\t\treturn WebGLCoordinateSystem;\n\n\t}\n\n\tget outputColorSpace() {\n\n\t\treturn this._outputColorSpace;\n\n\t}\n\n\tset outputColorSpace( colorSpace ) {\n\n\t\tthis._outputColorSpace = colorSpace;\n\n\t\tconst gl = this.getContext();\n\t\tgl.drawingBufferColorSpace = colorSpace === DisplayP3ColorSpace ? 'display-p3' : 'srgb';\n\t\tgl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? 'display-p3' : 'srgb';\n\n\t}\n\n\tget physicallyCorrectLights() { // @deprecated, r150\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );\n\t\treturn ! this.useLegacyLights;\n\n\t}\n\n\tset physicallyCorrectLights( value ) { // @deprecated, r150\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );\n\t\tthis.useLegacyLights = ! value;\n\n\t}\n\n\tget outputEncoding() { // @deprecated, r152\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.' );\n\t\treturn this.outputColorSpace === SRGBColorSpace ? sRGBEncoding : LinearEncoding;\n\n\t}\n\n\tset outputEncoding( encoding ) { // @deprecated, r152\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead.' );\n\t\tthis.outputColorSpace = encoding === sRGBEncoding ? SRGBColorSpace : LinearSRGBColorSpace;\n\n\t}\n\n\tget useLegacyLights() { // @deprecated, r155\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' );\n\t\treturn this._useLegacyLights;\n\n\t}\n\n\tset useLegacyLights( value ) { // @deprecated, r155\n\n\t\tconsole.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' );\n\t\tthis._useLegacyLights = value;\n\n\t}\n\n}\n\nclass WebGL1Renderer extends WebGLRenderer {}\n\nWebGL1Renderer.prototype.isWebGL1Renderer = true;\n\nclass FogExp2 {\n\n\tconstructor( color, density = 0.00025 ) {\n\n\t\tthis.isFogExp2 = true;\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\t\tthis.density = density;\n\n\t}\n\n\tclone() {\n\n\t\treturn new FogExp2( this.color, this.density );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'FogExp2',\n\t\t\tname: this.name,\n\t\t\tcolor: this.color.getHex(),\n\t\t\tdensity: this.density\n\t\t};\n\n\t}\n\n}\n\nclass Fog {\n\n\tconstructor( color, near = 1, far = 1000 ) {\n\n\t\tthis.isFog = true;\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Fog( this.color, this.near, this.far );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'Fog',\n\t\t\tname: this.name,\n\t\t\tcolor: this.color.getHex(),\n\t\t\tnear: this.near,\n\t\t\tfar: this.far\n\t\t};\n\n\t}\n\n}\n\nclass Scene extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isScene = true;\n\n\t\tthis.type = 'Scene';\n\n\t\tthis.background = null;\n\t\tthis.environment = null;\n\t\tthis.fog = null;\n\n\t\tthis.backgroundBlurriness = 0;\n\t\tthis.backgroundIntensity = 1;\n\n\t\tthis.overrideMaterial = null;\n\n\t\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.background !== null ) this.background = source.background.clone();\n\t\tif ( source.environment !== null ) this.environment = source.environment.clone();\n\t\tif ( source.fog !== null ) this.fog = source.fog.clone();\n\n\t\tthis.backgroundBlurriness = source.backgroundBlurriness;\n\t\tthis.backgroundIntensity = source.backgroundIntensity;\n\n\t\tif ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.fog !== null ) data.object.fog = this.fog.toJSON();\n\t\tif ( this.backgroundBlurriness > 0 ) data.object.backgroundBlurriness = this.backgroundBlurriness;\n\t\tif ( this.backgroundIntensity !== 1 ) data.object.backgroundIntensity = this.backgroundIntensity;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass InterleavedBuffer {\n\n\tconstructor( array, stride ) {\n\n\t\tthis.isInterleavedBuffer = true;\n\n\t\tthis.array = array;\n\t\tthis.stride = stride;\n\t\tthis.count = array !== undefined ? array.length / stride : 0;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\n\t\tthis.version = 0;\n\n\t\tthis.uuid = generateUUID();\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.count = source.count;\n\t\tthis.stride = source.stride;\n\t\tthis.usage = source.usage;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.stride;\n\t\tindex2 *= attribute.stride;\n\n\t\tfor ( let i = 0, l = this.stride; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = this.array.slice( 0 ).buffer;\n\n\t\t}\n\n\t\tconst array = new this.array.constructor( data.arrayBuffers[ this.array.buffer._uuid ] );\n\n\t\tconst ib = new this.constructor( array, this.stride );\n\t\tib.setUsage( this.usage );\n\n\t\treturn ib;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\t// generate UUID for array buffer if necessary\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = Array.from( new Uint32Array( this.array.buffer ) );\n\n\t\t}\n\n\t\t//\n\n\t\treturn {\n\t\t\tuuid: this.uuid,\n\t\t\tbuffer: this.array.buffer._uuid,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tstride: this.stride\n\t\t};\n\n\t}\n\n}\n\nconst _vector$5 = /*@__PURE__*/ new Vector3();\n\nclass InterleavedBufferAttribute {\n\n\tconstructor( interleavedBuffer, itemSize, offset, normalized = false ) {\n\n\t\tthis.isInterleavedBufferAttribute = true;\n\n\t\tthis.name = '';\n\n\t\tthis.data = interleavedBuffer;\n\t\tthis.itemSize = itemSize;\n\t\tthis.offset = offset;\n\n\t\tthis.normalized = normalized;\n\n\t}\n\n\tget count() {\n\n\t\treturn this.data.count;\n\n\t}\n\n\tget array() {\n\n\t\treturn this.data.array;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tthis.data.needsUpdate = value;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.data.count; i < l; i ++ ) {\n\n\t\t\t_vector$5.fromBufferAttribute( this, i );\n\n\t\t\t_vector$5.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$5.x, _vector$5.y, _vector$5.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$5.fromBufferAttribute( this, i );\n\n\t\t\t_vector$5.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$5.x, _vector$5.y, _vector$5.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$5.fromBufferAttribute( this, i );\n\n\t\t\t_vector$5.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$5.x, _vector$5.y, _vector$5.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tif ( this.normalized ) x = normalize( x, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tif ( this.normalized ) y = normalize( y, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tif ( this.normalized ) z = normalize( z, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tif ( this.normalized ) w = normalize( w, this.array );\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\tlet x = this.data.array[ index * this.data.stride + this.offset ];\n\n\t\tif ( this.normalized ) x = denormalize( x, this.array );\n\n\t\treturn x;\n\n\t}\n\n\tgetY( index ) {\n\n\t\tlet y = this.data.array[ index * this.data.stride + this.offset + 1 ];\n\n\t\tif ( this.normalized ) y = denormalize( y, this.array );\n\n\t\treturn y;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\tlet z = this.data.array[ index * this.data.stride + this.offset + 2 ];\n\n\t\tif ( this.normalized ) z = denormalize( z, this.array );\n\n\t\treturn z;\n\n\t}\n\n\tgetW( index ) {\n\n\t\tlet w = this.data.array[ index * this.data.stride + this.offset + 3 ];\n\n\t\tif ( this.normalized ) w = denormalize( w, this.array );\n\n\t\treturn w;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\n\t\t}\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\n\t\t}\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tif ( this.normalized ) {\n\n\t\t\tx = normalize( x, this.array );\n\t\t\ty = normalize( y, this.array );\n\t\t\tz = normalize( z, this.array );\n\t\t\tw = normalize( w, this.array );\n\n\t\t}\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\t\tthis.data.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( new this.array.constructor( array ), this.itemSize, this.normalized );\n\n\t\t} else {\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.clone( data );\n\n\t\t\t}\n\n\t\t\treturn new InterleavedBufferAttribute( data.interleavedBuffers[ this.data.uuid ], this.itemSize, this.offset, this.normalized );\n\n\t\t}\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// de-interleave data and save it as an ordinary buffer attribute for now\n\n\t\t\treturn {\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tarray: array,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t} else {\n\n\t\t\t// save as true interleaved attribute\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.toJSON( data );\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tisInterleavedBufferAttribute: true,\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\tdata: this.data.uuid,\n\t\t\t\toffset: this.offset,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t}\n\n\t}\n\n}\n\nclass SpriteMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isSpriteMaterial = true;\n\n\t\tthis.type = 'SpriteMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.rotation = 0;\n\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.transparent = true;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nlet _geometry;\n\nconst _intersectPoint = /*@__PURE__*/ new Vector3();\nconst _worldScale = /*@__PURE__*/ new Vector3();\nconst _mvPosition = /*@__PURE__*/ new Vector3();\n\nconst _alignedPosition = /*@__PURE__*/ new Vector2();\nconst _rotatedPosition = /*@__PURE__*/ new Vector2();\nconst _viewWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _vA = /*@__PURE__*/ new Vector3();\nconst _vB = /*@__PURE__*/ new Vector3();\nconst _vC = /*@__PURE__*/ new Vector3();\n\nconst _uvA = /*@__PURE__*/ new Vector2();\nconst _uvB = /*@__PURE__*/ new Vector2();\nconst _uvC = /*@__PURE__*/ new Vector2();\n\nclass Sprite extends Object3D {\n\n\tconstructor( material = new SpriteMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.isSprite = true;\n\n\t\tthis.type = 'Sprite';\n\n\t\tif ( _geometry === undefined ) {\n\n\t\t\t_geometry = new BufferGeometry();\n\n\t\t\tconst float32Array = new Float32Array( [\n\t\t\t\t- 0.5, - 0.5, 0, 0, 0,\n\t\t\t\t0.5, - 0.5, 0, 1, 0,\n\t\t\t\t0.5, 0.5, 0, 1, 1,\n\t\t\t\t- 0.5, 0.5, 0, 0, 1\n\t\t\t] );\n\n\t\t\tconst interleavedBuffer = new InterleavedBuffer( float32Array, 5 );\n\n\t\t\t_geometry.setIndex( [ 0, 1, 2,\t0, 2, 3 ] );\n\t\t\t_geometry.setAttribute( 'position', new InterleavedBufferAttribute( interleavedBuffer, 3, 0, false ) );\n\t\t\t_geometry.setAttribute( 'uv', new InterleavedBufferAttribute( interleavedBuffer, 2, 3, false ) );\n\n\t\t}\n\n\t\tthis.geometry = _geometry;\n\t\tthis.material = material;\n\n\t\tthis.center = new Vector2( 0.5, 0.5 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tif ( raycaster.camera === null ) {\n\n\t\t\tconsole.error( 'THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.' );\n\n\t\t}\n\n\t\t_worldScale.setFromMatrixScale( this.matrixWorld );\n\n\t\t_viewWorldMatrix.copy( raycaster.camera.matrixWorld );\n\t\tthis.modelViewMatrix.multiplyMatrices( raycaster.camera.matrixWorldInverse, this.matrixWorld );\n\n\t\t_mvPosition.setFromMatrixPosition( this.modelViewMatrix );\n\n\t\tif ( raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false ) {\n\n\t\t\t_worldScale.multiplyScalar( - _mvPosition.z );\n\n\t\t}\n\n\t\tconst rotation = this.material.rotation;\n\t\tlet sin, cos;\n\n\t\tif ( rotation !== 0 ) {\n\n\t\t\tcos = Math.cos( rotation );\n\t\t\tsin = Math.sin( rotation );\n\n\t\t}\n\n\t\tconst center = this.center;\n\n\t\ttransformVertex( _vA.set( - 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vB.set( 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\n\t\t_uvA.set( 0, 0 );\n\t\t_uvB.set( 1, 0 );\n\t\t_uvC.set( 1, 1 );\n\n\t\t// check first triangle\n\t\tlet intersect = raycaster.ray.intersectTriangle( _vA, _vB, _vC, false, _intersectPoint );\n\n\t\tif ( intersect === null ) {\n\n\t\t\t// check second triangle\n\t\t\ttransformVertex( _vB.set( - 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\t\t_uvB.set( 0, 1 );\n\n\t\t\tintersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint );\n\t\t\tif ( intersect === null ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( _intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tpoint: _intersectPoint.clone(),\n\t\t\tuv: Triangle.getInterpolation( _intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() ),\n\t\t\tface: null,\n\t\t\tobject: this\n\n\t\t} );\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.center !== undefined ) this.center.copy( source.center );\n\n\t\tthis.material = source.material;\n\n\t\treturn this;\n\n\t}\n\n}\n\nfunction transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) {\n\n\t// compute position in camera space\n\t_alignedPosition.subVectors( vertexPosition, center ).addScalar( 0.5 ).multiply( scale );\n\n\t// to check if rotation is not zero\n\tif ( sin !== undefined ) {\n\n\t\t_rotatedPosition.x = ( cos * _alignedPosition.x ) - ( sin * _alignedPosition.y );\n\t\t_rotatedPosition.y = ( sin * _alignedPosition.x ) + ( cos * _alignedPosition.y );\n\n\t} else {\n\n\t\t_rotatedPosition.copy( _alignedPosition );\n\n\t}\n\n\n\tvertexPosition.copy( mvPosition );\n\tvertexPosition.x += _rotatedPosition.x;\n\tvertexPosition.y += _rotatedPosition.y;\n\n\t// transform to world space\n\tvertexPosition.applyMatrix4( _viewWorldMatrix );\n\n}\n\nconst _v1$2 = /*@__PURE__*/ new Vector3();\nconst _v2$1 = /*@__PURE__*/ new Vector3();\n\nclass LOD extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis._currentLevel = 0;\n\n\t\tthis.type = 'LOD';\n\n\t\tObject.defineProperties( this, {\n\t\t\tlevels: {\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tisLOD: {\n\t\t\t\tvalue: true,\n\t\t\t}\n\t\t} );\n\n\t\tthis.autoUpdate = true;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tconst levels = source.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tthis.addLevel( level.object.clone(), level.distance, level.hysteresis );\n\n\t\t}\n\n\t\tthis.autoUpdate = source.autoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\taddLevel( object, distance = 0, hysteresis = 0 ) {\n\n\t\tdistance = Math.abs( distance );\n\n\t\tconst levels = this.levels;\n\n\t\tlet l;\n\n\t\tfor ( l = 0; l < levels.length; l ++ ) {\n\n\t\t\tif ( distance < levels[ l ].distance ) {\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlevels.splice( l, 0, { distance: distance, hysteresis: hysteresis, object: object } );\n\n\t\tthis.add( object );\n\n\t\treturn this;\n\n\t}\n\n\tgetCurrentLevel() {\n\n\t\treturn this._currentLevel;\n\n\t}\n\n\n\n\tgetObjectForDistance( distance ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tlet levelDistance = levels[ i ].distance;\n\n\t\t\t\tif ( levels[ i ].object.visible ) {\n\n\t\t\t\t\tlevelDistance -= levelDistance * levels[ i ].hysteresis;\n\n\t\t\t\t}\n\n\t\t\t\tif ( distance < levelDistance ) {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn levels[ i - 1 ].object;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = raycaster.ray.origin.distanceTo( _v1$2 );\n\n\t\t\tthis.getObjectForDistance( distance ).raycast( raycaster, intersects );\n\n\t\t}\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 1 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( camera.matrixWorld );\n\t\t\t_v2$1.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = _v1$2.distanceTo( _v2$1 ) / camera.zoom;\n\n\t\t\tlevels[ 0 ].object.visible = true;\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tlet levelDistance = levels[ i ].distance;\n\n\t\t\t\tif ( levels[ i ].object.visible ) {\n\n\t\t\t\t\tlevelDistance -= levelDistance * levels[ i ].hysteresis;\n\n\t\t\t\t}\n\n\t\t\t\tif ( distance >= levelDistance ) {\n\n\t\t\t\t\tlevels[ i - 1 ].object.visible = false;\n\t\t\t\t\tlevels[ i ].object.visible = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._currentLevel = i - 1;\n\n\t\t\tfor ( ; i < l; i ++ ) {\n\n\t\t\t\tlevels[ i ].object.visible = false;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.autoUpdate === false ) data.object.autoUpdate = false;\n\n\t\tdata.object.levels = [];\n\n\t\tconst levels = this.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tdata.object.levels.push( {\n\t\t\t\tobject: level.object.uuid,\n\t\t\t\tdistance: level.distance,\n\t\t\t\thysteresis: level.hysteresis\n\t\t\t} );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _basePosition = /*@__PURE__*/ new Vector3();\n\nconst _skinIndex = /*@__PURE__*/ new Vector4();\nconst _skinWeight = /*@__PURE__*/ new Vector4();\n\nconst _vector3 = /*@__PURE__*/ new Vector3();\nconst _matrix4 = /*@__PURE__*/ new Matrix4();\nconst _vertex = /*@__PURE__*/ new Vector3();\n\nconst _sphere$3 = /*@__PURE__*/ new Sphere();\nconst _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();\nconst _ray$2 = /*@__PURE__*/ new Ray();\n\nclass SkinnedMesh extends Mesh {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isSkinnedMesh = true;\n\n\t\tthis.type = 'SkinnedMesh';\n\n\t\tthis.bindMode = AttachedBindMode;\n\t\tthis.bindMatrix = new Matrix4();\n\t\tthis.bindMatrixInverse = new Matrix4();\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tthis.boundingBox.makeEmpty();\n\n\t\tconst positionAttribute = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0; i < positionAttribute.count; i ++ ) {\n\n\t\t\tthis.getVertexPosition( i, _vertex );\n\t\t\tthis.boundingBox.expandByPoint( _vertex );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tthis.boundingSphere.makeEmpty();\n\n\t\tconst positionAttribute = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0; i < positionAttribute.count; i ++ ) {\n\n\t\t\tthis.getVertexPosition( i, _vertex );\n\t\t\tthis.boundingSphere.expandByPoint( _vertex );\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.bindMode = source.bindMode;\n\t\tthis.bindMatrix.copy( source.bindMatrix );\n\t\tthis.bindMatrixInverse.copy( source.bindMatrixInverse );\n\n\t\tthis.skeleton = source.skeleton;\n\n\t\tif ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone();\n\t\tif ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone();\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst material = this.material;\n\t\tconst matrixWorld = this.matrixWorld;\n\n\t\tif ( material === undefined ) return;\n\n\t\t// test with bounding sphere in world space\n\n\t\tif ( this.boundingSphere === null ) this.computeBoundingSphere();\n\n\t\t_sphere$3.copy( this.boundingSphere );\n\t\t_sphere$3.applyMatrix4( matrixWorld );\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return;\n\n\t\t// convert ray to local space of skinned mesh\n\n\t\t_inverseMatrix$2.copy( matrixWorld ).invert();\n\t\t_ray$2.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$2 );\n\n\t\t// test with bounding box in local space\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tif ( _ray$2.intersectsBox( this.boundingBox ) === false ) return;\n\n\t\t}\n\n\t\t// test for intersections with geometry\n\n\t\tthis._computeIntersections( raycaster, intersects, _ray$2 );\n\n\t}\n\n\tgetVertexPosition( index, target ) {\n\n\t\tsuper.getVertexPosition( index, target );\n\n\t\tthis.applyBoneTransform( index, target );\n\n\t\treturn target;\n\n\t}\n\n\tbind( skeleton, bindMatrix ) {\n\n\t\tthis.skeleton = skeleton;\n\n\t\tif ( bindMatrix === undefined ) {\n\n\t\t\tthis.updateMatrixWorld( true );\n\n\t\t\tthis.skeleton.calculateInverses();\n\n\t\t\tbindMatrix = this.matrixWorld;\n\n\t\t}\n\n\t\tthis.bindMatrix.copy( bindMatrix );\n\t\tthis.bindMatrixInverse.copy( bindMatrix ).invert();\n\n\t}\n\n\tpose() {\n\n\t\tthis.skeleton.pose();\n\n\t}\n\n\tnormalizeSkinWeights() {\n\n\t\tconst vector = new Vector4();\n\n\t\tconst skinWeight = this.geometry.attributes.skinWeight;\n\n\t\tfor ( let i = 0, l = skinWeight.count; i < l; i ++ ) {\n\n\t\t\tvector.fromBufferAttribute( skinWeight, i );\n\n\t\t\tconst scale = 1.0 / vector.manhattanLength();\n\n\t\t\tif ( scale !== Infinity ) {\n\n\t\t\t\tvector.multiplyScalar( scale );\n\n\t\t\t} else {\n\n\t\t\t\tvector.set( 1, 0, 0, 0 ); // do something reasonable\n\n\t\t\t}\n\n\t\t\tskinWeight.setXYZW( i, vector.x, vector.y, vector.z, vector.w );\n\n\t\t}\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.bindMode === AttachedBindMode ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.matrixWorld ).invert();\n\n\t\t} else if ( this.bindMode === DetachedBindMode ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.bindMatrix ).invert();\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode );\n\n\t\t}\n\n\t}\n\n\tapplyBoneTransform( index, vector ) {\n\n\t\tconst skeleton = this.skeleton;\n\t\tconst geometry = this.geometry;\n\n\t\t_skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );\n\t\t_skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index );\n\n\t\t_basePosition.copy( vector ).applyMatrix4( this.bindMatrix );\n\n\t\tvector.set( 0, 0, 0 );\n\n\t\tfor ( let i = 0; i < 4; i ++ ) {\n\n\t\t\tconst weight = _skinWeight.getComponent( i );\n\n\t\t\tif ( weight !== 0 ) {\n\n\t\t\t\tconst boneIndex = _skinIndex.getComponent( i );\n\n\t\t\t\t_matrix4.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] );\n\n\t\t\t\tvector.addScaledVector( _vector3.copy( _basePosition ).applyMatrix4( _matrix4 ), weight );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn vector.applyMatrix4( this.bindMatrixInverse );\n\n\t}\n\n\tboneTransform( index, vector ) { // @deprecated, r151\n\n\t\tconsole.warn( 'THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151.' );\n\t\treturn this.applyBoneTransform( index, vector );\n\n\t}\n\n\n}\n\nclass Bone extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isBone = true;\n\n\t\tthis.type = 'Bone';\n\n\t}\n\n}\n\nclass DataTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, colorSpace ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace );\n\n\t\tthis.isDataTexture = true;\n\n\t\tthis.image = { data: data, width: width, height: height };\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t}\n\n}\n\nconst _offsetMatrix = /*@__PURE__*/ new Matrix4();\nconst _identityMatrix = /*@__PURE__*/ new Matrix4();\n\nclass Skeleton {\n\n\tconstructor( bones = [], boneInverses = [] ) {\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.bones = bones.slice( 0 );\n\t\tthis.boneInverses = boneInverses;\n\t\tthis.boneMatrices = null;\n\n\t\tthis.boneTexture = null;\n\t\tthis.boneTextureSize = 0;\n\n\t\tthis.init();\n\n\t}\n\n\tinit() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tthis.boneMatrices = new Float32Array( bones.length * 16 );\n\n\t\t// calculate inverse bone matrices if necessary\n\n\t\tif ( boneInverses.length === 0 ) {\n\n\t\t\tthis.calculateInverses();\n\n\t\t} else {\n\n\t\t\t// handle special case\n\n\t\t\tif ( bones.length !== boneInverses.length ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' );\n\n\t\t\t\tthis.boneInverses = [];\n\n\t\t\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\t\t\tthis.boneInverses.push( new Matrix4() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcalculateInverses() {\n\n\t\tthis.boneInverses.length = 0;\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst inverse = new Matrix4();\n\n\t\t\tif ( this.bones[ i ] ) {\n\n\t\t\t\tinverse.copy( this.bones[ i ].matrixWorld ).invert();\n\n\t\t\t}\n\n\t\t\tthis.boneInverses.push( inverse );\n\n\t\t}\n\n\t}\n\n\tpose() {\n\n\t\t// recover the bind-time world matrices\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tbone.matrixWorld.copy( this.boneInverses[ i ] ).invert();\n\n\t\t\t}\n\n\t\t}\n\n\t\t// compute the local matrices, positions, rotations and scales\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t\tbone.matrix.copy( bone.parent.matrixWorld ).invert();\n\t\t\t\t\tbone.matrix.multiply( bone.matrixWorld );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbone.matrix.copy( bone.matrixWorld );\n\n\t\t\t\t}\n\n\t\t\t\tbone.matrix.decompose( bone.position, bone.quaternion, bone.scale );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\t\tconst boneMatrices = this.boneMatrices;\n\t\tconst boneTexture = this.boneTexture;\n\n\t\t// flatten bone matrices to array\n\n\t\tfor ( let i = 0, il = bones.length; i < il; i ++ ) {\n\n\t\t\t// compute the offset between the current and the original transform\n\n\t\t\tconst matrix = bones[ i ] ? bones[ i ].matrixWorld : _identityMatrix;\n\n\t\t\t_offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] );\n\t\t\t_offsetMatrix.toArray( boneMatrices, i * 16 );\n\n\t\t}\n\n\t\tif ( boneTexture !== null ) {\n\n\t\t\tboneTexture.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new Skeleton( this.bones, this.boneInverses );\n\n\t}\n\n\tcomputeBoneTexture() {\n\n\t\t// layout (1 matrix = 4 pixels)\n\t\t// RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n\t\t// with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8)\n\t\t// 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16)\n\t\t// 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32)\n\t\t// 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n\n\t\tlet size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix\n\t\tsize = ceilPowerOfTwo( size );\n\t\tsize = Math.max( size, 4 );\n\n\t\tconst boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel\n\t\tboneMatrices.set( this.boneMatrices ); // copy current values\n\n\t\tconst boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType );\n\t\tboneTexture.needsUpdate = true;\n\n\t\tthis.boneMatrices = boneMatrices;\n\t\tthis.boneTexture = boneTexture;\n\t\tthis.boneTextureSize = size;\n\n\t\treturn this;\n\n\t}\n\n\tgetBoneByName( name ) {\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone.name === name ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tdispose( ) {\n\n\t\tif ( this.boneTexture !== null ) {\n\n\t\t\tthis.boneTexture.dispose();\n\n\t\t\tthis.boneTexture = null;\n\n\t\t}\n\n\t}\n\n\tfromJSON( json, bones ) {\n\n\t\tthis.uuid = json.uuid;\n\n\t\tfor ( let i = 0, l = json.bones.length; i < l; i ++ ) {\n\n\t\t\tconst uuid = json.bones[ i ];\n\t\t\tlet bone = bones[ uuid ];\n\n\t\t\tif ( bone === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: No bone found with UUID:', uuid );\n\t\t\t\tbone = new Bone();\n\n\t\t\t}\n\n\t\t\tthis.bones.push( bone );\n\t\t\tthis.boneInverses.push( new Matrix4().fromArray( json.boneInverses[ i ] ) );\n\n\t\t}\n\n\t\tthis.init();\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Skeleton',\n\t\t\t\tgenerator: 'Skeleton.toJSON'\n\t\t\t},\n\t\t\tbones: [],\n\t\t\tboneInverses: []\n\t\t};\n\n\t\tdata.uuid = this.uuid;\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tfor ( let i = 0, l = bones.length; i < l; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\t\t\tdata.bones.push( bone.uuid );\n\n\t\t\tconst boneInverse = boneInverses[ i ];\n\t\t\tdata.boneInverses.push( boneInverse.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass InstancedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized, meshPerAttribute = 1 ) {\n\n\t\tsuper( array, itemSize, normalized );\n\n\t\tthis.isInstancedBufferAttribute = true;\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.meshPerAttribute = this.meshPerAttribute;\n\n\t\tdata.isInstancedBufferAttribute = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _instanceLocalMatrix = /*@__PURE__*/ new Matrix4();\nconst _instanceWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _instanceIntersects = [];\n\nconst _box3 = /*@__PURE__*/ new Box3();\nconst _identity = /*@__PURE__*/ new Matrix4();\nconst _mesh = /*@__PURE__*/ new Mesh();\nconst _sphere$2 = /*@__PURE__*/ new Sphere();\n\nclass InstancedMesh extends Mesh {\n\n\tconstructor( geometry, material, count ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isInstancedMesh = true;\n\n\t\tthis.instanceMatrix = new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 );\n\t\tthis.instanceColor = null;\n\n\t\tthis.count = count;\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.setMatrixAt( i, _identity );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst count = this.count;\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tif ( geometry.boundingBox === null ) {\n\n\t\t\tgeometry.computeBoundingBox();\n\n\t\t}\n\n\t\tthis.boundingBox.makeEmpty();\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.getMatrixAt( i, _instanceLocalMatrix );\n\n\t\t\t_box3.copy( geometry.boundingBox ).applyMatrix4( _instanceLocalMatrix );\n\n\t\t\tthis.boundingBox.union( _box3 );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst count = this.count;\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tif ( geometry.boundingSphere === null ) {\n\n\t\t\tgeometry.computeBoundingSphere();\n\n\t\t}\n\n\t\tthis.boundingSphere.makeEmpty();\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.getMatrixAt( i, _instanceLocalMatrix );\n\n\t\t\t_sphere$2.copy( geometry.boundingSphere ).applyMatrix4( _instanceLocalMatrix );\n\n\t\t\tthis.boundingSphere.union( _sphere$2 );\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.instanceMatrix.copy( source.instanceMatrix );\n\n\t\tif ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone();\n\n\t\tthis.count = source.count;\n\n\t\tif ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone();\n\t\tif ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone();\n\n\t\treturn this;\n\n\t}\n\n\tgetColorAt( index, color ) {\n\n\t\tcolor.fromArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tgetMatrixAt( index, matrix ) {\n\n\t\tmatrix.fromArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst raycastTimes = this.count;\n\n\t\t_mesh.geometry = this.geometry;\n\t\t_mesh.material = this.material;\n\n\t\tif ( _mesh.material === undefined ) return;\n\n\t\t// test with bounding sphere first\n\n\t\tif ( this.boundingSphere === null ) this.computeBoundingSphere();\n\n\t\t_sphere$2.copy( this.boundingSphere );\n\t\t_sphere$2.applyMatrix4( matrixWorld );\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$2 ) === false ) return;\n\n\t\t// now test each instance\n\n\t\tfor ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) {\n\n\t\t\t// calculate the world matrix for each instance\n\n\t\t\tthis.getMatrixAt( instanceId, _instanceLocalMatrix );\n\n\t\t\t_instanceWorldMatrix.multiplyMatrices( matrixWorld, _instanceLocalMatrix );\n\n\t\t\t// the mesh represents this single instance\n\n\t\t\t_mesh.matrixWorld = _instanceWorldMatrix;\n\n\t\t\t_mesh.raycast( raycaster, _instanceIntersects );\n\n\t\t\t// process the result of raycast\n\n\t\t\tfor ( let i = 0, l = _instanceIntersects.length; i < l; i ++ ) {\n\n\t\t\t\tconst intersect = _instanceIntersects[ i ];\n\t\t\t\tintersect.instanceId = instanceId;\n\t\t\t\tintersect.object = this;\n\t\t\t\tintersects.push( intersect );\n\n\t\t\t}\n\n\t\t\t_instanceIntersects.length = 0;\n\n\t\t}\n\n\t}\n\n\tsetColorAt( index, color ) {\n\n\t\tif ( this.instanceColor === null ) {\n\n\t\t\tthis.instanceColor = new InstancedBufferAttribute( new Float32Array( this.instanceMatrix.count * 3 ), 3 );\n\n\t\t}\n\n\t\tcolor.toArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tsetMatrixAt( index, matrix ) {\n\n\t\tmatrix.toArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nclass LineBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isLineBasicMaterial = true;\n\n\t\tthis.type = 'LineBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.linewidth = 1;\n\t\tthis.linecap = 'round';\n\t\tthis.linejoin = 'round';\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.linewidth = source.linewidth;\n\t\tthis.linecap = source.linecap;\n\t\tthis.linejoin = source.linejoin;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _start$1 = /*@__PURE__*/ new Vector3();\nconst _end$1 = /*@__PURE__*/ new Vector3();\nconst _inverseMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _ray$1 = /*@__PURE__*/ new Ray();\nconst _sphere$1 = /*@__PURE__*/ new Sphere();\n\nclass Line extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.isLine = true;\n\n\t\tthis.type = 'Line';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.material = Array.isArray( source.material ) ? source.material.slice() : source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\t// we assume non-indexed geometry\n\n\t\tif ( geometry.index === null ) {\n\n\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\tconst lineDistances = [ 0 ];\n\n\t\t\tfor ( let i = 1, l = positionAttribute.count; i < l; i ++ ) {\n\n\t\t\t\t_start$1.fromBufferAttribute( positionAttribute, i - 1 );\n\t\t\t\t_end$1.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\tlineDistances[ i ] = lineDistances[ i - 1 ];\n\t\t\t\tlineDistances[ i ] += _start$1.distanceTo( _end$1 );\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Line.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$1.copy( geometry.boundingSphere );\n\t\t_sphere$1.applyMatrix4( matrixWorld );\n\t\t_sphere$1.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$1 ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix$1.copy( matrixWorld ).invert();\n\t\t_ray$1.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$1 );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tconst vStart = new Vector3();\n\t\tconst vEnd = new Vector3();\n\t\tconst interSegment = new Vector3();\n\t\tconst interRay = new Vector3();\n\t\tconst step = this.isLineSegments ? 2 : 1;\n\n\t\tconst index = geometry.index;\n\t\tconst attributes = geometry.attributes;\n\t\tconst positionAttribute = attributes.position;\n\n\t\tif ( index !== null ) {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\tconst a = index.getX( i );\n\t\t\t\tconst b = index.getX( i + 1 );\n\n\t\t\t\tvStart.fromBufferAttribute( positionAttribute, a );\n\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, b );\n\n\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\tintersects.push( {\n\n\t\t\t\t\tdistance: distance,\n\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\tindex: i,\n\t\t\t\t\tface: null,\n\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\tobject: this\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\tvStart.fromBufferAttribute( positionAttribute, i );\n\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\tintersects.push( {\n\n\t\t\t\t\tdistance: distance,\n\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\tindex: i,\n\t\t\t\t\tface: null,\n\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\tobject: this\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\t\tconst keys = Object.keys( morphAttributes );\n\n\t\tif ( keys.length > 0 ) {\n\n\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nconst _start = /*@__PURE__*/ new Vector3();\nconst _end = /*@__PURE__*/ new Vector3();\n\nclass LineSegments extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isLineSegments = true;\n\n\t\tthis.type = 'LineSegments';\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\t// we assume non-indexed geometry\n\n\t\tif ( geometry.index === null ) {\n\n\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\tconst lineDistances = [];\n\n\t\t\tfor ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) {\n\n\t\t\t\t_start.fromBufferAttribute( positionAttribute, i );\n\t\t\t\t_end.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\tlineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ];\n\t\t\t\tlineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end );\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineLoop extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isLineLoop = true;\n\n\t\tthis.type = 'LineLoop';\n\n\t}\n\n}\n\nclass PointsMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isPointsMaterial = true;\n\n\t\tthis.type = 'PointsMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.size = 1;\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.size = source.size;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _inverseMatrix = /*@__PURE__*/ new Matrix4();\nconst _ray = /*@__PURE__*/ new Ray();\nconst _sphere = /*@__PURE__*/ new Sphere();\nconst _position$2 = /*@__PURE__*/ new Vector3();\n\nclass Points extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.isPoints = true;\n\n\t\tthis.type = 'Points';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.material = Array.isArray( source.material ) ? source.material.slice() : source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Points.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere.copy( geometry.boundingSphere );\n\t\t_sphere.applyMatrix4( matrixWorld );\n\t\t_sphere.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix.copy( matrixWorld ).invert();\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tconst index = geometry.index;\n\t\tconst attributes = geometry.attributes;\n\t\tconst positionAttribute = attributes.position;\n\n\t\tif ( index !== null ) {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, il = end; i < il; i ++ ) {\n\n\t\t\t\tconst a = index.getX( i );\n\n\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, a );\n\n\t\t\t\ttestPoint( _position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\tfor ( let i = start, l = end; i < l; i ++ ) {\n\n\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\ttestPoint( _position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\t\tconst keys = Object.keys( morphAttributes );\n\n\t\tif ( keys.length > 0 ) {\n\n\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nfunction testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) {\n\n\tconst rayPointDistanceSq = _ray.distanceSqToPoint( point );\n\n\tif ( rayPointDistanceSq < localThresholdSq ) {\n\n\t\tconst intersectPoint = new Vector3();\n\n\t\t_ray.closestPointToPoint( point, intersectPoint );\n\t\tintersectPoint.applyMatrix4( matrixWorld );\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tdistanceToRay: Math.sqrt( rayPointDistanceSq ),\n\t\t\tpoint: intersectPoint,\n\t\t\tindex: index,\n\t\t\tface: null,\n\t\t\tobject: object\n\n\t\t} );\n\n\t}\n\n}\n\nclass VideoTexture extends Texture {\n\n\tconstructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.isVideoTexture = true;\n\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : LinearFilter;\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : LinearFilter;\n\n\t\tthis.generateMipmaps = false;\n\n\t\tconst scope = this;\n\n\t\tfunction updateVideo() {\n\n\t\t\tscope.needsUpdate = true;\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t\tif ( 'requestVideoFrameCallback' in video ) {\n\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.image ).copy( this );\n\n\t}\n\n\tupdate() {\n\n\t\tconst video = this.image;\n\t\tconst hasVideoFrameCallback = 'requestVideoFrameCallback' in video;\n\n\t\tif ( hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA ) {\n\n\t\t\tthis.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n}\n\nclass FramebufferTexture extends Texture {\n\n\tconstructor( width, height ) {\n\n\t\tsuper( { width, height } );\n\n\t\tthis.isFramebufferTexture = true;\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.generateMipmaps = false;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nclass CompressedTexture extends Texture {\n\n\tconstructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace );\n\n\t\tthis.isCompressedTexture = true;\n\n\t\tthis.image = { width: width, height: height };\n\t\tthis.mipmaps = mipmaps;\n\n\t\t// no flipping for cube textures\n\t\t// (also flipping doesn't work for compressed textures )\n\n\t\tthis.flipY = false;\n\n\t\t// can't generate mipmaps for compressed textures\n\t\t// mips must be embedded in DDS files\n\n\t\tthis.generateMipmaps = false;\n\n\t}\n\n}\n\nclass CompressedArrayTexture extends CompressedTexture {\n\n\tconstructor( mipmaps, width, height, depth, format, type ) {\n\n\t\tsuper( mipmaps, width, height, format, type );\n\n\t\tthis.isCompressedArrayTexture = true;\n\t\tthis.image.depth = depth;\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t}\n\n}\n\nclass CompressedCubeTexture extends CompressedTexture {\n\n\tconstructor( images, format, type ) {\n\n\t\tsuper( undefined, images[ 0 ].width, images[ 0 ].height, format, type, CubeReflectionMapping );\n\n\t\tthis.isCompressedCubeTexture = true;\n\t\tthis.isCubeTexture = true;\n\n\t\tthis.image = images;\n\n\t}\n\n}\n\nclass CanvasTexture extends Texture {\n\n\tconstructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.isCanvasTexture = true;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\n/**\n * Extensible curve object.\n *\n * Some common of curve methods:\n * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n * .getPoints(), .getSpacedPoints()\n * .getLength()\n * .updateArcLengths()\n *\n * This following curves inherit from THREE.Curve:\n *\n * -- 2D curves --\n * THREE.ArcCurve\n * THREE.CubicBezierCurve\n * THREE.EllipseCurve\n * THREE.LineCurve\n * THREE.QuadraticBezierCurve\n * THREE.SplineCurve\n *\n * -- 3D curves --\n * THREE.CatmullRomCurve3\n * THREE.CubicBezierCurve3\n * THREE.LineCurve3\n * THREE.QuadraticBezierCurve3\n *\n * A series of curves can be represented as a THREE.CurvePath.\n *\n **/\n\nclass Curve {\n\n\tconstructor() {\n\n\t\tthis.type = 'Curve';\n\n\t\tthis.arcLengthDivisions = 200;\n\n\t}\n\n\t// Virtual base class method to overwrite and implement in subclasses\n\t//\t- t [0 .. 1]\n\n\tgetPoint( /* t, optionalTarget */ ) {\n\n\t\tconsole.warn( 'THREE.Curve: .getPoint() not implemented.' );\n\t\treturn null;\n\n\t}\n\n\t// Get point at relative position in curve according to arc length\n\t// - u [0 .. 1]\n\n\tgetPointAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getPoint( t, optionalTarget );\n\n\t}\n\n\t// Get sequence of points using getPoint( t )\n\n\tgetPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPoint( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get sequence of points using getPointAt( u )\n\n\tgetSpacedPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPointAt( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get total curve arc length\n\n\tgetLength() {\n\n\t\tconst lengths = this.getLengths();\n\t\treturn lengths[ lengths.length - 1 ];\n\n\t}\n\n\t// Get list of cumulative segment lengths\n\n\tgetLengths( divisions = this.arcLengthDivisions ) {\n\n\t\tif ( this.cacheArcLengths &&\n\t\t\t( this.cacheArcLengths.length === divisions + 1 ) &&\n\t\t\t! this.needsUpdate ) {\n\n\t\t\treturn this.cacheArcLengths;\n\n\t\t}\n\n\t\tthis.needsUpdate = false;\n\n\t\tconst cache = [];\n\t\tlet current, last = this.getPoint( 0 );\n\t\tlet sum = 0;\n\n\t\tcache.push( 0 );\n\n\t\tfor ( let p = 1; p <= divisions; p ++ ) {\n\n\t\t\tcurrent = this.getPoint( p / divisions );\n\t\t\tsum += current.distanceTo( last );\n\t\t\tcache.push( sum );\n\t\t\tlast = current;\n\n\t\t}\n\n\t\tthis.cacheArcLengths = cache;\n\n\t\treturn cache; // { sums: cache, sum: sum }; Sum is in the last element.\n\n\t}\n\n\tupdateArcLengths() {\n\n\t\tthis.needsUpdate = true;\n\t\tthis.getLengths();\n\n\t}\n\n\t// Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n\n\tgetUtoTmapping( u, distance ) {\n\n\t\tconst arcLengths = this.getLengths();\n\n\t\tlet i = 0;\n\t\tconst il = arcLengths.length;\n\n\t\tlet targetArcLength; // The targeted u distance value to get\n\n\t\tif ( distance ) {\n\n\t\t\ttargetArcLength = distance;\n\n\t\t} else {\n\n\t\t\ttargetArcLength = u * arcLengths[ il - 1 ];\n\n\t\t}\n\n\t\t// binary search for the index with largest value smaller than target u distance\n\n\t\tlet low = 0, high = il - 1, comparison;\n\n\t\twhile ( low <= high ) {\n\n\t\t\ti = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n\n\t\t\tcomparison = arcLengths[ i ] - targetArcLength;\n\n\t\t\tif ( comparison < 0 ) {\n\n\t\t\t\tlow = i + 1;\n\n\t\t\t} else if ( comparison > 0 ) {\n\n\t\t\t\thigh = i - 1;\n\n\t\t\t} else {\n\n\t\t\t\thigh = i;\n\t\t\t\tbreak;\n\n\t\t\t\t// DONE\n\n\t\t\t}\n\n\t\t}\n\n\t\ti = high;\n\n\t\tif ( arcLengths[ i ] === targetArcLength ) {\n\n\t\t\treturn i / ( il - 1 );\n\n\t\t}\n\n\t\t// we could get finer grain at lengths, or use simple interpolation between two points\n\n\t\tconst lengthBefore = arcLengths[ i ];\n\t\tconst lengthAfter = arcLengths[ i + 1 ];\n\n\t\tconst segmentLength = lengthAfter - lengthBefore;\n\n\t\t// determine where we are between the 'before' and 'after' points\n\n\t\tconst segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength;\n\n\t\t// add that fractional amount to t\n\n\t\tconst t = ( i + segmentFraction ) / ( il - 1 );\n\n\t\treturn t;\n\n\t}\n\n\t// Returns a unit vector tangent at t\n\t// In case any sub curve does not implement its tangent derivation,\n\t// 2 points a small delta apart will be used to find its gradient\n\t// which seems to give a reasonable approximation\n\n\tgetTangent( t, optionalTarget ) {\n\n\t\tconst delta = 0.0001;\n\t\tlet t1 = t - delta;\n\t\tlet t2 = t + delta;\n\n\t\t// Capping in case of danger\n\n\t\tif ( t1 < 0 ) t1 = 0;\n\t\tif ( t2 > 1 ) t2 = 1;\n\n\t\tconst pt1 = this.getPoint( t1 );\n\t\tconst pt2 = this.getPoint( t2 );\n\n\t\tconst tangent = optionalTarget || ( ( pt1.isVector2 ) ? new Vector2() : new Vector3() );\n\n\t\ttangent.copy( pt2 ).sub( pt1 ).normalize();\n\n\t\treturn tangent;\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getTangent( t, optionalTarget );\n\n\t}\n\n\tcomputeFrenetFrames( segments, closed ) {\n\n\t\t// see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n\n\t\tconst normal = new Vector3();\n\n\t\tconst tangents = [];\n\t\tconst normals = [];\n\t\tconst binormals = [];\n\n\t\tconst vec = new Vector3();\n\t\tconst mat = new Matrix4();\n\n\t\t// compute the tangent vectors for each segment on the curve\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst u = i / segments;\n\n\t\t\ttangents[ i ] = this.getTangentAt( u, new Vector3() );\n\n\t\t}\n\n\t\t// select an initial normal vector perpendicular to the first tangent vector,\n\t\t// and in the direction of the minimum tangent xyz component\n\n\t\tnormals[ 0 ] = new Vector3();\n\t\tbinormals[ 0 ] = new Vector3();\n\t\tlet min = Number.MAX_VALUE;\n\t\tconst tx = Math.abs( tangents[ 0 ].x );\n\t\tconst ty = Math.abs( tangents[ 0 ].y );\n\t\tconst tz = Math.abs( tangents[ 0 ].z );\n\n\t\tif ( tx <= min ) {\n\n\t\t\tmin = tx;\n\t\t\tnormal.set( 1, 0, 0 );\n\n\t\t}\n\n\t\tif ( ty <= min ) {\n\n\t\t\tmin = ty;\n\t\t\tnormal.set( 0, 1, 0 );\n\n\t\t}\n\n\t\tif ( tz <= min ) {\n\n\t\t\tnormal.set( 0, 0, 1 );\n\n\t\t}\n\n\t\tvec.crossVectors( tangents[ 0 ], normal ).normalize();\n\n\t\tnormals[ 0 ].crossVectors( tangents[ 0 ], vec );\n\t\tbinormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] );\n\n\n\t\t// compute the slowly-varying normal and binormal vectors for each segment on the curve\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tnormals[ i ] = normals[ i - 1 ].clone();\n\n\t\t\tbinormals[ i ] = binormals[ i - 1 ].clone();\n\n\t\t\tvec.crossVectors( tangents[ i - 1 ], tangents[ i ] );\n\n\t\t\tif ( vec.length() > Number.EPSILON ) {\n\n\t\t\t\tvec.normalize();\n\n\t\t\t\tconst theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), - 1, 1 ) ); // clamp for floating pt errors\n\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) );\n\n\t\t\t}\n\n\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t}\n\n\t\t// if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n\n\t\tif ( closed === true ) {\n\n\t\t\tlet theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), - 1, 1 ) );\n\t\t\ttheta /= segments;\n\n\t\t\tif ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) {\n\n\t\t\t\ttheta = - theta;\n\n\t\t\t}\n\n\t\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\t\t// twist a little...\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) );\n\t\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttangents: tangents,\n\t\t\tnormals: normals,\n\t\t\tbinormals: binormals\n\t\t};\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.arcLengthDivisions = source.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.6,\n\t\t\t\ttype: 'Curve',\n\t\t\t\tgenerator: 'Curve.toJSON'\n\t\t\t}\n\t\t};\n\n\t\tdata.arcLengthDivisions = this.arcLengthDivisions;\n\t\tdata.type = this.type;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.arcLengthDivisions = json.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass EllipseCurve extends Curve {\n\n\tconstructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.isEllipseCurve = true;\n\n\t\tthis.type = 'EllipseCurve';\n\n\t\tthis.aX = aX;\n\t\tthis.aY = aY;\n\n\t\tthis.xRadius = xRadius;\n\t\tthis.yRadius = yRadius;\n\n\t\tthis.aStartAngle = aStartAngle;\n\t\tthis.aEndAngle = aEndAngle;\n\n\t\tthis.aClockwise = aClockwise;\n\n\t\tthis.aRotation = aRotation;\n\n\t}\n\n\tgetPoint( t, optionalTarget ) {\n\n\t\tconst point = optionalTarget || new Vector2();\n\n\t\tconst twoPi = Math.PI * 2;\n\t\tlet deltaAngle = this.aEndAngle - this.aStartAngle;\n\t\tconst samePoints = Math.abs( deltaAngle ) < Number.EPSILON;\n\n\t\t// ensures that deltaAngle is 0 .. 2 PI\n\t\twhile ( deltaAngle < 0 ) deltaAngle += twoPi;\n\t\twhile ( deltaAngle > twoPi ) deltaAngle -= twoPi;\n\n\t\tif ( deltaAngle < Number.EPSILON ) {\n\n\t\t\tif ( samePoints ) {\n\n\t\t\t\tdeltaAngle = 0;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.aClockwise === true && ! samePoints ) {\n\n\t\t\tif ( deltaAngle === twoPi ) {\n\n\t\t\t\tdeltaAngle = - twoPi;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = deltaAngle - twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst angle = this.aStartAngle + t * deltaAngle;\n\t\tlet x = this.aX + this.xRadius * Math.cos( angle );\n\t\tlet y = this.aY + this.yRadius * Math.sin( angle );\n\n\t\tif ( this.aRotation !== 0 ) {\n\n\t\t\tconst cos = Math.cos( this.aRotation );\n\t\t\tconst sin = Math.sin( this.aRotation );\n\n\t\t\tconst tx = x - this.aX;\n\t\t\tconst ty = y - this.aY;\n\n\t\t\t// Rotate the point about the center of the ellipse.\n\t\t\tx = tx * cos - ty * sin + this.aX;\n\t\t\ty = tx * sin + ty * cos + this.aY;\n\n\t\t}\n\n\t\treturn point.set( x, y );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.aX = source.aX;\n\t\tthis.aY = source.aY;\n\n\t\tthis.xRadius = source.xRadius;\n\t\tthis.yRadius = source.yRadius;\n\n\t\tthis.aStartAngle = source.aStartAngle;\n\t\tthis.aEndAngle = source.aEndAngle;\n\n\t\tthis.aClockwise = source.aClockwise;\n\n\t\tthis.aRotation = source.aRotation;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.aX = this.aX;\n\t\tdata.aY = this.aY;\n\n\t\tdata.xRadius = this.xRadius;\n\t\tdata.yRadius = this.yRadius;\n\n\t\tdata.aStartAngle = this.aStartAngle;\n\t\tdata.aEndAngle = this.aEndAngle;\n\n\t\tdata.aClockwise = this.aClockwise;\n\n\t\tdata.aRotation = this.aRotation;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.aX = json.aX;\n\t\tthis.aY = json.aY;\n\n\t\tthis.xRadius = json.xRadius;\n\t\tthis.yRadius = json.yRadius;\n\n\t\tthis.aStartAngle = json.aStartAngle;\n\t\tthis.aEndAngle = json.aEndAngle;\n\n\t\tthis.aClockwise = json.aClockwise;\n\n\t\tthis.aRotation = json.aRotation;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass ArcCurve extends EllipseCurve {\n\n\tconstructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tsuper( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\tthis.isArcCurve = true;\n\n\t\tthis.type = 'ArcCurve';\n\n\t}\n\n}\n\n/**\n * Centripetal CatmullRom Curve - which is useful for avoiding\n * cusps and self-intersections in non-uniform catmull rom curves.\n * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n *\n * curve.type accepts centripetal(default), chordal and catmullrom\n * curve.tension is used for catmullrom which defaults to 0.5\n */\n\n\n/*\nBased on an optimized c++ solution in\n - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n - http://ideone.com/NoEbVM\n\nThis CubicPoly class could be used for reusing some variables and calculations,\nbut for three.js curve use, it could be possible inlined and flatten into a single function call\nwhich can be placed in CurveUtils.\n*/\n\nfunction CubicPoly() {\n\n\tlet c0 = 0, c1 = 0, c2 = 0, c3 = 0;\n\n\t/*\n\t * Compute coefficients for a cubic polynomial\n\t * p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t * such that\n\t * p(0) = x0, p(1) = x1\n\t * and\n\t * p'(0) = t0, p'(1) = t1.\n\t */\n\tfunction init( x0, x1, t0, t1 ) {\n\n\t\tc0 = x0;\n\t\tc1 = t0;\n\t\tc2 = - 3 * x0 + 3 * x1 - 2 * t0 - t1;\n\t\tc3 = 2 * x0 - 2 * x1 + t0 + t1;\n\n\t}\n\n\treturn {\n\n\t\tinitCatmullRom: function ( x0, x1, x2, x3, tension ) {\n\n\t\t\tinit( x1, x2, tension * ( x2 - x0 ), tension * ( x3 - x1 ) );\n\n\t\t},\n\n\t\tinitNonuniformCatmullRom: function ( x0, x1, x2, x3, dt0, dt1, dt2 ) {\n\n\t\t\t// compute tangents when parameterized in [t1,t2]\n\t\t\tlet t1 = ( x1 - x0 ) / dt0 - ( x2 - x0 ) / ( dt0 + dt1 ) + ( x2 - x1 ) / dt1;\n\t\t\tlet t2 = ( x2 - x1 ) / dt1 - ( x3 - x1 ) / ( dt1 + dt2 ) + ( x3 - x2 ) / dt2;\n\n\t\t\t// rescale tangents for parametrization in [0,1]\n\t\t\tt1 *= dt1;\n\t\t\tt2 *= dt1;\n\n\t\t\tinit( x1, x2, t1, t2 );\n\n\t\t},\n\n\t\tcalc: function ( t ) {\n\n\t\t\tconst t2 = t * t;\n\t\t\tconst t3 = t2 * t;\n\t\t\treturn c0 + c1 * t + c2 * t2 + c3 * t3;\n\n\t\t}\n\n\t};\n\n}\n\n//\n\nconst tmp = /*@__PURE__*/ new Vector3();\nconst px = /*@__PURE__*/ new CubicPoly();\nconst py = /*@__PURE__*/ new CubicPoly();\nconst pz = /*@__PURE__*/ new CubicPoly();\n\nclass CatmullRomCurve3 extends Curve {\n\n\tconstructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) {\n\n\t\tsuper();\n\n\t\tthis.isCatmullRomCurve3 = true;\n\n\t\tthis.type = 'CatmullRomCurve3';\n\n\t\tthis.points = points;\n\t\tthis.closed = closed;\n\t\tthis.curveType = curveType;\n\t\tthis.tension = tension;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst l = points.length;\n\n\t\tconst p = ( l - ( this.closed ? 0 : 1 ) ) * t;\n\t\tlet intPoint = Math.floor( p );\n\t\tlet weight = p - intPoint;\n\n\t\tif ( this.closed ) {\n\n\t\t\tintPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l;\n\n\t\t} else if ( weight === 0 && intPoint === l - 1 ) {\n\n\t\t\tintPoint = l - 2;\n\t\t\tweight = 1;\n\n\t\t}\n\n\t\tlet p0, p3; // 4 points (p1 & p2 defined below)\n\n\t\tif ( this.closed || intPoint > 0 ) {\n\n\t\t\tp0 = points[ ( intPoint - 1 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate first point\n\t\t\ttmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] );\n\t\t\tp0 = tmp;\n\n\t\t}\n\n\t\tconst p1 = points[ intPoint % l ];\n\t\tconst p2 = points[ ( intPoint + 1 ) % l ];\n\n\t\tif ( this.closed || intPoint + 2 < l ) {\n\n\t\t\tp3 = points[ ( intPoint + 2 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate last point\n\t\t\ttmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] );\n\t\t\tp3 = tmp;\n\n\t\t}\n\n\t\tif ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) {\n\n\t\t\t// init Centripetal / Chordal Catmull-Rom\n\t\t\tconst pow = this.curveType === 'chordal' ? 0.5 : 0.25;\n\t\t\tlet dt0 = Math.pow( p0.distanceToSquared( p1 ), pow );\n\t\t\tlet dt1 = Math.pow( p1.distanceToSquared( p2 ), pow );\n\t\t\tlet dt2 = Math.pow( p2.distanceToSquared( p3 ), pow );\n\n\t\t\t// safety check for repeated points\n\t\t\tif ( dt1 < 1e-4 ) dt1 = 1.0;\n\t\t\tif ( dt0 < 1e-4 ) dt0 = dt1;\n\t\t\tif ( dt2 < 1e-4 ) dt2 = dt1;\n\n\t\t\tpx.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 );\n\t\t\tpy.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 );\n\t\t\tpz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 );\n\n\t\t} else if ( this.curveType === 'catmullrom' ) {\n\n\t\t\tpx.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension );\n\t\t\tpy.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension );\n\t\t\tpz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension );\n\n\t\t}\n\n\t\tpoint.set(\n\t\t\tpx.calc( weight ),\n\t\t\tpy.calc( weight ),\n\t\t\tpz.calc( weight )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\tthis.closed = source.closed;\n\t\tthis.curveType = source.curveType;\n\t\tthis.tension = source.tension;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\tdata.closed = this.closed;\n\t\tdata.curveType = this.curveType;\n\t\tdata.tension = this.tension;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector3().fromArray( point ) );\n\n\t\t}\n\n\t\tthis.closed = json.closed;\n\t\tthis.curveType = json.curveType;\n\t\tthis.tension = json.tension;\n\n\t\treturn this;\n\n\t}\n\n}\n\n/**\n * Bezier Curves formulas obtained from\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n */\n\nfunction CatmullRom( t, p0, p1, p2, p3 ) {\n\n\tconst v0 = ( p2 - p0 ) * 0.5;\n\tconst v1 = ( p3 - p1 ) * 0.5;\n\tconst t2 = t * t;\n\tconst t3 = t * t2;\n\treturn ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;\n\n}\n\n//\n\nfunction QuadraticBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * p;\n\n}\n\nfunction QuadraticBezierP1( t, p ) {\n\n\treturn 2 * ( 1 - t ) * t * p;\n\n}\n\nfunction QuadraticBezierP2( t, p ) {\n\n\treturn t * t * p;\n\n}\n\nfunction QuadraticBezier( t, p0, p1, p2 ) {\n\n\treturn QuadraticBezierP0( t, p0 ) + QuadraticBezierP1( t, p1 ) +\n\t\tQuadraticBezierP2( t, p2 );\n\n}\n\n//\n\nfunction CubicBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * k * p;\n\n}\n\nfunction CubicBezierP1( t, p ) {\n\n\tconst k = 1 - t;\n\treturn 3 * k * k * t * p;\n\n}\n\nfunction CubicBezierP2( t, p ) {\n\n\treturn 3 * ( 1 - t ) * t * t * p;\n\n}\n\nfunction CubicBezierP3( t, p ) {\n\n\treturn t * t * t * p;\n\n}\n\nfunction CubicBezier( t, p0, p1, p2, p3 ) {\n\n\treturn CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) +\n\t\tCubicBezierP3( t, p3 );\n\n}\n\nclass CubicBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.isCubicBezierCurve = true;\n\n\t\tthis.type = 'CubicBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass CubicBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.isCubicBezierCurve3 = true;\n\n\t\tthis.type = 'CubicBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y ),\n\t\t\tCubicBezier( t, v0.z, v1.z, v2.z, v3.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineCurve extends Curve {\n\n\tconstructor( v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.isLineCurve = true;\n\n\t\tthis.type = 'LineCurve';\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\n\tgetTangent( t, optionalTarget = new Vector2() ) {\n\n\t\treturn optionalTarget.subVectors( this.v2, this.v1 ).normalize();\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\treturn this.getTangent( u, optionalTarget );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineCurve3 extends Curve {\n\n\tconstructor( v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.isLineCurve3 = true;\n\n\t\tthis.type = 'LineCurve3';\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\n\tgetTangent( t, optionalTarget = new Vector3() ) {\n\n\t\treturn optionalTarget.subVectors( this.v2, this.v1 ).normalize();\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\treturn this.getTangent( u, optionalTarget );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass QuadraticBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.isQuadraticBezierCurve = true;\n\n\t\tthis.type = 'QuadraticBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass QuadraticBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.isQuadraticBezierCurve3 = true;\n\n\t\tthis.type = 'QuadraticBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y ),\n\t\t\tQuadraticBezier( t, v0.z, v1.z, v2.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass SplineCurve extends Curve {\n\n\tconstructor( points = [] ) {\n\n\t\tsuper();\n\n\t\tthis.isSplineCurve = true;\n\n\t\tthis.type = 'SplineCurve';\n\n\t\tthis.points = points;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst p = ( points.length - 1 ) * t;\n\n\t\tconst intPoint = Math.floor( p );\n\t\tconst weight = p - intPoint;\n\n\t\tconst p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ];\n\t\tconst p1 = points[ intPoint ];\n\t\tconst p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ];\n\t\tconst p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ];\n\n\t\tpoint.set(\n\t\t\tCatmullRom( weight, p0.x, p1.x, p2.x, p3.x ),\n\t\t\tCatmullRom( weight, p0.y, p1.y, p2.y, p3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector2().fromArray( point ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nvar Curves = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tArcCurve: ArcCurve,\n\tCatmullRomCurve3: CatmullRomCurve3,\n\tCubicBezierCurve: CubicBezierCurve,\n\tCubicBezierCurve3: CubicBezierCurve3,\n\tEllipseCurve: EllipseCurve,\n\tLineCurve: LineCurve,\n\tLineCurve3: LineCurve3,\n\tQuadraticBezierCurve: QuadraticBezierCurve,\n\tQuadraticBezierCurve3: QuadraticBezierCurve3,\n\tSplineCurve: SplineCurve\n});\n\n/**************************************************************\n *\tCurved Path - a curve path is simply a array of connected\n * curves, but retains the api of a curve\n **************************************************************/\n\nclass CurvePath extends Curve {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'CurvePath';\n\n\t\tthis.curves = [];\n\t\tthis.autoClose = false; // Automatically closes the path\n\n\t}\n\n\tadd( curve ) {\n\n\t\tthis.curves.push( curve );\n\n\t}\n\n\tclosePath() {\n\n\t\t// Add a line curve if start and end of lines are not connected\n\t\tconst startPoint = this.curves[ 0 ].getPoint( 0 );\n\t\tconst endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 );\n\n\t\tif ( ! startPoint.equals( endPoint ) ) {\n\n\t\t\tconst lineType = ( startPoint.isVector2 === true ) ? 'LineCurve' : 'LineCurve3';\n\t\t\tthis.curves.push( new Curves[ lineType ]( endPoint, startPoint ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// To get accurate point with reference to\n\t// entire path distance at time t,\n\t// following has to be done:\n\n\t// 1. Length of each sub path have to be known\n\t// 2. Locate and identify type of curve\n\t// 3. Get t for the curve\n\t// 4. Return curve.getPointAt(t')\n\n\tgetPoint( t, optionalTarget ) {\n\n\t\tconst d = t * this.getLength();\n\t\tconst curveLengths = this.getCurveLengths();\n\t\tlet i = 0;\n\n\t\t// To think about boundaries points.\n\n\t\twhile ( i < curveLengths.length ) {\n\n\t\t\tif ( curveLengths[ i ] >= d ) {\n\n\t\t\t\tconst diff = curveLengths[ i ] - d;\n\t\t\t\tconst curve = this.curves[ i ];\n\n\t\t\t\tconst segmentLength = curve.getLength();\n\t\t\t\tconst u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n\n\t\t\t\treturn curve.getPointAt( u, optionalTarget );\n\n\t\t\t}\n\n\t\t\ti ++;\n\n\t\t}\n\n\t\treturn null;\n\n\t\t// loop where sum != 0, sum > d , sum+1 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) {\n\n\t\t\tpoints.push( points[ 0 ] );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = source.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = source.curves[ i ];\n\n\t\t\tthis.curves.push( curve.clone() );\n\n\t\t}\n\n\t\tthis.autoClose = source.autoClose;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.autoClose = this.autoClose;\n\t\tdata.curves = [];\n\n\t\tfor ( let i = 0, l = this.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = this.curves[ i ];\n\t\t\tdata.curves.push( curve.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.autoClose = json.autoClose;\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = json.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = json.curves[ i ];\n\t\t\tthis.curves.push( new Curves[ curve.type ]().fromJSON( curve ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Path extends CurvePath {\n\n\tconstructor( points ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Path';\n\n\t\tthis.currentPoint = new Vector2();\n\n\t\tif ( points ) {\n\n\t\t\tthis.setFromPoints( points );\n\n\t\t}\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.moveTo( points[ 0 ].x, points[ 0 ].y );\n\n\t\tfor ( let i = 1, l = points.length; i < l; i ++ ) {\n\n\t\t\tthis.lineTo( points[ i ].x, points[ i ].y );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPoint.set( x, y ); // TODO consider referencing vectors instead of copying?\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tconst curve = new LineCurve( this.currentPoint.clone(), new Vector2( x, y ) );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tconst curve = new QuadraticBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCPx, aCPy ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tconst curve = new CubicBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCP1x, aCP1y ),\n\t\t\tnew Vector2( aCP2x, aCP2y ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts /*Array of Vector*/ ) {\n\n\t\tconst npts = [ this.currentPoint.clone() ].concat( pts );\n\n\t\tconst curve = new SplineCurve( npts );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.copy( pts[ pts.length - 1 ] );\n\n\t\treturn this;\n\n\t}\n\n\tarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absarc( aX + x0, aY + y0, aRadius,\n\t\t\taStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tabsarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tthis.absellipse( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absellipse( aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\treturn this;\n\n\t}\n\n\tabsellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst curve = new EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\tif ( this.curves.length > 0 ) {\n\n\t\t\t// if a previous curve is present, attempt to join\n\t\t\tconst firstPoint = curve.getPoint( 0 );\n\n\t\t\tif ( ! firstPoint.equals( this.currentPoint ) ) {\n\n\t\t\t\tthis.lineTo( firstPoint.x, firstPoint.y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.curves.push( curve );\n\n\t\tconst lastPoint = curve.getPoint( 1 );\n\t\tthis.currentPoint.copy( lastPoint );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.currentPoint.copy( source.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.currentPoint = this.currentPoint.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.currentPoint.fromArray( json.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LatheGeometry extends BufferGeometry {\n\n\tconstructor( points = [ new Vector2( 0, - 0.5 ), new Vector2( 0.5, 0 ), new Vector2( 0, 0.5 ) ], segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LatheGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpoints: points,\n\t\t\tsegments: segments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength\n\t\t};\n\n\t\tsegments = Math.floor( segments );\n\n\t\t// clamp phiLength so it's in range of [ 0, 2PI ]\n\n\t\tphiLength = clamp( phiLength, 0, Math.PI * 2 );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst uvs = [];\n\t\tconst initNormals = [];\n\t\tconst normals = [];\n\n\t\t// helper variables\n\n\t\tconst inverseSegments = 1.0 / segments;\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\t\tconst normal = new Vector3();\n\t\tconst curNormal = new Vector3();\n\t\tconst prevNormal = new Vector3();\n\t\tlet dx = 0;\n\t\tlet dy = 0;\n\n\t\t// pre-compute normals for initial \"meridian\"\n\n\t\tfor ( let j = 0; j <= ( points.length - 1 ); j ++ ) {\n\n\t\t\tswitch ( j ) {\n\n\t\t\t\tcase 0:\t\t\t\t// special handling for 1st vertex on path\n\n\t\t\t\t\tdx = points[ j + 1 ].x - points[ j ].x;\n\t\t\t\t\tdy = points[ j + 1 ].y - points[ j ].y;\n\n\t\t\t\t\tnormal.x = dy * 1.0;\n\t\t\t\t\tnormal.y = - dx;\n\t\t\t\t\tnormal.z = dy * 0.0;\n\n\t\t\t\t\tprevNormal.copy( normal );\n\n\t\t\t\t\tnormal.normalize();\n\n\t\t\t\t\tinitNormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ( points.length - 1 ):\t// special handling for last Vertex on path\n\n\t\t\t\t\tinitNormals.push( prevNormal.x, prevNormal.y, prevNormal.z );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\t\t\t// default handling for all vertices in between\n\n\t\t\t\t\tdx = points[ j + 1 ].x - points[ j ].x;\n\t\t\t\t\tdy = points[ j + 1 ].y - points[ j ].y;\n\n\t\t\t\t\tnormal.x = dy * 1.0;\n\t\t\t\t\tnormal.y = - dx;\n\t\t\t\t\tnormal.z = dy * 0.0;\n\n\t\t\t\t\tcurNormal.copy( normal );\n\n\t\t\t\t\tnormal.x += prevNormal.x;\n\t\t\t\t\tnormal.y += prevNormal.y;\n\t\t\t\t\tnormal.z += prevNormal.z;\n\n\t\t\t\t\tnormal.normalize();\n\n\t\t\t\t\tinitNormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\tprevNormal.copy( curNormal );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate vertices, uvs and normals\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst phi = phiStart + i * inverseSegments * phiLength;\n\n\t\t\tconst sin = Math.sin( phi );\n\t\t\tconst cos = Math.cos( phi );\n\n\t\t\tfor ( let j = 0; j <= ( points.length - 1 ); j ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = points[ j ].x * sin;\n\t\t\t\tvertex.y = points[ j ].y;\n\t\t\t\tvertex.z = points[ j ].x * cos;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = i / segments;\n\t\t\t\tuv.y = j / ( points.length - 1 );\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t// normal\n\n\t\t\t\tconst x = initNormals[ 3 * j + 0 ] * sin;\n\t\t\t\tconst y = initNormals[ 3 * j + 1 ];\n\t\t\t\tconst z = initNormals[ 3 * j + 0 ] * cos;\n\n\t\t\t\tnormals.push( x, y, z );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 0; i < segments; i ++ ) {\n\n\t\t\tfor ( let j = 0; j < ( points.length - 1 ); j ++ ) {\n\n\t\t\t\tconst base = j + i * points.length;\n\n\t\t\t\tconst a = base;\n\t\t\t\tconst b = base + points.length;\n\t\t\t\tconst c = base + points.length + 1;\n\t\t\t\tconst d = base + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( c, d, b );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength );\n\n\t}\n\n}\n\nclass CapsuleGeometry extends LatheGeometry {\n\n\tconstructor( radius = 1, length = 1, capSegments = 4, radialSegments = 8 ) {\n\n\t\tconst path = new Path();\n\t\tpath.absarc( 0, - length / 2, radius, Math.PI * 1.5, 0 );\n\t\tpath.absarc( 0, length / 2, radius, 0, Math.PI * 0.5 );\n\n\t\tsuper( path.getPoints( capSegments ), radialSegments );\n\n\t\tthis.type = 'CapsuleGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tlength: length,\n\t\t\tcapSegments: capSegments,\n\t\t\tradialSegments: radialSegments,\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CapsuleGeometry( data.radius, data.length, data.capSegments, data.radialSegments );\n\n\t}\n\n}\n\nclass CircleGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, segments = 32, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CircleGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tsegments: segments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tsegments = Math.max( 3, segments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// center point\n\n\t\tvertices.push( 0, 0, 0 );\n\t\tnormals.push( 0, 0, 1 );\n\t\tuvs.push( 0.5, 0.5 );\n\n\t\tfor ( let s = 0, i = 3; s <= segments; s ++, i += 3 ) {\n\n\t\t\tconst segment = thetaStart + s / segments * thetaLength;\n\n\t\t\t// vertex\n\n\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t// normal\n\n\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t// uvs\n\n\t\t\tuv.x = ( vertices[ i ] / radius + 1 ) / 2;\n\t\t\tuv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2;\n\n\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tindices.push( i, i + 1, 0 );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass CylinderGeometry extends BufferGeometry {\n\n\tconstructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CylinderGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradiusTop: radiusTop,\n\t\t\tradiusBottom: radiusBottom,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tconst scope = this;\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet index = 0;\n\t\tconst indexArray = [];\n\t\tconst halfHeight = height / 2;\n\t\tlet groupStart = 0;\n\n\t\t// generate geometry\n\n\t\tgenerateTorso();\n\n\t\tif ( openEnded === false ) {\n\n\t\t\tif ( radiusTop > 0 ) generateCap( true );\n\t\t\tif ( radiusBottom > 0 ) generateCap( false );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction generateTorso() {\n\n\t\t\tconst normal = new Vector3();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\t// this will be used to calculate the normal\n\t\t\tconst slope = ( radiusBottom - radiusTop ) / height;\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let y = 0; y <= heightSegments; y ++ ) {\n\n\t\t\t\tconst indexRow = [];\n\n\t\t\t\tconst v = y / heightSegments;\n\n\t\t\t\t// calculate the radius of the current row\n\n\t\t\t\tconst radius = v * ( radiusBottom - radiusTop ) + radiusTop;\n\n\t\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\t\tconst u = x / radialSegments;\n\n\t\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\t\tconst sinTheta = Math.sin( theta );\n\t\t\t\t\tconst cosTheta = Math.cos( theta );\n\n\t\t\t\t\t// vertex\n\n\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\tvertex.y = - v * height + halfHeight;\n\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t\t// normal\n\n\t\t\t\t\tnormal.set( sinTheta, slope, cosTheta ).normalize();\n\t\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\t// uv\n\n\t\t\t\t\tuvs.push( u, 1 - v );\n\n\t\t\t\t\t// save index of vertex in respective row\n\n\t\t\t\t\tindexRow.push( index ++ );\n\n\t\t\t\t}\n\n\t\t\t\t// now save vertices of the row in our index array\n\n\t\t\t\tindexArray.push( indexRow );\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tfor ( let y = 0; y < heightSegments; y ++ ) {\n\n\t\t\t\t\t// we use the index array to access the correct indices\n\n\t\t\t\t\tconst a = indexArray[ y ][ x ];\n\t\t\t\t\tconst b = indexArray[ y + 1 ][ x ];\n\t\t\t\t\tconst c = indexArray[ y + 1 ][ x + 1 ];\n\t\t\t\t\tconst d = indexArray[ y ][ x + 1 ];\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// update group counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, 0 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t\tfunction generateCap( top ) {\n\n\t\t\t// save the index of the first center vertex\n\t\t\tconst centerIndexStart = index;\n\n\t\t\tconst uv = new Vector2();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst radius = ( top === true ) ? radiusTop : radiusBottom;\n\t\t\tconst sign = ( top === true ) ? 1 : - 1;\n\n\t\t\t// first we generate the center vertex data of the cap.\n\t\t\t// because the geometry needs one set of uvs per face,\n\t\t\t// we must generate a center vertex per face/segment\n\n\t\t\tfor ( let x = 1; x <= radialSegments; x ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertices.push( 0, halfHeight * sign, 0 );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( 0.5, 0.5 );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// save the index of the last center vertex\n\t\t\tconst centerIndexEnd = index;\n\n\t\t\t// now we generate the surrounding vertices, normals and uvs\n\n\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\tconst u = x / radialSegments;\n\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\tconst cosTheta = Math.cos( theta );\n\t\t\t\tconst sinTheta = Math.sin( theta );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\tvertex.y = halfHeight * sign;\n\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( cosTheta * 0.5 ) + 0.5;\n\t\t\t\tuv.y = ( sinTheta * 0.5 * sign ) + 0.5;\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tconst c = centerIndexStart + x;\n\t\t\t\tconst i = centerIndexEnd + x;\n\n\t\t\t\tif ( top === true ) {\n\n\t\t\t\t\t// face top\n\n\t\t\t\t\tindices.push( i, i + 1, c );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// face bottom\n\n\t\t\t\t\tindices.push( i + 1, i, c );\n\n\t\t\t\t}\n\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, top === true ? 1 : 2 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ConeGeometry extends CylinderGeometry {\n\n\tconstructor( radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );\n\n\t\tthis.type = 'ConeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass PolyhedronGeometry extends BufferGeometry {\n\n\tconstructor( vertices = [], indices = [], radius = 1, detail = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PolyhedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tvertices: vertices,\n\t\t\tindices: indices,\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t\t// default buffer data\n\n\t\tconst vertexBuffer = [];\n\t\tconst uvBuffer = [];\n\n\t\t// the subdivision creates the vertex buffer data\n\n\t\tsubdivide( detail );\n\n\t\t// all vertices should lie on a conceptual sphere with a given radius\n\n\t\tapplyRadius( radius );\n\n\t\t// finally, create the uv data\n\n\t\tgenerateUVs();\n\n\t\t// build non-indexed geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) );\n\n\t\tif ( detail === 0 ) {\n\n\t\t\tthis.computeVertexNormals(); // flat normals\n\n\t\t} else {\n\n\t\t\tthis.normalizeNormals(); // smooth normals\n\n\t\t}\n\n\t\t// helper functions\n\n\t\tfunction subdivide( detail ) {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\t// iterate over all faces and apply a subdivision with the given detail value\n\n\t\t\tfor ( let i = 0; i < indices.length; i += 3 ) {\n\n\t\t\t\t// get the vertices of the face\n\n\t\t\t\tgetVertexByIndex( indices[ i + 0 ], a );\n\t\t\t\tgetVertexByIndex( indices[ i + 1 ], b );\n\t\t\t\tgetVertexByIndex( indices[ i + 2 ], c );\n\n\t\t\t\t// perform subdivision\n\n\t\t\t\tsubdivideFace( a, b, c, detail );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction subdivideFace( a, b, c, detail ) {\n\n\t\t\tconst cols = detail + 1;\n\n\t\t\t// we use this multidimensional array as a data structure for creating the subdivision\n\n\t\t\tconst v = [];\n\n\t\t\t// construct all of the vertices for this subdivision\n\n\t\t\tfor ( let i = 0; i <= cols; i ++ ) {\n\n\t\t\t\tv[ i ] = [];\n\n\t\t\t\tconst aj = a.clone().lerp( c, i / cols );\n\t\t\t\tconst bj = b.clone().lerp( c, i / cols );\n\n\t\t\t\tconst rows = cols - i;\n\n\t\t\t\tfor ( let j = 0; j <= rows; j ++ ) {\n\n\t\t\t\t\tif ( j === 0 && i === cols ) {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj.clone().lerp( bj, j / rows );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// construct all of the faces\n\n\t\t\tfor ( let i = 0; i < cols; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j < 2 * ( cols - i ) - 1; j ++ ) {\n\n\t\t\t\t\tconst k = Math.floor( j / 2 );\n\n\t\t\t\t\tif ( j % 2 === 0 ) {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\t\t\t\t\t\tpushVertex( v[ i ][ k ] );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction applyRadius( radius ) {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\t// iterate over the entire buffer and apply the radius to each vertex\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tvertex.normalize().multiplyScalar( radius );\n\n\t\t\t\tvertexBuffer[ i + 0 ] = vertex.x;\n\t\t\t\tvertexBuffer[ i + 1 ] = vertex.y;\n\t\t\t\tvertexBuffer[ i + 2 ] = vertex.z;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tconst u = azimuth( vertex ) / 2 / Math.PI + 0.5;\n\t\t\t\tconst v = inclination( vertex ) / Math.PI + 0.5;\n\t\t\t\tuvBuffer.push( u, 1 - v );\n\n\t\t\t}\n\n\t\t\tcorrectUVs();\n\n\t\t\tcorrectSeam();\n\n\t\t}\n\n\t\tfunction correctSeam() {\n\n\t\t\t// handle case when face straddles the seam, see #3269\n\n\t\t\tfor ( let i = 0; i < uvBuffer.length; i += 6 ) {\n\n\t\t\t\t// uv data of a single face\n\n\t\t\t\tconst x0 = uvBuffer[ i + 0 ];\n\t\t\t\tconst x1 = uvBuffer[ i + 2 ];\n\t\t\t\tconst x2 = uvBuffer[ i + 4 ];\n\n\t\t\t\tconst max = Math.max( x0, x1, x2 );\n\t\t\t\tconst min = Math.min( x0, x1, x2 );\n\n\t\t\t\t// 0.9 is somewhat arbitrary\n\n\t\t\t\tif ( max > 0.9 && min < 0.1 ) {\n\n\t\t\t\t\tif ( x0 < 0.2 ) uvBuffer[ i + 0 ] += 1;\n\t\t\t\t\tif ( x1 < 0.2 ) uvBuffer[ i + 2 ] += 1;\n\t\t\t\t\tif ( x2 < 0.2 ) uvBuffer[ i + 4 ] += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction pushVertex( vertex ) {\n\n\t\t\tvertexBuffer.push( vertex.x, vertex.y, vertex.z );\n\n\t\t}\n\n\t\tfunction getVertexByIndex( index, vertex ) {\n\n\t\t\tconst stride = index * 3;\n\n\t\t\tvertex.x = vertices[ stride + 0 ];\n\t\t\tvertex.y = vertices[ stride + 1 ];\n\t\t\tvertex.z = vertices[ stride + 2 ];\n\n\t\t}\n\n\t\tfunction correctUVs() {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\tconst centroid = new Vector3();\n\n\t\t\tconst uvA = new Vector2();\n\t\t\tconst uvB = new Vector2();\n\t\t\tconst uvC = new Vector2();\n\n\t\t\tfor ( let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6 ) {\n\n\t\t\t\ta.set( vertexBuffer[ i + 0 ], vertexBuffer[ i + 1 ], vertexBuffer[ i + 2 ] );\n\t\t\t\tb.set( vertexBuffer[ i + 3 ], vertexBuffer[ i + 4 ], vertexBuffer[ i + 5 ] );\n\t\t\t\tc.set( vertexBuffer[ i + 6 ], vertexBuffer[ i + 7 ], vertexBuffer[ i + 8 ] );\n\n\t\t\t\tuvA.set( uvBuffer[ j + 0 ], uvBuffer[ j + 1 ] );\n\t\t\t\tuvB.set( uvBuffer[ j + 2 ], uvBuffer[ j + 3 ] );\n\t\t\t\tuvC.set( uvBuffer[ j + 4 ], uvBuffer[ j + 5 ] );\n\n\t\t\t\tcentroid.copy( a ).add( b ).add( c ).divideScalar( 3 );\n\n\t\t\t\tconst azi = azimuth( centroid );\n\n\t\t\t\tcorrectUV( uvA, j + 0, a, azi );\n\t\t\t\tcorrectUV( uvB, j + 2, b, azi );\n\t\t\t\tcorrectUV( uvC, j + 4, c, azi );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction correctUV( uv, stride, vector, azimuth ) {\n\n\t\t\tif ( ( azimuth < 0 ) && ( uv.x === 1 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = uv.x - 1;\n\n\t\t\t}\n\n\t\t\tif ( ( vector.x === 0 ) && ( vector.z === 0 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = azimuth / 2 / Math.PI + 0.5;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Angle around the Y axis, counter-clockwise when looking from above.\n\n\t\tfunction azimuth( vector ) {\n\n\t\t\treturn Math.atan2( vector.z, - vector.x );\n\n\t\t}\n\n\n\t\t// Angle above the XZ plane.\n\n\t\tfunction inclination( vector ) {\n\n\t\t\treturn Math.atan2( - vector.y, Math.sqrt( ( vector.x * vector.x ) + ( vector.z * vector.z ) ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details );\n\n\t}\n\n}\n\nclass DodecahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\t\tconst r = 1 / t;\n\n\t\tconst vertices = [\n\n\t\t\t// (±1, ±1, ±1)\n\t\t\t- 1, - 1, - 1,\t- 1, - 1, 1,\n\t\t\t- 1, 1, - 1, - 1, 1, 1,\n\t\t\t1, - 1, - 1, 1, - 1, 1,\n\t\t\t1, 1, - 1, 1, 1, 1,\n\n\t\t\t// (0, ±1/φ, ±φ)\n\t\t\t0, - r, - t, 0, - r, t,\n\t\t\t0, r, - t, 0, r, t,\n\n\t\t\t// (±1/φ, ±φ, 0)\n\t\t\t- r, - t, 0, - r, t, 0,\n\t\t\tr, - t, 0, r, t, 0,\n\n\t\t\t// (±φ, 0, ±1/φ)\n\t\t\t- t, 0, - r, t, 0, - r,\n\t\t\t- t, 0, r, t, 0, r\n\t\t];\n\n\t\tconst indices = [\n\t\t\t3, 11, 7, \t3, 7, 15, \t3, 15, 13,\n\t\t\t7, 19, 17, \t7, 17, 6, \t7, 6, 15,\n\t\t\t17, 4, 8, \t17, 8, 10, \t17, 10, 6,\n\t\t\t8, 0, 16, \t8, 16, 2, \t8, 2, 10,\n\t\t\t0, 12, 1, \t0, 1, 18, \t0, 18, 16,\n\t\t\t6, 10, 2, \t6, 2, 13, \t6, 13, 15,\n\t\t\t2, 16, 18, \t2, 18, 3, \t2, 3, 13,\n\t\t\t18, 1, 9, \t18, 9, 11, \t18, 11, 3,\n\t\t\t4, 14, 12, \t4, 12, 0, \t4, 0, 8,\n\t\t\t11, 9, 5, \t11, 5, 19, \t11, 19, 7,\n\t\t\t19, 5, 14, \t19, 14, 4, \t19, 4, 17,\n\t\t\t1, 12, 14, \t1, 14, 5, \t1, 5, 9\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'DodecahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new DodecahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nconst _v0 = /*@__PURE__*/ new Vector3();\nconst _v1$1 = /*@__PURE__*/ new Vector3();\nconst _normal = /*@__PURE__*/ new Vector3();\nconst _triangle = /*@__PURE__*/ new Triangle();\n\nclass EdgesGeometry extends BufferGeometry {\n\n\tconstructor( geometry = null, thresholdAngle = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'EdgesGeometry';\n\n\t\tthis.parameters = {\n\t\t\tgeometry: geometry,\n\t\t\tthresholdAngle: thresholdAngle\n\t\t};\n\n\t\tif ( geometry !== null ) {\n\n\t\t\tconst precisionPoints = 4;\n\t\t\tconst precision = Math.pow( 10, precisionPoints );\n\t\t\tconst thresholdDot = Math.cos( DEG2RAD * thresholdAngle );\n\n\t\t\tconst indexAttr = geometry.getIndex();\n\t\t\tconst positionAttr = geometry.getAttribute( 'position' );\n\t\t\tconst indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n\n\t\t\tconst indexArr = [ 0, 0, 0 ];\n\t\t\tconst vertKeys = [ 'a', 'b', 'c' ];\n\t\t\tconst hashes = new Array( 3 );\n\n\t\t\tconst edgeData = {};\n\t\t\tconst vertices = [];\n\t\t\tfor ( let i = 0; i < indexCount; i += 3 ) {\n\n\t\t\t\tif ( indexAttr ) {\n\n\t\t\t\t\tindexArr[ 0 ] = indexAttr.getX( i );\n\t\t\t\t\tindexArr[ 1 ] = indexAttr.getX( i + 1 );\n\t\t\t\t\tindexArr[ 2 ] = indexAttr.getX( i + 2 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tindexArr[ 0 ] = i;\n\t\t\t\t\tindexArr[ 1 ] = i + 1;\n\t\t\t\t\tindexArr[ 2 ] = i + 2;\n\n\t\t\t\t}\n\n\t\t\t\tconst { a, b, c } = _triangle;\n\t\t\t\ta.fromBufferAttribute( positionAttr, indexArr[ 0 ] );\n\t\t\t\tb.fromBufferAttribute( positionAttr, indexArr[ 1 ] );\n\t\t\t\tc.fromBufferAttribute( positionAttr, indexArr[ 2 ] );\n\t\t\t\t_triangle.getNormal( _normal );\n\n\t\t\t\t// create hashes for the edge from the vertices\n\t\t\t\thashes[ 0 ] = `${ Math.round( a.x * precision ) },${ Math.round( a.y * precision ) },${ Math.round( a.z * precision ) }`;\n\t\t\t\thashes[ 1 ] = `${ Math.round( b.x * precision ) },${ Math.round( b.y * precision ) },${ Math.round( b.z * precision ) }`;\n\t\t\t\thashes[ 2 ] = `${ Math.round( c.x * precision ) },${ Math.round( c.y * precision ) },${ Math.round( c.z * precision ) }`;\n\n\t\t\t\t// skip degenerate triangles\n\t\t\t\tif ( hashes[ 0 ] === hashes[ 1 ] || hashes[ 1 ] === hashes[ 2 ] || hashes[ 2 ] === hashes[ 0 ] ) {\n\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\t// iterate over every edge\n\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t// get the first and next vertex making up the edge\n\t\t\t\t\tconst jNext = ( j + 1 ) % 3;\n\t\t\t\t\tconst vecHash0 = hashes[ j ];\n\t\t\t\t\tconst vecHash1 = hashes[ jNext ];\n\t\t\t\t\tconst v0 = _triangle[ vertKeys[ j ] ];\n\t\t\t\t\tconst v1 = _triangle[ vertKeys[ jNext ] ];\n\n\t\t\t\t\tconst hash = `${ vecHash0 }_${ vecHash1 }`;\n\t\t\t\t\tconst reverseHash = `${ vecHash1 }_${ vecHash0 }`;\n\n\t\t\t\t\tif ( reverseHash in edgeData && edgeData[ reverseHash ] ) {\n\n\t\t\t\t\t\t// if we found a sibling edge add it into the vertex array if\n\t\t\t\t\t\t// it meets the angle threshold and delete the edge from the map.\n\t\t\t\t\t\tif ( _normal.dot( edgeData[ reverseHash ].normal ) <= thresholdDot ) {\n\n\t\t\t\t\t\t\tvertices.push( v0.x, v0.y, v0.z );\n\t\t\t\t\t\t\tvertices.push( v1.x, v1.y, v1.z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tedgeData[ reverseHash ] = null;\n\n\t\t\t\t\t} else if ( ! ( hash in edgeData ) ) {\n\n\t\t\t\t\t\t// if we've already got an edge here then skip adding a new one\n\t\t\t\t\t\tedgeData[ hash ] = {\n\n\t\t\t\t\t\t\tindex0: indexArr[ j ],\n\t\t\t\t\t\t\tindex1: indexArr[ jNext ],\n\t\t\t\t\t\t\tnormal: _normal.clone(),\n\n\t\t\t\t\t\t};\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// iterate over all remaining, unmatched edges and add them to the vertex array\n\t\t\tfor ( const key in edgeData ) {\n\n\t\t\t\tif ( edgeData[ key ] ) {\n\n\t\t\t\t\tconst { index0, index1 } = edgeData[ key ];\n\t\t\t\t\t_v0.fromBufferAttribute( positionAttr, index0 );\n\t\t\t\t\t_v1$1.fromBufferAttribute( positionAttr, index1 );\n\n\t\t\t\t\tvertices.push( _v0.x, _v0.y, _v0.z );\n\t\t\t\t\tvertices.push( _v1$1.x, _v1$1.y, _v1$1.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Shape extends Path {\n\n\tconstructor( points ) {\n\n\t\tsuper( points );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.type = 'Shape';\n\n\t\tthis.holes = [];\n\n\t}\n\n\tgetPointsHoles( divisions ) {\n\n\t\tconst holesPts = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tholesPts[ i ] = this.holes[ i ].getPoints( divisions );\n\n\t\t}\n\n\t\treturn holesPts;\n\n\t}\n\n\t// get points of shape and holes (keypoints based on segments parameter)\n\n\textractPoints( divisions ) {\n\n\t\treturn {\n\n\t\t\tshape: this.getPoints( divisions ),\n\t\t\tholes: this.getPointsHoles( divisions )\n\n\t\t};\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = source.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = source.holes[ i ];\n\n\t\t\tthis.holes.push( hole.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.holes = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = this.holes[ i ];\n\t\t\tdata.holes.push( hole.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.uuid = json.uuid;\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = json.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = json.holes[ i ];\n\t\t\tthis.holes.push( new Path().fromJSON( hole ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\n/**\n * Port from https://github.com/mapbox/earcut (v2.2.4)\n */\n\nconst Earcut = {\n\n\ttriangulate: function ( data, holeIndices, dim = 2 ) {\n\n\t\tconst hasHoles = holeIndices && holeIndices.length;\n\t\tconst outerLen = hasHoles ? holeIndices[ 0 ] * dim : data.length;\n\t\tlet outerNode = linkedList( data, 0, outerLen, dim, true );\n\t\tconst triangles = [];\n\n\t\tif ( ! outerNode || outerNode.next === outerNode.prev ) return triangles;\n\n\t\tlet minX, minY, maxX, maxY, x, y, invSize;\n\n\t\tif ( hasHoles ) outerNode = eliminateHoles( data, holeIndices, outerNode, dim );\n\n\t\t// if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n\t\tif ( data.length > 80 * dim ) {\n\n\t\t\tminX = maxX = data[ 0 ];\n\t\t\tminY = maxY = data[ 1 ];\n\n\t\t\tfor ( let i = dim; i < outerLen; i += dim ) {\n\n\t\t\t\tx = data[ i ];\n\t\t\t\ty = data[ i + 1 ];\n\t\t\t\tif ( x < minX ) minX = x;\n\t\t\t\tif ( y < minY ) minY = y;\n\t\t\t\tif ( x > maxX ) maxX = x;\n\t\t\t\tif ( y > maxY ) maxY = y;\n\n\t\t\t}\n\n\t\t\t// minX, minY and invSize are later used to transform coords into integers for z-order calculation\n\t\t\tinvSize = Math.max( maxX - minX, maxY - minY );\n\t\t\tinvSize = invSize !== 0 ? 32767 / invSize : 0;\n\n\t\t}\n\n\t\tearcutLinked( outerNode, triangles, dim, minX, minY, invSize, 0 );\n\n\t\treturn triangles;\n\n\t}\n\n};\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList( data, start, end, dim, clockwise ) {\n\n\tlet i, last;\n\n\tif ( clockwise === ( signedArea( data, start, end, dim ) > 0 ) ) {\n\n\t\tfor ( i = start; i < end; i += dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t} else {\n\n\t\tfor ( i = end - dim; i >= start; i -= dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t}\n\n\tif ( last && equals( last, last.next ) ) {\n\n\t\tremoveNode( last );\n\t\tlast = last.next;\n\n\t}\n\n\treturn last;\n\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints( start, end ) {\n\n\tif ( ! start ) return start;\n\tif ( ! end ) end = start;\n\n\tlet p = start,\n\t\tagain;\n\tdo {\n\n\t\tagain = false;\n\n\t\tif ( ! p.steiner && ( equals( p, p.next ) || area( p.prev, p, p.next ) === 0 ) ) {\n\n\t\t\tremoveNode( p );\n\t\t\tp = end = p.prev;\n\t\t\tif ( p === p.next ) break;\n\t\t\tagain = true;\n\n\t\t} else {\n\n\t\t\tp = p.next;\n\n\t\t}\n\n\t} while ( again || p !== end );\n\n\treturn end;\n\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) {\n\n\tif ( ! ear ) return;\n\n\t// interlink polygon nodes in z-order\n\tif ( ! pass && invSize ) indexCurve( ear, minX, minY, invSize );\n\n\tlet stop = ear,\n\t\tprev, next;\n\n\t// iterate through ears, slicing them one by one\n\twhile ( ear.prev !== ear.next ) {\n\n\t\tprev = ear.prev;\n\t\tnext = ear.next;\n\n\t\tif ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) {\n\n\t\t\t// cut off the triangle\n\t\t\ttriangles.push( prev.i / dim | 0 );\n\t\t\ttriangles.push( ear.i / dim | 0 );\n\t\t\ttriangles.push( next.i / dim | 0 );\n\n\t\t\tremoveNode( ear );\n\n\t\t\t// skipping the next vertex leads to less sliver triangles\n\t\t\tear = next.next;\n\t\t\tstop = next.next;\n\n\t\t\tcontinue;\n\n\t\t}\n\n\t\tear = next;\n\n\t\t// if we looped through the whole remaining polygon and can't find any more ears\n\t\tif ( ear === stop ) {\n\n\t\t\t// try filtering points and slicing again\n\t\t\tif ( ! pass ) {\n\n\t\t\t\tearcutLinked( filterPoints( ear ), triangles, dim, minX, minY, invSize, 1 );\n\n\t\t\t\t// if this didn't work, try curing all small self-intersections locally\n\n\t\t\t} else if ( pass === 1 ) {\n\n\t\t\t\tear = cureLocalIntersections( filterPoints( ear ), triangles, dim );\n\t\t\t\tearcutLinked( ear, triangles, dim, minX, minY, invSize, 2 );\n\n\t\t\t\t// as a last resort, try splitting the remaining polygon into two\n\n\t\t\t} else if ( pass === 2 ) {\n\n\t\t\t\tsplitEarcut( ear, triangles, dim, minX, minY, invSize );\n\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar( ear ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\t// now make sure we don't have other points inside the potential ear\n\tconst ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n\t// triangle bbox; min & max are calculated like this for speed\n\tconst x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ),\n\t\ty0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ),\n\t\tx1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ),\n\t\ty1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy );\n\n\tlet p = c.next;\n\twhile ( p !== a ) {\n\n\t\tif ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.next;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction isEarHashed( ear, minX, minY, invSize ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\tconst ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;\n\n\t// triangle bbox; min & max are calculated like this for speed\n\tconst x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ),\n\t\ty0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ),\n\t\tx1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ),\n\t\ty1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy );\n\n\t// z-order range for the current triangle bbox;\n\tconst minZ = zOrder( x0, y0, minX, minY, invSize ),\n\t\tmaxZ = zOrder( x1, y1, minX, minY, invSize );\n\n\tlet p = ear.prevZ,\n\t\tn = ear.nextZ;\n\n\t// look for points inside the triangle in both directions\n\twhile ( p && p.z >= minZ && n && n.z <= maxZ ) {\n\n\t\tif ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t\tif ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\t// look for remaining points in decreasing z-order\n\twhile ( p && p.z >= minZ ) {\n\n\t\tif ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t}\n\n\t// look for remaining points in increasing z-order\n\twhile ( n && n.z <= maxZ ) {\n\n\t\tif ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&\n\t\t\tpointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\treturn true;\n\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections( start, triangles, dim ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tconst a = p.prev,\n\t\t\tb = p.next.next;\n\n\t\tif ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) {\n\n\t\t\ttriangles.push( a.i / dim | 0 );\n\t\t\ttriangles.push( p.i / dim | 0 );\n\t\t\ttriangles.push( b.i / dim | 0 );\n\n\t\t\t// remove two nodes involved\n\t\t\tremoveNode( p );\n\t\t\tremoveNode( p.next );\n\n\t\t\tp = start = b;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn filterPoints( p );\n\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut( start, triangles, dim, minX, minY, invSize ) {\n\n\t// look for a valid diagonal that divides the polygon into two\n\tlet a = start;\n\tdo {\n\n\t\tlet b = a.next.next;\n\t\twhile ( b !== a.prev ) {\n\n\t\t\tif ( a.i !== b.i && isValidDiagonal( a, b ) ) {\n\n\t\t\t\t// split the polygon in two by the diagonal\n\t\t\t\tlet c = splitPolygon( a, b );\n\n\t\t\t\t// filter colinear points around the cuts\n\t\t\t\ta = filterPoints( a, a.next );\n\t\t\t\tc = filterPoints( c, c.next );\n\n\t\t\t\t// run earcut on each half\n\t\t\t\tearcutLinked( a, triangles, dim, minX, minY, invSize, 0 );\n\t\t\t\tearcutLinked( c, triangles, dim, minX, minY, invSize, 0 );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tb = b.next;\n\n\t\t}\n\n\t\ta = a.next;\n\n\t} while ( a !== start );\n\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles( data, holeIndices, outerNode, dim ) {\n\n\tconst queue = [];\n\tlet i, len, start, end, list;\n\n\tfor ( i = 0, len = holeIndices.length; i < len; i ++ ) {\n\n\t\tstart = holeIndices[ i ] * dim;\n\t\tend = i < len - 1 ? holeIndices[ i + 1 ] * dim : data.length;\n\t\tlist = linkedList( data, start, end, dim, false );\n\t\tif ( list === list.next ) list.steiner = true;\n\t\tqueue.push( getLeftmost( list ) );\n\n\t}\n\n\tqueue.sort( compareX );\n\n\t// process holes from left to right\n\tfor ( i = 0; i < queue.length; i ++ ) {\n\n\t\touterNode = eliminateHole( queue[ i ], outerNode );\n\n\t}\n\n\treturn outerNode;\n\n}\n\nfunction compareX( a, b ) {\n\n\treturn a.x - b.x;\n\n}\n\n// find a bridge between vertices that connects hole with an outer ring and link it\nfunction eliminateHole( hole, outerNode ) {\n\n\tconst bridge = findHoleBridge( hole, outerNode );\n\tif ( ! bridge ) {\n\n\t\treturn outerNode;\n\n\t}\n\n\tconst bridgeReverse = splitPolygon( bridge, hole );\n\n\t// filter collinear points around the cuts\n\tfilterPoints( bridgeReverse, bridgeReverse.next );\n\treturn filterPoints( bridge, bridge.next );\n\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge( hole, outerNode ) {\n\n\tlet p = outerNode,\n\t\tqx = - Infinity,\n\t\tm;\n\n\tconst hx = hole.x, hy = hole.y;\n\n\t// find a segment intersected by a ray from the hole's leftmost point to the left;\n\t// segment's endpoint with lesser x will be potential connection point\n\tdo {\n\n\t\tif ( hy <= p.y && hy >= p.next.y && p.next.y !== p.y ) {\n\n\t\t\tconst x = p.x + ( hy - p.y ) * ( p.next.x - p.x ) / ( p.next.y - p.y );\n\t\t\tif ( x <= hx && x > qx ) {\n\n\t\t\t\tqx = x;\n\t\t\t\tm = p.x < p.next.x ? p : p.next;\n\t\t\t\tif ( x === hx ) return m; // hole touches outer segment; pick leftmost endpoint\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== outerNode );\n\n\tif ( ! m ) return null;\n\n\t// look for points inside the triangle of hole point, segment intersection and endpoint;\n\t// if there are no points found, we have a valid connection;\n\t// otherwise choose the point of the minimum angle with the ray as connection point\n\n\tconst stop = m,\n\t\tmx = m.x,\n\t\tmy = m.y;\n\tlet tanMin = Infinity, tan;\n\n\tp = m;\n\n\tdo {\n\n\t\tif ( hx >= p.x && p.x >= mx && hx !== p.x &&\n\t\t\t\tpointInTriangle( hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y ) ) {\n\n\t\t\ttan = Math.abs( hy - p.y ) / ( hx - p.x ); // tangential\n\n\t\t\tif ( locallyInside( p, hole ) && ( tan < tanMin || ( tan === tanMin && ( p.x > m.x || ( p.x === m.x && sectorContainsSector( m, p ) ) ) ) ) ) {\n\n\t\t\t\tm = p;\n\t\t\t\ttanMin = tan;\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== stop );\n\n\treturn m;\n\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector( m, p ) {\n\n\treturn area( m.prev, m, p.prev ) < 0 && area( p.next, m, m.next ) < 0;\n\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve( start, minX, minY, invSize ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tif ( p.z === 0 ) p.z = zOrder( p.x, p.y, minX, minY, invSize );\n\t\tp.prevZ = p.prev;\n\t\tp.nextZ = p.next;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\tp.prevZ.nextZ = null;\n\tp.prevZ = null;\n\n\tsortLinked( p );\n\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked( list ) {\n\n\tlet i, p, q, e, tail, numMerges, pSize, qSize,\n\t\tinSize = 1;\n\n\tdo {\n\n\t\tp = list;\n\t\tlist = null;\n\t\ttail = null;\n\t\tnumMerges = 0;\n\n\t\twhile ( p ) {\n\n\t\t\tnumMerges ++;\n\t\t\tq = p;\n\t\t\tpSize = 0;\n\t\t\tfor ( i = 0; i < inSize; i ++ ) {\n\n\t\t\t\tpSize ++;\n\t\t\t\tq = q.nextZ;\n\t\t\t\tif ( ! q ) break;\n\n\t\t\t}\n\n\t\t\tqSize = inSize;\n\n\t\t\twhile ( pSize > 0 || ( qSize > 0 && q ) ) {\n\n\t\t\t\tif ( pSize !== 0 && ( qSize === 0 || ! q || p.z <= q.z ) ) {\n\n\t\t\t\t\te = p;\n\t\t\t\t\tp = p.nextZ;\n\t\t\t\t\tpSize --;\n\n\t\t\t\t} else {\n\n\t\t\t\t\te = q;\n\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\tqSize --;\n\n\t\t\t\t}\n\n\t\t\t\tif ( tail ) tail.nextZ = e;\n\t\t\t\telse list = e;\n\n\t\t\t\te.prevZ = tail;\n\t\t\t\ttail = e;\n\n\t\t\t}\n\n\t\t\tp = q;\n\n\t\t}\n\n\t\ttail.nextZ = null;\n\t\tinSize *= 2;\n\n\t} while ( numMerges > 1 );\n\n\treturn list;\n\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder( x, y, minX, minY, invSize ) {\n\n\t// coords are transformed into non-negative 15-bit integer range\n\tx = ( x - minX ) * invSize | 0;\n\ty = ( y - minY ) * invSize | 0;\n\n\tx = ( x | ( x << 8 ) ) & 0x00FF00FF;\n\tx = ( x | ( x << 4 ) ) & 0x0F0F0F0F;\n\tx = ( x | ( x << 2 ) ) & 0x33333333;\n\tx = ( x | ( x << 1 ) ) & 0x55555555;\n\n\ty = ( y | ( y << 8 ) ) & 0x00FF00FF;\n\ty = ( y | ( y << 4 ) ) & 0x0F0F0F0F;\n\ty = ( y | ( y << 2 ) ) & 0x33333333;\n\ty = ( y | ( y << 1 ) ) & 0x55555555;\n\n\treturn x | ( y << 1 );\n\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost( start ) {\n\n\tlet p = start,\n\t\tleftmost = start;\n\tdo {\n\n\t\tif ( p.x < leftmost.x || ( p.x === leftmost.x && p.y < leftmost.y ) ) leftmost = p;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn leftmost;\n\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) >= ( ax - px ) * ( cy - py ) &&\n ( ax - px ) * ( by - py ) >= ( bx - px ) * ( ay - py ) &&\n ( bx - px ) * ( cy - py ) >= ( cx - px ) * ( by - py );\n\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n ( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n ( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}\n\n// signed area of a triangle\nfunction area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}\n\n// check if two points are equal\nfunction equals( p1, p2 ) {\n\n\treturn p1.x === p2.x && p1.y === p2.y;\n\n}\n\n// check if two segments intersect\nfunction intersects( p1, q1, p2, q2 ) {\n\n\tconst o1 = sign( area( p1, q1, p2 ) );\n\tconst o2 = sign( area( p1, q1, q2 ) );\n\tconst o3 = sign( area( p2, q2, p1 ) );\n\tconst o4 = sign( area( p2, q2, q1 ) );\n\n\tif ( o1 !== o2 && o3 !== o4 ) return true; // general case\n\n\tif ( o1 === 0 && onSegment( p1, p2, q1 ) ) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n\tif ( o2 === 0 && onSegment( p1, q2, q1 ) ) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n\tif ( o3 === 0 && onSegment( p2, p1, q2 ) ) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n\tif ( o4 === 0 && onSegment( p2, q1, q2 ) ) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n\treturn false;\n\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment( p, q, r ) {\n\n\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n}\n\nfunction sign( num ) {\n\n\treturn num > 0 ? 1 : num < 0 ? - 1 : 0;\n\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon( a, b ) {\n\n\tlet p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside( a, b ) {\n\n\tlet p = a,\n\t\tinside = false;\n\tconst px = ( a.x + b.x ) / 2,\n\t\tpy = ( a.y + b.y ) / 2;\n\tdo {\n\n\t\tif ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y &&\n\t\t\t( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) )\n\t\t\tinside = ! inside;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn inside;\n\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon( a, b ) {\n\n\tconst a2 = new Node( a.i, a.x, a.y ),\n\t\tb2 = new Node( b.i, b.x, b.y ),\n\t\tan = a.next,\n\t\tbp = b.prev;\n\n\ta.next = b;\n\tb.prev = a;\n\n\ta2.next = an;\n\tan.prev = a2;\n\n\tb2.next = a2;\n\ta2.prev = b2;\n\n\tbp.next = b2;\n\tb2.prev = bp;\n\n\treturn b2;\n\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode( i, x, y, last ) {\n\n\tconst p = new Node( i, x, y );\n\n\tif ( ! last ) {\n\n\t\tp.prev = p;\n\t\tp.next = p;\n\n\t} else {\n\n\t\tp.next = last.next;\n\t\tp.prev = last;\n\t\tlast.next.prev = p;\n\t\tlast.next = p;\n\n\t}\n\n\treturn p;\n\n}\n\nfunction removeNode( p ) {\n\n\tp.next.prev = p.prev;\n\tp.prev.next = p.next;\n\n\tif ( p.prevZ ) p.prevZ.nextZ = p.nextZ;\n\tif ( p.nextZ ) p.nextZ.prevZ = p.prevZ;\n\n}\n\nfunction Node( i, x, y ) {\n\n\t// vertex index in coordinates array\n\tthis.i = i;\n\n\t// vertex coordinates\n\tthis.x = x;\n\tthis.y = y;\n\n\t// previous and next vertex nodes in a polygon ring\n\tthis.prev = null;\n\tthis.next = null;\n\n\t// z-order curve value\n\tthis.z = 0;\n\n\t// previous and next nodes in z-order\n\tthis.prevZ = null;\n\tthis.nextZ = null;\n\n\t// indicates whether this is a steiner point\n\tthis.steiner = false;\n\n}\n\nfunction signedArea( data, start, end, dim ) {\n\n\tlet sum = 0;\n\tfor ( let i = start, j = end - dim; i < end; i += dim ) {\n\n\t\tsum += ( data[ j ] - data[ i ] ) * ( data[ i + 1 ] + data[ j + 1 ] );\n\t\tj = i;\n\n\t}\n\n\treturn sum;\n\n}\n\nclass ShapeUtils {\n\n\t// calculate area of the contour polygon\n\n\tstatic area( contour ) {\n\n\t\tconst n = contour.length;\n\t\tlet a = 0.0;\n\n\t\tfor ( let p = n - 1, q = 0; q < n; p = q ++ ) {\n\n\t\t\ta += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y;\n\n\t\t}\n\n\t\treturn a * 0.5;\n\n\t}\n\n\tstatic isClockWise( pts ) {\n\n\t\treturn ShapeUtils.area( pts ) < 0;\n\n\t}\n\n\tstatic triangulateShape( contour, holes ) {\n\n\t\tconst vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n\t\tconst holeIndices = []; // array of hole indices\n\t\tconst faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n\n\t\tremoveDupEndPts( contour );\n\t\taddContour( vertices, contour );\n\n\t\t//\n\n\t\tlet holeIndex = contour.length;\n\n\t\tholes.forEach( removeDupEndPts );\n\n\t\tfor ( let i = 0; i < holes.length; i ++ ) {\n\n\t\t\tholeIndices.push( holeIndex );\n\t\t\tholeIndex += holes[ i ].length;\n\t\t\taddContour( vertices, holes[ i ] );\n\n\t\t}\n\n\t\t//\n\n\t\tconst triangles = Earcut.triangulate( vertices, holeIndices );\n\n\t\t//\n\n\t\tfor ( let i = 0; i < triangles.length; i += 3 ) {\n\n\t\t\tfaces.push( triangles.slice( i, i + 3 ) );\n\n\t\t}\n\n\t\treturn faces;\n\n\t}\n\n}\n\nfunction removeDupEndPts( points ) {\n\n\tconst l = points.length;\n\n\tif ( l > 2 && points[ l - 1 ].equals( points[ 0 ] ) ) {\n\n\t\tpoints.pop();\n\n\t}\n\n}\n\nfunction addContour( vertices, contour ) {\n\n\tfor ( let i = 0; i < contour.length; i ++ ) {\n\n\t\tvertices.push( contour[ i ].x );\n\t\tvertices.push( contour[ i ].y );\n\n\t}\n\n}\n\n/**\n * Creates extruded geometry from a path shape.\n *\n * parameters = {\n *\n * curveSegments: , // number of points on the curves\n * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too\n * depth: , // Depth to extrude the shape\n *\n * bevelEnabled: , // turn on bevel\n * bevelThickness: , // how deep into the original shape bevel goes\n * bevelSize: , // how far from shape outline (including bevelOffset) is bevel\n * bevelOffset: , // how far from shape outline does bevel start\n * bevelSegments: , // number of bevel layers\n *\n * extrudePath: // curve to extrude shape along\n *\n * UVGenerator: // object that provides UV generator functions\n *\n * }\n */\n\n\nclass ExtrudeGeometry extends BufferGeometry {\n\n\tconstructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( - 0.5, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), options = {} ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ExtrudeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\toptions: options\n\t\t};\n\n\t\tshapes = Array.isArray( shapes ) ? shapes : [ shapes ];\n\n\t\tconst scope = this;\n\n\t\tconst verticesArray = [];\n\t\tconst uvArray = [];\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\t\t\taddShape( shape );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvArray, 2 ) );\n\n\t\tthis.computeVertexNormals();\n\n\t\t// functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst placeholder = [];\n\n\t\t\t// options\n\n\t\t\tconst curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n\t\t\tconst steps = options.steps !== undefined ? options.steps : 1;\n\t\t\tconst depth = options.depth !== undefined ? options.depth : 1;\n\n\t\t\tlet bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n\t\t\tlet bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 0.2;\n\t\t\tlet bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 0.1;\n\t\t\tlet bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n\t\t\tlet bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n\n\t\t\tconst extrudePath = options.extrudePath;\n\n\t\t\tconst uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator;\n\n\t\t\t//\n\n\t\t\tlet extrudePts, extrudeByPath = false;\n\t\t\tlet splineTube, binormal, normal, position2;\n\n\t\t\tif ( extrudePath ) {\n\n\t\t\t\textrudePts = extrudePath.getSpacedPoints( steps );\n\n\t\t\t\textrudeByPath = true;\n\t\t\t\tbevelEnabled = false; // bevels not supported for path extrusion\n\n\t\t\t\t// SETUP TNB variables\n\n\t\t\t\t// TODO1 - have a .isClosed in spline?\n\n\t\t\t\tsplineTube = extrudePath.computeFrenetFrames( steps, false );\n\n\t\t\t\t// console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n\n\t\t\t\tbinormal = new Vector3();\n\t\t\t\tnormal = new Vector3();\n\t\t\t\tposition2 = new Vector3();\n\n\t\t\t}\n\n\t\t\t// Safeguards if bevels are not enabled\n\n\t\t\tif ( ! bevelEnabled ) {\n\n\t\t\t\tbevelSegments = 0;\n\t\t\t\tbevelThickness = 0;\n\t\t\t\tbevelSize = 0;\n\t\t\t\tbevelOffset = 0;\n\n\t\t\t}\n\n\t\t\t// Variables initialization\n\n\t\t\tconst shapePoints = shape.extractPoints( curveSegments );\n\n\t\t\tlet vertices = shapePoints.shape;\n\t\t\tconst holes = shapePoints.holes;\n\n\t\t\tconst reverse = ! ShapeUtils.isClockWise( vertices );\n\n\t\t\tif ( reverse ) {\n\n\t\t\t\tvertices = vertices.reverse();\n\n\t\t\t\t// Maybe we should also check if holes are in the opposite direction, just to be safe ...\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\t\tif ( ShapeUtils.isClockWise( ahole ) ) {\n\n\t\t\t\t\t\tholes[ h ] = ahole.reverse();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( vertices, holes );\n\n\t\t\t/* Vertices */\n\n\t\t\tconst contour = vertices; // vertices has all points but contour has only points of circumference\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\tvertices = vertices.concat( ahole );\n\n\t\t\t}\n\n\n\t\t\tfunction scalePt2( pt, vec, size ) {\n\n\t\t\t\tif ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' );\n\n\t\t\t\treturn pt.clone().addScaledVector( vec, size );\n\n\t\t\t}\n\n\t\t\tconst vlen = vertices.length, flen = faces.length;\n\n\n\t\t\t// Find directions for point movement\n\n\n\t\t\tfunction getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t//\n\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\t\tlet v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\tconst v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\tconst v_next_x = inNext.x - inPt.x,\n\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\t\tconst v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t\t// check for collinear edges\n\t\t\t\tconst collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not collinear\n\n\t\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\t\tconst v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\t\tconst v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\t\tconst ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\t\tconst ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\t\tconst ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\t\tconst ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\t\tconst sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t// but prevent crazy spikes\n\t\t\t\t\tconst v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\t\tlet direction_eq = false; // assumes: opposite\n\n\t\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t\t}\n\n\n\t\t\tconst contourMovements = [];\n\n\t\t\tfor ( let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t// console.log('i,j,k', i, j , k)\n\n\t\t\t\tcontourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );\n\n\t\t\t}\n\n\t\t\tconst holesMovements = [];\n\t\t\tlet oneHoleMovements, verticesMovements = contourMovements.concat();\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\toneHoleMovements = [];\n\n\t\t\t\tfor ( let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t\toneHoleMovements[ i ] = getBevelVec( ahole[ i ], ahole[ j ], ahole[ k ] );\n\n\t\t\t\t}\n\n\t\t\t\tholesMovements.push( oneHoleMovements );\n\t\t\t\tverticesMovements = verticesMovements.concat( oneHoleMovements );\n\n\t\t\t}\n\n\n\t\t\t// Loop bevelSegments, 1 for the front, 1 for the back\n\n\t\t\tfor ( let b = 0; b < bevelSegments; b ++ ) {\n\n\t\t\t\t//for ( b = bevelSegments; b > 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\n\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst bs = bevelSize + bevelOffset;\n\n\t\t\t// Back facing vertices\n\n\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\tv( vert.x, vert.y, 0 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n\n\t\t\t\t\tnormal.copy( splineTube.normals[ 0 ] ).multiplyScalar( vert.x );\n\t\t\t\t\tbinormal.copy( splineTube.binormals[ 0 ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\tposition2.copy( extrudePts[ 0 ] ).add( normal ).add( binormal );\n\n\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Add stepped vertices...\n\t\t\t// Including front facing vertices\n\n\t\t\tfor ( let s = 1; s <= steps; s ++ ) {\n\n\t\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\tv( vert.x, vert.y, depth / steps * s );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n\n\t\t\t\t\t\tnormal.copy( splineTube.normals[ s ] ).multiplyScalar( vert.x );\n\t\t\t\t\t\tbinormal.copy( splineTube.binormals[ s ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\t\tposition2.copy( extrudePts[ s ] ).add( normal ).add( binormal );\n\n\t\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\t// Add bevel segments planes\n\n\t\t\t//for ( b = 1; b <= bevelSegments; b ++ ) {\n\t\t\tfor ( let b = bevelSegments - 1; b >= 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y + extrudePts[ steps - 1 ].y, extrudePts[ steps - 1 ].x + z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/* Faces */\n\n\t\t\t// Top and bottom faces\n\n\t\t\tbuildLidFaces();\n\n\t\t\t// Sides faces\n\n\t\t\tbuildSideFaces();\n\n\n\t\t\t///// Internal functions\n\n\t\t\tfunction buildLidFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\n\t\t\t\tif ( bevelEnabled ) {\n\n\t\t\t\t\tlet layer = 0; // steps + 1\n\t\t\t\t\tlet offset = vlen * layer;\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ] + offset, face[ 1 ] + offset, face[ 0 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlayer = steps + bevelSegments * 2;\n\t\t\t\t\toffset = vlen * layer;\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ], face[ 1 ], face[ 0 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 0 );\n\n\t\t\t}\n\n\t\t\t// Create faces for the z-sides of the shape\n\n\t\t\tfunction buildSideFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\t\t\t\tlet layeroffset = 0;\n\t\t\t\tsidewalls( contour, layeroffset );\n\t\t\t\tlayeroffset += contour.length;\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\tsidewalls( ahole, layeroffset );\n\n\t\t\t\t\t//, true\n\t\t\t\t\tlayeroffset += ahole.length;\n\n\t\t\t\t}\n\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 1 );\n\n\n\t\t\t}\n\n\t\t\tfunction sidewalls( contour, layeroffset ) {\n\n\t\t\t\tlet i = contour.length;\n\n\t\t\t\twhile ( -- i >= 0 ) {\n\n\t\t\t\t\tconst j = i;\n\t\t\t\t\tlet k = i - 1;\n\t\t\t\t\tif ( k < 0 ) k = contour.length - 1;\n\n\t\t\t\t\t//console.log('b', i,j, i-1, k,vertices.length);\n\n\t\t\t\t\tfor ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) {\n\n\t\t\t\t\t\tconst slen1 = vlen * s;\n\t\t\t\t\t\tconst slen2 = vlen * ( s + 1 );\n\n\t\t\t\t\t\tconst a = layeroffset + j + slen1,\n\t\t\t\t\t\t\tb = layeroffset + k + slen1,\n\t\t\t\t\t\t\tc = layeroffset + k + slen2,\n\t\t\t\t\t\t\td = layeroffset + j + slen2;\n\n\t\t\t\t\t\tf4( a, b, c, d );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfunction v( x, y, z ) {\n\n\t\t\t\tplaceholder.push( x );\n\t\t\t\tplaceholder.push( y );\n\t\t\t\tplaceholder.push( z );\n\n\t\t\t}\n\n\n\t\t\tfunction f3( a, b, c ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateTopUV( scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\n\t\t\t}\n\n\t\t\tfunction f4( a, b, c, d ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( d );\n\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\t\t\t\taddVertex( d );\n\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateSideWallUV( scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t}\n\n\t\t\tfunction addVertex( index ) {\n\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 0 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 1 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 2 ] );\n\n\t\t\t}\n\n\n\t\t\tfunction addUV( vector2 ) {\n\n\t\t\t\tuvArray.push( vector2.x );\n\t\t\t\tuvArray.push( vector2.y );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\t\tconst options = this.parameters.options;\n\n\t\treturn toJSON$1( shapes, options, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\tconst extrudePath = data.options.extrudePath;\n\n\t\tif ( extrudePath !== undefined ) {\n\n\t\t\tdata.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath );\n\n\t\t}\n\n\t\treturn new ExtrudeGeometry( geometryShapes, data.options );\n\n\t}\n\n}\n\nconst WorldUVGenerator = {\n\n\tgenerateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\n\t\treturn [\n\t\t\tnew Vector2( a_x, a_y ),\n\t\t\tnew Vector2( b_x, b_y ),\n\t\t\tnew Vector2( c_x, c_y )\n\t\t];\n\n\t},\n\n\tgenerateSideWallUV: function ( geometry, vertices, indexA, indexB, indexC, indexD ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst a_z = vertices[ indexA * 3 + 2 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst b_z = vertices[ indexB * 3 + 2 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\t\tconst c_z = vertices[ indexC * 3 + 2 ];\n\t\tconst d_x = vertices[ indexD * 3 ];\n\t\tconst d_y = vertices[ indexD * 3 + 1 ];\n\t\tconst d_z = vertices[ indexD * 3 + 2 ];\n\n\t\tif ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_x, 1 - a_z ),\n\t\t\t\tnew Vector2( b_x, 1 - b_z ),\n\t\t\t\tnew Vector2( c_x, 1 - c_z ),\n\t\t\t\tnew Vector2( d_x, 1 - d_z )\n\t\t\t];\n\n\t\t} else {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_y, 1 - a_z ),\n\t\t\t\tnew Vector2( b_y, 1 - b_z ),\n\t\t\t\tnew Vector2( c_y, 1 - c_z ),\n\t\t\t\tnew Vector2( d_y, 1 - d_z )\n\t\t\t];\n\n\t\t}\n\n\t}\n\n};\n\nfunction toJSON$1( shapes, options, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\tdata.options = Object.assign( {}, options );\n\n\tif ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON();\n\n\treturn data;\n\n}\n\nclass IcosahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\n\t\tconst vertices = [\n\t\t\t- 1, t, 0, \t1, t, 0, \t- 1, - t, 0, \t1, - t, 0,\n\t\t\t0, - 1, t, \t0, 1, t,\t0, - 1, - t, \t0, 1, - t,\n\t\t\tt, 0, - 1, \tt, 0, 1, \t- t, 0, - 1, \t- t, 0, 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 11, 5, \t0, 5, 1, \t0, 1, 7, \t0, 7, 10, \t0, 10, 11,\n\t\t\t1, 5, 9, \t5, 11, 4,\t11, 10, 2,\t10, 7, 6,\t7, 1, 8,\n\t\t\t3, 9, 4, \t3, 4, 2,\t3, 2, 6,\t3, 6, 8,\t3, 8, 9,\n\t\t\t4, 9, 5, \t2, 4, 11,\t6, 2, 10,\t8, 6, 7,\t9, 8, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'IcosahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new IcosahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass OctahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 0, 0, \t- 1, 0, 0,\t0, 1, 0,\n\t\t\t0, - 1, 0, \t0, 0, 1,\t0, 0, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 2, 4,\t0, 4, 3,\t0, 3, 5,\n\t\t\t0, 5, 2,\t1, 2, 5,\t1, 5, 3,\n\t\t\t1, 3, 4,\t1, 4, 2\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'OctahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new OctahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass RingGeometry extends BufferGeometry {\n\n\tconstructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'RingGeometry';\n\n\t\tthis.parameters = {\n\t\t\tinnerRadius: innerRadius,\n\t\t\touterRadius: outerRadius,\n\t\t\tthetaSegments: thetaSegments,\n\t\t\tphiSegments: phiSegments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tthetaSegments = Math.max( 3, thetaSegments );\n\t\tphiSegments = Math.max( 1, phiSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// some helper variables\n\n\t\tlet radius = innerRadius;\n\t\tconst radiusStep = ( ( outerRadius - innerRadius ) / phiSegments );\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= phiSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= thetaSegments; i ++ ) {\n\n\t\t\t\t// values are generate from the inside of the ring to the outside\n\n\t\t\t\tconst segment = thetaStart + i / thetaSegments * thetaLength;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( vertex.x / outerRadius + 1 ) / 2;\n\t\t\t\tuv.y = ( vertex.y / outerRadius + 1 ) / 2;\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t}\n\n\t\t\t// increase the radius for next row of vertices\n\n\t\t\tradius += radiusStep;\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let j = 0; j < phiSegments; j ++ ) {\n\n\t\t\tconst thetaSegmentLevel = j * ( thetaSegments + 1 );\n\n\t\t\tfor ( let i = 0; i < thetaSegments; i ++ ) {\n\n\t\t\t\tconst segment = i + thetaSegmentLevel;\n\n\t\t\t\tconst a = segment;\n\t\t\t\tconst b = segment + thetaSegments + 1;\n\t\t\t\tconst c = segment + thetaSegments + 2;\n\t\t\t\tconst d = segment + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ShapeGeometry extends BufferGeometry {\n\n\tconstructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), curveSegments = 12 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ShapeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\tcurveSegments: curveSegments\n\t\t};\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet groupStart = 0;\n\t\tlet groupCount = 0;\n\n\t\t// allow single and array values for \"shapes\" parameter\n\n\t\tif ( Array.isArray( shapes ) === false ) {\n\n\t\t\taddShape( shapes );\n\n\t\t} else {\n\n\t\t\tfor ( let i = 0; i < shapes.length; i ++ ) {\n\n\t\t\t\taddShape( shapes[ i ] );\n\n\t\t\t\tthis.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t\tgroupCount = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\n\t\t// helper functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst indexOffset = vertices.length / 3;\n\t\t\tconst points = shape.extractPoints( curveSegments );\n\n\t\t\tlet shapeVertices = points.shape;\n\t\t\tconst shapeHoles = points.holes;\n\n\t\t\t// check direction of vertices\n\n\t\t\tif ( ShapeUtils.isClockWise( shapeVertices ) === false ) {\n\n\t\t\t\tshapeVertices = shapeVertices.reverse();\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\n\t\t\t\tif ( ShapeUtils.isClockWise( shapeHole ) === true ) {\n\n\t\t\t\t\tshapeHoles[ i ] = shapeHole.reverse();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles );\n\n\t\t\t// join vertices of inner and outer paths to a single array\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\t\t\t\tshapeVertices = shapeVertices.concat( shapeHole );\n\n\t\t\t}\n\n\t\t\t// vertices, normals, uvs\n\n\t\t\tfor ( let i = 0, l = shapeVertices.length; i < l; i ++ ) {\n\n\t\t\t\tconst vertex = shapeVertices[ i ];\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, 0 );\n\t\t\t\tnormals.push( 0, 0, 1 );\n\t\t\t\tuvs.push( vertex.x, vertex.y ); // world uvs\n\n\t\t\t}\n\n\t\t\t// indices\n\n\t\t\tfor ( let i = 0, l = faces.length; i < l; i ++ ) {\n\n\t\t\t\tconst face = faces[ i ];\n\n\t\t\t\tconst a = face[ 0 ] + indexOffset;\n\t\t\t\tconst b = face[ 1 ] + indexOffset;\n\t\t\t\tconst c = face[ 2 ] + indexOffset;\n\n\t\t\t\tindices.push( a, b, c );\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\n\t\treturn toJSON( shapes, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\treturn new ShapeGeometry( geometryShapes, data.curveSegments );\n\n\t}\n\n}\n\nfunction toJSON( shapes, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\treturn data;\n\n}\n\nclass SphereGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'SphereGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\twidthSegments = Math.max( 3, Math.floor( widthSegments ) );\n\t\theightSegments = Math.max( 2, Math.floor( heightSegments ) );\n\n\t\tconst thetaEnd = Math.min( thetaStart + thetaLength, Math.PI );\n\n\t\tlet index = 0;\n\t\tconst grid = [];\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let iy = 0; iy <= heightSegments; iy ++ ) {\n\n\t\t\tconst verticesRow = [];\n\n\t\t\tconst v = iy / heightSegments;\n\n\t\t\t// special case for the poles\n\n\t\t\tlet uOffset = 0;\n\n\t\t\tif ( iy === 0 && thetaStart === 0 ) {\n\n\t\t\t\tuOffset = 0.5 / widthSegments;\n\n\t\t\t} else if ( iy === heightSegments && thetaEnd === Math.PI ) {\n\n\t\t\t\tuOffset = - 0.5 / widthSegments;\n\n\t\t\t}\n\n\t\t\tfor ( let ix = 0; ix <= widthSegments; ix ++ ) {\n\n\t\t\t\tconst u = ix / widthSegments;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\t\t\t\tvertex.y = radius * Math.cos( thetaStart + v * thetaLength );\n\t\t\t\tvertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.copy( vertex ).normalize();\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( u + uOffset, 1 - v );\n\n\t\t\t\tverticesRow.push( index ++ );\n\n\t\t\t}\n\n\t\t\tgrid.push( verticesRow );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let iy = 0; iy < heightSegments; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < widthSegments; ix ++ ) {\n\n\t\t\t\tconst a = grid[ iy ][ ix + 1 ];\n\t\t\t\tconst b = grid[ iy ][ ix ];\n\t\t\t\tconst c = grid[ iy + 1 ][ ix ];\n\t\t\t\tconst d = grid[ iy + 1 ][ ix + 1 ];\n\n\t\t\t\tif ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d );\n\t\t\t\tif ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass TetrahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 1, 1, \t- 1, - 1, 1, \t- 1, 1, - 1, \t1, - 1, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t2, 1, 0, \t0, 3, 2,\t1, 3, 0,\t2, 3, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'TetrahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TetrahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass TorusGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'TorusGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\tradialSegments: radialSegments,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tarc: arc\n\t\t};\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\ttubularSegments = Math.floor( tubularSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst center = new Vector3();\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tconst u = i / tubularSegments * arc;\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u );\n\t\t\t\tvertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u );\n\t\t\t\tvertex.z = tube * Math.sin( v );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tcenter.x = radius * Math.cos( u );\n\t\t\t\tcenter.y = radius * Math.sin( u );\n\t\t\t\tnormal.subVectors( vertex, center ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= tubularSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( tubularSegments + 1 ) * j + i - 1;\n\t\t\t\tconst b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1;\n\t\t\t\tconst c = ( tubularSegments + 1 ) * ( j - 1 ) + i;\n\t\t\t\tconst d = ( tubularSegments + 1 ) * j + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc );\n\n\t}\n\n}\n\nclass TorusKnotGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'TorusKnotGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradialSegments: radialSegments,\n\t\t\tp: p,\n\t\t\tq: q\n\t\t};\n\n\t\ttubularSegments = Math.floor( tubularSegments );\n\t\tradialSegments = Math.floor( radialSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\tconst P1 = new Vector3();\n\t\tconst P2 = new Vector3();\n\n\t\tconst B = new Vector3();\n\t\tconst T = new Vector3();\n\t\tconst N = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let i = 0; i <= tubularSegments; ++ i ) {\n\n\t\t\t// the radian \"u\" is used to calculate the position on the torus curve of the current tubular segment\n\n\t\t\tconst u = i / tubularSegments * p * Math.PI * 2;\n\n\t\t\t// now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n\t\t\t// these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n\n\t\t\tcalculatePositionOnCurve( u, p, q, radius, P1 );\n\t\t\tcalculatePositionOnCurve( u + 0.01, p, q, radius, P2 );\n\n\t\t\t// calculate orthonormal basis\n\n\t\t\tT.subVectors( P2, P1 );\n\t\t\tN.addVectors( P2, P1 );\n\t\t\tB.crossVectors( T, N );\n\t\t\tN.crossVectors( B, T );\n\n\t\t\t// normalize B, N. T can be ignored, we don't use it\n\n\t\t\tB.normalize();\n\t\t\tN.normalize();\n\n\t\t\tfor ( let j = 0; j <= radialSegments; ++ j ) {\n\n\t\t\t\t// now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n\t\t\t\t// because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\t\t\t\tconst cx = - tube * Math.cos( v );\n\t\t\t\tconst cy = tube * Math.sin( v );\n\n\t\t\t\t// now calculate the final vertex position.\n\t\t\t\t// first we orient the extrusion with our basis vectors, then we add it to the current position on the curve\n\n\t\t\t\tvertex.x = P1.x + ( cx * N.x + cy * B.x );\n\t\t\t\tvertex.y = P1.y + ( cx * N.y + cy * B.y );\n\t\t\t\tvertex.z = P1.z + ( cx * N.z + cy * B.z );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n\n\t\t\t\tnormal.subVectors( vertex, P1 ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// this function calculates the current position on the torus curve\n\n\t\tfunction calculatePositionOnCurve( u, p, q, radius, position ) {\n\n\t\t\tconst cu = Math.cos( u );\n\t\t\tconst su = Math.sin( u );\n\t\t\tconst quOverP = q / p * u;\n\t\t\tconst cs = Math.cos( quOverP );\n\n\t\t\tposition.x = radius * ( 2 + cs ) * 0.5 * cu;\n\t\t\tposition.y = radius * ( 2 + cs ) * su * 0.5;\n\t\t\tposition.z = radius * Math.sin( quOverP ) * 0.5;\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q );\n\n\t}\n\n}\n\nclass TubeGeometry extends BufferGeometry {\n\n\tconstructor( path = new QuadraticBezierCurve3( new Vector3( - 1, - 1, 0 ), new Vector3( - 1, 1, 0 ), new Vector3( 1, 1, 0 ) ), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'TubeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpath: path,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradius: radius,\n\t\t\tradialSegments: radialSegments,\n\t\t\tclosed: closed\n\t\t};\n\n\t\tconst frames = path.computeFrenetFrames( tubularSegments, closed );\n\n\t\t// expose internals\n\n\t\tthis.tangents = frames.tangents;\n\t\tthis.normals = frames.normals;\n\t\tthis.binormals = frames.binormals;\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\t\tconst uv = new Vector2();\n\t\tlet P = new Vector3();\n\n\t\t// buffer\n\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\t\tconst indices = [];\n\n\t\t// create buffer data\n\n\t\tgenerateBufferData();\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// functions\n\n\t\tfunction generateBufferData() {\n\n\t\t\tfor ( let i = 0; i < tubularSegments; i ++ ) {\n\n\t\t\t\tgenerateSegment( i );\n\n\t\t\t}\n\n\t\t\t// if the geometry is not closed, generate the last row of vertices and normals\n\t\t\t// at the regular position on the given path\n\t\t\t//\n\t\t\t// if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n\n\t\t\tgenerateSegment( ( closed === false ) ? tubularSegments : 0 );\n\n\t\t\t// uvs are generated in a separate function.\n\t\t\t// this makes it easy compute correct values for closed geometries\n\n\t\t\tgenerateUVs();\n\n\t\t\t// finally create faces\n\n\t\t\tgenerateIndices();\n\n\t\t}\n\n\t\tfunction generateSegment( i ) {\n\n\t\t\t// we use getPointAt to sample evenly distributed points from the given path\n\n\t\t\tP = path.getPointAt( i / tubularSegments, P );\n\n\t\t\t// retrieve corresponding normal and binormal\n\n\t\t\tconst N = frames.normals[ i ];\n\t\t\tconst B = frames.binormals[ i ];\n\n\t\t\t// generate normals and vertices for the current segment\n\n\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\tconst sin = Math.sin( v );\n\t\t\t\tconst cos = - Math.cos( v );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.x = ( cos * N.x + sin * B.x );\n\t\t\t\tnormal.y = ( cos * N.y + sin * B.y );\n\t\t\t\tnormal.z = ( cos * N.z + sin * B.z );\n\t\t\t\tnormal.normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = P.x + radius * normal.x;\n\t\t\t\tvertex.y = P.y + radius * normal.y;\n\t\t\t\tvertex.z = P.z + radius * normal.z;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateIndices() {\n\n\t\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\t\tuv.x = i / tubularSegments;\n\t\t\t\t\tuv.y = j / radialSegments;\n\n\t\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.path = this.parameters.path.toJSON();\n\n\t\treturn data;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\t// This only works for built-in curves (e.g. CatmullRomCurve3).\n\t\t// User defined curves or instances of CurvePath will not be deserialized.\n\t\treturn new TubeGeometry(\n\t\t\tnew Curves[ data.path.type ]().fromJSON( data.path ),\n\t\t\tdata.tubularSegments,\n\t\t\tdata.radius,\n\t\t\tdata.radialSegments,\n\t\t\tdata.closed\n\t\t);\n\n\t}\n\n}\n\nclass WireframeGeometry extends BufferGeometry {\n\n\tconstructor( geometry = null ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'WireframeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tgeometry: geometry\n\t\t};\n\n\t\tif ( geometry !== null ) {\n\n\t\t\t// buffer\n\n\t\t\tconst vertices = [];\n\t\t\tconst edges = new Set();\n\n\t\t\t// helper variables\n\n\t\t\tconst start = new Vector3();\n\t\t\tconst end = new Vector3();\n\n\t\t\tif ( geometry.index !== null ) {\n\n\t\t\t\t// indexed BufferGeometry\n\n\t\t\t\tconst position = geometry.attributes.position;\n\t\t\t\tconst indices = geometry.index;\n\t\t\t\tlet groups = geometry.groups;\n\n\t\t\t\tif ( groups.length === 0 ) {\n\n\t\t\t\t\tgroups = [ { start: 0, count: indices.count, materialIndex: 0 } ];\n\n\t\t\t\t}\n\n\t\t\t\t// create a data structure that contains all edges without duplicates\n\n\t\t\t\tfor ( let o = 0, ol = groups.length; o < ol; ++ o ) {\n\n\t\t\t\t\tconst group = groups[ o ];\n\n\t\t\t\t\tconst groupStart = group.start;\n\t\t\t\t\tconst groupCount = group.count;\n\n\t\t\t\t\tfor ( let i = groupStart, l = ( groupStart + groupCount ); i < l; i += 3 ) {\n\n\t\t\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\t\tconst index1 = indices.getX( i + j );\n\t\t\t\t\t\t\tconst index2 = indices.getX( i + ( j + 1 ) % 3 );\n\n\t\t\t\t\t\t\tstart.fromBufferAttribute( position, index1 );\n\t\t\t\t\t\t\tend.fromBufferAttribute( position, index2 );\n\n\t\t\t\t\t\t\tif ( isUniqueEdge( start, end, edges ) === true ) {\n\n\t\t\t\t\t\t\t\tvertices.push( start.x, start.y, start.z );\n\t\t\t\t\t\t\t\tvertices.push( end.x, end.y, end.z );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// non-indexed BufferGeometry\n\n\t\t\t\tconst position = geometry.attributes.position;\n\n\t\t\t\tfor ( let i = 0, l = ( position.count / 3 ); i < l; i ++ ) {\n\n\t\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\t// three edges per triangle, an edge is represented as (index1, index2)\n\t\t\t\t\t\t// e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n\n\t\t\t\t\t\tconst index1 = 3 * i + j;\n\t\t\t\t\t\tconst index2 = 3 * i + ( ( j + 1 ) % 3 );\n\n\t\t\t\t\t\tstart.fromBufferAttribute( position, index1 );\n\t\t\t\t\t\tend.fromBufferAttribute( position, index2 );\n\n\t\t\t\t\t\tif ( isUniqueEdge( start, end, edges ) === true ) {\n\n\t\t\t\t\t\t\tvertices.push( start.x, start.y, start.z );\n\t\t\t\t\t\t\tvertices.push( end.x, end.y, end.z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// build geometry\n\n\t\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.parameters = Object.assign( {}, source.parameters );\n\n\t\treturn this;\n\n\t}\n\n}\n\nfunction isUniqueEdge( start, end, edges ) {\n\n\tconst hash1 = `${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;\n\tconst hash2 = `${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`; // coincident edge\n\n\tif ( edges.has( hash1 ) === true || edges.has( hash2 ) === true ) {\n\n\t\treturn false;\n\n\t} else {\n\n\t\tedges.add( hash1 );\n\t\tedges.add( hash2 );\n\t\treturn true;\n\n\t}\n\n}\n\nvar Geometries = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tBoxGeometry: BoxGeometry,\n\tCapsuleGeometry: CapsuleGeometry,\n\tCircleGeometry: CircleGeometry,\n\tConeGeometry: ConeGeometry,\n\tCylinderGeometry: CylinderGeometry,\n\tDodecahedronGeometry: DodecahedronGeometry,\n\tEdgesGeometry: EdgesGeometry,\n\tExtrudeGeometry: ExtrudeGeometry,\n\tIcosahedronGeometry: IcosahedronGeometry,\n\tLatheGeometry: LatheGeometry,\n\tOctahedronGeometry: OctahedronGeometry,\n\tPlaneGeometry: PlaneGeometry,\n\tPolyhedronGeometry: PolyhedronGeometry,\n\tRingGeometry: RingGeometry,\n\tShapeGeometry: ShapeGeometry,\n\tSphereGeometry: SphereGeometry,\n\tTetrahedronGeometry: TetrahedronGeometry,\n\tTorusGeometry: TorusGeometry,\n\tTorusKnotGeometry: TorusKnotGeometry,\n\tTubeGeometry: TubeGeometry,\n\tWireframeGeometry: WireframeGeometry\n});\n\nclass ShadowMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isShadowMaterial = true;\n\n\t\tthis.type = 'ShadowMaterial';\n\n\t\tthis.color = new Color( 0x000000 );\n\t\tthis.transparent = true;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass RawShaderMaterial extends ShaderMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper( parameters );\n\n\t\tthis.isRawShaderMaterial = true;\n\n\t\tthis.type = 'RawShaderMaterial';\n\n\t}\n\n}\n\nclass MeshStandardMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshStandardMaterial = true;\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.type = 'MeshStandardMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.roughness = 1.0;\n\t\tthis.metalness = 0.0;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.roughnessMap = null;\n\n\t\tthis.metalnessMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.envMapIntensity = 1.0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.color.copy( source.color );\n\t\tthis.roughness = source.roughness;\n\t\tthis.metalness = source.metalness;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.roughnessMap = source.roughnessMap;\n\n\t\tthis.metalnessMap = source.metalnessMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.envMapIntensity = source.envMapIntensity;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshPhysicalMaterial extends MeshStandardMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshPhysicalMaterial = true;\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.type = 'MeshPhysicalMaterial';\n\n\t\tthis.anisotropyRotation = 0;\n\t\tthis.anisotropyMap = null;\n\n\t\tthis.clearcoatMap = null;\n\t\tthis.clearcoatRoughness = 0.0;\n\t\tthis.clearcoatRoughnessMap = null;\n\t\tthis.clearcoatNormalScale = new Vector2( 1, 1 );\n\t\tthis.clearcoatNormalMap = null;\n\n\t\tthis.ior = 1.5;\n\n\t\tObject.defineProperty( this, 'reflectivity', {\n\t\t\tget: function () {\n\n\t\t\t\treturn ( clamp( 2.5 * ( this.ior - 1 ) / ( this.ior + 1 ), 0, 1 ) );\n\n\t\t\t},\n\t\t\tset: function ( reflectivity ) {\n\n\t\t\t\tthis.ior = ( 1 + 0.4 * reflectivity ) / ( 1 - 0.4 * reflectivity );\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.iridescenceMap = null;\n\t\tthis.iridescenceIOR = 1.3;\n\t\tthis.iridescenceThicknessRange = [ 100, 400 ];\n\t\tthis.iridescenceThicknessMap = null;\n\n\t\tthis.sheenColor = new Color( 0x000000 );\n\t\tthis.sheenColorMap = null;\n\t\tthis.sheenRoughness = 1.0;\n\t\tthis.sheenRoughnessMap = null;\n\n\t\tthis.transmissionMap = null;\n\n\t\tthis.thickness = 0;\n\t\tthis.thicknessMap = null;\n\t\tthis.attenuationDistance = Infinity;\n\t\tthis.attenuationColor = new Color( 1, 1, 1 );\n\n\t\tthis.specularIntensity = 1.0;\n\t\tthis.specularIntensityMap = null;\n\t\tthis.specularColor = new Color( 1, 1, 1 );\n\t\tthis.specularColorMap = null;\n\n\t\tthis._anisotropy = 0;\n\t\tthis._clearcoat = 0;\n\t\tthis._iridescence = 0;\n\t\tthis._sheen = 0.0;\n\t\tthis._transmission = 0;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tget anisotropy() {\n\n\t\treturn this._anisotropy;\n\n\t}\n\n\tset anisotropy( value ) {\n\n\t\tif ( this._anisotropy > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._anisotropy = value;\n\n\t}\n\n\tget clearcoat() {\n\n\t\treturn this._clearcoat;\n\n\t}\n\n\tset clearcoat( value ) {\n\n\t\tif ( this._clearcoat > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._clearcoat = value;\n\n\t}\n\n\tget iridescence() {\n\n\t\treturn this._iridescence;\n\n\t}\n\n\tset iridescence( value ) {\n\n\t\tif ( this._iridescence > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._iridescence = value;\n\n\t}\n\n\tget sheen() {\n\n\t\treturn this._sheen;\n\n\t}\n\n\tset sheen( value ) {\n\n\t\tif ( this._sheen > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._sheen = value;\n\n\t}\n\n\tget transmission() {\n\n\t\treturn this._transmission;\n\n\t}\n\n\tset transmission( value ) {\n\n\t\tif ( this._transmission > 0 !== value > 0 ) {\n\n\t\t\tthis.version ++;\n\n\t\t}\n\n\t\tthis._transmission = value;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.anisotropy = source.anisotropy;\n\t\tthis.anisotropyRotation = source.anisotropyRotation;\n\t\tthis.anisotropyMap = source.anisotropyMap;\n\n\t\tthis.clearcoat = source.clearcoat;\n\t\tthis.clearcoatMap = source.clearcoatMap;\n\t\tthis.clearcoatRoughness = source.clearcoatRoughness;\n\t\tthis.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n\t\tthis.clearcoatNormalMap = source.clearcoatNormalMap;\n\t\tthis.clearcoatNormalScale.copy( source.clearcoatNormalScale );\n\n\t\tthis.ior = source.ior;\n\n\t\tthis.iridescence = source.iridescence;\n\t\tthis.iridescenceMap = source.iridescenceMap;\n\t\tthis.iridescenceIOR = source.iridescenceIOR;\n\t\tthis.iridescenceThicknessRange = [ ...source.iridescenceThicknessRange ];\n\t\tthis.iridescenceThicknessMap = source.iridescenceThicknessMap;\n\n\t\tthis.sheen = source.sheen;\n\t\tthis.sheenColor.copy( source.sheenColor );\n\t\tthis.sheenColorMap = source.sheenColorMap;\n\t\tthis.sheenRoughness = source.sheenRoughness;\n\t\tthis.sheenRoughnessMap = source.sheenRoughnessMap;\n\n\t\tthis.transmission = source.transmission;\n\t\tthis.transmissionMap = source.transmissionMap;\n\n\t\tthis.thickness = source.thickness;\n\t\tthis.thicknessMap = source.thicknessMap;\n\t\tthis.attenuationDistance = source.attenuationDistance;\n\t\tthis.attenuationColor.copy( source.attenuationColor );\n\n\t\tthis.specularIntensity = source.specularIntensity;\n\t\tthis.specularIntensityMap = source.specularIntensityMap;\n\t\tthis.specularColor.copy( source.specularColor );\n\t\tthis.specularColorMap = source.specularColorMap;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshPhongMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshPhongMaterial = true;\n\n\t\tthis.type = 'MeshPhongMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.specular = new Color( 0x111111 );\n\t\tthis.shininess = 30;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.specular.copy( source.specular );\n\t\tthis.shininess = source.shininess;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshToonMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshToonMaterial = true;\n\n\t\tthis.defines = { 'TOON': '' };\n\n\t\tthis.type = 'MeshToonMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\t\tthis.gradientMap = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\t\tthis.gradientMap = source.gradientMap;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshNormalMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshNormalMaterial = true;\n\n\t\tthis.type = 'MeshNormalMaterial';\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshLambertMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshLambertMaterial = true;\n\n\t\tthis.type = 'MeshLambertMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass MeshMatcapMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isMeshMatcapMaterial = true;\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.type = 'MeshMatcapMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.matcap = null;\n\n\t\tthis.map = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.fog = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.matcap = source.matcap;\n\n\t\tthis.map = source.map;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.fog = source.fog;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass LineDashedMaterial extends LineBasicMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.isLineDashedMaterial = true;\n\n\t\tthis.type = 'LineDashedMaterial';\n\n\t\tthis.scale = 1;\n\t\tthis.dashSize = 3;\n\t\tthis.gapSize = 1;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.scale = source.scale;\n\t\tthis.dashSize = source.dashSize;\n\t\tthis.gapSize = source.gapSize;\n\n\t\treturn this;\n\n\t}\n\n}\n\n// converts an array to a specific type\nfunction convertArray( array, type, forceClone ) {\n\n\tif ( ! array || // let 'undefined' and 'null' pass\n\t\t! forceClone && array.constructor === type ) return array;\n\n\tif ( typeof type.BYTES_PER_ELEMENT === 'number' ) {\n\n\t\treturn new type( array ); // create typed array\n\n\t}\n\n\treturn Array.prototype.slice.call( array ); // create Array\n\n}\n\nfunction isTypedArray( object ) {\n\n\treturn ArrayBuffer.isView( object ) &&\n\t\t! ( object instanceof DataView );\n\n}\n\n// returns an array by which times and values can be sorted\nfunction getKeyframeOrder( times ) {\n\n\tfunction compareTime( i, j ) {\n\n\t\treturn times[ i ] - times[ j ];\n\n\t}\n\n\tconst n = times.length;\n\tconst result = new Array( n );\n\tfor ( let i = 0; i !== n; ++ i ) result[ i ] = i;\n\n\tresult.sort( compareTime );\n\n\treturn result;\n\n}\n\n// uses the array previously returned by 'getKeyframeOrder' to sort data\nfunction sortedArray( values, stride, order ) {\n\n\tconst nValues = values.length;\n\tconst result = new values.constructor( nValues );\n\n\tfor ( let i = 0, dstOffset = 0; dstOffset !== nValues; ++ i ) {\n\n\t\tconst srcOffset = order[ i ] * stride;\n\n\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\tresult[ dstOffset ++ ] = values[ srcOffset + j ];\n\n\t\t}\n\n\t}\n\n\treturn result;\n\n}\n\n// function for parsing AOS keyframe formats\nfunction flattenJSON( jsonKeys, times, values, valuePropertyName ) {\n\n\tlet i = 1, key = jsonKeys[ 0 ];\n\n\twhile ( key !== undefined && key[ valuePropertyName ] === undefined ) {\n\n\t\tkey = jsonKeys[ i ++ ];\n\n\t}\n\n\tif ( key === undefined ) return; // no data\n\n\tlet value = key[ valuePropertyName ];\n\tif ( value === undefined ) return; // no data\n\n\tif ( Array.isArray( value ) ) {\n\n\t\tdo {\n\n\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\tif ( value !== undefined ) {\n\n\t\t\t\ttimes.push( key.time );\n\t\t\t\tvalues.push.apply( values, value ); // push all elements\n\n\t\t\t}\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t} while ( key !== undefined );\n\n\t} else if ( value.toArray !== undefined ) {\n\n\t\t// ...assume THREE.Math-ish\n\n\t\tdo {\n\n\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\tif ( value !== undefined ) {\n\n\t\t\t\ttimes.push( key.time );\n\t\t\t\tvalue.toArray( values, values.length );\n\n\t\t\t}\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t} while ( key !== undefined );\n\n\t} else {\n\n\t\t// otherwise push as-is\n\n\t\tdo {\n\n\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\tif ( value !== undefined ) {\n\n\t\t\t\ttimes.push( key.time );\n\t\t\t\tvalues.push( value );\n\n\t\t\t}\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t} while ( key !== undefined );\n\n\t}\n\n}\n\nfunction subclip( sourceClip, name, startFrame, endFrame, fps = 30 ) {\n\n\tconst clip = sourceClip.clone();\n\n\tclip.name = name;\n\n\tconst tracks = [];\n\n\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\tconst track = clip.tracks[ i ];\n\t\tconst valueSize = track.getValueSize();\n\n\t\tconst times = [];\n\t\tconst values = [];\n\n\t\tfor ( let j = 0; j < track.times.length; ++ j ) {\n\n\t\t\tconst frame = track.times[ j ] * fps;\n\n\t\t\tif ( frame < startFrame || frame >= endFrame ) continue;\n\n\t\t\ttimes.push( track.times[ j ] );\n\n\t\t\tfor ( let k = 0; k < valueSize; ++ k ) {\n\n\t\t\t\tvalues.push( track.values[ j * valueSize + k ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( times.length === 0 ) continue;\n\n\t\ttrack.times = convertArray( times, track.times.constructor );\n\t\ttrack.values = convertArray( values, track.values.constructor );\n\n\t\ttracks.push( track );\n\n\t}\n\n\tclip.tracks = tracks;\n\n\t// find minimum .times value across all tracks in the trimmed clip\n\n\tlet minStartTime = Infinity;\n\n\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\tif ( minStartTime > clip.tracks[ i ].times[ 0 ] ) {\n\n\t\t\tminStartTime = clip.tracks[ i ].times[ 0 ];\n\n\t\t}\n\n\t}\n\n\t// shift all tracks such that clip begins at t=0\n\n\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\tclip.tracks[ i ].shift( - 1 * minStartTime );\n\n\t}\n\n\tclip.resetDuration();\n\n\treturn clip;\n\n}\n\nfunction makeClipAdditive( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) {\n\n\tif ( fps <= 0 ) fps = 30;\n\n\tconst numTracks = referenceClip.tracks.length;\n\tconst referenceTime = referenceFrame / fps;\n\n\t// Make each track's values relative to the values at the reference frame\n\tfor ( let i = 0; i < numTracks; ++ i ) {\n\n\t\tconst referenceTrack = referenceClip.tracks[ i ];\n\t\tconst referenceTrackType = referenceTrack.ValueTypeName;\n\n\t\t// Skip this track if it's non-numeric\n\t\tif ( referenceTrackType === 'bool' || referenceTrackType === 'string' ) continue;\n\n\t\t// Find the track in the target clip whose name and type matches the reference track\n\t\tconst targetTrack = targetClip.tracks.find( function ( track ) {\n\n\t\t\treturn track.name === referenceTrack.name\n\t\t\t\t&& track.ValueTypeName === referenceTrackType;\n\n\t\t} );\n\n\t\tif ( targetTrack === undefined ) continue;\n\n\t\tlet referenceOffset = 0;\n\t\tconst referenceValueSize = referenceTrack.getValueSize();\n\n\t\tif ( referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\treferenceOffset = referenceValueSize / 3;\n\n\t\t}\n\n\t\tlet targetOffset = 0;\n\t\tconst targetValueSize = targetTrack.getValueSize();\n\n\t\tif ( targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\ttargetOffset = targetValueSize / 3;\n\n\t\t}\n\n\t\tconst lastIndex = referenceTrack.times.length - 1;\n\t\tlet referenceValue;\n\n\t\t// Find the value to subtract out of the track\n\t\tif ( referenceTime <= referenceTrack.times[ 0 ] ) {\n\n\t\t\t// Reference frame is earlier than the first keyframe, so just use the first keyframe\n\t\t\tconst startIndex = referenceOffset;\n\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\treferenceValue = referenceTrack.values.slice( startIndex, endIndex );\n\n\t\t} else if ( referenceTime >= referenceTrack.times[ lastIndex ] ) {\n\n\t\t\t// Reference frame is after the last keyframe, so just use the last keyframe\n\t\t\tconst startIndex = lastIndex * referenceValueSize + referenceOffset;\n\t\t\tconst endIndex = startIndex + referenceValueSize - referenceOffset;\n\t\t\treferenceValue = referenceTrack.values.slice( startIndex, endIndex );\n\n\t\t} else {\n\n\t\t\t// Interpolate to the reference value\n\t\t\tconst interpolant = referenceTrack.createInterpolant();\n\t\t\tconst startIndex = referenceOffset;\n\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\tinterpolant.evaluate( referenceTime );\n\t\t\treferenceValue = interpolant.resultBuffer.slice( startIndex, endIndex );\n\n\t\t}\n\n\t\t// Conjugate the quaternion\n\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\tconst referenceQuat = new Quaternion().fromArray( referenceValue ).normalize().conjugate();\n\t\t\treferenceQuat.toArray( referenceValue );\n\n\t\t}\n\n\t\t// Subtract the reference value from all of the track values\n\n\t\tconst numTimes = targetTrack.times.length;\n\t\tfor ( let j = 0; j < numTimes; ++ j ) {\n\n\t\t\tconst valueStart = j * targetValueSize + targetOffset;\n\n\t\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\t\t// Multiply the conjugate for quaternion track types\n\t\t\t\tQuaternion.multiplyQuaternionsFlat(\n\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\tvalueStart,\n\t\t\t\t\treferenceValue,\n\t\t\t\t\t0,\n\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\tvalueStart\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\tconst valueEnd = targetValueSize - targetOffset * 2;\n\n\t\t\t\t// Subtract each value for all other numeric track types\n\t\t\t\tfor ( let k = 0; k < valueEnd; ++ k ) {\n\n\t\t\t\t\ttargetTrack.values[ valueStart + k ] -= referenceValue[ k ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttargetClip.blendMode = AdditiveAnimationBlendMode;\n\n\treturn targetClip;\n\n}\n\nconst AnimationUtils = {\n\tconvertArray: convertArray,\n\tisTypedArray: isTypedArray,\n\tgetKeyframeOrder: getKeyframeOrder,\n\tsortedArray: sortedArray,\n\tflattenJSON: flattenJSON,\n\tsubclip: subclip,\n\tmakeClipAdditive: makeClipAdditive\n};\n\n/**\n * Abstract base class of interpolants over parametric samples.\n *\n * The parameter domain is one dimensional, typically the time or a path\n * along a curve defined by the data.\n *\n * The sample values can have any dimensionality and derived classes may\n * apply special interpretations to the data.\n *\n * This class provides the interval seek in a Template Method, deferring\n * the actual interpolation to derived classes.\n *\n * Time complexity is O(1) for linear access crossing at most two points\n * and O(log N) for random access, where N is the number of positions.\n *\n * References:\n *\n * \t\thttp://www.oodesign.com/template-method-pattern.html\n *\n */\n\nclass Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tthis.parameterPositions = parameterPositions;\n\t\tthis._cachedIndex = 0;\n\n\t\tthis.resultBuffer = resultBuffer !== undefined ?\n\t\t\tresultBuffer : new sampleValues.constructor( sampleSize );\n\t\tthis.sampleValues = sampleValues;\n\t\tthis.valueSize = sampleSize;\n\n\t\tthis.settings = null;\n\t\tthis.DefaultSettings_ = {};\n\n\t}\n\n\tevaluate( t ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet i1 = this._cachedIndex,\n\t\t\tt1 = pp[ i1 ],\n\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\tvalidate_interval: {\n\n\t\t\tseek: {\n\n\t\t\t\tlet right;\n\n\t\t\t\tlinear_scan: {\n\n\t\t\t\t\t//- See http://jsperf.com/comparison-to-undefined/3\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\n\t\t\t\t\t//- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n\t\t\t\t\tforward_scan: if ( ! ( t < t1 ) ) {\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 + 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\t\t\t\tif ( t < t0 ) break forward_scan;\n\n\t\t\t\t\t\t\t\t// after end\n\n\t\t\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\t\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt0 = t1;\n\t\t\t\t\t\t\tt1 = pp[ ++ i1 ];\n\n\t\t\t\t\t\t\tif ( t < t1 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the right side of the index\n\t\t\t\t\t\tright = pp.length;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n\t\t\t\t\tif ( ! ( t >= t0 ) ) {\n\n\t\t\t\t\t\t// looping?\n\n\t\t\t\t\t\tconst t1global = pp[ 1 ];\n\n\t\t\t\t\t\tif ( t < t1global ) {\n\n\t\t\t\t\t\t\ti1 = 2; // + 1, using the scan for the details\n\t\t\t\t\t\t\tt0 = t1global;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// linear reverse scan\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 - 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\t\t\t\t// before start\n\n\t\t\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\t\t\treturn this.copySampleValue_( 0 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt1 = t0;\n\t\t\t\t\t\t\tt0 = pp[ -- i1 - 1 ];\n\n\t\t\t\t\t\t\tif ( t >= t0 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the left side of the index\n\t\t\t\t\t\tright = i1;\n\t\t\t\t\t\ti1 = 0;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// the interval is valid\n\n\t\t\t\t\tbreak validate_interval;\n\n\t\t\t\t} // linear scan\n\n\t\t\t\t// binary search\n\n\t\t\t\twhile ( i1 < right ) {\n\n\t\t\t\t\tconst mid = ( i1 + right ) >>> 1;\n\n\t\t\t\t\tif ( t < pp[ mid ] ) {\n\n\t\t\t\t\t\tright = mid;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ti1 = mid + 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tt1 = pp[ i1 ];\n\t\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\t\t\t// check boundary cases, again\n\n\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\treturn this.copySampleValue_( 0 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t\t\t\t}\n\n\t\t\t} // seek\n\n\t\t\tthis._cachedIndex = i1;\n\n\t\t\tthis.intervalChanged_( i1, t0, t1 );\n\n\t\t} // validate_interval\n\n\t\treturn this.interpolate_( i1, t0, t, t1 );\n\n\t}\n\n\tgetSettings_() {\n\n\t\treturn this.settings || this.DefaultSettings_;\n\n\t}\n\n\tcopySampleValue_( index ) {\n\n\t\t// copies a sample value to the result buffer\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = index * stride;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] = values[ offset + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\t// Template methods for derived classes:\n\n\tinterpolate_( /* i1, t0, t, t1 */ ) {\n\n\t\tthrow new Error( 'call to abstract method' );\n\t\t// implementations shall return this.resultBuffer\n\n\t}\n\n\tintervalChanged_( /* i1, t0, t1 */ ) {\n\n\t\t// empty\n\n\t}\n\n}\n\n/**\n * Fast and simple cubic spline interpolant.\n *\n * It was derived from a Hermitian construction setting the first derivative\n * at each sample position to the linear slope between neighboring positions\n * over their parameter interval.\n */\n\nclass CubicInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t\tthis._weightPrev = - 0;\n\t\tthis._offsetPrev = - 0;\n\t\tthis._weightNext = - 0;\n\t\tthis._offsetNext = - 0;\n\n\t\tthis.DefaultSettings_ = {\n\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\n\t\t};\n\n\t}\n\n\tintervalChanged_( i1, t0, t1 ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet iPrev = i1 - 2,\n\t\t\tiNext = i1 + 1,\n\n\t\t\ttPrev = pp[ iPrev ],\n\t\t\ttNext = pp[ iNext ];\n\n\t\tif ( tPrev === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingStart ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(t0) = 0\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = 2 * t0 - t1;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiPrev = pp.length - 2;\n\t\t\t\t\ttPrev = t0 + pp[ iPrev ] - pp[ iPrev + 1 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(t0) = 0 a.k.a. Natural Spline\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = t1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tNext === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingEnd ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(tN) = 0\n\t\t\t\t\tiNext = i1;\n\t\t\t\t\ttNext = 2 * t1 - t0;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiNext = 1;\n\t\t\t\t\ttNext = t1 + pp[ 1 ] - pp[ 0 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(tN) = 0, a.k.a. Natural Spline\n\t\t\t\t\tiNext = i1 - 1;\n\t\t\t\t\ttNext = t0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst halfDt = ( t1 - t0 ) * 0.5,\n\t\t\tstride = this.valueSize;\n\n\t\tthis._weightPrev = halfDt / ( t0 - tPrev );\n\t\tthis._weightNext = halfDt / ( tNext - t1 );\n\t\tthis._offsetPrev = iPrev * stride;\n\t\tthis._offsetNext = iNext * stride;\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\to1 = i1 * stride,\t\to0 = o1 - stride,\n\t\t\toP = this._offsetPrev, \toN = this._offsetNext,\n\t\t\twP = this._weightPrev,\twN = this._weightNext,\n\n\t\t\tp = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tpp = p * p,\n\t\t\tppp = pp * p;\n\n\t\t// evaluate polynomials\n\n\t\tconst sP = - wP * ppp + 2 * wP * pp - wP * p;\n\t\tconst s0 = ( 1 + wP ) * ppp + ( - 1.5 - 2 * wP ) * pp + ( - 0.5 + wP ) * p + 1;\n\t\tconst s1 = ( - 1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p;\n\t\tconst sN = wN * ppp - wN * pp;\n\n\t\t// combine data linearly\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tsP * values[ oP + i ] +\n\t\t\t\t\ts0 * values[ o0 + i ] +\n\t\t\t\t\ts1 * values[ o1 + i ] +\n\t\t\t\t\tsN * values[ oN + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\nclass LinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\toffset1 = i1 * stride,\n\t\t\toffset0 = offset1 - stride,\n\n\t\t\tweight1 = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tweight0 = 1 - weight1;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tvalues[ offset0 + i ] * weight0 +\n\t\t\t\t\tvalues[ offset1 + i ] * weight1;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n *\n * Interpolant that evaluates to the sample value at the position preceding\n * the parameter.\n */\n\nclass DiscreteInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1 /*, t0, t, t1 */ ) {\n\n\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t}\n\n}\n\nclass KeyframeTrack {\n\n\tconstructor( name, times, values, interpolation ) {\n\n\t\tif ( name === undefined ) throw new Error( 'THREE.KeyframeTrack: track name is undefined' );\n\t\tif ( times === undefined || times.length === 0 ) throw new Error( 'THREE.KeyframeTrack: no keyframes in track named ' + name );\n\n\t\tthis.name = name;\n\n\t\tthis.times = convertArray( times, this.TimeBufferType );\n\t\tthis.values = convertArray( values, this.ValueBufferType );\n\n\t\tthis.setInterpolation( interpolation || this.DefaultInterpolation );\n\n\t}\n\n\t// Serialization (in static context, because of constructor invocation\n\t// and automatic invocation of .toJSON):\n\n\tstatic toJSON( track ) {\n\n\t\tconst trackType = track.constructor;\n\n\t\tlet json;\n\n\t\t// derived classes can define a static toJSON method\n\t\tif ( trackType.toJSON !== this.toJSON ) {\n\n\t\t\tjson = trackType.toJSON( track );\n\n\t\t} else {\n\n\t\t\t// by default, we assume the data can be serialized as-is\n\t\t\tjson = {\n\n\t\t\t\t'name': track.name,\n\t\t\t\t'times': convertArray( track.times, Array ),\n\t\t\t\t'values': convertArray( track.values, Array )\n\n\t\t\t};\n\n\t\t\tconst interpolation = track.getInterpolation();\n\n\t\t\tif ( interpolation !== track.DefaultInterpolation ) {\n\n\t\t\t\tjson.interpolation = interpolation;\n\n\t\t\t}\n\n\t\t}\n\n\t\tjson.type = track.ValueTypeName; // mandatory\n\n\t\treturn json;\n\n\t}\n\n\tInterpolantFactoryMethodDiscrete( result ) {\n\n\t\treturn new DiscreteInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new LinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodSmooth( result ) {\n\n\t\treturn new CubicInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tsetInterpolation( interpolation ) {\n\n\t\tlet factoryMethod;\n\n\t\tswitch ( interpolation ) {\n\n\t\t\tcase InterpolateDiscrete:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodDiscrete;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateLinear:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodLinear;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateSmooth:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodSmooth;\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tif ( factoryMethod === undefined ) {\n\n\t\t\tconst message = 'unsupported interpolation for ' +\n\t\t\t\tthis.ValueTypeName + ' keyframe track named ' + this.name;\n\n\t\t\tif ( this.createInterpolant === undefined ) {\n\n\t\t\t\t// fall back to default, unless the default itself is messed up\n\t\t\t\tif ( interpolation !== this.DefaultInterpolation ) {\n\n\t\t\t\t\tthis.setInterpolation( this.DefaultInterpolation );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( message ); // fatal, in this case\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconsole.warn( 'THREE.KeyframeTrack:', message );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tthis.createInterpolant = factoryMethod;\n\n\t\treturn this;\n\n\t}\n\n\tgetInterpolation() {\n\n\t\tswitch ( this.createInterpolant ) {\n\n\t\t\tcase this.InterpolantFactoryMethodDiscrete:\n\n\t\t\t\treturn InterpolateDiscrete;\n\n\t\t\tcase this.InterpolantFactoryMethodLinear:\n\n\t\t\t\treturn InterpolateLinear;\n\n\t\t\tcase this.InterpolantFactoryMethodSmooth:\n\n\t\t\t\treturn InterpolateSmooth;\n\n\t\t}\n\n\t}\n\n\tgetValueSize() {\n\n\t\treturn this.values.length / this.times.length;\n\n\t}\n\n\t// move all keyframes either forwards or backwards in time\n\tshift( timeOffset ) {\n\n\t\tif ( timeOffset !== 0.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] += timeOffset;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n\tscale( timeScale ) {\n\n\t\tif ( timeScale !== 1.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] *= timeScale;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n\t// IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n\ttrim( startTime, endTime ) {\n\n\t\tconst times = this.times,\n\t\t\tnKeys = times.length;\n\n\t\tlet from = 0,\n\t\t\tto = nKeys - 1;\n\n\t\twhile ( from !== nKeys && times[ from ] < startTime ) {\n\n\t\t\t++ from;\n\n\t\t}\n\n\t\twhile ( to !== - 1 && times[ to ] > endTime ) {\n\n\t\t\t-- to;\n\n\t\t}\n\n\t\t++ to; // inclusive -> exclusive bound\n\n\t\tif ( from !== 0 || to !== nKeys ) {\n\n\t\t\t// empty tracks are forbidden, so keep at least one keyframe\n\t\t\tif ( from >= to ) {\n\n\t\t\t\tto = Math.max( to, 1 );\n\t\t\t\tfrom = to - 1;\n\n\t\t\t}\n\n\t\t\tconst stride = this.getValueSize();\n\t\t\tthis.times = times.slice( from, to );\n\t\t\tthis.values = this.values.slice( from * stride, to * stride );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tconst valueSize = this.getValueSize();\n\t\tif ( valueSize - Math.floor( valueSize ) !== 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Invalid value size in track.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tconst times = this.times,\n\t\t\tvalues = this.values,\n\n\t\t\tnKeys = times.length;\n\n\t\tif ( nKeys === 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Track is empty.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tlet prevTime = null;\n\n\t\tfor ( let i = 0; i !== nKeys; i ++ ) {\n\n\t\t\tconst currTime = times[ i ];\n\n\t\t\tif ( typeof currTime === 'number' && isNaN( currTime ) ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( prevTime !== null && prevTime > currTime ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tprevTime = currTime;\n\n\t\t}\n\n\t\tif ( values !== undefined ) {\n\n\t\t\tif ( isTypedArray( values ) ) {\n\n\t\t\t\tfor ( let i = 0, n = values.length; i !== n; ++ i ) {\n\n\t\t\t\t\tconst value = values[ i ];\n\n\t\t\t\t\tif ( isNaN( value ) ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value );\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\t// removes equivalent sequential keys as common in morph target sequences\n\t// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n\toptimize() {\n\n\t\t// times or values may be shared with other tracks, so overwriting is unsafe\n\t\tconst times = this.times.slice(),\n\t\t\tvalues = this.values.slice(),\n\t\t\tstride = this.getValueSize(),\n\n\t\t\tsmoothInterpolation = this.getInterpolation() === InterpolateSmooth,\n\n\t\t\tlastIndex = times.length - 1;\n\n\t\tlet writeIndex = 1;\n\n\t\tfor ( let i = 1; i < lastIndex; ++ i ) {\n\n\t\t\tlet keep = false;\n\n\t\t\tconst time = times[ i ];\n\t\t\tconst timeNext = times[ i + 1 ];\n\n\t\t\t// remove adjacent keyframes scheduled at the same time\n\n\t\t\tif ( time !== timeNext && ( i !== 1 || time !== times[ 0 ] ) ) {\n\n\t\t\t\tif ( ! smoothInterpolation ) {\n\n\t\t\t\t\t// remove unnecessary keyframes same as their neighbors\n\n\t\t\t\t\tconst offset = i * stride,\n\t\t\t\t\t\toffsetP = offset - stride,\n\t\t\t\t\t\toffsetN = offset + stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tconst value = values[ offset + j ];\n\n\t\t\t\t\t\tif ( value !== values[ offsetP + j ] ||\n\t\t\t\t\t\t\tvalue !== values[ offsetN + j ] ) {\n\n\t\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tkeep = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// in-place compaction\n\n\t\t\tif ( keep ) {\n\n\t\t\t\tif ( i !== writeIndex ) {\n\n\t\t\t\t\ttimes[ writeIndex ] = times[ i ];\n\n\t\t\t\t\tconst readOffset = i * stride,\n\t\t\t\t\t\twriteOffset = writeIndex * stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t++ writeIndex;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// flush last keyframe (compaction looks ahead)\n\n\t\tif ( lastIndex > 0 ) {\n\n\t\t\ttimes[ writeIndex ] = times[ lastIndex ];\n\n\t\t\tfor ( let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j ) {\n\n\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t}\n\n\t\t\t++ writeIndex;\n\n\t\t}\n\n\t\tif ( writeIndex !== times.length ) {\n\n\t\t\tthis.times = times.slice( 0, writeIndex );\n\t\t\tthis.values = values.slice( 0, writeIndex * stride );\n\n\t\t} else {\n\n\t\t\tthis.times = times;\n\t\t\tthis.values = values;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst times = this.times.slice();\n\t\tconst values = this.values.slice();\n\n\t\tconst TypedKeyframeTrack = this.constructor;\n\t\tconst track = new TypedKeyframeTrack( this.name, times, values );\n\n\t\t// Interpolant argument to constructor is not saved, so copy the factory method directly.\n\t\ttrack.createInterpolant = this.createInterpolant;\n\n\t\treturn track;\n\n\t}\n\n}\n\nKeyframeTrack.prototype.TimeBufferType = Float32Array;\nKeyframeTrack.prototype.ValueBufferType = Float32Array;\nKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\n\n/**\n * A Track of Boolean keyframe values.\n */\nclass BooleanKeyframeTrack extends KeyframeTrack {}\n\nBooleanKeyframeTrack.prototype.ValueTypeName = 'bool';\nBooleanKeyframeTrack.prototype.ValueBufferType = Array;\nBooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of keyframe values that represent color.\n */\nclass ColorKeyframeTrack extends KeyframeTrack {}\n\nColorKeyframeTrack.prototype.ValueTypeName = 'color';\n\n/**\n * A Track of numeric keyframe values.\n */\nclass NumberKeyframeTrack extends KeyframeTrack {}\n\nNumberKeyframeTrack.prototype.ValueTypeName = 'number';\n\n/**\n * Spherical linear unit quaternion interpolant.\n */\n\nclass QuaternionLinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\talpha = ( t - t0 ) / ( t1 - t0 );\n\n\t\tlet offset = i1 * stride;\n\n\t\tfor ( let end = offset + stride; offset !== end; offset += 4 ) {\n\n\t\t\tQuaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha );\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n * A Track of quaternion keyframe values.\n */\nclass QuaternionKeyframeTrack extends KeyframeTrack {\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n}\n\nQuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion';\n// ValueBufferType is inherited\nQuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\nQuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track that interpolates Strings\n */\nclass StringKeyframeTrack extends KeyframeTrack {}\n\nStringKeyframeTrack.prototype.ValueTypeName = 'string';\nStringKeyframeTrack.prototype.ValueBufferType = Array;\nStringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of vectored keyframe values.\n */\nclass VectorKeyframeTrack extends KeyframeTrack {}\n\nVectorKeyframeTrack.prototype.ValueTypeName = 'vector';\n\nclass AnimationClip {\n\n\tconstructor( name, duration = - 1, tracks, blendMode = NormalAnimationBlendMode ) {\n\n\t\tthis.name = name;\n\t\tthis.tracks = tracks;\n\t\tthis.duration = duration;\n\t\tthis.blendMode = blendMode;\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// this means it should figure out its duration by scanning the tracks\n\t\tif ( this.duration < 0 ) {\n\n\t\t\tthis.resetDuration();\n\n\t\t}\n\n\t}\n\n\n\tstatic parse( json ) {\n\n\t\tconst tracks = [],\n\t\t\tjsonTracks = json.tracks,\n\t\t\tframeTime = 1.0 / ( json.fps || 1.0 );\n\n\t\tfor ( let i = 0, n = jsonTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( parseKeyframeTrack( jsonTracks[ i ] ).scale( frameTime ) );\n\n\t\t}\n\n\t\tconst clip = new this( json.name, json.duration, tracks, json.blendMode );\n\t\tclip.uuid = json.uuid;\n\n\t\treturn clip;\n\n\t}\n\n\tstatic toJSON( clip ) {\n\n\t\tconst tracks = [],\n\t\t\tclipTracks = clip.tracks;\n\n\t\tconst json = {\n\n\t\t\t'name': clip.name,\n\t\t\t'duration': clip.duration,\n\t\t\t'tracks': tracks,\n\t\t\t'uuid': clip.uuid,\n\t\t\t'blendMode': clip.blendMode\n\n\t\t};\n\n\t\tfor ( let i = 0, n = clipTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( KeyframeTrack.toJSON( clipTracks[ i ] ) );\n\n\t\t}\n\n\t\treturn json;\n\n\t}\n\n\tstatic CreateFromMorphTargetSequence( name, morphTargetSequence, fps, noLoop ) {\n\n\t\tconst numMorphTargets = morphTargetSequence.length;\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < numMorphTargets; i ++ ) {\n\n\t\t\tlet times = [];\n\t\t\tlet values = [];\n\n\t\t\ttimes.push(\n\t\t\t\t( i + numMorphTargets - 1 ) % numMorphTargets,\n\t\t\t\ti,\n\t\t\t\t( i + 1 ) % numMorphTargets );\n\n\t\t\tvalues.push( 0, 1, 0 );\n\n\t\t\tconst order = getKeyframeOrder( times );\n\t\t\ttimes = sortedArray( times, 1, order );\n\t\t\tvalues = sortedArray( values, 1, order );\n\n\t\t\t// if there is a key at the first frame, duplicate it as the\n\t\t\t// last frame as well for perfect loop.\n\t\t\tif ( ! noLoop && times[ 0 ] === 0 ) {\n\n\t\t\t\ttimes.push( numMorphTargets );\n\t\t\t\tvalues.push( values[ 0 ] );\n\n\t\t\t}\n\n\t\t\ttracks.push(\n\t\t\t\tnew NumberKeyframeTrack(\n\t\t\t\t\t'.morphTargetInfluences[' + morphTargetSequence[ i ].name + ']',\n\t\t\t\t\ttimes, values\n\t\t\t\t).scale( 1.0 / fps ) );\n\n\t\t}\n\n\t\treturn new this( name, - 1, tracks );\n\n\t}\n\n\tstatic findByName( objectOrClipArray, name ) {\n\n\t\tlet clipArray = objectOrClipArray;\n\n\t\tif ( ! Array.isArray( objectOrClipArray ) ) {\n\n\t\t\tconst o = objectOrClipArray;\n\t\t\tclipArray = o.geometry && o.geometry.animations || o.animations;\n\n\t\t}\n\n\t\tfor ( let i = 0; i < clipArray.length; i ++ ) {\n\n\t\t\tif ( clipArray[ i ].name === name ) {\n\n\t\t\t\treturn clipArray[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\tstatic CreateClipsFromMorphTargetSequences( morphTargets, fps, noLoop ) {\n\n\t\tconst animationToMorphTargets = {};\n\n\t\t// tested with https://regex101.com/ on trick sequences\n\t\t// such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n\t\tconst pattern = /^([\\w-]*?)([\\d]+)$/;\n\n\t\t// sort morph target names into animation groups based\n\t\t// patterns like Walk_001, Walk_002, Run_001, Run_002\n\t\tfor ( let i = 0, il = morphTargets.length; i < il; i ++ ) {\n\n\t\t\tconst morphTarget = morphTargets[ i ];\n\t\t\tconst parts = morphTarget.name.match( pattern );\n\n\t\t\tif ( parts && parts.length > 1 ) {\n\n\t\t\t\tconst name = parts[ 1 ];\n\n\t\t\t\tlet animationMorphTargets = animationToMorphTargets[ name ];\n\n\t\t\t\tif ( ! animationMorphTargets ) {\n\n\t\t\t\t\tanimationToMorphTargets[ name ] = animationMorphTargets = [];\n\n\t\t\t\t}\n\n\t\t\t\tanimationMorphTargets.push( morphTarget );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst clips = [];\n\n\t\tfor ( const name in animationToMorphTargets ) {\n\n\t\t\tclips.push( this.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) );\n\n\t\t}\n\n\t\treturn clips;\n\n\t}\n\n\t// parse the animation.hierarchy format\n\tstatic parseAnimation( animation, bones ) {\n\n\t\tif ( ! animation ) {\n\n\t\t\tconsole.error( 'THREE.AnimationClip: No animation in JSONLoader data.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) {\n\n\t\t\t// only return track if there are actually keys.\n\t\t\tif ( animationKeys.length !== 0 ) {\n\n\t\t\t\tconst times = [];\n\t\t\t\tconst values = [];\n\n\t\t\t\tflattenJSON( animationKeys, times, values, propertyName );\n\n\t\t\t\t// empty keys are filtered out, so check again\n\t\t\t\tif ( times.length !== 0 ) {\n\n\t\t\t\t\tdestTracks.push( new trackType( trackName, times, values ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tconst tracks = [];\n\n\t\tconst clipName = animation.name || 'default';\n\t\tconst fps = animation.fps || 30;\n\t\tconst blendMode = animation.blendMode;\n\n\t\t// automatic length determination in AnimationClip.\n\t\tlet duration = animation.length || - 1;\n\n\t\tconst hierarchyTracks = animation.hierarchy || [];\n\n\t\tfor ( let h = 0; h < hierarchyTracks.length; h ++ ) {\n\n\t\t\tconst animationKeys = hierarchyTracks[ h ].keys;\n\n\t\t\t// skip empty tracks\n\t\t\tif ( ! animationKeys || animationKeys.length === 0 ) continue;\n\n\t\t\t// process morph targets\n\t\t\tif ( animationKeys[ 0 ].morphTargets ) {\n\n\t\t\t\t// figure out all morph targets used in this track\n\t\t\t\tconst morphTargetNames = {};\n\n\t\t\t\tlet k;\n\n\t\t\t\tfor ( k = 0; k < animationKeys.length; k ++ ) {\n\n\t\t\t\t\tif ( animationKeys[ k ].morphTargets ) {\n\n\t\t\t\t\t\tfor ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {\n\n\t\t\t\t\t\t\tmorphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = - 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// create a track for each morph target with all zero\n\t\t\t\t// morphTargetInfluences except for the keys in which\n\t\t\t\t// the morphTarget is named.\n\t\t\t\tfor ( const morphTargetName in morphTargetNames ) {\n\n\t\t\t\t\tconst times = [];\n\t\t\t\t\tconst values = [];\n\n\t\t\t\t\tfor ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) {\n\n\t\t\t\t\t\tconst animationKey = animationKeys[ k ];\n\n\t\t\t\t\t\ttimes.push( animationKey.time );\n\t\t\t\t\t\tvalues.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) );\n\n\t\t\t\t}\n\n\t\t\t\tduration = morphTargetNames.length * fps;\n\n\t\t\t} else {\n\n\t\t\t\t// ...assume skeletal animation\n\n\t\t\t\tconst boneName = '.bones[' + bones[ h ].name + ']';\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.position',\n\t\t\t\t\tanimationKeys, 'pos', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tQuaternionKeyframeTrack, boneName + '.quaternion',\n\t\t\t\t\tanimationKeys, 'rot', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.scale',\n\t\t\t\t\tanimationKeys, 'scl', tracks );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tracks.length === 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst clip = new this( clipName, duration, tracks, blendMode );\n\n\t\treturn clip;\n\n\t}\n\n\tresetDuration() {\n\n\t\tconst tracks = this.tracks;\n\t\tlet duration = 0;\n\n\t\tfor ( let i = 0, n = tracks.length; i !== n; ++ i ) {\n\n\t\t\tconst track = this.tracks[ i ];\n\n\t\t\tduration = Math.max( duration, track.times[ track.times.length - 1 ] );\n\n\t\t}\n\n\t\tthis.duration = duration;\n\n\t\treturn this;\n\n\t}\n\n\ttrim() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].trim( 0, this.duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tvalid = valid && this.tracks[ i ].validate();\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\toptimize() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].optimize();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\ttracks.push( this.tracks[ i ].clone() );\n\n\t\t}\n\n\t\treturn new this.constructor( this.name, this.duration, tracks, this.blendMode );\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.constructor.toJSON( this );\n\n\t}\n\n}\n\nfunction getTrackTypeForValueTypeName( typeName ) {\n\n\tswitch ( typeName.toLowerCase() ) {\n\n\t\tcase 'scalar':\n\t\tcase 'double':\n\t\tcase 'float':\n\t\tcase 'number':\n\t\tcase 'integer':\n\n\t\t\treturn NumberKeyframeTrack;\n\n\t\tcase 'vector':\n\t\tcase 'vector2':\n\t\tcase 'vector3':\n\t\tcase 'vector4':\n\n\t\t\treturn VectorKeyframeTrack;\n\n\t\tcase 'color':\n\n\t\t\treturn ColorKeyframeTrack;\n\n\t\tcase 'quaternion':\n\n\t\t\treturn QuaternionKeyframeTrack;\n\n\t\tcase 'bool':\n\t\tcase 'boolean':\n\n\t\t\treturn BooleanKeyframeTrack;\n\n\t\tcase 'string':\n\n\t\t\treturn StringKeyframeTrack;\n\n\t}\n\n\tthrow new Error( 'THREE.KeyframeTrack: Unsupported typeName: ' + typeName );\n\n}\n\nfunction parseKeyframeTrack( json ) {\n\n\tif ( json.type === undefined ) {\n\n\t\tthrow new Error( 'THREE.KeyframeTrack: track type undefined, can not parse' );\n\n\t}\n\n\tconst trackType = getTrackTypeForValueTypeName( json.type );\n\n\tif ( json.times === undefined ) {\n\n\t\tconst times = [], values = [];\n\n\t\tflattenJSON( json.keys, times, values, 'value' );\n\n\t\tjson.times = times;\n\t\tjson.values = values;\n\n\t}\n\n\t// derived classes can define a static parse method\n\tif ( trackType.parse !== undefined ) {\n\n\t\treturn trackType.parse( json );\n\n\t} else {\n\n\t\t// by default, we assume a constructor compatible with the base\n\t\treturn new trackType( json.name, json.times, json.values, json.interpolation );\n\n\t}\n\n}\n\nconst Cache = {\n\n\tenabled: false,\n\n\tfiles: {},\n\n\tadd: function ( key, file ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Adding key:', key );\n\n\t\tthis.files[ key ] = file;\n\n\t},\n\n\tget: function ( key ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Checking key:', key );\n\n\t\treturn this.files[ key ];\n\n\t},\n\n\tremove: function ( key ) {\n\n\t\tdelete this.files[ key ];\n\n\t},\n\n\tclear: function () {\n\n\t\tthis.files = {};\n\n\t}\n\n};\n\nclass LoadingManager {\n\n\tconstructor( onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tlet isLoading = false;\n\t\tlet itemsLoaded = 0;\n\t\tlet itemsTotal = 0;\n\t\tlet urlModifier = undefined;\n\t\tconst handlers = [];\n\n\t\t// Refer to #5689 for the reason why we don't set .onStart\n\t\t// in the constructor\n\n\t\tthis.onStart = undefined;\n\t\tthis.onLoad = onLoad;\n\t\tthis.onProgress = onProgress;\n\t\tthis.onError = onError;\n\n\t\tthis.itemStart = function ( url ) {\n\n\t\t\titemsTotal ++;\n\n\t\t\tif ( isLoading === false ) {\n\n\t\t\t\tif ( scope.onStart !== undefined ) {\n\n\t\t\t\t\tscope.onStart( url, itemsLoaded, itemsTotal );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tisLoading = true;\n\n\t\t};\n\n\t\tthis.itemEnd = function ( url ) {\n\n\t\t\titemsLoaded ++;\n\n\t\t\tif ( scope.onProgress !== undefined ) {\n\n\t\t\t\tscope.onProgress( url, itemsLoaded, itemsTotal );\n\n\t\t\t}\n\n\t\t\tif ( itemsLoaded === itemsTotal ) {\n\n\t\t\t\tisLoading = false;\n\n\t\t\t\tif ( scope.onLoad !== undefined ) {\n\n\t\t\t\t\tscope.onLoad();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.itemError = function ( url ) {\n\n\t\t\tif ( scope.onError !== undefined ) {\n\n\t\t\t\tscope.onError( url );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.resolveURL = function ( url ) {\n\n\t\t\tif ( urlModifier ) {\n\n\t\t\t\treturn urlModifier( url );\n\n\t\t\t}\n\n\t\t\treturn url;\n\n\t\t};\n\n\t\tthis.setURLModifier = function ( transform ) {\n\n\t\t\turlModifier = transform;\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.addHandler = function ( regex, loader ) {\n\n\t\t\thandlers.push( regex, loader );\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.removeHandler = function ( regex ) {\n\n\t\t\tconst index = handlers.indexOf( regex );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\thandlers.splice( index, 2 );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.getHandler = function ( file ) {\n\n\t\t\tfor ( let i = 0, l = handlers.length; i < l; i += 2 ) {\n\n\t\t\t\tconst regex = handlers[ i ];\n\t\t\t\tconst loader = handlers[ i + 1 ];\n\n\t\t\t\tif ( regex.global ) regex.lastIndex = 0; // see #17920\n\n\t\t\t\tif ( regex.test( file ) ) {\n\n\t\t\t\t\treturn loader;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t};\n\n\t}\n\n}\n\nconst DefaultLoadingManager = /*@__PURE__*/ new LoadingManager();\n\nclass Loader {\n\n\tconstructor( manager ) {\n\n\t\tthis.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;\n\n\t\tthis.crossOrigin = 'anonymous';\n\t\tthis.withCredentials = false;\n\t\tthis.path = '';\n\t\tthis.resourcePath = '';\n\t\tthis.requestHeader = {};\n\n\t}\n\n\tload( /* url, onLoad, onProgress, onError */ ) {}\n\n\tloadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\tscope.load( url, resolve, onProgress, reject );\n\n\t\t} );\n\n\t}\n\n\tparse( /* data */ ) {}\n\n\tsetCrossOrigin( crossOrigin ) {\n\n\t\tthis.crossOrigin = crossOrigin;\n\t\treturn this;\n\n\t}\n\n\tsetWithCredentials( value ) {\n\n\t\tthis.withCredentials = value;\n\t\treturn this;\n\n\t}\n\n\tsetPath( path ) {\n\n\t\tthis.path = path;\n\t\treturn this;\n\n\t}\n\n\tsetResourcePath( resourcePath ) {\n\n\t\tthis.resourcePath = resourcePath;\n\t\treturn this;\n\n\t}\n\n\tsetRequestHeader( requestHeader ) {\n\n\t\tthis.requestHeader = requestHeader;\n\t\treturn this;\n\n\t}\n\n}\n\nLoader.DEFAULT_MATERIAL_NAME = '__DEFAULT';\n\nconst loading = {};\n\nclass HttpError extends Error {\n\n\tconstructor( message, response ) {\n\n\t\tsuper( message );\n\t\tthis.response = response;\n\n\t}\n\n}\n\nclass FileLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tthis.manager.itemStart( url );\n\n\t\t\tsetTimeout( () => {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tthis.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\t// Check if request is duplicate\n\n\t\tif ( loading[ url ] !== undefined ) {\n\n\t\t\tloading[ url ].push( {\n\n\t\t\t\tonLoad: onLoad,\n\t\t\t\tonProgress: onProgress,\n\t\t\t\tonError: onError\n\n\t\t\t} );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Initialise array for duplicate requests\n\t\tloading[ url ] = [];\n\n\t\tloading[ url ].push( {\n\t\t\tonLoad: onLoad,\n\t\t\tonProgress: onProgress,\n\t\t\tonError: onError,\n\t\t} );\n\n\t\t// create request\n\t\tconst req = new Request( url, {\n\t\t\theaders: new Headers( this.requestHeader ),\n\t\t\tcredentials: this.withCredentials ? 'include' : 'same-origin',\n\t\t\t// An abort controller could be added within a future PR\n\t\t} );\n\n\t\t// record states ( avoid data race )\n\t\tconst mimeType = this.mimeType;\n\t\tconst responseType = this.responseType;\n\n\t\t// start the fetch\n\t\tfetch( req )\n\t\t\t.then( response => {\n\n\t\t\t\tif ( response.status === 200 || response.status === 0 ) {\n\n\t\t\t\t\t// Some browsers return HTTP Status 0 when using non-http protocol\n\t\t\t\t\t// e.g. 'file://' or 'data://'. Handle as success.\n\n\t\t\t\t\tif ( response.status === 0 ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.FileLoader: HTTP Status 0 received.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Workaround: Checking if response.body === undefined for Alipay browser #23548\n\n\t\t\t\t\tif ( typeof ReadableStream === 'undefined' || response.body === undefined || response.body.getReader === undefined ) {\n\n\t\t\t\t\t\treturn response;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst callbacks = loading[ url ];\n\t\t\t\t\tconst reader = response.body.getReader();\n\n\t\t\t\t\t// Nginx needs X-File-Size check\n\t\t\t\t\t// https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content\n\t\t\t\t\tconst contentLength = response.headers.get( 'Content-Length' ) || response.headers.get( 'X-File-Size' );\n\t\t\t\t\tconst total = contentLength ? parseInt( contentLength ) : 0;\n\t\t\t\t\tconst lengthComputable = total !== 0;\n\t\t\t\t\tlet loaded = 0;\n\n\t\t\t\t\t// periodically read data into the new stream tracking while download progress\n\t\t\t\t\tconst stream = new ReadableStream( {\n\t\t\t\t\t\tstart( controller ) {\n\n\t\t\t\t\t\t\treadData();\n\n\t\t\t\t\t\t\tfunction readData() {\n\n\t\t\t\t\t\t\t\treader.read().then( ( { done, value } ) => {\n\n\t\t\t\t\t\t\t\t\tif ( done ) {\n\n\t\t\t\t\t\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\tloaded += value.byteLength;\n\n\t\t\t\t\t\t\t\t\t\tconst event = new ProgressEvent( 'progress', { lengthComputable, loaded, total } );\n\t\t\t\t\t\t\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\t\t\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\t\t\t\t\t\t\tif ( callback.onProgress ) callback.onProgress( event );\n\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tcontroller.enqueue( value );\n\t\t\t\t\t\t\t\t\t\treadData();\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn new Response( stream );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new HttpError( `fetch for \"${response.url}\" responded with ${response.status}: ${response.statusText}`, response );\n\n\t\t\t\t}\n\n\t\t\t} )\n\t\t\t.then( response => {\n\n\t\t\t\tswitch ( responseType ) {\n\n\t\t\t\t\tcase 'arraybuffer':\n\n\t\t\t\t\t\treturn response.arrayBuffer();\n\n\t\t\t\t\tcase 'blob':\n\n\t\t\t\t\t\treturn response.blob();\n\n\t\t\t\t\tcase 'document':\n\n\t\t\t\t\t\treturn response.text()\n\t\t\t\t\t\t\t.then( text => {\n\n\t\t\t\t\t\t\t\tconst parser = new DOMParser();\n\t\t\t\t\t\t\t\treturn parser.parseFromString( text, mimeType );\n\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\tcase 'json':\n\n\t\t\t\t\t\treturn response.json();\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tif ( mimeType === undefined ) {\n\n\t\t\t\t\t\t\treturn response.text();\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// sniff encoding\n\t\t\t\t\t\t\tconst re = /charset=\"?([^;\"\\s]*)\"?/i;\n\t\t\t\t\t\t\tconst exec = re.exec( mimeType );\n\t\t\t\t\t\t\tconst label = exec && exec[ 1 ] ? exec[ 1 ].toLowerCase() : undefined;\n\t\t\t\t\t\t\tconst decoder = new TextDecoder( label );\n\t\t\t\t\t\t\treturn response.arrayBuffer().then( ab => decoder.decode( ab ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} )\n\t\t\t.then( data => {\n\n\t\t\t\t// Add to cache only on HTTP success, so that we do not cache\n\t\t\t\t// error response bodies as proper responses to requests.\n\t\t\t\tCache.add( url, data );\n\n\t\t\t\tconst callbacks = loading[ url ];\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onLoad ) callback.onLoad( data );\n\n\t\t\t\t}\n\n\t\t\t} )\n\t\t\t.catch( err => {\n\n\t\t\t\t// Abort errors and other errors are handled the same\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tif ( callbacks === undefined ) {\n\n\t\t\t\t\t// When onLoad was called and url was deleted in `loading`\n\t\t\t\t\tthis.manager.itemError( url );\n\t\t\t\t\tthrow err;\n\n\t\t\t\t}\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onError ) callback.onError( err );\n\n\t\t\t\t}\n\n\t\t\t\tthis.manager.itemError( url );\n\n\t\t\t} )\n\t\t\t.finally( () => {\n\n\t\t\t\tthis.manager.itemEnd( url );\n\n\t\t\t} );\n\n\t\tthis.manager.itemStart( url );\n\n\t}\n\n\tsetResponseType( value ) {\n\n\t\tthis.responseType = value;\n\t\treturn this;\n\n\t}\n\n\tsetMimeType( value ) {\n\n\t\tthis.mimeType = value;\n\t\treturn this;\n\n\t}\n\n}\n\nclass AnimationLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst animations = [];\n\n\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\tconst clip = AnimationClip.parse( json[ i ] );\n\n\t\t\tanimations.push( clip );\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to block based textures loader (dds, pvr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass CompressedTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst images = [];\n\n\t\tconst texture = new CompressedTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( url[ i ], function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\timages[ i ] = {\n\t\t\t\t\twidth: texDatas.width,\n\t\t\t\t\theight: texDatas.height,\n\t\t\t\t\tformat: texDatas.format,\n\t\t\t\t\tmipmaps: texDatas.mipmaps\n\t\t\t\t};\n\n\t\t\t\tloaded += 1;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\tif ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter;\n\n\t\t\t\t\ttexture.image = images;\n\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\tif ( Array.isArray( url ) ) {\n\n\t\t\tfor ( let i = 0, il = url.length; i < il; ++ i ) {\n\n\t\t\t\tloadTexture( i );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// compressed cubemap texture stored in a single DDS file\n\n\t\t\tloader.load( url, function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\tif ( texDatas.isCubemap ) {\n\n\t\t\t\t\tconst faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n\n\t\t\t\t\tfor ( let f = 0; f < faces; f ++ ) {\n\n\t\t\t\t\t\timages[ f ] = { mipmaps: [] };\n\n\t\t\t\t\t\tfor ( let i = 0; i < texDatas.mipmapCount; i ++ ) {\n\n\t\t\t\t\t\t\timages[ f ].mipmaps.push( texDatas.mipmaps[ f * texDatas.mipmapCount + i ] );\n\t\t\t\t\t\t\timages[ f ].format = texDatas.format;\n\t\t\t\t\t\t\timages[ f ].width = texDatas.width;\n\t\t\t\t\t\t\timages[ f ].height = texDatas.height;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.image = images;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttexture.image.width = texDatas.width;\n\t\t\t\t\ttexture.image.height = texDatas.height;\n\t\t\t\t\ttexture.mipmaps = texDatas.mipmaps;\n\n\t\t\t\t}\n\n\t\t\t\tif ( texDatas.mipmapCount === 1 ) {\n\n\t\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t\t}\n\n\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass ImageLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst image = createElementNS( 'img' );\n\n\t\tfunction onImageLoad() {\n\n\t\t\tremoveEventListeners();\n\n\t\t\tCache.add( url, this );\n\n\t\t\tif ( onLoad ) onLoad( this );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\tfunction onImageError( event ) {\n\n\t\t\tremoveEventListeners();\n\n\t\t\tif ( onError ) onError( event );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\tfunction removeEventListeners() {\n\n\t\t\timage.removeEventListener( 'load', onImageLoad, false );\n\t\t\timage.removeEventListener( 'error', onImageError, false );\n\n\t\t}\n\n\t\timage.addEventListener( 'load', onImageLoad, false );\n\t\timage.addEventListener( 'error', onImageError, false );\n\n\t\tif ( url.slice( 0, 5 ) !== 'data:' ) {\n\n\t\t\tif ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin;\n\n\t\t}\n\n\t\tscope.manager.itemStart( url );\n\n\t\timage.src = url;\n\n\t\treturn image;\n\n\t}\n\n}\n\nclass CubeTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( urls, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new CubeTexture();\n\t\ttexture.colorSpace = SRGBColorSpace;\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( urls[ i ], function ( image ) {\n\n\t\t\t\ttexture.images[ i ] = image;\n\n\t\t\t\tloaded ++;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, undefined, onError );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < urls.length; ++ i ) {\n\n\t\t\tloadTexture( i );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass DataTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst texture = new DataTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setPath( this.path );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\tlet texData;\n\n\t\t\ttry {\n\n\t\t\t\ttexData = scope.parse( buffer );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\tif ( onError !== undefined ) {\n\n\t\t\t\t\tonError( error );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( error );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( texData.image !== undefined ) {\n\n\t\t\t\ttexture.image = texData.image;\n\n\t\t\t} else if ( texData.data !== undefined ) {\n\n\t\t\t\ttexture.image.width = texData.width;\n\t\t\t\ttexture.image.height = texData.height;\n\t\t\t\ttexture.image.data = texData.data;\n\n\t\t\t}\n\n\t\t\ttexture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping;\n\t\t\ttexture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping;\n\n\t\t\ttexture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter;\n\t\t\ttexture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter;\n\n\t\t\ttexture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n\n\t\t\tif ( texData.colorSpace !== undefined ) {\n\n\t\t\t\ttexture.colorSpace = texData.colorSpace;\n\n\t\t\t} else if ( texData.encoding !== undefined ) { // @deprecated, r152\n\n\t\t\t\ttexture.encoding = texData.encoding;\n\n\t\t\t}\n\n\t\t\tif ( texData.flipY !== undefined ) {\n\n\t\t\t\ttexture.flipY = texData.flipY;\n\n\t\t\t}\n\n\t\t\tif ( texData.format !== undefined ) {\n\n\t\t\t\ttexture.format = texData.format;\n\n\t\t\t}\n\n\t\t\tif ( texData.type !== undefined ) {\n\n\t\t\t\ttexture.type = texData.type;\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmaps !== undefined ) {\n\n\t\t\t\ttexture.mipmaps = texData.mipmaps;\n\t\t\t\ttexture.minFilter = LinearMipmapLinearFilter; // presumably...\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmapCount === 1 ) {\n\n\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t}\n\n\t\t\tif ( texData.generateMipmaps !== undefined ) {\n\n\t\t\t\ttexture.generateMipmaps = texData.generateMipmaps;\n\n\t\t\t}\n\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad ) onLoad( texture, texData );\n\n\t\t}, onProgress, onError );\n\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass TextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new Texture();\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tloader.load( url, function ( image ) {\n\n\t\t\ttexture.image = image;\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad !== undefined ) {\n\n\t\t\t\tonLoad( texture );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass Light extends Object3D {\n\n\tconstructor( color, intensity = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.isLight = true;\n\n\t\tthis.type = 'Light';\n\n\t\tthis.color = new Color( color );\n\t\tthis.intensity = intensity;\n\n\t}\n\n\tdispose() {\n\n\t\t// Empty here in base class; some subclasses override.\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.intensity = source.intensity;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.color = this.color.getHex();\n\t\tdata.object.intensity = this.intensity;\n\n\t\tif ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex();\n\n\t\tif ( this.distance !== undefined ) data.object.distance = this.distance;\n\t\tif ( this.angle !== undefined ) data.object.angle = this.angle;\n\t\tif ( this.decay !== undefined ) data.object.decay = this.decay;\n\t\tif ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra;\n\n\t\tif ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON();\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass HemisphereLight extends Light {\n\n\tconstructor( skyColor, groundColor, intensity ) {\n\n\t\tsuper( skyColor, intensity );\n\n\t\tthis.isHemisphereLight = true;\n\n\t\tthis.type = 'HemisphereLight';\n\n\t\tthis.position.copy( Object3D.DEFAULT_UP );\n\t\tthis.updateMatrix();\n\n\t\tthis.groundColor = new Color( groundColor );\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.groundColor.copy( source.groundColor );\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld$1 = /*@__PURE__*/ new Vector3();\nconst _lookTarget$1 = /*@__PURE__*/ new Vector3();\n\nclass LightShadow {\n\n\tconstructor( camera ) {\n\n\t\tthis.camera = camera;\n\n\t\tthis.bias = 0;\n\t\tthis.normalBias = 0;\n\t\tthis.radius = 1;\n\t\tthis.blurSamples = 8;\n\n\t\tthis.mapSize = new Vector2( 512, 512 );\n\n\t\tthis.map = null;\n\t\tthis.mapPass = null;\n\t\tthis.matrix = new Matrix4();\n\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\n\t\tthis._frustum = new Frustum();\n\t\tthis._frameExtents = new Vector2( 1, 1 );\n\n\t\tthis._viewportCount = 1;\n\n\t\tthis._viewports = [\n\n\t\t\tnew Vector4( 0, 0, 1, 1 )\n\n\t\t];\n\n\t}\n\n\tgetViewportCount() {\n\n\t\treturn this._viewportCount;\n\n\t}\n\n\tgetFrustum() {\n\n\t\treturn this._frustum;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst shadowCamera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\t_lightPositionWorld$1.setFromMatrixPosition( light.matrixWorld );\n\t\tshadowCamera.position.copy( _lightPositionWorld$1 );\n\n\t\t_lookTarget$1.setFromMatrixPosition( light.target.matrixWorld );\n\t\tshadowCamera.lookAt( _lookTarget$1 );\n\t\tshadowCamera.updateMatrixWorld();\n\n\t\t_projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix$1 );\n\n\t\tshadowMatrix.set(\n\t\t\t0.5, 0.0, 0.0, 0.5,\n\t\t\t0.0, 0.5, 0.0, 0.5,\n\t\t\t0.0, 0.0, 0.5, 0.5,\n\t\t\t0.0, 0.0, 0.0, 1.0\n\t\t);\n\n\t\tshadowMatrix.multiply( _projScreenMatrix$1 );\n\n\t}\n\n\tgetViewport( viewportIndex ) {\n\n\t\treturn this._viewports[ viewportIndex ];\n\n\t}\n\n\tgetFrameExtents() {\n\n\t\treturn this._frameExtents;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.map ) {\n\n\t\t\tthis.map.dispose();\n\n\t\t}\n\n\t\tif ( this.mapPass ) {\n\n\t\t\tthis.mapPass.dispose();\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.camera = source.camera.clone();\n\n\t\tthis.bias = source.bias;\n\t\tthis.radius = source.radius;\n\n\t\tthis.mapSize.copy( source.mapSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst object = {};\n\n\t\tif ( this.bias !== 0 ) object.bias = this.bias;\n\t\tif ( this.normalBias !== 0 ) object.normalBias = this.normalBias;\n\t\tif ( this.radius !== 1 ) object.radius = this.radius;\n\t\tif ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray();\n\n\t\tobject.camera = this.camera.toJSON( false ).object;\n\t\tdelete object.camera.matrix;\n\n\t\treturn object;\n\n\t}\n\n}\n\nclass SpotLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 50, 1, 0.5, 500 ) );\n\n\t\tthis.isSpotLightShadow = true;\n\n\t\tthis.focus = 1;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst camera = this.camera;\n\n\t\tconst fov = RAD2DEG * 2 * light.angle * this.focus;\n\t\tconst aspect = this.mapSize.width / this.mapSize.height;\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) {\n\n\t\t\tcamera.fov = fov;\n\t\t\tcamera.aspect = aspect;\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\tsuper.updateMatrices( light );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.focus = source.focus;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass SpotLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isSpotLight = true;\n\n\t\tthis.type = 'SpotLight';\n\n\t\tthis.position.copy( Object3D.DEFAULT_UP );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.distance = distance;\n\t\tthis.angle = angle;\n\t\tthis.penumbra = penumbra;\n\t\tthis.decay = decay;\n\n\t\tthis.map = null;\n\n\t\tthis.shadow = new SpotLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// compute the light's luminous power (in lumens) from its intensity (in candela)\n\t\t// by convention for a spotlight, luminous power (lm) = π * luminous intensity (cd)\n\t\treturn this.intensity * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// set the light's intensity (in candela) from the desired luminous power (in lumens)\n\t\tthis.intensity = power / Math.PI;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.distance = source.distance;\n\t\tthis.angle = source.angle;\n\t\tthis.penumbra = source.penumbra;\n\t\tthis.decay = source.decay;\n\n\t\tthis.target = source.target.clone();\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _projScreenMatrix = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld = /*@__PURE__*/ new Vector3();\nconst _lookTarget = /*@__PURE__*/ new Vector3();\n\nclass PointLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 90, 1, 0.5, 500 ) );\n\n\t\tthis.isPointLightShadow = true;\n\n\t\tthis._frameExtents = new Vector2( 4, 2 );\n\n\t\tthis._viewportCount = 6;\n\n\t\tthis._viewports = [\n\t\t\t// These viewports map a cube-map onto a 2D texture with the\n\t\t\t// following orientation:\n\t\t\t//\n\t\t\t// xzXZ\n\t\t\t// y Y\n\t\t\t//\n\t\t\t// X - Positive x direction\n\t\t\t// x - Negative x direction\n\t\t\t// Y - Positive y direction\n\t\t\t// y - Negative y direction\n\t\t\t// Z - Positive z direction\n\t\t\t// z - Negative z direction\n\n\t\t\t// positive X\n\t\t\tnew Vector4( 2, 1, 1, 1 ),\n\t\t\t// negative X\n\t\t\tnew Vector4( 0, 1, 1, 1 ),\n\t\t\t// positive Z\n\t\t\tnew Vector4( 3, 1, 1, 1 ),\n\t\t\t// negative Z\n\t\t\tnew Vector4( 1, 1, 1, 1 ),\n\t\t\t// positive Y\n\t\t\tnew Vector4( 3, 0, 1, 1 ),\n\t\t\t// negative Y\n\t\t\tnew Vector4( 1, 0, 1, 1 )\n\t\t];\n\n\t\tthis._cubeDirections = [\n\t\t\tnew Vector3( 1, 0, 0 ), new Vector3( - 1, 0, 0 ), new Vector3( 0, 0, 1 ),\n\t\t\tnew Vector3( 0, 0, - 1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, - 1, 0 )\n\t\t];\n\n\t\tthis._cubeUps = [\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ),\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ),\tnew Vector3( 0, 0, - 1 )\n\t\t];\n\n\t}\n\n\tupdateMatrices( light, viewportIndex = 0 ) {\n\n\t\tconst camera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( far !== camera.far ) {\n\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\t_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );\n\t\tcamera.position.copy( _lightPositionWorld );\n\n\t\t_lookTarget.copy( camera.position );\n\t\t_lookTarget.add( this._cubeDirections[ viewportIndex ] );\n\t\tcamera.up.copy( this._cubeUps[ viewportIndex ] );\n\t\tcamera.lookAt( _lookTarget );\n\t\tcamera.updateMatrixWorld();\n\n\t\tshadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z );\n\n\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t}\n\n}\n\nclass PointLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, decay = 2 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isPointLight = true;\n\n\t\tthis.type = 'PointLight';\n\n\t\tthis.distance = distance;\n\t\tthis.decay = decay;\n\n\t\tthis.shadow = new PointLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// compute the light's luminous power (in lumens) from its intensity (in candela)\n\t\t// for an isotropic light source, luminous power (lm) = 4 π luminous intensity (cd)\n\t\treturn this.intensity * 4 * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// set the light's intensity (in candela) from the desired luminous power (in lumens)\n\t\tthis.intensity = power / ( 4 * Math.PI );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.distance = source.distance;\n\t\tthis.decay = source.decay;\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass DirectionalLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );\n\n\t\tthis.isDirectionalLightShadow = true;\n\n\t}\n\n}\n\nclass DirectionalLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isDirectionalLight = true;\n\n\t\tthis.type = 'DirectionalLight';\n\n\t\tthis.position.copy( Object3D.DEFAULT_UP );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.shadow = new DirectionalLightShadow();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.target = source.target.clone();\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass AmbientLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isAmbientLight = true;\n\n\t\tthis.type = 'AmbientLight';\n\n\t}\n\n}\n\nclass RectAreaLight extends Light {\n\n\tconstructor( color, intensity, width = 10, height = 10 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.isRectAreaLight = true;\n\n\t\tthis.type = 'RectAreaLight';\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\n\t}\n\n\tget power() {\n\n\t\t// compute the light's luminous power (in lumens) from its intensity (in nits)\n\t\treturn this.intensity * this.width * this.height * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// set the light's intensity (in nits) from the desired luminous power (in lumens)\n\t\tthis.intensity = power / ( this.width * this.height * Math.PI );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.width = this.width;\n\t\tdata.object.height = this.height;\n\n\t\treturn data;\n\n\t}\n\n}\n\n/**\n * Primary reference:\n * https://graphics.stanford.edu/papers/envmap/envmap.pdf\n *\n * Secondary reference:\n * https://www.ppsloan.org/publications/StupidSH36.pdf\n */\n\n// 3-band SH defined by 9 coefficients\n\nclass SphericalHarmonics3 {\n\n\tconstructor() {\n\n\t\tthis.isSphericalHarmonics3 = true;\n\n\t\tthis.coefficients = [];\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients.push( new Vector3() );\n\n\t\t}\n\n\t}\n\n\tset( coefficients ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].copy( coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tzero() {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].set( 0, 0, 0 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// get the radiance in the direction of the normal\n\t// target is a Vector3\n\tgetAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.282095 );\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 0.488603 * y );\n\t\ttarget.addScaledVector( coeff[ 2 ], 0.488603 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 0.488603 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 1.092548 * ( x * y ) );\n\t\ttarget.addScaledVector( coeff[ 5 ], 1.092548 * ( y * z ) );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.315392 * ( 3.0 * z * z - 1.0 ) );\n\t\ttarget.addScaledVector( coeff[ 7 ], 1.092548 * ( x * z ) );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.546274 * ( x * x - y * y ) );\n\n\t\treturn target;\n\n\t}\n\n\t// get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n\t// target is a Vector3\n\t// https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\tgetIrradianceAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.886227 ); // π * 0.282095\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 2.0 * 0.511664 * y ); // ( 2 * π / 3 ) * 0.488603\n\t\ttarget.addScaledVector( coeff[ 2 ], 2.0 * 0.511664 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 2.0 * 0.511664 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 2.0 * 0.429043 * x * y ); // ( π / 4 ) * 1.092548\n\t\ttarget.addScaledVector( coeff[ 5 ], 2.0 * 0.429043 * y * z );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.743125 * z * z - 0.247708 ); // ( π / 4 ) * 0.315392 * 3\n\t\ttarget.addScaledVector( coeff[ 7 ], 2.0 * 0.429043 * x * z );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.429043 * ( x * x - y * y ) ); // ( π / 4 ) * 0.546274\n\n\t\treturn target;\n\n\t}\n\n\tadd( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].add( sh.coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\taddScaledSH( sh, s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].addScaledVector( sh.coefficients[ i ], s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tscale( s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].multiplyScalar( s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tlerp( sh, alpha ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].lerp( sh.coefficients[ i ], alpha );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tequals( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( ! this.coefficients[ i ].equals( sh.coefficients[ i ] ) ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcopy( sh ) {\n\n\t\treturn this.set( sh.coefficients );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].fromArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].toArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn array;\n\n\t}\n\n\t// evaluate the basis functions\n\t// shBasis is an Array[ 9 ]\n\tstatic getBasisAt( normal, shBasis ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\t// band 0\n\t\tshBasis[ 0 ] = 0.282095;\n\n\t\t// band 1\n\t\tshBasis[ 1 ] = 0.488603 * y;\n\t\tshBasis[ 2 ] = 0.488603 * z;\n\t\tshBasis[ 3 ] = 0.488603 * x;\n\n\t\t// band 2\n\t\tshBasis[ 4 ] = 1.092548 * x * y;\n\t\tshBasis[ 5 ] = 1.092548 * y * z;\n\t\tshBasis[ 6 ] = 0.315392 * ( 3 * z * z - 1 );\n\t\tshBasis[ 7 ] = 1.092548 * x * z;\n\t\tshBasis[ 8 ] = 0.546274 * ( x * x - y * y );\n\n\t}\n\n}\n\nclass LightProbe extends Light {\n\n\tconstructor( sh = new SphericalHarmonics3(), intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tthis.isLightProbe = true;\n\n\t\tthis.sh = sh;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.sh.copy( source.sh );\n\n\t\treturn this;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n\t\tthis.sh.fromArray( json.sh );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.sh = this.sh.toArray();\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass MaterialLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\t\tthis.textures = {};\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst textures = this.textures;\n\n\t\tfunction getTexture( name ) {\n\n\t\t\tif ( textures[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.MaterialLoader: Undefined texture', name );\n\n\t\t\t}\n\n\t\t\treturn textures[ name ];\n\n\t\t}\n\n\t\tconst material = MaterialLoader.createMaterialFromType( json.type );\n\n\t\tif ( json.uuid !== undefined ) material.uuid = json.uuid;\n\t\tif ( json.name !== undefined ) material.name = json.name;\n\t\tif ( json.color !== undefined && material.color !== undefined ) material.color.setHex( json.color );\n\t\tif ( json.roughness !== undefined ) material.roughness = json.roughness;\n\t\tif ( json.metalness !== undefined ) material.metalness = json.metalness;\n\t\tif ( json.sheen !== undefined ) material.sheen = json.sheen;\n\t\tif ( json.sheenColor !== undefined ) material.sheenColor = new Color().setHex( json.sheenColor );\n\t\tif ( json.sheenRoughness !== undefined ) material.sheenRoughness = json.sheenRoughness;\n\t\tif ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive );\n\t\tif ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular );\n\t\tif ( json.specularIntensity !== undefined ) material.specularIntensity = json.specularIntensity;\n\t\tif ( json.specularColor !== undefined && material.specularColor !== undefined ) material.specularColor.setHex( json.specularColor );\n\t\tif ( json.shininess !== undefined ) material.shininess = json.shininess;\n\t\tif ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat;\n\t\tif ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness;\n\t\tif ( json.iridescence !== undefined ) material.iridescence = json.iridescence;\n\t\tif ( json.iridescenceIOR !== undefined ) material.iridescenceIOR = json.iridescenceIOR;\n\t\tif ( json.iridescenceThicknessRange !== undefined ) material.iridescenceThicknessRange = json.iridescenceThicknessRange;\n\t\tif ( json.transmission !== undefined ) material.transmission = json.transmission;\n\t\tif ( json.thickness !== undefined ) material.thickness = json.thickness;\n\t\tif ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance;\n\t\tif ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor );\n\t\tif ( json.anisotropy !== undefined ) material.anisotropy = json.anisotropy;\n\t\tif ( json.anisotropyRotation !== undefined ) material.anisotropyRotation = json.anisotropyRotation;\n\t\tif ( json.fog !== undefined ) material.fog = json.fog;\n\t\tif ( json.flatShading !== undefined ) material.flatShading = json.flatShading;\n\t\tif ( json.blending !== undefined ) material.blending = json.blending;\n\t\tif ( json.combine !== undefined ) material.combine = json.combine;\n\t\tif ( json.side !== undefined ) material.side = json.side;\n\t\tif ( json.shadowSide !== undefined ) material.shadowSide = json.shadowSide;\n\t\tif ( json.opacity !== undefined ) material.opacity = json.opacity;\n\t\tif ( json.transparent !== undefined ) material.transparent = json.transparent;\n\t\tif ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest;\n\t\tif ( json.alphaHash !== undefined ) material.alphaHash = json.alphaHash;\n\t\tif ( json.depthFunc !== undefined ) material.depthFunc = json.depthFunc;\n\t\tif ( json.depthTest !== undefined ) material.depthTest = json.depthTest;\n\t\tif ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite;\n\t\tif ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite;\n\t\tif ( json.blendSrc !== undefined ) material.blendSrc = json.blendSrc;\n\t\tif ( json.blendDst !== undefined ) material.blendDst = json.blendDst;\n\t\tif ( json.blendEquation !== undefined ) material.blendEquation = json.blendEquation;\n\t\tif ( json.blendSrcAlpha !== undefined ) material.blendSrcAlpha = json.blendSrcAlpha;\n\t\tif ( json.blendDstAlpha !== undefined ) material.blendDstAlpha = json.blendDstAlpha;\n\t\tif ( json.blendEquationAlpha !== undefined ) material.blendEquationAlpha = json.blendEquationAlpha;\n\t\tif ( json.blendColor !== undefined && material.blendColor !== undefined ) material.blendColor.setHex( json.blendColor );\n\t\tif ( json.blendAlpha !== undefined ) material.blendAlpha = json.blendAlpha;\n\t\tif ( json.stencilWriteMask !== undefined ) material.stencilWriteMask = json.stencilWriteMask;\n\t\tif ( json.stencilFunc !== undefined ) material.stencilFunc = json.stencilFunc;\n\t\tif ( json.stencilRef !== undefined ) material.stencilRef = json.stencilRef;\n\t\tif ( json.stencilFuncMask !== undefined ) material.stencilFuncMask = json.stencilFuncMask;\n\t\tif ( json.stencilFail !== undefined ) material.stencilFail = json.stencilFail;\n\t\tif ( json.stencilZFail !== undefined ) material.stencilZFail = json.stencilZFail;\n\t\tif ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass;\n\t\tif ( json.stencilWrite !== undefined ) material.stencilWrite = json.stencilWrite;\n\n\t\tif ( json.wireframe !== undefined ) material.wireframe = json.wireframe;\n\t\tif ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth;\n\t\tif ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap;\n\t\tif ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin;\n\n\t\tif ( json.rotation !== undefined ) material.rotation = json.rotation;\n\n\t\tif ( json.linewidth !== undefined ) material.linewidth = json.linewidth;\n\t\tif ( json.dashSize !== undefined ) material.dashSize = json.dashSize;\n\t\tif ( json.gapSize !== undefined ) material.gapSize = json.gapSize;\n\t\tif ( json.scale !== undefined ) material.scale = json.scale;\n\n\t\tif ( json.polygonOffset !== undefined ) material.polygonOffset = json.polygonOffset;\n\t\tif ( json.polygonOffsetFactor !== undefined ) material.polygonOffsetFactor = json.polygonOffsetFactor;\n\t\tif ( json.polygonOffsetUnits !== undefined ) material.polygonOffsetUnits = json.polygonOffsetUnits;\n\n\t\tif ( json.dithering !== undefined ) material.dithering = json.dithering;\n\n\t\tif ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage;\n\t\tif ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha;\n\t\tif ( json.forceSinglePass !== undefined ) material.forceSinglePass = json.forceSinglePass;\n\n\t\tif ( json.visible !== undefined ) material.visible = json.visible;\n\n\t\tif ( json.toneMapped !== undefined ) material.toneMapped = json.toneMapped;\n\n\t\tif ( json.userData !== undefined ) material.userData = json.userData;\n\n\t\tif ( json.vertexColors !== undefined ) {\n\n\t\t\tif ( typeof json.vertexColors === 'number' ) {\n\n\t\t\t\tmaterial.vertexColors = ( json.vertexColors > 0 ) ? true : false;\n\n\t\t\t} else {\n\n\t\t\t\tmaterial.vertexColors = json.vertexColors;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Shader Material\n\n\t\tif ( json.uniforms !== undefined ) {\n\n\t\t\tfor ( const name in json.uniforms ) {\n\n\t\t\t\tconst uniform = json.uniforms[ name ];\n\n\t\t\t\tmaterial.uniforms[ name ] = {};\n\n\t\t\t\tswitch ( uniform.type ) {\n\n\t\t\t\t\tcase 't':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = getTexture( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Color().setHex( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v2':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector2().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = uniform.value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json.defines !== undefined ) material.defines = json.defines;\n\t\tif ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader;\n\t\tif ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader;\n\t\tif ( json.glslVersion !== undefined ) material.glslVersion = json.glslVersion;\n\n\t\tif ( json.extensions !== undefined ) {\n\n\t\t\tfor ( const key in json.extensions ) {\n\n\t\t\t\tmaterial.extensions[ key ] = json.extensions[ key ];\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json.lights !== undefined ) material.lights = json.lights;\n\t\tif ( json.clipping !== undefined ) material.clipping = json.clipping;\n\n\t\t// for PointsMaterial\n\n\t\tif ( json.size !== undefined ) material.size = json.size;\n\t\tif ( json.sizeAttenuation !== undefined ) material.sizeAttenuation = json.sizeAttenuation;\n\n\t\t// maps\n\n\t\tif ( json.map !== undefined ) material.map = getTexture( json.map );\n\t\tif ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap );\n\n\t\tif ( json.alphaMap !== undefined ) material.alphaMap = getTexture( json.alphaMap );\n\n\t\tif ( json.bumpMap !== undefined ) material.bumpMap = getTexture( json.bumpMap );\n\t\tif ( json.bumpScale !== undefined ) material.bumpScale = json.bumpScale;\n\n\t\tif ( json.normalMap !== undefined ) material.normalMap = getTexture( json.normalMap );\n\t\tif ( json.normalMapType !== undefined ) material.normalMapType = json.normalMapType;\n\t\tif ( json.normalScale !== undefined ) {\n\n\t\t\tlet normalScale = json.normalScale;\n\n\t\t\tif ( Array.isArray( normalScale ) === false ) {\n\n\t\t\t\t// Blender exporter used to export a scalar. See #7459\n\n\t\t\t\tnormalScale = [ normalScale, normalScale ];\n\n\t\t\t}\n\n\t\t\tmaterial.normalScale = new Vector2().fromArray( normalScale );\n\n\t\t}\n\n\t\tif ( json.displacementMap !== undefined ) material.displacementMap = getTexture( json.displacementMap );\n\t\tif ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale;\n\t\tif ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias;\n\n\t\tif ( json.roughnessMap !== undefined ) material.roughnessMap = getTexture( json.roughnessMap );\n\t\tif ( json.metalnessMap !== undefined ) material.metalnessMap = getTexture( json.metalnessMap );\n\n\t\tif ( json.emissiveMap !== undefined ) material.emissiveMap = getTexture( json.emissiveMap );\n\t\tif ( json.emissiveIntensity !== undefined ) material.emissiveIntensity = json.emissiveIntensity;\n\n\t\tif ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap );\n\t\tif ( json.specularIntensityMap !== undefined ) material.specularIntensityMap = getTexture( json.specularIntensityMap );\n\t\tif ( json.specularColorMap !== undefined ) material.specularColorMap = getTexture( json.specularColorMap );\n\n\t\tif ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap );\n\t\tif ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity;\n\n\t\tif ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity;\n\t\tif ( json.refractionRatio !== undefined ) material.refractionRatio = json.refractionRatio;\n\n\t\tif ( json.lightMap !== undefined ) material.lightMap = getTexture( json.lightMap );\n\t\tif ( json.lightMapIntensity !== undefined ) material.lightMapIntensity = json.lightMapIntensity;\n\n\t\tif ( json.aoMap !== undefined ) material.aoMap = getTexture( json.aoMap );\n\t\tif ( json.aoMapIntensity !== undefined ) material.aoMapIntensity = json.aoMapIntensity;\n\n\t\tif ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap );\n\n\t\tif ( json.clearcoatMap !== undefined ) material.clearcoatMap = getTexture( json.clearcoatMap );\n\t\tif ( json.clearcoatRoughnessMap !== undefined ) material.clearcoatRoughnessMap = getTexture( json.clearcoatRoughnessMap );\n\t\tif ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap );\n\t\tif ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale );\n\n\t\tif ( json.iridescenceMap !== undefined ) material.iridescenceMap = getTexture( json.iridescenceMap );\n\t\tif ( json.iridescenceThicknessMap !== undefined ) material.iridescenceThicknessMap = getTexture( json.iridescenceThicknessMap );\n\n\t\tif ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap );\n\t\tif ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap );\n\n\t\tif ( json.anisotropyMap !== undefined ) material.anisotropyMap = getTexture( json.anisotropyMap );\n\n\t\tif ( json.sheenColorMap !== undefined ) material.sheenColorMap = getTexture( json.sheenColorMap );\n\t\tif ( json.sheenRoughnessMap !== undefined ) material.sheenRoughnessMap = getTexture( json.sheenRoughnessMap );\n\n\t\treturn material;\n\n\t}\n\n\tsetTextures( value ) {\n\n\t\tthis.textures = value;\n\t\treturn this;\n\n\t}\n\n\tstatic createMaterialFromType( type ) {\n\n\t\tconst materialLib = {\n\t\t\tShadowMaterial,\n\t\t\tSpriteMaterial,\n\t\t\tRawShaderMaterial,\n\t\t\tShaderMaterial,\n\t\t\tPointsMaterial,\n\t\t\tMeshPhysicalMaterial,\n\t\t\tMeshStandardMaterial,\n\t\t\tMeshPhongMaterial,\n\t\t\tMeshToonMaterial,\n\t\t\tMeshNormalMaterial,\n\t\t\tMeshLambertMaterial,\n\t\t\tMeshDepthMaterial,\n\t\t\tMeshDistanceMaterial,\n\t\t\tMeshBasicMaterial,\n\t\t\tMeshMatcapMaterial,\n\t\t\tLineDashedMaterial,\n\t\t\tLineBasicMaterial,\n\t\t\tMaterial\n\t\t};\n\n\t\treturn new materialLib[ type ]();\n\n\t}\n\n}\n\nclass LoaderUtils {\n\n\tstatic decodeText( array ) {\n\n\t\tif ( typeof TextDecoder !== 'undefined' ) {\n\n\t\t\treturn new TextDecoder().decode( array );\n\n\t\t}\n\n\t\t// Avoid the String.fromCharCode.apply(null, array) shortcut, which\n\t\t// throws a \"maximum call stack size exceeded\" error for large arrays.\n\n\t\tlet s = '';\n\n\t\tfor ( let i = 0, il = array.length; i < il; i ++ ) {\n\n\t\t\t// Implicitly assumes little-endian.\n\t\t\ts += String.fromCharCode( array[ i ] );\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// merges multi-byte utf-8 characters.\n\n\t\t\treturn decodeURIComponent( escape( s ) );\n\n\t\t} catch ( e ) { // see #16358\n\n\t\t\treturn s;\n\n\t\t}\n\n\t}\n\n\tstatic extractUrlBase( url ) {\n\n\t\tconst index = url.lastIndexOf( '/' );\n\n\t\tif ( index === - 1 ) return './';\n\n\t\treturn url.slice( 0, index + 1 );\n\n\t}\n\n\tstatic resolveURL( url, path ) {\n\n\t\t// Invalid URL\n\t\tif ( typeof url !== 'string' || url === '' ) return '';\n\n\t\t// Host Relative URL\n\t\tif ( /^https?:\\/\\//i.test( path ) && /^\\//.test( url ) ) {\n\n\t\t\tpath = path.replace( /(^https?:\\/\\/[^\\/]+).*/i, '$1' );\n\n\t\t}\n\n\t\t// Absolute URL http://,https://,//\n\t\tif ( /^(https?:)?\\/\\//i.test( url ) ) return url;\n\n\t\t// Data URI\n\t\tif ( /^data:.*,.*$/i.test( url ) ) return url;\n\n\t\t// Blob URL\n\t\tif ( /^blob:.*$/i.test( url ) ) return url;\n\n\t\t// Relative URL\n\t\treturn path + url;\n\n\t}\n\n}\n\nclass InstancedBufferGeometry extends BufferGeometry {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isInstancedBufferGeometry = true;\n\n\t\tthis.type = 'InstancedBufferGeometry';\n\t\tthis.instanceCount = Infinity;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.instanceCount = source.instanceCount;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.instanceCount = this.instanceCount;\n\n\t\tdata.isInstancedBufferGeometry = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nclass BufferGeometryLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst interleavedBufferMap = {};\n\t\tconst arrayBufferMap = {};\n\n\t\tfunction getInterleavedBuffer( json, uuid ) {\n\n\t\t\tif ( interleavedBufferMap[ uuid ] !== undefined ) return interleavedBufferMap[ uuid ];\n\n\t\t\tconst interleavedBuffers = json.interleavedBuffers;\n\t\t\tconst interleavedBuffer = interleavedBuffers[ uuid ];\n\n\t\t\tconst buffer = getArrayBuffer( json, interleavedBuffer.buffer );\n\n\t\t\tconst array = getTypedArray( interleavedBuffer.type, buffer );\n\t\t\tconst ib = new InterleavedBuffer( array, interleavedBuffer.stride );\n\t\t\tib.uuid = interleavedBuffer.uuid;\n\n\t\t\tinterleavedBufferMap[ uuid ] = ib;\n\n\t\t\treturn ib;\n\n\t\t}\n\n\t\tfunction getArrayBuffer( json, uuid ) {\n\n\t\t\tif ( arrayBufferMap[ uuid ] !== undefined ) return arrayBufferMap[ uuid ];\n\n\t\t\tconst arrayBuffers = json.arrayBuffers;\n\t\t\tconst arrayBuffer = arrayBuffers[ uuid ];\n\n\t\t\tconst ab = new Uint32Array( arrayBuffer ).buffer;\n\n\t\t\tarrayBufferMap[ uuid ] = ab;\n\n\t\t\treturn ab;\n\n\t\t}\n\n\t\tconst geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry();\n\n\t\tconst index = json.data.index;\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst typedArray = getTypedArray( index.type, index.array );\n\t\t\tgeometry.setIndex( new BufferAttribute( typedArray, 1 ) );\n\n\t\t}\n\n\t\tconst attributes = json.data.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\t\t\tlet bufferAttribute;\n\n\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t} else {\n\n\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\tconst bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute;\n\t\t\t\tbufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t}\n\n\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\tif ( attribute.usage !== undefined ) bufferAttribute.setUsage( attribute.usage );\n\n\t\t\tif ( attribute.updateRange !== undefined ) {\n\n\t\t\t\tbufferAttribute.updateRange.offset = attribute.updateRange.offset;\n\t\t\t\tbufferAttribute.updateRange.count = attribute.updateRange.count;\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( key, bufferAttribute );\n\n\t\t}\n\n\t\tconst morphAttributes = json.data.morphAttributes;\n\n\t\tif ( morphAttributes ) {\n\n\t\t\tfor ( const key in morphAttributes ) {\n\n\t\t\t\tconst attributeArray = morphAttributes[ key ];\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst attribute = attributeArray[ i ];\n\t\t\t\t\tlet bufferAttribute;\n\n\t\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\t\t\tbufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\t\t\tarray.push( bufferAttribute );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.morphAttributes[ key ] = array;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst morphTargetsRelative = json.data.morphTargetsRelative;\n\n\t\tif ( morphTargetsRelative ) {\n\n\t\t\tgeometry.morphTargetsRelative = true;\n\n\t\t}\n\n\t\tconst groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n\n\t\tif ( groups !== undefined ) {\n\n\t\t\tfor ( let i = 0, n = groups.length; i !== n; ++ i ) {\n\n\t\t\t\tconst group = groups[ i ];\n\n\t\t\t\tgeometry.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst boundingSphere = json.data.boundingSphere;\n\n\t\tif ( boundingSphere !== undefined ) {\n\n\t\t\tconst center = new Vector3();\n\n\t\t\tif ( boundingSphere.center !== undefined ) {\n\n\t\t\t\tcenter.fromArray( boundingSphere.center );\n\n\t\t\t}\n\n\t\t\tgeometry.boundingSphere = new Sphere( center, boundingSphere.radius );\n\n\t\t}\n\n\t\tif ( json.name ) geometry.name = json.name;\n\t\tif ( json.userData ) geometry.userData = json.userData;\n\n\t\treturn geometry;\n\n\t}\n\n}\n\nclass ObjectLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tlet json = null;\n\n\t\t\ttry {\n\n\t\t\t\tjson = JSON.parse( text );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\tif ( onError !== undefined ) onError( error );\n\n\t\t\t\tconsole.error( 'THREE:ObjectLoader: Can\\'t parse ' + url + '.', error.message );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst metadata = json.metadata;\n\n\t\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\t\tif ( onError !== undefined ) onError( new Error( 'THREE.ObjectLoader: Can\\'t load ' + url ) );\n\n\t\t\t\tconsole.error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tscope.parse( json, onLoad );\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tasync loadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tconst text = await loader.loadAsync( url, onProgress );\n\n\t\tconst json = JSON.parse( text );\n\n\t\tconst metadata = json.metadata;\n\n\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\tthrow new Error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\n\t\t}\n\n\t\treturn await scope.parseAsync( json );\n\n\t}\n\n\tparse( json, onLoad ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = this.parseImages( json.images, function () {\n\n\t\t\tif ( onLoad !== undefined ) onLoad( object );\n\n\t\t} );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\t//\n\n\t\tif ( onLoad !== undefined ) {\n\n\t\t\tlet hasImages = false;\n\n\t\t\tfor ( const uuid in images ) {\n\n\t\t\t\tif ( images[ uuid ].data instanceof HTMLImageElement ) {\n\n\t\t\t\t\thasImages = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( hasImages === false ) onLoad( object );\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tasync parseAsync( json ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = await this.parseImagesAsync( json.images );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\treturn object;\n\n\t}\n\n\tparseShapes( json ) {\n\n\t\tconst shapes = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst shape = new Shape().fromJSON( json[ i ] );\n\n\t\t\t\tshapes[ shape.uuid ] = shape;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn shapes;\n\n\t}\n\n\tparseSkeletons( json, object ) {\n\n\t\tconst skeletons = {};\n\t\tconst bones = {};\n\n\t\t// generate bone lookup table\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isBone ) bones[ child.uuid ] = child;\n\n\t\t} );\n\n\t\t// create skeletons\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst skeleton = new Skeleton().fromJSON( json[ i ], bones );\n\n\t\t\t\tskeletons[ skeleton.uuid ] = skeleton;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn skeletons;\n\n\t}\n\n\tparseGeometries( json, shapes ) {\n\n\t\tconst geometries = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst bufferGeometryLoader = new BufferGeometryLoader();\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tlet geometry;\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tswitch ( data.type ) {\n\n\t\t\t\t\tcase 'BufferGeometry':\n\t\t\t\t\tcase 'InstancedBufferGeometry':\n\n\t\t\t\t\t\tgeometry = bufferGeometryLoader.parse( data );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tif ( data.type in Geometries ) {\n\n\t\t\t\t\t\t\tgeometry = Geometries[ data.type ].fromJSON( data, shapes );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tconsole.warn( `THREE.ObjectLoader: Unsupported geometry type \"${ data.type }\"` );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) geometry.name = data.name;\n\t\t\t\tif ( data.userData !== undefined ) geometry.userData = data.userData;\n\n\t\t\t\tgeometries[ data.uuid ] = geometry;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn geometries;\n\n\t}\n\n\tparseMaterials( json, textures ) {\n\n\t\tconst cache = {}; // MultiMaterial\n\t\tconst materials = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst loader = new MaterialLoader();\n\t\t\tloader.setTextures( textures );\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( cache[ data.uuid ] === undefined ) {\n\n\t\t\t\t\tcache[ data.uuid ] = loader.parse( data );\n\n\t\t\t\t}\n\n\t\t\t\tmaterials[ data.uuid ] = cache[ data.uuid ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn materials;\n\n\t}\n\n\tparseAnimations( json ) {\n\n\t\tconst animations = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tconst clip = AnimationClip.parse( data );\n\n\t\t\t\tanimations[ clip.uuid ] = clip;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n\tparseImages( json, onLoad ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tfunction loadImage( url ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\treturn loader.load( url, function () {\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, undefined, function () {\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t} );\n\n\t\t}\n\n\t\tfunction deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn loadImage( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tconst manager = new LoadingManager( onLoad );\n\n\t\t\tloader = new ImageLoader( manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\tconst imageArray = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timageArray.push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\timages[ image.uuid ] = new Source( imageArray );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = deserializeImage( image.url );\n\t\t\t\t\timages[ image.uuid ] = new Source( deserializedImage );\n\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tasync parseImagesAsync( json ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tasync function deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn await loader.loadAsync( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tloader = new ImageLoader( this.manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\tconst imageArray = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = await deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timageArray.push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\timages[ image.uuid ] = new Source( imageArray );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = await deserializeImage( image.url );\n\t\t\t\t\timages[ image.uuid ] = new Source( deserializedImage );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tparseTextures( json, images ) {\n\n\t\tfunction parseConstant( value, type ) {\n\n\t\t\tif ( typeof value === 'number' ) return value;\n\n\t\t\tconsole.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value );\n\n\t\t\treturn type[ value ];\n\n\t\t}\n\n\t\tconst textures = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( data.image === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No \"image\" specified for', data.uuid );\n\n\t\t\t\t}\n\n\t\t\t\tif ( images[ data.image ] === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined image', data.image );\n\n\t\t\t\t}\n\n\t\t\t\tconst source = images[ data.image ];\n\t\t\t\tconst image = source.data;\n\n\t\t\t\tlet texture;\n\n\t\t\t\tif ( Array.isArray( image ) ) {\n\n\t\t\t\t\ttexture = new CubeTexture();\n\n\t\t\t\t\tif ( image.length === 6 ) texture.needsUpdate = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( image && image.data ) {\n\n\t\t\t\t\t\ttexture = new DataTexture();\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttexture = new Texture();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( image ) texture.needsUpdate = true; // textures can have undefined image data\n\n\t\t\t\t}\n\n\t\t\t\ttexture.source = source;\n\n\t\t\t\ttexture.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) texture.name = data.name;\n\n\t\t\t\tif ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING );\n\t\t\t\tif ( data.channel !== undefined ) texture.channel = data.channel;\n\n\t\t\t\tif ( data.offset !== undefined ) texture.offset.fromArray( data.offset );\n\t\t\t\tif ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );\n\t\t\t\tif ( data.center !== undefined ) texture.center.fromArray( data.center );\n\t\t\t\tif ( data.rotation !== undefined ) texture.rotation = data.rotation;\n\n\t\t\t\tif ( data.wrap !== undefined ) {\n\n\t\t\t\t\ttexture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING );\n\t\t\t\t\ttexture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING );\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.format !== undefined ) texture.format = data.format;\n\t\t\t\tif ( data.internalFormat !== undefined ) texture.internalFormat = data.internalFormat;\n\t\t\t\tif ( data.type !== undefined ) texture.type = data.type;\n\t\t\t\tif ( data.colorSpace !== undefined ) texture.colorSpace = data.colorSpace;\n\t\t\t\tif ( data.encoding !== undefined ) texture.encoding = data.encoding; // @deprecated, r152\n\n\t\t\t\tif ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;\n\n\t\t\t\tif ( data.flipY !== undefined ) texture.flipY = data.flipY;\n\n\t\t\t\tif ( data.generateMipmaps !== undefined ) texture.generateMipmaps = data.generateMipmaps;\n\t\t\t\tif ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha;\n\t\t\t\tif ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment;\n\t\t\t\tif ( data.compareFunction !== undefined ) texture.compareFunction = data.compareFunction;\n\n\t\t\t\tif ( data.userData !== undefined ) texture.userData = data.userData;\n\n\t\t\t\ttextures[ data.uuid ] = texture;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn textures;\n\n\t}\n\n\tparseObject( data, geometries, materials, textures, animations ) {\n\n\t\tlet object;\n\n\t\tfunction getGeometry( name ) {\n\n\t\t\tif ( geometries[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined geometry', name );\n\n\t\t\t}\n\n\t\t\treturn geometries[ name ];\n\n\t\t}\n\n\t\tfunction getMaterial( name ) {\n\n\t\t\tif ( name === undefined ) return undefined;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, l = name.length; i < l; i ++ ) {\n\n\t\t\t\t\tconst uuid = name[ i ];\n\n\t\t\t\t\tif ( materials[ uuid ] === undefined ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', uuid );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tarray.push( materials[ uuid ] );\n\n\t\t\t\t}\n\n\t\t\t\treturn array;\n\n\t\t\t}\n\n\t\t\tif ( materials[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', name );\n\n\t\t\t}\n\n\t\t\treturn materials[ name ];\n\n\t\t}\n\n\t\tfunction getTexture( uuid ) {\n\n\t\t\tif ( textures[ uuid ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined texture', uuid );\n\n\t\t\t}\n\n\t\t\treturn textures[ uuid ];\n\n\t\t}\n\n\t\tlet geometry, material;\n\n\t\tswitch ( data.type ) {\n\n\t\t\tcase 'Scene':\n\n\t\t\t\tobject = new Scene();\n\n\t\t\t\tif ( data.background !== undefined ) {\n\n\t\t\t\t\tif ( Number.isInteger( data.background ) ) {\n\n\t\t\t\t\t\tobject.background = new Color( data.background );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tobject.background = getTexture( data.background );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.environment !== undefined ) {\n\n\t\t\t\t\tobject.environment = getTexture( data.environment );\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.fog !== undefined ) {\n\n\t\t\t\t\tif ( data.fog.type === 'Fog' ) {\n\n\t\t\t\t\t\tobject.fog = new Fog( data.fog.color, data.fog.near, data.fog.far );\n\n\t\t\t\t\t} else if ( data.fog.type === 'FogExp2' ) {\n\n\t\t\t\t\t\tobject.fog = new FogExp2( data.fog.color, data.fog.density );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( data.fog.name !== '' ) {\n\n\t\t\t\t\t\tobject.fog.name = data.fog.name;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.backgroundBlurriness !== undefined ) object.backgroundBlurriness = data.backgroundBlurriness;\n\t\t\t\tif ( data.backgroundIntensity !== undefined ) object.backgroundIntensity = data.backgroundIntensity;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PerspectiveCamera':\n\n\t\t\t\tobject = new PerspectiveCamera( data.fov, data.aspect, data.near, data.far );\n\n\t\t\t\tif ( data.focus !== undefined ) object.focus = data.focus;\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.filmGauge !== undefined ) object.filmGauge = data.filmGauge;\n\t\t\t\tif ( data.filmOffset !== undefined ) object.filmOffset = data.filmOffset;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'OrthographicCamera':\n\n\t\t\t\tobject = new OrthographicCamera( data.left, data.right, data.top, data.bottom, data.near, data.far );\n\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'AmbientLight':\n\n\t\t\t\tobject = new AmbientLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'DirectionalLight':\n\n\t\t\t\tobject = new DirectionalLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointLight':\n\n\t\t\t\tobject = new PointLight( data.color, data.intensity, data.distance, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'RectAreaLight':\n\n\t\t\t\tobject = new RectAreaLight( data.color, data.intensity, data.width, data.height );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SpotLight':\n\n\t\t\t\tobject = new SpotLight( data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'HemisphereLight':\n\n\t\t\t\tobject = new HemisphereLight( data.color, data.groundColor, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LightProbe':\n\n\t\t\t\tobject = new LightProbe().fromJSON( data );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SkinnedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t \tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new SkinnedMesh( geometry, material );\n\n\t\t\t\tif ( data.bindMode !== undefined ) object.bindMode = data.bindMode;\n\t\t\t\tif ( data.bindMatrix !== undefined ) object.bindMatrix.fromArray( data.bindMatrix );\n\t\t\t\tif ( data.skeleton !== undefined ) object.skeleton = data.skeleton;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Mesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new Mesh( geometry, material );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'InstancedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\t\t\t\tconst count = data.count;\n\t\t\t\tconst instanceMatrix = data.instanceMatrix;\n\t\t\t\tconst instanceColor = data.instanceColor;\n\n\t\t\t\tobject = new InstancedMesh( geometry, material, count );\n\t\t\t\tobject.instanceMatrix = new InstancedBufferAttribute( new Float32Array( instanceMatrix.array ), 16 );\n\t\t\t\tif ( instanceColor !== undefined ) object.instanceColor = new InstancedBufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LOD':\n\n\t\t\t\tobject = new LOD();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Line':\n\n\t\t\t\tobject = new Line( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineLoop':\n\n\t\t\t\tobject = new LineLoop( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineSegments':\n\n\t\t\t\tobject = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointCloud':\n\t\t\tcase 'Points':\n\n\t\t\t\tobject = new Points( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Sprite':\n\n\t\t\t\tobject = new Sprite( getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Group':\n\n\t\t\t\tobject = new Group();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Bone':\n\n\t\t\t\tobject = new Bone();\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tobject = new Object3D();\n\n\t\t}\n\n\t\tobject.uuid = data.uuid;\n\n\t\tif ( data.name !== undefined ) object.name = data.name;\n\n\t\tif ( data.matrix !== undefined ) {\n\n\t\t\tobject.matrix.fromArray( data.matrix );\n\n\t\t\tif ( data.matrixAutoUpdate !== undefined ) object.matrixAutoUpdate = data.matrixAutoUpdate;\n\t\t\tif ( object.matrixAutoUpdate ) object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n\t\t} else {\n\n\t\t\tif ( data.position !== undefined ) object.position.fromArray( data.position );\n\t\t\tif ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation );\n\t\t\tif ( data.quaternion !== undefined ) object.quaternion.fromArray( data.quaternion );\n\t\t\tif ( data.scale !== undefined ) object.scale.fromArray( data.scale );\n\n\t\t}\n\n\t\tif ( data.up !== undefined ) object.up.fromArray( data.up );\n\n\t\tif ( data.castShadow !== undefined ) object.castShadow = data.castShadow;\n\t\tif ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow;\n\n\t\tif ( data.shadow ) {\n\n\t\t\tif ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias;\n\t\t\tif ( data.shadow.normalBias !== undefined ) object.shadow.normalBias = data.shadow.normalBias;\n\t\t\tif ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius;\n\t\t\tif ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize );\n\t\t\tif ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera );\n\n\t\t}\n\n\t\tif ( data.visible !== undefined ) object.visible = data.visible;\n\t\tif ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;\n\t\tif ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;\n\t\tif ( data.userData !== undefined ) object.userData = data.userData;\n\t\tif ( data.layers !== undefined ) object.layers.mask = data.layers;\n\n\t\tif ( data.children !== undefined ) {\n\n\t\t\tconst children = data.children;\n\n\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\tobject.add( this.parseObject( children[ i ], geometries, materials, textures, animations ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.animations !== undefined ) {\n\n\t\t\tconst objectAnimations = data.animations;\n\n\t\t\tfor ( let i = 0; i < objectAnimations.length; i ++ ) {\n\n\t\t\t\tconst uuid = objectAnimations[ i ];\n\n\t\t\t\tobject.animations.push( animations[ uuid ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.type === 'LOD' ) {\n\n\t\t\tif ( data.autoUpdate !== undefined ) object.autoUpdate = data.autoUpdate;\n\n\t\t\tconst levels = data.levels;\n\n\t\t\tfor ( let l = 0; l < levels.length; l ++ ) {\n\n\t\t\t\tconst level = levels[ l ];\n\t\t\t\tconst child = object.getObjectByProperty( 'uuid', level.object );\n\n\t\t\t\tif ( child !== undefined ) {\n\n\t\t\t\t\tobject.addLevel( child, level.distance, level.hysteresis );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tbindSkeletons( object, skeletons ) {\n\n\t\tif ( Object.keys( skeletons ).length === 0 ) return;\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isSkinnedMesh === true && child.skeleton !== undefined ) {\n\n\t\t\t\tconst skeleton = skeletons[ child.skeleton ];\n\n\t\t\t\tif ( skeleton === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tchild.bind( skeleton, child.bindMatrix );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t}\n\n}\n\nconst TEXTURE_MAPPING = {\n\tUVMapping: UVMapping,\n\tCubeReflectionMapping: CubeReflectionMapping,\n\tCubeRefractionMapping: CubeRefractionMapping,\n\tEquirectangularReflectionMapping: EquirectangularReflectionMapping,\n\tEquirectangularRefractionMapping: EquirectangularRefractionMapping,\n\tCubeUVReflectionMapping: CubeUVReflectionMapping\n};\n\nconst TEXTURE_WRAPPING = {\n\tRepeatWrapping: RepeatWrapping,\n\tClampToEdgeWrapping: ClampToEdgeWrapping,\n\tMirroredRepeatWrapping: MirroredRepeatWrapping\n};\n\nconst TEXTURE_FILTER = {\n\tNearestFilter: NearestFilter,\n\tNearestMipmapNearestFilter: NearestMipmapNearestFilter,\n\tNearestMipmapLinearFilter: NearestMipmapLinearFilter,\n\tLinearFilter: LinearFilter,\n\tLinearMipmapNearestFilter: LinearMipmapNearestFilter,\n\tLinearMipmapLinearFilter: LinearMipmapLinearFilter\n};\n\nclass ImageBitmapLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t\tthis.isImageBitmapLoader = true;\n\n\t\tif ( typeof createImageBitmap === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' );\n\n\t\t}\n\n\t\tif ( typeof fetch === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' );\n\n\t\t}\n\n\t\tthis.options = { premultiplyAlpha: 'none' };\n\n\t}\n\n\tsetOptions( options ) {\n\n\t\tthis.options = options;\n\n\t\treturn this;\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst fetchOptions = {};\n\t\tfetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include';\n\t\tfetchOptions.headers = this.requestHeader;\n\n\t\tfetch( url, fetchOptions ).then( function ( res ) {\n\n\t\t\treturn res.blob();\n\n\t\t} ).then( function ( blob ) {\n\n\t\t\treturn createImageBitmap( blob, Object.assign( scope.options, { colorSpaceConversion: 'none' } ) );\n\n\t\t} ).then( function ( imageBitmap ) {\n\n\t\t\tCache.add( url, imageBitmap );\n\n\t\t\tif ( onLoad ) onLoad( imageBitmap );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} ).catch( function ( e ) {\n\n\t\t\tif ( onError ) onError( e );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} );\n\n\t\tscope.manager.itemStart( url );\n\n\t}\n\n}\n\nlet _context;\n\nclass AudioContext {\n\n\tstatic getContext() {\n\n\t\tif ( _context === undefined ) {\n\n\t\t\t_context = new ( window.AudioContext || window.webkitAudioContext )();\n\n\t\t}\n\n\t\treturn _context;\n\n\t}\n\n\tstatic setContext( value ) {\n\n\t\t_context = value;\n\n\t}\n\n}\n\nclass AudioLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\ttry {\n\n\t\t\t\t// Create a copy of the buffer. The `decodeAudioData` method\n\t\t\t\t// detaches the buffer when complete, preventing reuse.\n\t\t\t\tconst bufferCopy = buffer.slice( 0 );\n\n\t\t\t\tconst context = AudioContext.getContext();\n\t\t\t\tcontext.decodeAudioData( bufferCopy, function ( audioBuffer ) {\n\n\t\t\t\t\tonLoad( audioBuffer );\n\n\t\t\t\t}, handleError );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\thandleError( e );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t\tfunction handleError( e ) {\n\n\t\t\tif ( onError ) {\n\n\t\t\t\tonError( e );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.error( e );\n\n\t\t\t}\n\n\t\t\tscope.manager.itemError( url );\n\n\t\t}\n\n\t}\n\n}\n\nconst _eyeRight = /*@__PURE__*/ new Matrix4();\nconst _eyeLeft = /*@__PURE__*/ new Matrix4();\nconst _projectionMatrix = /*@__PURE__*/ new Matrix4();\n\nclass StereoCamera {\n\n\tconstructor() {\n\n\t\tthis.type = 'StereoCamera';\n\n\t\tthis.aspect = 1;\n\n\t\tthis.eyeSep = 0.064;\n\n\t\tthis.cameraL = new PerspectiveCamera();\n\t\tthis.cameraL.layers.enable( 1 );\n\t\tthis.cameraL.matrixAutoUpdate = false;\n\n\t\tthis.cameraR = new PerspectiveCamera();\n\t\tthis.cameraR.layers.enable( 2 );\n\t\tthis.cameraR.matrixAutoUpdate = false;\n\n\t\tthis._cache = {\n\t\t\tfocus: null,\n\t\t\tfov: null,\n\t\t\taspect: null,\n\t\t\tnear: null,\n\t\t\tfar: null,\n\t\t\tzoom: null,\n\t\t\teyeSep: null\n\t\t};\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst cache = this._cache;\n\n\t\tconst needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov ||\n\t\t\tcache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near ||\n\t\t\tcache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n\n\t\tif ( needsUpdate ) {\n\n\t\t\tcache.focus = camera.focus;\n\t\t\tcache.fov = camera.fov;\n\t\t\tcache.aspect = camera.aspect * this.aspect;\n\t\t\tcache.near = camera.near;\n\t\t\tcache.far = camera.far;\n\t\t\tcache.zoom = camera.zoom;\n\t\t\tcache.eyeSep = this.eyeSep;\n\n\t\t\t// Off-axis stereoscopic effect based on\n\t\t\t// http://paulbourke.net/stereographics/stereorender/\n\n\t\t\t_projectionMatrix.copy( camera.projectionMatrix );\n\t\t\tconst eyeSepHalf = cache.eyeSep / 2;\n\t\t\tconst eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n\t\t\tconst ymax = ( cache.near * Math.tan( DEG2RAD * cache.fov * 0.5 ) ) / cache.zoom;\n\t\t\tlet xmin, xmax;\n\n\t\t\t// translate xOffset\n\n\t\t\t_eyeLeft.elements[ 12 ] = - eyeSepHalf;\n\t\t\t_eyeRight.elements[ 12 ] = eyeSepHalf;\n\n\t\t\t// for left eye\n\n\t\t\txmin = - ymax * cache.aspect + eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect + eyeSepOnProjection;\n\n\t\t\t_projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\t_projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraL.projectionMatrix.copy( _projectionMatrix );\n\n\t\t\t// for right eye\n\n\t\t\txmin = - ymax * cache.aspect - eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect - eyeSepOnProjection;\n\n\t\t\t_projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\t_projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraR.projectionMatrix.copy( _projectionMatrix );\n\n\t\t}\n\n\t\tthis.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeLeft );\n\t\tthis.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeRight );\n\n\t}\n\n}\n\nclass Clock {\n\n\tconstructor( autoStart = true ) {\n\n\t\tthis.autoStart = autoStart;\n\n\t\tthis.startTime = 0;\n\t\tthis.oldTime = 0;\n\t\tthis.elapsedTime = 0;\n\n\t\tthis.running = false;\n\n\t}\n\n\tstart() {\n\n\t\tthis.startTime = now();\n\n\t\tthis.oldTime = this.startTime;\n\t\tthis.elapsedTime = 0;\n\t\tthis.running = true;\n\n\t}\n\n\tstop() {\n\n\t\tthis.getElapsedTime();\n\t\tthis.running = false;\n\t\tthis.autoStart = false;\n\n\t}\n\n\tgetElapsedTime() {\n\n\t\tthis.getDelta();\n\t\treturn this.elapsedTime;\n\n\t}\n\n\tgetDelta() {\n\n\t\tlet diff = 0;\n\n\t\tif ( this.autoStart && ! this.running ) {\n\n\t\t\tthis.start();\n\t\t\treturn 0;\n\n\t\t}\n\n\t\tif ( this.running ) {\n\n\t\t\tconst newTime = now();\n\n\t\t\tdiff = ( newTime - this.oldTime ) / 1000;\n\t\t\tthis.oldTime = newTime;\n\n\t\t\tthis.elapsedTime += diff;\n\n\t\t}\n\n\t\treturn diff;\n\n\t}\n\n}\n\nfunction now() {\n\n\treturn ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732\n\n}\n\nconst _position$1 = /*@__PURE__*/ new Vector3();\nconst _quaternion$1 = /*@__PURE__*/ new Quaternion();\nconst _scale$1 = /*@__PURE__*/ new Vector3();\nconst _orientation$1 = /*@__PURE__*/ new Vector3();\n\nclass AudioListener extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'AudioListener';\n\n\t\tthis.context = AudioContext.getContext();\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( this.context.destination );\n\n\t\tthis.filter = null;\n\n\t\tthis.timeDelta = 0;\n\n\t\t// private\n\n\t\tthis._clock = new Clock();\n\n\t}\n\n\tgetInput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tremoveFilter() {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\t\t\tthis.gain.connect( this.context.destination );\n\t\t\tthis.filter = null;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.filter;\n\n\t}\n\n\tsetFilter( value ) {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\n\t\t} else {\n\n\t\t\tthis.gain.disconnect( this.context.destination );\n\n\t\t}\n\n\t\tthis.filter = value;\n\t\tthis.gain.connect( this.filter );\n\t\tthis.filter.connect( this.context.destination );\n\n\t\treturn this;\n\n\t}\n\n\tgetMasterVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetMasterVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tconst listener = this.context.listener;\n\t\tconst up = this.up;\n\n\t\tthis.timeDelta = this._clock.getDelta();\n\n\t\tthis.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 );\n\n\t\t_orientation$1.set( 0, 0, - 1 ).applyQuaternion( _quaternion$1 );\n\n\t\tif ( listener.positionX ) {\n\n\t\t\t// code path for Chrome (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.timeDelta;\n\n\t\t\tlistener.positionX.linearRampToValueAtTime( _position$1.x, endTime );\n\t\t\tlistener.positionY.linearRampToValueAtTime( _position$1.y, endTime );\n\t\t\tlistener.positionZ.linearRampToValueAtTime( _position$1.z, endTime );\n\t\t\tlistener.forwardX.linearRampToValueAtTime( _orientation$1.x, endTime );\n\t\t\tlistener.forwardY.linearRampToValueAtTime( _orientation$1.y, endTime );\n\t\t\tlistener.forwardZ.linearRampToValueAtTime( _orientation$1.z, endTime );\n\t\t\tlistener.upX.linearRampToValueAtTime( up.x, endTime );\n\t\t\tlistener.upY.linearRampToValueAtTime( up.y, endTime );\n\t\t\tlistener.upZ.linearRampToValueAtTime( up.z, endTime );\n\n\t\t} else {\n\n\t\t\tlistener.setPosition( _position$1.x, _position$1.y, _position$1.z );\n\t\t\tlistener.setOrientation( _orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass Audio extends Object3D {\n\n\tconstructor( listener ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Audio';\n\n\t\tthis.listener = listener;\n\t\tthis.context = listener.context;\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( listener.getInput() );\n\n\t\tthis.autoplay = false;\n\n\t\tthis.buffer = null;\n\t\tthis.detune = 0;\n\t\tthis.loop = false;\n\t\tthis.loopStart = 0;\n\t\tthis.loopEnd = 0;\n\t\tthis.offset = 0;\n\t\tthis.duration = undefined;\n\t\tthis.playbackRate = 1;\n\t\tthis.isPlaying = false;\n\t\tthis.hasPlaybackControl = true;\n\t\tthis.source = null;\n\t\tthis.sourceType = 'empty';\n\n\t\tthis._startedAt = 0;\n\t\tthis._progress = 0;\n\t\tthis._connected = false;\n\n\t\tthis.filters = [];\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tsetNodeSource( audioNode ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'audioNode';\n\t\tthis.source = audioNode;\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaElementSource( mediaElement ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaNode';\n\t\tthis.source = this.context.createMediaElementSource( mediaElement );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaStreamSource( mediaStream ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaStreamNode';\n\t\tthis.source = this.context.createMediaStreamSource( mediaStream );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetBuffer( audioBuffer ) {\n\n\t\tthis.buffer = audioBuffer;\n\t\tthis.sourceType = 'buffer';\n\n\t\tif ( this.autoplay ) this.play();\n\n\t\treturn this;\n\n\t}\n\n\tplay( delay = 0 ) {\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: Audio is already playing.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._startedAt = this.context.currentTime + delay;\n\n\t\tconst source = this.context.createBufferSource();\n\t\tsource.buffer = this.buffer;\n\t\tsource.loop = this.loop;\n\t\tsource.loopStart = this.loopStart;\n\t\tsource.loopEnd = this.loopEnd;\n\t\tsource.onended = this.onEnded.bind( this );\n\t\tsource.start( this._startedAt, this._progress + this.offset, this.duration );\n\n\t\tthis.isPlaying = true;\n\n\t\tthis.source = source;\n\n\t\tthis.setDetune( this.detune );\n\t\tthis.setPlaybackRate( this.playbackRate );\n\n\t\treturn this.connect();\n\n\t}\n\n\tpause() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\t// update current progress\n\n\t\t\tthis._progress += Math.max( this.context.currentTime - this._startedAt, 0 ) * this.playbackRate;\n\n\t\t\tif ( this.loop === true ) {\n\n\t\t\t\t// ensure _progress does not exceed duration with looped audios\n\n\t\t\t\tthis._progress = this._progress % ( this.duration || this.buffer.duration );\n\n\t\t\t}\n\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\n\t\t\tthis.isPlaying = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._progress = 0;\n\n\t\tif ( this.source !== null ) {\n\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\n\t\t}\n\n\t\tthis.isPlaying = false;\n\n\t\treturn this;\n\n\t}\n\n\tconnect() {\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.connect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].connect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].connect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.connect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = true;\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect() {\n\n\t\tif ( this._connected === false ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.disconnect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].disconnect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].disconnect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.disconnect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = false;\n\n\t\treturn this;\n\n\t}\n\n\tgetFilters() {\n\n\t\treturn this.filters;\n\n\t}\n\n\tsetFilters( value ) {\n\n\t\tif ( ! value ) value = [];\n\n\t\tif ( this._connected === true ) {\n\n\t\t\tthis.disconnect();\n\t\t\tthis.filters = value.slice();\n\t\t\tthis.connect();\n\n\t\t} else {\n\n\t\t\tthis.filters = value.slice();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetDetune( value ) {\n\n\t\tthis.detune = value;\n\n\t\tif ( this.source.detune === undefined ) return; // only set detune when available\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.detune.setTargetAtTime( this.detune, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetDetune() {\n\n\t\treturn this.detune;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.getFilters()[ 0 ];\n\n\t}\n\n\tsetFilter( filter ) {\n\n\t\treturn this.setFilters( filter ? [ filter ] : [] );\n\n\t}\n\n\tsetPlaybackRate( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.playbackRate = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.playbackRate.setTargetAtTime( this.playbackRate, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetPlaybackRate() {\n\n\t\treturn this.playbackRate;\n\n\t}\n\n\tonEnded() {\n\n\t\tthis.isPlaying = false;\n\n\t}\n\n\tgetLoop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn false;\n\n\t\t}\n\n\t\treturn this.loop;\n\n\t}\n\n\tsetLoop( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.loop = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.loop = this.loop;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopStart( value ) {\n\n\t\tthis.loopStart = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopEnd( value ) {\n\n\t\tthis.loopEnd = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _position = /*@__PURE__*/ new Vector3();\nconst _quaternion = /*@__PURE__*/ new Quaternion();\nconst _scale = /*@__PURE__*/ new Vector3();\nconst _orientation = /*@__PURE__*/ new Vector3();\n\nclass PositionalAudio extends Audio {\n\n\tconstructor( listener ) {\n\n\t\tsuper( listener );\n\n\t\tthis.panner = this.context.createPanner();\n\t\tthis.panner.panningModel = 'HRTF';\n\t\tthis.panner.connect( this.gain );\n\n\t}\n\n\tconnect() {\n\n\t\tsuper.connect();\n\n\t\tthis.panner.connect( this.gain );\n\n\t}\n\n\tdisconnect() {\n\n\t\tsuper.disconnect();\n\n\t\tthis.panner.disconnect( this.gain );\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.panner;\n\n\t}\n\n\tgetRefDistance() {\n\n\t\treturn this.panner.refDistance;\n\n\t}\n\n\tsetRefDistance( value ) {\n\n\t\tthis.panner.refDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetRolloffFactor() {\n\n\t\treturn this.panner.rolloffFactor;\n\n\t}\n\n\tsetRolloffFactor( value ) {\n\n\t\tthis.panner.rolloffFactor = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetDistanceModel() {\n\n\t\treturn this.panner.distanceModel;\n\n\t}\n\n\tsetDistanceModel( value ) {\n\n\t\tthis.panner.distanceModel = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxDistance() {\n\n\t\treturn this.panner.maxDistance;\n\n\t}\n\n\tsetMaxDistance( value ) {\n\n\t\tthis.panner.maxDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetDirectionalCone( coneInnerAngle, coneOuterAngle, coneOuterGain ) {\n\n\t\tthis.panner.coneInnerAngle = coneInnerAngle;\n\t\tthis.panner.coneOuterAngle = coneOuterAngle;\n\t\tthis.panner.coneOuterGain = coneOuterGain;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.hasPlaybackControl === true && this.isPlaying === false ) return;\n\n\t\tthis.matrixWorld.decompose( _position, _quaternion, _scale );\n\n\t\t_orientation.set( 0, 0, 1 ).applyQuaternion( _quaternion );\n\n\t\tconst panner = this.panner;\n\n\t\tif ( panner.positionX ) {\n\n\t\t\t// code path for Chrome and Firefox (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.listener.timeDelta;\n\n\t\t\tpanner.positionX.linearRampToValueAtTime( _position.x, endTime );\n\t\t\tpanner.positionY.linearRampToValueAtTime( _position.y, endTime );\n\t\t\tpanner.positionZ.linearRampToValueAtTime( _position.z, endTime );\n\t\t\tpanner.orientationX.linearRampToValueAtTime( _orientation.x, endTime );\n\t\t\tpanner.orientationY.linearRampToValueAtTime( _orientation.y, endTime );\n\t\t\tpanner.orientationZ.linearRampToValueAtTime( _orientation.z, endTime );\n\n\t\t} else {\n\n\t\t\tpanner.setPosition( _position.x, _position.y, _position.z );\n\t\t\tpanner.setOrientation( _orientation.x, _orientation.y, _orientation.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass AudioAnalyser {\n\n\tconstructor( audio, fftSize = 2048 ) {\n\n\t\tthis.analyser = audio.context.createAnalyser();\n\t\tthis.analyser.fftSize = fftSize;\n\n\t\tthis.data = new Uint8Array( this.analyser.frequencyBinCount );\n\n\t\taudio.getOutput().connect( this.analyser );\n\n\t}\n\n\n\tgetFrequencyData() {\n\n\t\tthis.analyser.getByteFrequencyData( this.data );\n\n\t\treturn this.data;\n\n\t}\n\n\tgetAverageFrequency() {\n\n\t\tlet value = 0;\n\t\tconst data = this.getFrequencyData();\n\n\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\tvalue += data[ i ];\n\n\t\t}\n\n\t\treturn value / data.length;\n\n\t}\n\n}\n\nclass PropertyMixer {\n\n\tconstructor( binding, typeName, valueSize ) {\n\n\t\tthis.binding = binding;\n\t\tthis.valueSize = valueSize;\n\n\t\tlet mixFunction,\n\t\t\tmixFunctionAdditive,\n\t\t\tsetIdentity;\n\n\t\t// buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n\t\t//\n\t\t// interpolators can use .buffer as their .result\n\t\t// the data then goes to 'incoming'\n\t\t//\n\t\t// 'accu0' and 'accu1' are used frame-interleaved for\n\t\t// the cumulative result and are compared to detect\n\t\t// changes\n\t\t//\n\t\t// 'orig' stores the original state of the property\n\t\t//\n\t\t// 'add' is used for additive cumulative results\n\t\t//\n\t\t// 'work' is optional and is only present for quaternion types. It is used\n\t\t// to store intermediate quaternion multiplication results\n\n\t\tswitch ( typeName ) {\n\n\t\t\tcase 'quaternion':\n\t\t\t\tmixFunction = this._slerp;\n\t\t\t\tmixFunctionAdditive = this._slerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityQuaternion;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 6 );\n\t\t\t\tthis._workIndex = 5;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\tcase 'bool':\n\t\t\t\tmixFunction = this._select;\n\n\t\t\t\t// Use the regular mix function and for additive on these types,\n\t\t\t\t// additive is not relevant for non-numeric types\n\t\t\t\tmixFunctionAdditive = this._select;\n\n\t\t\t\tsetIdentity = this._setAdditiveIdentityOther;\n\n\t\t\t\tthis.buffer = new Array( valueSize * 5 );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tmixFunction = this._lerp;\n\t\t\t\tmixFunctionAdditive = this._lerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityNumeric;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 5 );\n\n\t\t}\n\n\t\tthis._mixBufferRegion = mixFunction;\n\t\tthis._mixBufferRegionAdditive = mixFunctionAdditive;\n\t\tthis._setIdentity = setIdentity;\n\t\tthis._origIndex = 3;\n\t\tthis._addIndex = 4;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tthis.useCount = 0;\n\t\tthis.referenceCount = 0;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'accu'\n\taccumulate( accuIndex, weight ) {\n\n\t\t// note: happily accumulating nothing when weight = 0, the caller knows\n\t\t// the weight and shouldn't have made the call in the first place\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = accuIndex * stride + stride;\n\n\t\tlet currentWeight = this.cumulativeWeight;\n\n\t\tif ( currentWeight === 0 ) {\n\n\t\t\t// accuN := incoming * weight\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ offset + i ] = buffer[ i ];\n\n\t\t\t}\n\n\t\t\tcurrentWeight = weight;\n\n\t\t} else {\n\n\t\t\t// accuN := accuN + incoming * weight\n\n\t\t\tcurrentWeight += weight;\n\t\t\tconst mix = weight / currentWeight;\n\t\t\tthis._mixBufferRegion( buffer, offset, 0, mix, stride );\n\n\t\t}\n\n\t\tthis.cumulativeWeight = currentWeight;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'add'\n\taccumulateAdditive( weight ) {\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = stride * this._addIndex;\n\n\t\tif ( this.cumulativeWeightAdditive === 0 ) {\n\n\t\t\t// add = identity\n\n\t\t\tthis._setIdentity();\n\n\t\t}\n\n\t\t// add := add + incoming * weight\n\n\t\tthis._mixBufferRegionAdditive( buffer, offset, 0, weight, stride );\n\t\tthis.cumulativeWeightAdditive += weight;\n\n\t}\n\n\t// apply the state of 'accu' to the binding when accus differ\n\tapply( accuIndex ) {\n\n\t\tconst stride = this.valueSize,\n\t\t\tbuffer = this.buffer,\n\t\t\toffset = accuIndex * stride + stride,\n\n\t\t\tweight = this.cumulativeWeight,\n\t\t\tweightAdditive = this.cumulativeWeightAdditive,\n\n\t\t\tbinding = this.binding;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tif ( weight < 1 ) {\n\n\t\t\t// accuN := accuN + original * ( 1 - cumulativeWeight )\n\n\t\t\tconst originalValueOffset = stride * this._origIndex;\n\n\t\t\tthis._mixBufferRegion(\n\t\t\t\tbuffer, offset, originalValueOffset, 1 - weight, stride );\n\n\t\t}\n\n\t\tif ( weightAdditive > 0 ) {\n\n\t\t\t// accuN := accuN + additive accuN\n\n\t\t\tthis._mixBufferRegionAdditive( buffer, offset, this._addIndex * stride, 1, stride );\n\n\t\t}\n\n\t\tfor ( let i = stride, e = stride + stride; i !== e; ++ i ) {\n\n\t\t\tif ( buffer[ i ] !== buffer[ i + stride ] ) {\n\n\t\t\t\t// value has changed -> update scene graph\n\n\t\t\t\tbinding.setValue( buffer, offset );\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remember the state of the bound property and copy it to both accus\n\tsaveOriginalState() {\n\n\t\tconst binding = this.binding;\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\n\t\t\toriginalValueOffset = stride * this._origIndex;\n\n\t\tbinding.getValue( buffer, originalValueOffset );\n\n\t\t// accu[0..1] := orig -- initially detect changes against the original\n\t\tfor ( let i = stride, e = originalValueOffset; i !== e; ++ i ) {\n\n\t\t\tbuffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ];\n\n\t\t}\n\n\t\t// Add to identity for additive\n\t\tthis._setIdentity();\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t}\n\n\t// apply the state previously taken via 'saveOriginalState' to the binding\n\trestoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}\n\n\t_setAdditiveIdentityNumeric() {\n\n\t\tconst startIndex = this._addIndex * this.valueSize;\n\t\tconst endIndex = startIndex + this.valueSize;\n\n\t\tfor ( let i = startIndex; i < endIndex; i ++ ) {\n\n\t\t\tthis.buffer[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\t_setAdditiveIdentityQuaternion() {\n\n\t\tthis._setAdditiveIdentityNumeric();\n\t\tthis.buffer[ this._addIndex * this.valueSize + 3 ] = 1;\n\n\t}\n\n\t_setAdditiveIdentityOther() {\n\n\t\tconst startIndex = this._origIndex * this.valueSize;\n\t\tconst targetIndex = this._addIndex * this.valueSize;\n\n\t\tfor ( let i = 0; i < this.valueSize; i ++ ) {\n\n\t\t\tthis.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ];\n\n\t\t}\n\n\t}\n\n\n\t// mix functions\n\n\t_select( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tif ( t >= 0.5 ) {\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ dstOffset + i ] = buffer[ srcOffset + i ];\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_slerp( buffer, dstOffset, srcOffset, t ) {\n\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t );\n\n\t}\n\n\t_slerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst workOffset = this._workIndex * stride;\n\n\t\t// Store result in intermediate buffer offset\n\t\tQuaternion.multiplyQuaternionsFlat( buffer, workOffset, buffer, dstOffset, buffer, srcOffset );\n\n\t\t// Slerp to the intermediate result\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t );\n\n\t}\n\n\t_lerp( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst s = 1 - t;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] * s + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n\t_lerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n}\n\n// Characters [].:/ are reserved for track binding syntax.\nconst _RESERVED_CHARS_RE = '\\\\[\\\\]\\\\.:\\\\/';\nconst _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' );\n\n// Attempts to allow node names from any language. ES5's `\\w` regexp matches\n// only latin characters, and the unicode \\p{L} is not yet supported. So\n// instead, we exclude reserved characters and match everything else.\nconst _wordChar = '[^' + _RESERVED_CHARS_RE + ']';\nconst _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\\\.', '' ) + ']';\n\n// Parent directories, delimited by '/' or ':'. Currently unused, but must\n// be matched to parse the rest of the track name.\nconst _directoryRe = /*@__PURE__*/ /((?:WC+[\\/:])*)/.source.replace( 'WC', _wordChar );\n\n// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\nconst _nodeRe = /*@__PURE__*/ /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot );\n\n// Object on target node, and accessor. May not contain reserved\n// characters. Accessor may contain any character except closing bracket.\nconst _objectRe = /*@__PURE__*/ /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace( 'WC', _wordChar );\n\n// Property and accessor. May not contain reserved characters. Accessor may\n// contain any non-bracket characters.\nconst _propertyRe = /*@__PURE__*/ /\\.(WC+)(?:\\[(.+)\\])?/.source.replace( 'WC', _wordChar );\n\nconst _trackRe = new RegExp( ''\n\t+ '^'\n\t+ _directoryRe\n\t+ _nodeRe\n\t+ _objectRe\n\t+ _propertyRe\n\t+ '$'\n);\n\nconst _supportedObjectNames = [ 'material', 'materials', 'bones', 'map' ];\n\nclass Composite {\n\n\tconstructor( targetGroup, path, optionalParsedPath ) {\n\n\t\tconst parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis._targetGroup = targetGroup;\n\t\tthis._bindings = targetGroup.subscribe_( path, parsedPath );\n\n\t}\n\n\tgetValue( array, offset ) {\n\n\t\tthis.bind(); // bind all binding\n\n\t\tconst firstValidIndex = this._targetGroup.nCachedObjects_,\n\t\t\tbinding = this._bindings[ firstValidIndex ];\n\n\t\t// and only call .getValue on the first\n\t\tif ( binding !== undefined ) binding.getValue( array, offset );\n\n\t}\n\n\tsetValue( array, offset ) {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].setValue( array, offset );\n\n\t\t}\n\n\t}\n\n\tbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].bind();\n\n\t\t}\n\n\t}\n\n\tunbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].unbind();\n\n\t\t}\n\n\t}\n\n}\n\n// Note: This class uses a State pattern on a per-method basis:\n// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n// prototype version of these methods with one that represents\n// the bound state. When the property is not found, the methods\n// become no-ops.\nclass PropertyBinding {\n\n\tconstructor( rootNode, path, parsedPath ) {\n\n\t\tthis.path = path;\n\t\tthis.parsedPath = parsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName );\n\n\t\tthis.rootNode = rootNode;\n\n\t\t// initial state of these methods that calls 'bind'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n\n\tstatic create( root, path, parsedPath ) {\n\n\t\tif ( ! ( root && root.isAnimationObjectGroup ) ) {\n\n\t\t\treturn new PropertyBinding( root, path, parsedPath );\n\n\t\t} else {\n\n\t\t\treturn new PropertyBinding.Composite( root, path, parsedPath );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Replaces spaces with underscores and removes unsupported characters from\n\t * node names, to ensure compatibility with parseTrackName().\n\t *\n\t * @param {string} name Node name to be sanitized.\n\t * @return {string}\n\t */\n\tstatic sanitizeNodeName( name ) {\n\n\t\treturn name.replace( /\\s/g, '_' ).replace( _reservedRe, '' );\n\n\t}\n\n\tstatic parseTrackName( trackName ) {\n\n\t\tconst matches = _trackRe.exec( trackName );\n\n\t\tif ( matches === null ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName );\n\n\t\t}\n\n\t\tconst results = {\n\t\t\t// directoryName: matches[ 1 ], // (tschw) currently unused\n\t\t\tnodeName: matches[ 2 ],\n\t\t\tobjectName: matches[ 3 ],\n\t\t\tobjectIndex: matches[ 4 ],\n\t\t\tpropertyName: matches[ 5 ], // required\n\t\t\tpropertyIndex: matches[ 6 ]\n\t\t};\n\n\t\tconst lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' );\n\n\t\tif ( lastDot !== undefined && lastDot !== - 1 ) {\n\n\t\t\tconst objectName = results.nodeName.substring( lastDot + 1 );\n\n\t\t\t// Object names must be checked against an allowlist. Otherwise, there\n\t\t\t// is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n\t\t\t// 'bar' could be the objectName, or part of a nodeName (which can\n\t\t\t// include '.' characters).\n\t\t\tif ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) {\n\n\t\t\t\tresults.nodeName = results.nodeName.substring( 0, lastDot );\n\t\t\t\tresults.objectName = objectName;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( results.propertyName === null || results.propertyName.length === 0 ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName );\n\n\t\t}\n\n\t\treturn results;\n\n\t}\n\n\tstatic findNode( root, nodeName ) {\n\n\t\tif ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) {\n\n\t\t\treturn root;\n\n\t\t}\n\n\t\t// search into skeleton bones.\n\t\tif ( root.skeleton ) {\n\n\t\t\tconst bone = root.skeleton.getBoneByName( nodeName );\n\n\t\t\tif ( bone !== undefined ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// search into node subtree.\n\t\tif ( root.children ) {\n\n\t\t\tconst searchNodeSubtree = function ( children ) {\n\n\t\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\t\tconst childNode = children[ i ];\n\n\t\t\t\t\tif ( childNode.name === nodeName || childNode.uuid === nodeName ) {\n\n\t\t\t\t\t\treturn childNode;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst result = searchNodeSubtree( childNode.children );\n\n\t\t\t\t\tif ( result ) return result;\n\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\n\t\t\t};\n\n\t\t\tconst subTreeNode = searchNodeSubtree( root.children );\n\n\t\t\tif ( subTreeNode ) {\n\n\t\t\t\treturn subTreeNode;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// these are used to \"bind\" a nonexistent property\n\t_getValue_unavailable() {}\n\t_setValue_unavailable() {}\n\n\t// Getters\n\n\t_getValue_direct( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.targetObject[ this.propertyName ];\n\n\t}\n\n\t_getValue_array( buffer, offset ) {\n\n\t\tconst source = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = source.length; i !== n; ++ i ) {\n\n\t\t\tbuffer[ offset ++ ] = source[ i ];\n\n\t\t}\n\n\t}\n\n\t_getValue_arrayElement( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.resolvedProperty[ this.propertyIndex ];\n\n\t}\n\n\t_getValue_toArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.toArray( buffer, offset );\n\n\t}\n\n\t// Direct\n\n\t_setValue_direct( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_direct_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// EntireArray\n\n\t_setValue_array( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t}\n\n\t_setValue_array_setNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// ArrayElement\n\n\t_setValue_arrayElement( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_arrayElement_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// HasToFromArray\n\n\t_setValue_fromArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\n\t}\n\n\t_setValue_fromArray_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t_getValue_unbound( targetArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.getValue( targetArray, offset );\n\n\t}\n\n\t_setValue_unbound( sourceArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.setValue( sourceArray, offset );\n\n\t}\n\n\t// create getter / setter pair for a property in the scene graph\n\tbind() {\n\n\t\tlet targetObject = this.node;\n\t\tconst parsedPath = this.parsedPath;\n\n\t\tconst objectName = parsedPath.objectName;\n\t\tconst propertyName = parsedPath.propertyName;\n\t\tlet propertyIndex = parsedPath.propertyIndex;\n\n\t\tif ( ! targetObject ) {\n\n\t\t\ttargetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName );\n\n\t\t\tthis.node = targetObject;\n\n\t\t}\n\n\t\t// set fail state so we can just 'return' on error\n\t\tthis.getValue = this._getValue_unavailable;\n\t\tthis.setValue = this._setValue_unavailable;\n\n\t\t// ensure there is a value node\n\t\tif ( ! targetObject ) {\n\n\t\t\tconsole.warn( 'THREE.PropertyBinding: No target node found for track: ' + this.path + '.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( objectName ) {\n\n\t\t\tlet objectIndex = parsedPath.objectIndex;\n\n\t\t\t// special cases were we need to reach deeper into the hierarchy to get the face materials....\n\t\t\tswitch ( objectName ) {\n\n\t\t\t\tcase 'materials':\n\n\t\t\t\t\tif ( ! targetObject.material ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material.materials ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject.material.materials;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'bones':\n\n\t\t\t\t\tif ( ! targetObject.skeleton ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// potential future optimization: skip this if propertyIndex is already an integer\n\t\t\t\t\t// and convert the integer string to a true integer.\n\n\t\t\t\t\ttargetObject = targetObject.skeleton.bones;\n\n\t\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\t\tfor ( let i = 0; i < targetObject.length; i ++ ) {\n\n\t\t\t\t\t\tif ( targetObject[ i ].name === objectIndex ) {\n\n\t\t\t\t\t\t\tobjectIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map':\n\n\t\t\t\t\tif ( 'map' in targetObject ) {\n\n\t\t\t\t\t\ttargetObject = targetObject.map;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material.map ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject.material.map;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tif ( targetObject[ objectName ] === undefined ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject[ objectName ];\n\n\t\t\t}\n\n\n\t\t\tif ( objectIndex !== undefined ) {\n\n\t\t\t\tif ( targetObject[ objectIndex ] === undefined ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\ttargetObject = targetObject[ objectIndex ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// resolve property\n\t\tconst nodeProperty = targetObject[ propertyName ];\n\n\t\tif ( nodeProperty === undefined ) {\n\n\t\t\tconst nodeName = parsedPath.nodeName;\n\n\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName +\n\t\t\t\t'.' + propertyName + ' but it wasn\\'t found.', targetObject );\n\t\t\treturn;\n\n\t\t}\n\n\t\t// determine versioning scheme\n\t\tlet versioning = this.Versioning.None;\n\n\t\tthis.targetObject = targetObject;\n\n\t\tif ( targetObject.needsUpdate !== undefined ) { // material\n\n\t\t\tversioning = this.Versioning.NeedsUpdate;\n\n\t\t} else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform\n\n\t\t\tversioning = this.Versioning.MatrixWorldNeedsUpdate;\n\n\t\t}\n\n\t\t// determine how the property gets bound\n\t\tlet bindingType = this.BindingType.Direct;\n\n\t\tif ( propertyIndex !== undefined ) {\n\n\t\t\t// access a sub element of the property array (only primitives are supported right now)\n\n\t\t\tif ( propertyName === 'morphTargetInfluences' ) {\n\n\t\t\t\t// potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n\n\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\tif ( ! targetObject.geometry ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( ! targetObject.geometry.morphAttributes ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) {\n\n\t\t\t\t\tpropertyIndex = targetObject.morphTargetDictionary[ propertyIndex ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbindingType = this.BindingType.ArrayElement;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\tthis.propertyIndex = propertyIndex;\n\n\t\t} else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) {\n\n\t\t\t// must use copy for Object3D.Euler/Quaternion\n\n\t\t\tbindingType = this.BindingType.HasFromToArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else if ( Array.isArray( nodeProperty ) ) {\n\n\t\t\tbindingType = this.BindingType.EntireArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else {\n\n\t\t\tthis.propertyName = propertyName;\n\n\t\t}\n\n\t\t// select getter / setter\n\t\tthis.getValue = this.GetterByBindingType[ bindingType ];\n\t\tthis.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ];\n\n\t}\n\n\tunbind() {\n\n\t\tthis.node = null;\n\n\t\t// back to the prototype version of getValue / setValue\n\t\t// note: avoiding to mutate the shape of 'this' via 'delete'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n}\n\nPropertyBinding.Composite = Composite;\n\nPropertyBinding.prototype.BindingType = {\n\tDirect: 0,\n\tEntireArray: 1,\n\tArrayElement: 2,\n\tHasFromToArray: 3\n};\n\nPropertyBinding.prototype.Versioning = {\n\tNone: 0,\n\tNeedsUpdate: 1,\n\tMatrixWorldNeedsUpdate: 2\n};\n\nPropertyBinding.prototype.GetterByBindingType = [\n\n\tPropertyBinding.prototype._getValue_direct,\n\tPropertyBinding.prototype._getValue_array,\n\tPropertyBinding.prototype._getValue_arrayElement,\n\tPropertyBinding.prototype._getValue_toArray,\n\n];\n\nPropertyBinding.prototype.SetterByBindingTypeAndVersioning = [\n\n\t[\n\t\t// Direct\n\t\tPropertyBinding.prototype._setValue_direct,\n\t\tPropertyBinding.prototype._setValue_direct_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// EntireArray\n\n\t\tPropertyBinding.prototype._setValue_array,\n\t\tPropertyBinding.prototype._setValue_array_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// ArrayElement\n\t\tPropertyBinding.prototype._setValue_arrayElement,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// HasToFromArray\n\t\tPropertyBinding.prototype._setValue_fromArray,\n\t\tPropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate,\n\n\t]\n\n];\n\n/**\n *\n * A group of objects that receives a shared animation state.\n *\n * Usage:\n *\n * - Add objects you would otherwise pass as 'root' to the\n * constructor or the .clipAction method of AnimationMixer.\n *\n * - Instead pass this object as 'root'.\n *\n * - You can also add and remove objects later when the mixer\n * is running.\n *\n * Note:\n *\n * Objects of this class appear as one object to the mixer,\n * so cache control of the individual objects must be done\n * on the group.\n *\n * Limitation:\n *\n * - The animated properties must be compatible among the\n * all objects in the group.\n *\n * - A single property can either be controlled through a\n * target group or directly, but not both.\n */\n\nclass AnimationObjectGroup {\n\n\tconstructor() {\n\n\t\tthis.isAnimationObjectGroup = true;\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// cached objects followed by the active ones\n\t\tthis._objects = Array.prototype.slice.call( arguments );\n\n\t\tthis.nCachedObjects_ = 0; // threshold\n\t\t// note: read by PropertyBinding.Composite\n\n\t\tconst indices = {};\n\t\tthis._indicesByUUID = indices; // for bookkeeping\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tindices[ arguments[ i ].uuid ] = i;\n\n\t\t}\n\n\t\tthis._paths = []; // inside: string\n\t\tthis._parsedPaths = []; // inside: { we don't care, here }\n\t\tthis._bindings = []; // inside: Array< PropertyBinding >\n\t\tthis._bindingsIndicesByPath = {}; // inside: indices in these arrays\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tobjects: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._objects.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn this.total - scope.nCachedObjects_;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tget bindingsPerObject() {\n\n\t\t\t\treturn scope._bindings.length;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tadd() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tpaths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet knownObject = undefined,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid;\n\t\t\tlet index = indicesByUUID[ uuid ];\n\n\t\t\tif ( index === undefined ) {\n\n\t\t\t\t// unknown object -> add it to the ACTIVE region\n\n\t\t\t\tindex = nObjects ++;\n\t\t\t\tindicesByUUID[ uuid ] = index;\n\t\t\t\tobjects.push( object );\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tbindings[ j ].push( new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ) );\n\n\t\t\t\t}\n\n\t\t\t} else if ( index < nCachedObjects ) {\n\n\t\t\t\tknownObject = objects[ index ];\n\n\t\t\t\t// move existing object to the ACTIVE region\n\n\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ];\n\n\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = firstActiveIndex;\n\t\t\t\tobjects[ firstActiveIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ];\n\n\t\t\t\t\tlet binding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\n\t\t\t\t\tif ( binding === undefined ) {\n\n\t\t\t\t\t\t// since we do not bother to create new bindings\n\t\t\t\t\t\t// for objects that are cached, the binding may\n\t\t\t\t\t\t// or may not exist\n\n\t\t\t\t\t\tbinding = new PropertyBinding( object, paths[ j ], parsedPaths[ j ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t} else if ( objects[ index ] !== knownObject ) {\n\n\t\t\t\tconsole.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' +\n\t\t\t\t\t'detected. Clean the caches or recreate your infrastructure when reloading scenes.' );\n\n\t\t\t} // else the object is already where we want it to be\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\tremove() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined && index >= nCachedObjects ) {\n\n\t\t\t\t// move existing object into the CACHED region\n\n\t\t\t\tconst lastCachedIndex = nCachedObjects ++,\n\t\t\t\t\tfirstActiveObject = objects[ lastCachedIndex ];\n\n\t\t\t\tindicesByUUID[ firstActiveObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = firstActiveObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = lastCachedIndex;\n\t\t\t\tobjects[ lastCachedIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tfirstActive = bindingsForPath[ lastCachedIndex ],\n\t\t\t\t\t\tbinding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = firstActive;\n\t\t\t\t\tbindingsForPath[ lastCachedIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// remove & forget\n\tuncache() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_,\n\t\t\tnObjects = objects.length;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined ) {\n\n\t\t\t\tdelete indicesByUUID[ uuid ];\n\n\t\t\t\tif ( index < nCachedObjects ) {\n\n\t\t\t\t\t// object is cached, shrink the CACHED region\n\n\t\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ],\n\t\t\t\t\t\tlastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\t// last cached object takes this object's place\n\t\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\t\t// last object goes to the activated slot and pop\n\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = firstActiveIndex;\n\t\t\t\t\tobjects[ firstActiveIndex ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ],\n\t\t\t\t\t\t\tlast = bindingsForPath[ lastIndex ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\t\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = last;\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// object is active, just swap with the last and pop\n\n\t\t\t\t\tconst lastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\tif ( lastIndex > 0 ) {\n\n\t\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = index;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tobjects[ index ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = bindingsForPath[ lastIndex ];\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} // cached or active\n\n\t\t\t} // if object is known\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// Internal interface used by befriended PropertyBinding.Composite:\n\n\tsubscribe_( path, parsedPath ) {\n\n\t\t// returns an array of bindings for the given path that is changed\n\t\t// according to the contained objects in the group\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath;\n\t\tlet index = indicesByPath[ path ];\n\t\tconst bindings = this._bindings;\n\n\t\tif ( index !== undefined ) return bindings[ index ];\n\n\t\tconst paths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tobjects = this._objects,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_,\n\t\t\tbindingsForPath = new Array( nObjects );\n\n\t\tindex = bindings.length;\n\n\t\tindicesByPath[ path ] = index;\n\n\t\tpaths.push( path );\n\t\tparsedPaths.push( parsedPath );\n\t\tbindings.push( bindingsForPath );\n\n\t\tfor ( let i = nCachedObjects, n = objects.length; i !== n; ++ i ) {\n\n\t\t\tconst object = objects[ i ];\n\t\t\tbindingsForPath[ i ] = new PropertyBinding( object, path, parsedPath );\n\n\t\t}\n\n\t\treturn bindingsForPath;\n\n\t}\n\n\tunsubscribe_( path ) {\n\n\t\t// tells the group to forget about a property path and no longer\n\t\t// update the array previously obtained with 'subscribe_'\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath,\n\t\t\tindex = indicesByPath[ path ];\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst paths = this._paths,\n\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\tbindings = this._bindings,\n\t\t\t\tlastBindingsIndex = bindings.length - 1,\n\t\t\t\tlastBindings = bindings[ lastBindingsIndex ],\n\t\t\t\tlastBindingsPath = path[ lastBindingsIndex ];\n\n\t\t\tindicesByPath[ lastBindingsPath ] = index;\n\n\t\t\tbindings[ index ] = lastBindings;\n\t\t\tbindings.pop();\n\n\t\t\tparsedPaths[ index ] = parsedPaths[ lastBindingsIndex ];\n\t\t\tparsedPaths.pop();\n\n\t\t\tpaths[ index ] = paths[ lastBindingsIndex ];\n\t\t\tpaths.pop();\n\n\t\t}\n\n\t}\n\n}\n\nclass AnimationAction {\n\n\tconstructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) {\n\n\t\tthis._mixer = mixer;\n\t\tthis._clip = clip;\n\t\tthis._localRoot = localRoot;\n\t\tthis.blendMode = blendMode;\n\n\t\tconst tracks = clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tinterpolants = new Array( nTracks );\n\n\t\tconst interpolantSettings = {\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t};\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst interpolant = tracks[ i ].createInterpolant( null );\n\t\t\tinterpolants[ i ] = interpolant;\n\t\t\tinterpolant.settings = interpolantSettings;\n\n\t\t}\n\n\t\tthis._interpolantSettings = interpolantSettings;\n\n\t\tthis._interpolants = interpolants; // bound by the mixer\n\n\t\t// inside: PropertyMixer (managed by the mixer)\n\t\tthis._propertyBindings = new Array( nTracks );\n\n\t\tthis._cacheIndex = null; // for the memory manager\n\t\tthis._byClipCacheIndex = null; // for the memory manager\n\n\t\tthis._timeScaleInterpolant = null;\n\t\tthis._weightInterpolant = null;\n\n\t\tthis.loop = LoopRepeat;\n\t\tthis._loopCount = - 1;\n\n\t\t// global mixer time when the action is to be started\n\t\t// it's set back to 'null' upon start of the action\n\t\tthis._startTime = null;\n\n\t\t// scaled local time of the action\n\t\t// gets clamped or wrapped to 0..clip.duration according to loop\n\t\tthis.time = 0;\n\n\t\tthis.timeScale = 1;\n\t\tthis._effectiveTimeScale = 1;\n\n\t\tthis.weight = 1;\n\t\tthis._effectiveWeight = 1;\n\n\t\tthis.repetitions = Infinity; // no. of repetitions when looping\n\n\t\tthis.paused = false; // true -> zero effective time scale\n\t\tthis.enabled = true; // false -> zero effective weight\n\n\t\tthis.clampWhenFinished = false;// keep feeding the last frame?\n\n\t\tthis.zeroSlopeAtStart = true;// for smooth interpolation w/o separate\n\t\tthis.zeroSlopeAtEnd = true;// clips for start, loop and end\n\n\t}\n\n\t// State & Scheduling\n\n\tplay() {\n\n\t\tthis._mixer._activateAction( this );\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tthis._mixer._deactivateAction( this );\n\n\t\treturn this.reset();\n\n\t}\n\n\treset() {\n\n\t\tthis.paused = false;\n\t\tthis.enabled = true;\n\n\t\tthis.time = 0; // restart clip\n\t\tthis._loopCount = - 1;// forget previous loops\n\t\tthis._startTime = null;// forget scheduling\n\n\t\treturn this.stopFading().stopWarping();\n\n\t}\n\n\tisRunning() {\n\n\t\treturn this.enabled && ! this.paused && this.timeScale !== 0 &&\n\t\t\tthis._startTime === null && this._mixer._isActiveAction( this );\n\n\t}\n\n\t// return true when play has been called\n\tisScheduled() {\n\n\t\treturn this._mixer._isActiveAction( this );\n\n\t}\n\n\tstartAt( time ) {\n\n\t\tthis._startTime = time;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoop( mode, repetitions ) {\n\n\t\tthis.loop = mode;\n\t\tthis.repetitions = repetitions;\n\n\t\treturn this;\n\n\t}\n\n\t// Weight\n\n\t// set the weight stopping any scheduled fading\n\t// although .enabled = false yields an effective weight of zero, this\n\t// method does *not* change .enabled, because it would be confusing\n\tsetEffectiveWeight( weight ) {\n\n\t\tthis.weight = weight;\n\n\t\t// note: same logic as when updated at runtime\n\t\tthis._effectiveWeight = this.enabled ? weight : 0;\n\n\t\treturn this.stopFading();\n\n\t}\n\n\t// return the weight considering fading and .enabled\n\tgetEffectiveWeight() {\n\n\t\treturn this._effectiveWeight;\n\n\t}\n\n\tfadeIn( duration ) {\n\n\t\treturn this._scheduleFading( duration, 0, 1 );\n\n\t}\n\n\tfadeOut( duration ) {\n\n\t\treturn this._scheduleFading( duration, 1, 0 );\n\n\t}\n\n\tcrossFadeFrom( fadeOutAction, duration, warp ) {\n\n\t\tfadeOutAction.fadeOut( duration );\n\t\tthis.fadeIn( duration );\n\n\t\tif ( warp ) {\n\n\t\t\tconst fadeInDuration = this._clip.duration,\n\t\t\t\tfadeOutDuration = fadeOutAction._clip.duration,\n\n\t\t\t\tstartEndRatio = fadeOutDuration / fadeInDuration,\n\t\t\t\tendStartRatio = fadeInDuration / fadeOutDuration;\n\n\t\t\tfadeOutAction.warp( 1.0, startEndRatio, duration );\n\t\t\tthis.warp( endStartRatio, 1.0, duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcrossFadeTo( fadeInAction, duration, warp ) {\n\n\t\treturn fadeInAction.crossFadeFrom( this, duration, warp );\n\n\t}\n\n\tstopFading() {\n\n\t\tconst weightInterpolant = this._weightInterpolant;\n\n\t\tif ( weightInterpolant !== null ) {\n\n\t\t\tthis._weightInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( weightInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Time Scale Control\n\n\t// set the time scale stopping any scheduled warping\n\t// although .paused = true yields an effective time scale of zero, this\n\t// method does *not* change .paused, because it would be confusing\n\tsetEffectiveTimeScale( timeScale ) {\n\n\t\tthis.timeScale = timeScale;\n\t\tthis._effectiveTimeScale = this.paused ? 0 : timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\t// return the time scale considering warping and .paused\n\tgetEffectiveTimeScale() {\n\n\t\treturn this._effectiveTimeScale;\n\n\t}\n\n\tsetDuration( duration ) {\n\n\t\tthis.timeScale = this._clip.duration / duration;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\tsyncWith( action ) {\n\n\t\tthis.time = action.time;\n\t\tthis.timeScale = action.timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\thalt( duration ) {\n\n\t\treturn this.warp( this._effectiveTimeScale, 0, duration );\n\n\t}\n\n\twarp( startTimeScale, endTimeScale, duration ) {\n\n\t\tconst mixer = this._mixer,\n\t\t\tnow = mixer.time,\n\t\t\ttimeScale = this.timeScale;\n\n\t\tlet interpolant = this._timeScaleInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._timeScaleInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\ttimes[ 1 ] = now + duration;\n\n\t\tvalues[ 0 ] = startTimeScale / timeScale;\n\t\tvalues[ 1 ] = endTimeScale / timeScale;\n\n\t\treturn this;\n\n\t}\n\n\tstopWarping() {\n\n\t\tconst timeScaleInterpolant = this._timeScaleInterpolant;\n\n\t\tif ( timeScaleInterpolant !== null ) {\n\n\t\t\tthis._timeScaleInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( timeScaleInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Object Accessors\n\n\tgetMixer() {\n\n\t\treturn this._mixer;\n\n\t}\n\n\tgetClip() {\n\n\t\treturn this._clip;\n\n\t}\n\n\tgetRoot() {\n\n\t\treturn this._localRoot || this._mixer._root;\n\n\t}\n\n\t// Interna\n\n\t_update( time, deltaTime, timeDirection, accuIndex ) {\n\n\t\t// called by the mixer\n\n\t\tif ( ! this.enabled ) {\n\n\t\t\t// call ._updateWeight() to update ._effectiveWeight\n\n\t\t\tthis._updateWeight( time );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst startTime = this._startTime;\n\n\t\tif ( startTime !== null ) {\n\n\t\t\t// check for scheduled start of action\n\n\t\t\tconst timeRunning = ( time - startTime ) * timeDirection;\n\t\t\tif ( timeRunning < 0 || timeDirection === 0 ) {\n\n\t\t\t\tdeltaTime = 0;\n\n\t\t\t} else {\n\n\n\t\t\t\tthis._startTime = null; // unschedule\n\t\t\t\tdeltaTime = timeDirection * timeRunning;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// apply time scale and advance time\n\n\t\tdeltaTime *= this._updateTimeScale( time );\n\t\tconst clipTime = this._updateTime( deltaTime );\n\n\t\t// note: _updateTime may disable the action resulting in\n\t\t// an effective weight of 0\n\n\t\tconst weight = this._updateWeight( time );\n\n\t\tif ( weight > 0 ) {\n\n\t\t\tconst interpolants = this._interpolants;\n\t\t\tconst propertyMixers = this._propertyBindings;\n\n\t\t\tswitch ( this.blendMode ) {\n\n\t\t\t\tcase AdditiveAnimationBlendMode:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulateAdditive( weight );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase NormalAnimationBlendMode:\n\t\t\t\tdefault:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulate( accuIndex, weight );\n\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_updateWeight( time ) {\n\n\t\tlet weight = 0;\n\n\t\tif ( this.enabled ) {\n\n\t\t\tweight = this.weight;\n\t\t\tconst interpolant = this._weightInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\tweight *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopFading();\n\n\t\t\t\t\tif ( interpolantValue === 0 ) {\n\n\t\t\t\t\t\t// faded out, disable\n\t\t\t\t\t\tthis.enabled = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveWeight = weight;\n\t\treturn weight;\n\n\t}\n\n\t_updateTimeScale( time ) {\n\n\t\tlet timeScale = 0;\n\n\t\tif ( ! this.paused ) {\n\n\t\t\ttimeScale = this.timeScale;\n\n\t\t\tconst interpolant = this._timeScaleInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\ttimeScale *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopWarping();\n\n\t\t\t\t\tif ( timeScale === 0 ) {\n\n\t\t\t\t\t\t// motion has halted, pause\n\t\t\t\t\t\tthis.paused = true;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// warp done - apply final time scale\n\t\t\t\t\t\tthis.timeScale = timeScale;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveTimeScale = timeScale;\n\t\treturn timeScale;\n\n\t}\n\n\t_updateTime( deltaTime ) {\n\n\t\tconst duration = this._clip.duration;\n\t\tconst loop = this.loop;\n\n\t\tlet time = this.time + deltaTime;\n\t\tlet loopCount = this._loopCount;\n\n\t\tconst pingPong = ( loop === LoopPingPong );\n\n\t\tif ( deltaTime === 0 ) {\n\n\t\t\tif ( loopCount === - 1 ) return time;\n\n\t\t\treturn ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;\n\n\t\t}\n\n\t\tif ( loop === LoopOnce ) {\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tthis._loopCount = 0;\n\t\t\t\tthis._setEndings( true, true, false );\n\n\t\t\t}\n\n\t\t\thandle_stop: {\n\n\t\t\t\tif ( time >= duration ) {\n\n\t\t\t\t\ttime = duration;\n\n\t\t\t\t} else if ( time < 0 ) {\n\n\t\t\t\t\ttime = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tbreak handle_stop;\n\n\t\t\t\t}\n\n\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\telse this.enabled = false;\n\n\t\t\t\tthis.time = time;\n\n\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\tdirection: deltaTime < 0 ? - 1 : 1\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t} else { // repetitive Repeat or PingPong\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tif ( deltaTime >= 0 ) {\n\n\t\t\t\t\tloopCount = 0;\n\n\t\t\t\t\tthis._setEndings( true, this.repetitions === 0, pingPong );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// when looping in reverse direction, the initial\n\t\t\t\t\t// transition through zero counts as a repetition,\n\t\t\t\t\t// so leave loopCount at -1\n\n\t\t\t\t\tthis._setEndings( this.repetitions === 0, true, pingPong );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( time >= duration || time < 0 ) {\n\n\t\t\t\t// wrap around\n\n\t\t\t\tconst loopDelta = Math.floor( time / duration ); // signed\n\t\t\t\ttime -= duration * loopDelta;\n\n\t\t\t\tloopCount += Math.abs( loopDelta );\n\n\t\t\t\tconst pending = this.repetitions - loopCount;\n\n\t\t\t\tif ( pending <= 0 ) {\n\n\t\t\t\t\t// have to stop (switch state, clamp time, fire event)\n\n\t\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\t\telse this.enabled = false;\n\n\t\t\t\t\ttime = deltaTime > 0 ? duration : 0;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\t\tdirection: deltaTime > 0 ? 1 : - 1\n\t\t\t\t\t} );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// keep running\n\n\t\t\t\t\tif ( pending === 1 ) {\n\n\t\t\t\t\t\t// entering the last round\n\n\t\t\t\t\t\tconst atStart = deltaTime < 0;\n\t\t\t\t\t\tthis._setEndings( atStart, ! atStart, pingPong );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis._setEndings( false, false, pingPong );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._loopCount = loopCount;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'loop', action: this, loopDelta: loopDelta\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tthis.time = time;\n\n\t\t\t}\n\n\t\t\tif ( pingPong && ( loopCount & 1 ) === 1 ) {\n\n\t\t\t\t// invert time for the \"pong round\"\n\n\t\t\t\treturn duration - time;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn time;\n\n\t}\n\n\t_setEndings( atStart, atEnd, pingPong ) {\n\n\t\tconst settings = this._interpolantSettings;\n\n\t\tif ( pingPong ) {\n\n\t\t\tsettings.endingStart = ZeroSlopeEnding;\n\t\t\tsettings.endingEnd = ZeroSlopeEnding;\n\n\t\t} else {\n\n\t\t\t// assuming for LoopOnce atStart == atEnd == true\n\n\t\t\tif ( atStart ) {\n\n\t\t\t\tsettings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingStart = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t\tif ( atEnd ) {\n\n\t\t\t\tsettings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingEnd \t = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_scheduleFading( duration, weightNow, weightThen ) {\n\n\t\tconst mixer = this._mixer, now = mixer.time;\n\t\tlet interpolant = this._weightInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._weightInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\tvalues[ 0 ] = weightNow;\n\t\ttimes[ 1 ] = now + duration;\n\t\tvalues[ 1 ] = weightThen;\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _controlInterpolantsResultBuffer = new Float32Array( 1 );\n\n\nclass AnimationMixer extends EventDispatcher {\n\n\tconstructor( root ) {\n\n\t\tsuper();\n\n\t\tthis._root = root;\n\t\tthis._initMemoryManager();\n\t\tthis._accuIndex = 0;\n\t\tthis.time = 0;\n\t\tthis.timeScale = 1.0;\n\n\t}\n\n\t_bindAction( action, prototypeAction ) {\n\n\t\tconst root = action._localRoot || this._root,\n\t\t\ttracks = action._clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tbindings = action._propertyBindings,\n\t\t\tinterpolants = action._interpolants,\n\t\t\trootUuid = root.uuid,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName;\n\n\t\tlet bindingsByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingsByName === undefined ) {\n\n\t\t\tbindingsByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingsByName;\n\n\t\t}\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst track = tracks[ i ],\n\t\t\t\ttrackName = track.name;\n\n\t\t\tlet binding = bindingsByName[ trackName ];\n\n\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\t++ binding.referenceCount;\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t} else {\n\n\t\t\t\tbinding = bindings[ i ];\n\n\t\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\t\t// existing binding, make sure the cache knows\n\n\t\t\t\t\tif ( binding._cacheIndex === null ) {\n\n\t\t\t\t\t\t++ binding.referenceCount;\n\t\t\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\tconst path = prototypeAction && prototypeAction.\n\t\t\t\t\t_propertyBindings[ i ].binding.parsedPath;\n\n\t\t\t\tbinding = new PropertyMixer(\n\t\t\t\t\tPropertyBinding.create( root, trackName, path ),\n\t\t\t\t\ttrack.ValueTypeName, track.getValueSize() );\n\n\t\t\t\t++ binding.referenceCount;\n\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t}\n\n\t\t\tinterpolants[ i ].resultBuffer = binding.buffer;\n\n\t\t}\n\n\t}\n\n\t_activateAction( action ) {\n\n\t\tif ( ! this._isActiveAction( action ) ) {\n\n\t\t\tif ( action._cacheIndex === null ) {\n\n\t\t\t\t// this action has been forgotten by the cache, but the user\n\t\t\t\t// appears to be still using it -> rebind\n\n\t\t\t\tconst rootUuid = ( action._localRoot || this._root ).uuid,\n\t\t\t\t\tclipUuid = action._clip.uuid,\n\t\t\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\t\t\tthis._bindAction( action,\n\t\t\t\t\tactionsForClip && actionsForClip.knownActions[ 0 ] );\n\n\t\t\t\tthis._addInactiveAction( action, clipUuid, rootUuid );\n\n\t\t\t}\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// increment reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( binding.useCount ++ === 0 ) {\n\n\t\t\t\t\tthis._lendBinding( binding );\n\t\t\t\t\tbinding.saveOriginalState();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._lendAction( action );\n\n\t\t}\n\n\t}\n\n\t_deactivateAction( action ) {\n\n\t\tif ( this._isActiveAction( action ) ) {\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// decrement reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( -- binding.useCount === 0 ) {\n\n\t\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\t\tthis._takeBackBinding( binding );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._takeBackAction( action );\n\n\t\t}\n\n\t}\n\n\t// Memory manager\n\n\t_initMemoryManager() {\n\n\t\tthis._actions = []; // 'nActiveActions' followed by inactive ones\n\t\tthis._nActiveActions = 0;\n\n\t\tthis._actionsByClip = {};\n\t\t// inside:\n\t\t// {\n\t\t// \tknownActions: Array< AnimationAction > - used as prototypes\n\t\t// \tactionByRoot: AnimationAction - lookup\n\t\t// }\n\n\n\t\tthis._bindings = []; // 'nActiveBindings' followed by inactive ones\n\t\tthis._nActiveBindings = 0;\n\n\t\tthis._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n\n\n\t\tthis._controlInterpolants = []; // same game as above\n\t\tthis._nActiveControlInterpolants = 0;\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tactions: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._actions.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveActions;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tbindings: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._bindings.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveBindings;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tcontrolInterpolants: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._controlInterpolants.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveControlInterpolants;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t// Memory management for AnimationAction objects\n\n\t_isActiveAction( action ) {\n\n\t\tconst index = action._cacheIndex;\n\t\treturn index !== null && index < this._nActiveActions;\n\n\t}\n\n\t_addInactiveAction( action, clipUuid, rootUuid ) {\n\n\t\tconst actions = this._actions,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tlet actionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip === undefined ) {\n\n\t\t\tactionsForClip = {\n\n\t\t\t\tknownActions: [ action ],\n\t\t\t\tactionByRoot: {}\n\n\t\t\t};\n\n\t\t\taction._byClipCacheIndex = 0;\n\n\t\t\tactionsByClip[ clipUuid ] = actionsForClip;\n\n\t\t} else {\n\n\t\t\tconst knownActions = actionsForClip.knownActions;\n\n\t\t\taction._byClipCacheIndex = knownActions.length;\n\t\t\tknownActions.push( action );\n\n\t\t}\n\n\t\taction._cacheIndex = actions.length;\n\t\tactions.push( action );\n\n\t\tactionsForClip.actionByRoot[ rootUuid ] = action;\n\n\t}\n\n\t_removeInactiveAction( action ) {\n\n\t\tconst actions = this._actions,\n\t\t\tlastInactiveAction = actions[ actions.length - 1 ],\n\t\t\tcacheIndex = action._cacheIndex;\n\n\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\tactions.pop();\n\n\t\taction._cacheIndex = null;\n\n\n\t\tconst clipUuid = action._clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ],\n\t\t\tknownActionsForClip = actionsForClip.knownActions,\n\n\t\t\tlastKnownAction =\n\t\t\t\tknownActionsForClip[ knownActionsForClip.length - 1 ],\n\n\t\t\tbyClipCacheIndex = action._byClipCacheIndex;\n\n\t\tlastKnownAction._byClipCacheIndex = byClipCacheIndex;\n\t\tknownActionsForClip[ byClipCacheIndex ] = lastKnownAction;\n\t\tknownActionsForClip.pop();\n\n\t\taction._byClipCacheIndex = null;\n\n\n\t\tconst actionByRoot = actionsForClip.actionByRoot,\n\t\t\trootUuid = ( action._localRoot || this._root ).uuid;\n\n\t\tdelete actionByRoot[ rootUuid ];\n\n\t\tif ( knownActionsForClip.length === 0 ) {\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t\tthis._removeInactiveBindingsForAction( action );\n\n\t}\n\n\t_removeInactiveBindingsForAction( action ) {\n\n\t\tconst bindings = action._propertyBindings;\n\n\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tconst binding = bindings[ i ];\n\n\t\t\tif ( -- binding.referenceCount === 0 ) {\n\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_lendAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions >| inactive actions ]\n\t\t// s a\n\t\t// <-swap->\n\t\t// a s\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveActions ++,\n\n\t\t\tfirstInactiveAction = actions[ lastActiveIndex ];\n\n\t\taction._cacheIndex = lastActiveIndex;\n\t\tactions[ lastActiveIndex ] = action;\n\n\t\tfirstInactiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = firstInactiveAction;\n\n\t}\n\n\t_takeBackAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions |< inactive actions ]\n\t\t// a s\n\t\t// <-swap->\n\t\t// s a\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveActions,\n\n\t\t\tlastActiveAction = actions[ firstInactiveIndex ];\n\n\t\taction._cacheIndex = firstInactiveIndex;\n\t\tactions[ firstInactiveIndex ] = action;\n\n\t\tlastActiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = lastActiveAction;\n\n\t}\n\n\t// Memory management for PropertyMixer objects\n\n\t_addInactiveBinding( binding, rootUuid, trackName ) {\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindings = this._bindings;\n\n\t\tlet bindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName === undefined ) {\n\n\t\t\tbindingByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingByName;\n\n\t\t}\n\n\t\tbindingByName[ trackName ] = binding;\n\n\t\tbinding._cacheIndex = bindings.length;\n\t\tbindings.push( binding );\n\n\t}\n\n\t_removeInactiveBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tpropBinding = binding.binding,\n\t\t\trootUuid = propBinding.rootNode.uuid,\n\t\t\ttrackName = propBinding.path,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ],\n\n\t\t\tlastInactiveBinding = bindings[ bindings.length - 1 ],\n\t\t\tcacheIndex = binding._cacheIndex;\n\n\t\tlastInactiveBinding._cacheIndex = cacheIndex;\n\t\tbindings[ cacheIndex ] = lastInactiveBinding;\n\t\tbindings.pop();\n\n\t\tdelete bindingByName[ trackName ];\n\n\t\tif ( Object.keys( bindingByName ).length === 0 ) {\n\n\t\t\tdelete bindingsByRoot[ rootUuid ];\n\n\t\t}\n\n\t}\n\n\t_lendBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveBindings ++,\n\n\t\t\tfirstInactiveBinding = bindings[ lastActiveIndex ];\n\n\t\tbinding._cacheIndex = lastActiveIndex;\n\t\tbindings[ lastActiveIndex ] = binding;\n\n\t\tfirstInactiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = firstInactiveBinding;\n\n\t}\n\n\t_takeBackBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveBindings,\n\n\t\t\tlastActiveBinding = bindings[ firstInactiveIndex ];\n\n\t\tbinding._cacheIndex = firstInactiveIndex;\n\t\tbindings[ firstInactiveIndex ] = binding;\n\n\t\tlastActiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = lastActiveBinding;\n\n\t}\n\n\n\t// Memory management of Interpolants for weight and time scale\n\n\t_lendControlInterpolant() {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tlastActiveIndex = this._nActiveControlInterpolants ++;\n\n\t\tlet interpolant = interpolants[ lastActiveIndex ];\n\n\t\tif ( interpolant === undefined ) {\n\n\t\t\tinterpolant = new LinearInterpolant(\n\t\t\t\tnew Float32Array( 2 ), new Float32Array( 2 ),\n\t\t\t\t1, _controlInterpolantsResultBuffer );\n\n\t\t\tinterpolant.__cacheIndex = lastActiveIndex;\n\t\t\tinterpolants[ lastActiveIndex ] = interpolant;\n\n\t\t}\n\n\t\treturn interpolant;\n\n\t}\n\n\t_takeBackControlInterpolant( interpolant ) {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tprevIndex = interpolant.__cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveControlInterpolants,\n\n\t\t\tlastActiveInterpolant = interpolants[ firstInactiveIndex ];\n\n\t\tinterpolant.__cacheIndex = firstInactiveIndex;\n\t\tinterpolants[ firstInactiveIndex ] = interpolant;\n\n\t\tlastActiveInterpolant.__cacheIndex = prevIndex;\n\t\tinterpolants[ prevIndex ] = lastActiveInterpolant;\n\n\t}\n\n\t// return an action for a clip optionally using a custom root target\n\t// object (this method allocates a lot of dynamic memory in case a\n\t// previously unknown clip/root combination is specified)\n\tclipAction( clip, optionalRoot, blendMode ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid;\n\n\t\tlet clipObject = typeof clip === 'string' ? AnimationClip.findByName( root, clip ) : clip;\n\n\t\tconst clipUuid = clipObject !== null ? clipObject.uuid : clip;\n\n\t\tconst actionsForClip = this._actionsByClip[ clipUuid ];\n\t\tlet prototypeAction = null;\n\n\t\tif ( blendMode === undefined ) {\n\n\t\t\tif ( clipObject !== null ) {\n\n\t\t\t\tblendMode = clipObject.blendMode;\n\n\t\t\t} else {\n\n\t\t\t\tblendMode = NormalAnimationBlendMode;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\tconst existingAction = actionsForClip.actionByRoot[ rootUuid ];\n\n\t\t\tif ( existingAction !== undefined && existingAction.blendMode === blendMode ) {\n\n\t\t\t\treturn existingAction;\n\n\t\t\t}\n\n\t\t\t// we know the clip, so we don't have to parse all\n\t\t\t// the bindings again but can just copy\n\t\t\tprototypeAction = actionsForClip.knownActions[ 0 ];\n\n\t\t\t// also, take the clip from the prototype action\n\t\t\tif ( clipObject === null )\n\t\t\t\tclipObject = prototypeAction._clip;\n\n\t\t}\n\n\t\t// clip must be known when specified via string\n\t\tif ( clipObject === null ) return null;\n\n\t\t// allocate all resources required to run it\n\t\tconst newAction = new AnimationAction( this, clipObject, optionalRoot, blendMode );\n\n\t\tthis._bindAction( newAction, prototypeAction );\n\n\t\t// and make the action known to the memory manager\n\t\tthis._addInactiveAction( newAction, clipUuid, rootUuid );\n\n\t\treturn newAction;\n\n\t}\n\n\t// get an existing action\n\texistingAction( clip, optionalRoot ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid,\n\n\t\t\tclipObject = typeof clip === 'string' ?\n\t\t\t\tAnimationClip.findByName( root, clip ) : clip,\n\n\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\n\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\treturn actionsForClip.actionByRoot[ rootUuid ] || null;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// deactivates all previously scheduled actions\n\tstopAllAction() {\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions;\n\n\t\tfor ( let i = nActions - 1; i >= 0; -- i ) {\n\n\t\t\tactions[ i ].stop();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// advance the time and update apply the animation\n\tupdate( deltaTime ) {\n\n\t\tdeltaTime *= this.timeScale;\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions,\n\n\t\t\ttime = this.time += deltaTime,\n\t\t\ttimeDirection = Math.sign( deltaTime ),\n\n\t\t\taccuIndex = this._accuIndex ^= 1;\n\n\t\t// run active actions\n\n\t\tfor ( let i = 0; i !== nActions; ++ i ) {\n\n\t\t\tconst action = actions[ i ];\n\n\t\t\taction._update( time, deltaTime, timeDirection, accuIndex );\n\n\t\t}\n\n\t\t// update scene graph\n\n\t\tconst bindings = this._bindings,\n\t\t\tnBindings = this._nActiveBindings;\n\n\t\tfor ( let i = 0; i !== nBindings; ++ i ) {\n\n\t\t\tbindings[ i ].apply( accuIndex );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Allows you to seek to a specific time in an animation.\n\tsetTime( timeInSeconds ) {\n\n\t\tthis.time = 0; // Zero out time attribute for AnimationMixer object;\n\t\tfor ( let i = 0; i < this._actions.length; i ++ ) {\n\n\t\t\tthis._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n\n\t\t}\n\n\t\treturn this.update( timeInSeconds ); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n\n\t}\n\n\t// return this mixer's root target object\n\tgetRoot() {\n\n\t\treturn this._root;\n\n\t}\n\n\t// free all resources specific to a particular clip\n\tuncacheClip( clip ) {\n\n\t\tconst actions = this._actions,\n\t\t\tclipUuid = clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\t// note: just calling _removeInactiveAction would mess up the\n\t\t\t// iteration state and also require updating the state we can\n\t\t\t// just throw away\n\n\t\t\tconst actionsToRemove = actionsForClip.knownActions;\n\n\t\t\tfor ( let i = 0, n = actionsToRemove.length; i !== n; ++ i ) {\n\n\t\t\t\tconst action = actionsToRemove[ i ];\n\n\t\t\t\tthis._deactivateAction( action );\n\n\t\t\t\tconst cacheIndex = action._cacheIndex,\n\t\t\t\t\tlastInactiveAction = actions[ actions.length - 1 ];\n\n\t\t\t\taction._cacheIndex = null;\n\t\t\t\taction._byClipCacheIndex = null;\n\n\t\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\t\t\tactions.pop();\n\n\t\t\t\tthis._removeInactiveBindingsForAction( action );\n\n\t\t\t}\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t}\n\n\t// free all resources specific to a particular root target object\n\tuncacheRoot( root ) {\n\n\t\tconst rootUuid = root.uuid,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tfor ( const clipUuid in actionsByClip ) {\n\n\t\t\tconst actionByRoot = actionsByClip[ clipUuid ].actionByRoot,\n\t\t\t\taction = actionByRoot[ rootUuid ];\n\n\t\t\tif ( action !== undefined ) {\n\n\t\t\t\tthis._deactivateAction( action );\n\t\t\t\tthis._removeInactiveAction( action );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName !== undefined ) {\n\n\t\t\tfor ( const trackName in bindingByName ) {\n\n\t\t\t\tconst binding = bindingByName[ trackName ];\n\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remove a targeted clip from the cache\n\tuncacheAction( clip, optionalRoot ) {\n\n\t\tconst action = this.existingAction( clip, optionalRoot );\n\n\t\tif ( action !== null ) {\n\n\t\t\tthis._deactivateAction( action );\n\t\t\tthis._removeInactiveAction( action );\n\n\t\t}\n\n\t}\n\n}\n\nclass Uniform {\n\n\tconstructor( value ) {\n\n\t\tthis.value = value;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );\n\n\t}\n\n}\n\nlet _id = 0;\n\nclass UniformsGroup extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.isUniformsGroup = true;\n\n\t\tObject.defineProperty( this, 'id', { value: _id ++ } );\n\n\t\tthis.name = '';\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.uniforms = [];\n\n\t}\n\n\tadd( uniform ) {\n\n\t\tthis.uniforms.push( uniform );\n\n\t\treturn this;\n\n\t}\n\n\tremove( uniform ) {\n\n\t\tconst index = this.uniforms.indexOf( uniform );\n\n\t\tif ( index !== - 1 ) this.uniforms.splice( index, 1 );\n\n\t\treturn this;\n\n\t}\n\n\tsetName( name ) {\n\n\t\tthis.name = name;\n\n\t\treturn this;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\t\tthis.usage = source.usage;\n\n\t\tconst uniformsSource = source.uniforms;\n\n\t\tthis.uniforms.length = 0;\n\n\t\tfor ( let i = 0, l = uniformsSource.length; i < l; i ++ ) {\n\n\t\t\tthis.uniforms.push( uniformsSource[ i ].clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass InstancedInterleavedBuffer extends InterleavedBuffer {\n\n\tconstructor( array, stride, meshPerAttribute = 1 ) {\n\n\t\tsuper( array, stride );\n\n\t\tthis.isInstancedInterleavedBuffer = true;\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tconst ib = super.clone( data );\n\n\t\tib.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn ib;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tconst json = super.toJSON( data );\n\n\t\tjson.isInstancedInterleavedBuffer = true;\n\t\tjson.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn json;\n\n\t}\n\n}\n\nclass GLBufferAttribute {\n\n\tconstructor( buffer, type, itemSize, elementSize, count ) {\n\n\t\tthis.isGLBufferAttribute = true;\n\n\t\tthis.name = '';\n\n\t\tthis.buffer = buffer;\n\t\tthis.type = type;\n\t\tthis.itemSize = itemSize;\n\t\tthis.elementSize = elementSize;\n\t\tthis.count = count;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetBuffer( buffer ) {\n\n\t\tthis.buffer = buffer;\n\n\t\treturn this;\n\n\t}\n\n\tsetType( type, elementSize ) {\n\n\t\tthis.type = type;\n\t\tthis.elementSize = elementSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetItemSize( itemSize ) {\n\n\t\tthis.itemSize = itemSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetCount( count ) {\n\n\t\tthis.count = count;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Raycaster {\n\n\tconstructor( origin, direction, near = 0, far = Infinity ) {\n\n\t\tthis.ray = new Ray( origin, direction );\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.camera = null;\n\t\tthis.layers = new Layers();\n\n\t\tthis.params = {\n\t\t\tMesh: {},\n\t\t\tLine: { threshold: 1 },\n\t\t\tLOD: {},\n\t\t\tPoints: { threshold: 1 },\n\t\t\tSprite: {}\n\t\t};\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.ray.set( origin, direction );\n\n\t}\n\n\tsetFromCamera( coords, camera ) {\n\n\t\tif ( camera.isPerspectiveCamera ) {\n\n\t\t\tthis.ray.origin.setFromMatrixPosition( camera.matrixWorld );\n\t\t\tthis.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();\n\t\t\tthis.camera = camera;\n\n\t\t} else if ( camera.isOrthographicCamera ) {\n\n\t\t\tthis.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera\n\t\t\tthis.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );\n\t\t\tthis.camera = camera;\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type );\n\n\t\t}\n\n\t}\n\n\tintersectObject( object, recursive = true, intersects = [] ) {\n\n\t\tintersectObject( object, this, intersects, recursive );\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n\tintersectObjects( objects, recursive = true, intersects = [] ) {\n\n\t\tfor ( let i = 0, l = objects.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( objects[ i ], this, intersects, recursive );\n\n\t\t}\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n}\n\nfunction ascSort( a, b ) {\n\n\treturn a.distance - b.distance;\n\n}\n\nfunction intersectObject( object, raycaster, intersects, recursive ) {\n\n\tif ( object.layers.test( raycaster.layers ) ) {\n\n\t\tobject.raycast( raycaster, intersects );\n\n\t}\n\n\tif ( recursive === true ) {\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( children[ i ], raycaster, intersects, true );\n\n\t\t}\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n *\n * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n * The azimuthal angle (theta) is measured from the positive z-axis.\n */\n\n\nclass Spherical {\n\n\tconstructor( radius = 1, phi = 0, theta = 0 ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi; // polar angle\n\t\tthis.theta = theta; // azimuthal angle\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, phi, theta ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi;\n\t\tthis.theta = theta;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.phi = other.phi;\n\t\tthis.theta = other.theta;\n\n\t\treturn this;\n\n\t}\n\n\t// restrict phi to be between EPS and PI-EPS\n\tmakeSafe() {\n\n\t\tconst EPS = 0.000001;\n\t\tthis.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + y * y + z * z );\n\n\t\tif ( this.radius === 0 ) {\n\n\t\t\tthis.theta = 0;\n\t\t\tthis.phi = 0;\n\n\t\t} else {\n\n\t\t\tthis.theta = Math.atan2( x, z );\n\t\t\tthis.phi = Math.acos( clamp( y / this.radius, - 1, 1 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n */\n\nclass Cylindrical {\n\n\tconstructor( radius = 1, theta = 0, y = 0 ) {\n\n\t\tthis.radius = radius; // distance from the origin to a point in the x-z plane\n\t\tthis.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n\t\tthis.y = y; // height above the x-z plane\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, theta, y ) {\n\n\t\tthis.radius = radius;\n\t\tthis.theta = theta;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.theta = other.theta;\n\t\tthis.y = other.y;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + z * z );\n\t\tthis.theta = Math.atan2( x, z );\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$4 = /*@__PURE__*/ new Vector2();\n\nclass Box2 {\n\n\tconstructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) {\n\n\t\tthis.isBox2 = true;\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$4.copy( size ).multiplyScalar( 0.5 );\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = + Infinity;\n\t\tthis.max.x = this.max.y = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 4 splitting planes to rule out intersections\n\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.clampPoint( point, _vector$4 ).distanceTo( point );\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\tif ( this.isEmpty() ) this.makeEmpty();\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nconst _startP = /*@__PURE__*/ new Vector3();\nconst _startEnd = /*@__PURE__*/ new Vector3();\n\nclass Line3 {\n\n\tconstructor( start = new Vector3(), end = new Vector3() ) {\n\n\t\tthis.start = start;\n\t\tthis.end = end;\n\n\t}\n\n\tset( start, end ) {\n\n\t\tthis.start.copy( start );\n\t\tthis.end.copy( end );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( line ) {\n\n\t\tthis.start.copy( line.start );\n\t\tthis.end.copy( line.end );\n\n\t\treturn this;\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn target.addVectors( this.start, this.end ).multiplyScalar( 0.5 );\n\n\t}\n\n\tdelta( target ) {\n\n\t\treturn target.subVectors( this.end, this.start );\n\n\t}\n\n\tdistanceSq() {\n\n\t\treturn this.start.distanceToSquared( this.end );\n\n\t}\n\n\tdistance() {\n\n\t\treturn this.start.distanceTo( this.end );\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tclosestPointToPointParameter( point, clampToLine ) {\n\n\t\t_startP.subVectors( point, this.start );\n\t\t_startEnd.subVectors( this.end, this.start );\n\n\t\tconst startEnd2 = _startEnd.dot( _startEnd );\n\t\tconst startEnd_startP = _startEnd.dot( _startP );\n\n\t\tlet t = startEnd_startP / startEnd2;\n\n\t\tif ( clampToLine ) {\n\n\t\t\tt = clamp( t, 0, 1 );\n\n\t\t}\n\n\t\treturn t;\n\n\t}\n\n\tclosestPointToPoint( point, clampToLine, target ) {\n\n\t\tconst t = this.closestPointToPointParameter( point, clampToLine );\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.start.applyMatrix4( matrix );\n\t\tthis.end.applyMatrix4( matrix );\n\n\t\treturn this;\n\n\t}\n\n\tequals( line ) {\n\n\t\treturn line.start.equals( this.start ) && line.end.equals( this.end );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$3 = /*@__PURE__*/ new Vector3();\n\nclass SpotLightHelper extends Object3D {\n\n\tconstructor( light, color ) {\n\n\t\tsuper();\n\n\t\tthis.light = light;\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'SpotLightHelper';\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst positions = [\n\t\t\t0, 0, 0, \t0, 0, 1,\n\t\t\t0, 0, 0, \t1, 0, 1,\n\t\t\t0, 0, 0,\t- 1, 0, 1,\n\t\t\t0, 0, 0, \t0, 1, 1,\n\t\t\t0, 0, 0, \t0, - 1, 1\n\t\t];\n\n\t\tfor ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {\n\n\t\t\tconst p1 = ( i / l ) * Math.PI * 2;\n\t\t\tconst p2 = ( j / l ) * Math.PI * 2;\n\n\t\t\tpositions.push(\n\t\t\t\tMath.cos( p1 ), Math.sin( p1 ), 1,\n\t\t\t\tMath.cos( p2 ), Math.sin( p2 ), 1\n\t\t\t);\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.cone = new LineSegments( geometry, material );\n\t\tthis.add( this.cone );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.cone.geometry.dispose();\n\t\tthis.cone.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\t\tthis.light.target.updateWorldMatrix( true, false );\n\n\t\tconst coneLength = this.light.distance ? this.light.distance : 1000;\n\t\tconst coneWidth = coneLength * Math.tan( this.light.angle );\n\n\t\tthis.cone.scale.set( coneWidth, coneWidth, coneLength );\n\n\t\t_vector$3.setFromMatrixPosition( this.light.target.matrixWorld );\n\n\t\tthis.cone.lookAt( _vector$3 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.cone.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.cone.material.color.copy( this.light.color );\n\n\t\t}\n\n\t}\n\n}\n\nconst _vector$2 = /*@__PURE__*/ new Vector3();\nconst _boneMatrix = /*@__PURE__*/ new Matrix4();\nconst _matrixWorldInv = /*@__PURE__*/ new Matrix4();\n\n\nclass SkeletonHelper extends LineSegments {\n\n\tconstructor( object ) {\n\n\t\tconst bones = getBoneList( object );\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst color1 = new Color( 0, 0, 1 );\n\t\tconst color2 = new Color( 0, 1, 0 );\n\n\t\tfor ( let i = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tcolors.push( color1.r, color1.g, color1.b );\n\t\t\t\tcolors.push( color2.r, color2.g, color2.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.isSkeletonHelper = true;\n\n\t\tthis.type = 'SkeletonHelper';\n\n\t\tthis.root = object;\n\t\tthis.bones = bones;\n\n\t\tthis.matrix = object.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst bones = this.bones;\n\n\t\tconst geometry = this.geometry;\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\t_matrixWorldInv.copy( this.root.matrixWorld ).invert();\n\n\t\tfor ( let i = 0, j = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j + 1, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\tj += 2;\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\n\nfunction getBoneList( object ) {\n\n\tconst boneList = [];\n\n\tif ( object.isBone === true ) {\n\n\t\tboneList.push( object );\n\n\t}\n\n\tfor ( let i = 0; i < object.children.length; i ++ ) {\n\n\t\tboneList.push.apply( boneList, getBoneList( object.children[ i ] ) );\n\n\t}\n\n\treturn boneList;\n\n}\n\nclass PointLightHelper extends Mesh {\n\n\tconstructor( light, sphereSize, color ) {\n\n\t\tconst geometry = new SphereGeometry( sphereSize, 4, 2 );\n\t\tconst material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.light = light;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'PointLightHelper';\n\n\t\tthis.matrix = this.light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\n\t\t/*\n\t// TODO: delete this comment?\n\tconst distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );\n\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\n\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\n\tconst d = light.distance;\n\n\tif ( d === 0.0 ) {\n\n\t\tthis.lightDistance.visible = false;\n\n\t} else {\n\n\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t}\n\n\tthis.add( this.lightDistance );\n\t*/\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\t/*\n\t\tconst d = this.light.distance;\n\n\t\tif ( d === 0.0 ) {\n\n\t\t\tthis.lightDistance.visible = false;\n\n\t\t} else {\n\n\t\t\tthis.lightDistance.visible = true;\n\t\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t\t}\n\t\t*/\n\n\t}\n\n}\n\nconst _vector$1 = /*@__PURE__*/ new Vector3();\nconst _color1 = /*@__PURE__*/ new Color();\nconst _color2 = /*@__PURE__*/ new Color();\n\nclass HemisphereLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\n\t\tthis.light = light;\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'HemisphereLightHelper';\n\n\t\tconst geometry = new OctahedronGeometry( size );\n\t\tgeometry.rotateY( Math.PI * 0.5 );\n\n\t\tthis.material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\t\tif ( this.color === undefined ) this.material.vertexColors = true;\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\t\tconst colors = new Float32Array( position.count * 3 );\n\n\t\tgeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) );\n\n\t\tthis.add( new Mesh( geometry, this.material ) );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.children[ 0 ].geometry.dispose();\n\t\tthis.children[ 0 ].material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tconst mesh = this.children[ 0 ];\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tconst colors = mesh.geometry.getAttribute( 'color' );\n\n\t\t\t_color1.copy( this.light.color );\n\t\t\t_color2.copy( this.light.groundColor );\n\n\t\t\tfor ( let i = 0, l = colors.count; i < l; i ++ ) {\n\n\t\t\t\tconst color = ( i < ( l / 2 ) ) ? _color1 : _color2;\n\n\t\t\t\tcolors.setXYZ( i, color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t\tcolors.needsUpdate = true;\n\n\t\t}\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\n\t\tmesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() );\n\n\t}\n\n}\n\nclass GridHelper extends LineSegments {\n\n\tconstructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst center = divisions / 2;\n\t\tconst step = size / divisions;\n\t\tconst halfSize = size / 2;\n\n\t\tconst vertices = [], colors = [];\n\n\t\tfor ( let i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) {\n\n\t\t\tvertices.push( - halfSize, 0, k, halfSize, 0, k );\n\t\t\tvertices.push( k, 0, - halfSize, k, 0, halfSize );\n\n\t\t\tconst color = i === center ? color1 : color2;\n\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'GridHelper';\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass PolarGridHelper extends LineSegments {\n\n\tconstructor( radius = 10, sectors = 16, rings = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\t// create the sectors\n\n\t\tif ( sectors > 1 ) {\n\n\t\t\tfor ( let i = 0; i < sectors; i ++ ) {\n\n\t\t\t\tconst v = ( i / sectors ) * ( Math.PI * 2 );\n\n\t\t\t\tconst x = Math.sin( v ) * radius;\n\t\t\t\tconst z = Math.cos( v ) * radius;\n\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tvertices.push( x, 0, z );\n\n\t\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// create the rings\n\n\t\tfor ( let i = 0; i < rings; i ++ ) {\n\n\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\tconst r = radius - ( radius / rings * i );\n\n\t\t\tfor ( let j = 0; j < divisions; j ++ ) {\n\n\t\t\t\t// first vertex\n\n\t\t\t\tlet v = ( j / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tlet x = Math.sin( v ) * r;\n\t\t\t\tlet z = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t\t// second vertex\n\n\t\t\t\tv = ( ( j + 1 ) / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tx = Math.sin( v ) * r;\n\t\t\t\tz = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'PolarGridHelper';\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nconst _v1 = /*@__PURE__*/ new Vector3();\nconst _v2 = /*@__PURE__*/ new Vector3();\nconst _v3 = /*@__PURE__*/ new Vector3();\n\nclass DirectionalLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\n\t\tthis.light = light;\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'DirectionalLightHelper';\n\n\t\tif ( size === undefined ) size = 1;\n\n\t\tlet geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [\n\t\t\t- size, size, 0,\n\t\t\tsize, size, 0,\n\t\t\tsize, - size, 0,\n\t\t\t- size, - size, 0,\n\t\t\t- size, size, 0\n\t\t], 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.lightPlane = new Line( geometry, material );\n\t\tthis.add( this.lightPlane );\n\n\t\tgeometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 0, 1 ], 3 ) );\n\n\t\tthis.targetLine = new Line( geometry, material );\n\t\tthis.add( this.targetLine );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.lightPlane.geometry.dispose();\n\t\tthis.lightPlane.material.dispose();\n\t\tthis.targetLine.geometry.dispose();\n\t\tthis.targetLine.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateWorldMatrix( true, false );\n\t\tthis.light.target.updateWorldMatrix( true, false );\n\n\t\t_v1.setFromMatrixPosition( this.light.matrixWorld );\n\t\t_v2.setFromMatrixPosition( this.light.target.matrixWorld );\n\t\t_v3.subVectors( _v2, _v1 );\n\n\t\tthis.lightPlane.lookAt( _v2 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.lightPlane.material.color.set( this.color );\n\t\t\tthis.targetLine.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.lightPlane.material.color.copy( this.light.color );\n\t\t\tthis.targetLine.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\tthis.targetLine.lookAt( _v2 );\n\t\tthis.targetLine.scale.z = _v3.length();\n\n\t}\n\n}\n\nconst _vector = /*@__PURE__*/ new Vector3();\nconst _camera = /*@__PURE__*/ new Camera();\n\n/**\n *\t- shows frustum, line of sight and up of the camera\n *\t- suitable for fast updates\n * \t- based on frustum visualization in lightgl.js shadowmap example\n *\t\thttps://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html\n */\n\nclass CameraHelper extends LineSegments {\n\n\tconstructor( camera ) {\n\n\t\tconst geometry = new BufferGeometry();\n\t\tconst material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true, toneMapped: false } );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst pointMap = {};\n\n\t\t// near\n\n\t\taddLine( 'n1', 'n2' );\n\t\taddLine( 'n2', 'n4' );\n\t\taddLine( 'n4', 'n3' );\n\t\taddLine( 'n3', 'n1' );\n\n\t\t// far\n\n\t\taddLine( 'f1', 'f2' );\n\t\taddLine( 'f2', 'f4' );\n\t\taddLine( 'f4', 'f3' );\n\t\taddLine( 'f3', 'f1' );\n\n\t\t// sides\n\n\t\taddLine( 'n1', 'f1' );\n\t\taddLine( 'n2', 'f2' );\n\t\taddLine( 'n3', 'f3' );\n\t\taddLine( 'n4', 'f4' );\n\n\t\t// cone\n\n\t\taddLine( 'p', 'n1' );\n\t\taddLine( 'p', 'n2' );\n\t\taddLine( 'p', 'n3' );\n\t\taddLine( 'p', 'n4' );\n\n\t\t// up\n\n\t\taddLine( 'u1', 'u2' );\n\t\taddLine( 'u2', 'u3' );\n\t\taddLine( 'u3', 'u1' );\n\n\t\t// target\n\n\t\taddLine( 'c', 't' );\n\t\taddLine( 'p', 'c' );\n\n\t\t// cross\n\n\t\taddLine( 'cn1', 'cn2' );\n\t\taddLine( 'cn3', 'cn4' );\n\n\t\taddLine( 'cf1', 'cf2' );\n\t\taddLine( 'cf3', 'cf4' );\n\n\t\tfunction addLine( a, b ) {\n\n\t\t\taddPoint( a );\n\t\t\taddPoint( b );\n\n\t\t}\n\n\t\tfunction addPoint( id ) {\n\n\t\t\tvertices.push( 0, 0, 0 );\n\t\t\tcolors.push( 0, 0, 0 );\n\n\t\t\tif ( pointMap[ id ] === undefined ) {\n\n\t\t\t\tpointMap[ id ] = [];\n\n\t\t\t}\n\n\t\t\tpointMap[ id ].push( ( vertices.length / 3 ) - 1 );\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'CameraHelper';\n\n\t\tthis.camera = camera;\n\t\tif ( this.camera.updateProjectionMatrix ) this.camera.updateProjectionMatrix();\n\n\t\tthis.matrix = camera.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.pointMap = pointMap;\n\n\t\tthis.update();\n\n\t\t// colors\n\n\t\tconst colorFrustum = new Color( 0xffaa00 );\n\t\tconst colorCone = new Color( 0xff0000 );\n\t\tconst colorUp = new Color( 0x00aaff );\n\t\tconst colorTarget = new Color( 0xffffff );\n\t\tconst colorCross = new Color( 0x333333 );\n\n\t\tthis.setColors( colorFrustum, colorCone, colorUp, colorTarget, colorCross );\n\n\t}\n\n\tsetColors( frustum, cone, up, target, cross ) {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst colorAttribute = geometry.getAttribute( 'color' );\n\n\t\t// near\n\n\t\tcolorAttribute.setXYZ( 0, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 1, frustum.r, frustum.g, frustum.b ); // n1, n2\n\t\tcolorAttribute.setXYZ( 2, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 3, frustum.r, frustum.g, frustum.b ); // n2, n4\n\t\tcolorAttribute.setXYZ( 4, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 5, frustum.r, frustum.g, frustum.b ); // n4, n3\n\t\tcolorAttribute.setXYZ( 6, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 7, frustum.r, frustum.g, frustum.b ); // n3, n1\n\n\t\t// far\n\n\t\tcolorAttribute.setXYZ( 8, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 9, frustum.r, frustum.g, frustum.b ); // f1, f2\n\t\tcolorAttribute.setXYZ( 10, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 11, frustum.r, frustum.g, frustum.b ); // f2, f4\n\t\tcolorAttribute.setXYZ( 12, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 13, frustum.r, frustum.g, frustum.b ); // f4, f3\n\t\tcolorAttribute.setXYZ( 14, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 15, frustum.r, frustum.g, frustum.b ); // f3, f1\n\n\t\t// sides\n\n\t\tcolorAttribute.setXYZ( 16, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 17, frustum.r, frustum.g, frustum.b ); // n1, f1\n\t\tcolorAttribute.setXYZ( 18, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 19, frustum.r, frustum.g, frustum.b ); // n2, f2\n\t\tcolorAttribute.setXYZ( 20, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 21, frustum.r, frustum.g, frustum.b ); // n3, f3\n\t\tcolorAttribute.setXYZ( 22, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 23, frustum.r, frustum.g, frustum.b ); // n4, f4\n\n\t\t// cone\n\n\t\tcolorAttribute.setXYZ( 24, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 25, cone.r, cone.g, cone.b ); // p, n1\n\t\tcolorAttribute.setXYZ( 26, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 27, cone.r, cone.g, cone.b ); // p, n2\n\t\tcolorAttribute.setXYZ( 28, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 29, cone.r, cone.g, cone.b ); // p, n3\n\t\tcolorAttribute.setXYZ( 30, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 31, cone.r, cone.g, cone.b ); // p, n4\n\n\t\t// up\n\n\t\tcolorAttribute.setXYZ( 32, up.r, up.g, up.b ); colorAttribute.setXYZ( 33, up.r, up.g, up.b ); // u1, u2\n\t\tcolorAttribute.setXYZ( 34, up.r, up.g, up.b ); colorAttribute.setXYZ( 35, up.r, up.g, up.b ); // u2, u3\n\t\tcolorAttribute.setXYZ( 36, up.r, up.g, up.b ); colorAttribute.setXYZ( 37, up.r, up.g, up.b ); // u3, u1\n\n\t\t// target\n\n\t\tcolorAttribute.setXYZ( 38, target.r, target.g, target.b ); colorAttribute.setXYZ( 39, target.r, target.g, target.b ); // c, t\n\t\tcolorAttribute.setXYZ( 40, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 41, cross.r, cross.g, cross.b ); // p, c\n\n\t\t// cross\n\n\t\tcolorAttribute.setXYZ( 42, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 43, cross.r, cross.g, cross.b ); // cn1, cn2\n\t\tcolorAttribute.setXYZ( 44, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 45, cross.r, cross.g, cross.b ); // cn3, cn4\n\n\t\tcolorAttribute.setXYZ( 46, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 47, cross.r, cross.g, cross.b ); // cf1, cf2\n\t\tcolorAttribute.setXYZ( 48, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 49, cross.r, cross.g, cross.b ); // cf3, cf4\n\n\t\tcolorAttribute.needsUpdate = true;\n\n\t}\n\n\tupdate() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst pointMap = this.pointMap;\n\n\t\tconst w = 1, h = 1;\n\n\t\t// we need just camera projection matrix inverse\n\t\t// world matrix must be identity\n\n\t\t_camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );\n\n\t\t// center / target\n\n\t\tsetPoint( 'c', pointMap, geometry, _camera, 0, 0, - 1 );\n\t\tsetPoint( 't', pointMap, geometry, _camera, 0, 0, 1 );\n\n\t\t// near\n\n\t\tsetPoint( 'n1', pointMap, geometry, _camera, - w, - h, - 1 );\n\t\tsetPoint( 'n2', pointMap, geometry, _camera, w, - h, - 1 );\n\t\tsetPoint( 'n3', pointMap, geometry, _camera, - w, h, - 1 );\n\t\tsetPoint( 'n4', pointMap, geometry, _camera, w, h, - 1 );\n\n\t\t// far\n\n\t\tsetPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 );\n\t\tsetPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 );\n\t\tsetPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 );\n\t\tsetPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );\n\n\t\t// up\n\n\t\tsetPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, - 1 );\n\n\t\t// cross\n\n\t\tsetPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 );\n\t\tsetPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );\n\t\tsetPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 );\n\t\tsetPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );\n\n\t\tsetPoint( 'cn1', pointMap, geometry, _camera, - w, 0, - 1 );\n\t\tsetPoint( 'cn2', pointMap, geometry, _camera, w, 0, - 1 );\n\t\tsetPoint( 'cn3', pointMap, geometry, _camera, 0, - h, - 1 );\n\t\tsetPoint( 'cn4', pointMap, geometry, _camera, 0, h, - 1 );\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\n\nfunction setPoint( point, pointMap, geometry, camera, x, y, z ) {\n\n\t_vector.set( x, y, z ).unproject( camera );\n\n\tconst points = pointMap[ point ];\n\n\tif ( points !== undefined ) {\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tposition.setXYZ( points[ i ], _vector.x, _vector.y, _vector.z );\n\n\t\t}\n\n\t}\n\n}\n\nconst _box = /*@__PURE__*/ new Box3();\n\nclass BoxHelper extends LineSegments {\n\n\tconstructor( object, color = 0xffff00 ) {\n\n\t\tconst indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );\n\t\tconst positions = new Float32Array( 8 * 3 );\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\t\tgeometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.object = object;\n\t\tthis.type = 'BoxHelper';\n\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\t}\n\n\tupdate( object ) {\n\n\t\tif ( object !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.BoxHelper: .update() has no longer arguments.' );\n\n\t\t}\n\n\t\tif ( this.object !== undefined ) {\n\n\t\t\t_box.setFromObject( this.object );\n\n\t\t}\n\n\t\tif ( _box.isEmpty() ) return;\n\n\t\tconst min = _box.min;\n\t\tconst max = _box.max;\n\n\t\t/*\n\t\t\t5____4\n\t\t1/___0/|\n\t\t| 6__|_7\n\t\t2/___3/\n\n\t\t0: max.x, max.y, max.z\n\t\t1: min.x, max.y, max.z\n\t\t2: min.x, min.y, max.z\n\t\t3: max.x, min.y, max.z\n\t\t4: max.x, max.y, min.z\n\t\t5: min.x, max.y, min.z\n\t\t6: min.x, min.y, min.z\n\t\t7: max.x, min.y, min.z\n\t\t*/\n\n\t\tconst position = this.geometry.attributes.position;\n\t\tconst array = position.array;\n\n\t\tarray[ 0 ] = max.x; array[ 1 ] = max.y; array[ 2 ] = max.z;\n\t\tarray[ 3 ] = min.x; array[ 4 ] = max.y; array[ 5 ] = max.z;\n\t\tarray[ 6 ] = min.x; array[ 7 ] = min.y; array[ 8 ] = max.z;\n\t\tarray[ 9 ] = max.x; array[ 10 ] = min.y; array[ 11 ] = max.z;\n\t\tarray[ 12 ] = max.x; array[ 13 ] = max.y; array[ 14 ] = min.z;\n\t\tarray[ 15 ] = min.x; array[ 16 ] = max.y; array[ 17 ] = min.z;\n\t\tarray[ 18 ] = min.x; array[ 19 ] = min.y; array[ 20 ] = min.z;\n\t\tarray[ 21 ] = max.x; array[ 22 ] = min.y; array[ 23 ] = min.z;\n\n\t\tposition.needsUpdate = true;\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\t}\n\n\tsetFromObject( object ) {\n\n\t\tthis.object = object;\n\t\tthis.update();\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.object = source.object;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass Box3Helper extends LineSegments {\n\n\tconstructor( box, color = 0xffff00 ) {\n\n\t\tconst indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] );\n\n\t\tconst positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ];\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.box = box;\n\n\t\tthis.type = 'Box3Helper';\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst box = this.box;\n\n\t\tif ( box.isEmpty() ) return;\n\n\t\tbox.getCenter( this.position );\n\n\t\tbox.getSize( this.scale );\n\n\t\tthis.scale.multiplyScalar( 0.5 );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass PlaneHelper extends Line {\n\n\tconstructor( plane, size = 1, hex = 0xffff00 ) {\n\n\t\tconst color = hex;\n\n\t\tconst positions = [ 1, - 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, - 1, 0, 1, 1, 0 ];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\t\tgeometry.computeBoundingSphere();\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.type = 'PlaneHelper';\n\n\t\tthis.plane = plane;\n\n\t\tthis.size = size;\n\n\t\tconst positions2 = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ];\n\n\t\tconst geometry2 = new BufferGeometry();\n\t\tgeometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );\n\t\tgeometry2.computeBoundingSphere();\n\n\t\tthis.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false, toneMapped: false } ) ) );\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tthis.position.set( 0, 0, 0 );\n\n\t\tthis.scale.set( 0.5 * this.size, 0.5 * this.size, 1 );\n\n\t\tthis.lookAt( this.plane.normal );\n\n\t\tthis.translateZ( - this.plane.constant );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\t\tthis.children[ 0 ].geometry.dispose();\n\t\tthis.children[ 0 ].material.dispose();\n\n\t}\n\n}\n\nconst _axis = /*@__PURE__*/ new Vector3();\nlet _lineGeometry, _coneGeometry;\n\nclass ArrowHelper extends Object3D {\n\n\t// dir is assumed to be normalized\n\n\tconstructor( dir = new Vector3( 0, 0, 1 ), origin = new Vector3( 0, 0, 0 ), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ArrowHelper';\n\n\t\tif ( _lineGeometry === undefined ) {\n\n\t\t\t_lineGeometry = new BufferGeometry();\n\t\t\t_lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );\n\n\t\t\t_coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 );\n\t\t\t_coneGeometry.translate( 0, - 0.5, 0 );\n\n\t\t}\n\n\t\tthis.position.copy( origin );\n\n\t\tthis.line = new Line( _lineGeometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.line.matrixAutoUpdate = false;\n\t\tthis.add( this.line );\n\n\t\tthis.cone = new Mesh( _coneGeometry, new MeshBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.cone.matrixAutoUpdate = false;\n\t\tthis.add( this.cone );\n\n\t\tthis.setDirection( dir );\n\t\tthis.setLength( length, headLength, headWidth );\n\n\t}\n\n\tsetDirection( dir ) {\n\n\t\t// dir is assumed to be normalized\n\n\t\tif ( dir.y > 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 0, 0, 0, 1 );\n\n\t\t} else if ( dir.y < - 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 1, 0, 0, 0 );\n\n\t\t} else {\n\n\t\t\t_axis.set( dir.z, 0, - dir.x ).normalize();\n\n\t\t\tconst radians = Math.acos( dir.y );\n\n\t\t\tthis.quaternion.setFromAxisAngle( _axis, radians );\n\n\t\t}\n\n\t}\n\n\tsetLength( length, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tthis.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458\n\t\tthis.line.updateMatrix();\n\n\t\tthis.cone.scale.set( headWidth, headLength, headWidth );\n\t\tthis.cone.position.y = length;\n\t\tthis.cone.updateMatrix();\n\n\t}\n\n\tsetColor( color ) {\n\n\t\tthis.line.material.color.set( color );\n\t\tthis.cone.material.color.set( color );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tthis.line.copy( source.line );\n\t\tthis.cone.copy( source.cone );\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.line.geometry.dispose();\n\t\tthis.line.material.dispose();\n\t\tthis.cone.geometry.dispose();\n\t\tthis.cone.material.dispose();\n\n\t}\n\n}\n\nclass AxesHelper extends LineSegments {\n\n\tconstructor( size = 1 ) {\n\n\t\tconst vertices = [\n\t\t\t0, 0, 0,\tsize, 0, 0,\n\t\t\t0, 0, 0,\t0, size, 0,\n\t\t\t0, 0, 0,\t0, 0, size\n\t\t];\n\n\t\tconst colors = [\n\t\t\t1, 0, 0,\t1, 0.6, 0,\n\t\t\t0, 1, 0,\t0.6, 1, 0,\n\t\t\t0, 0, 1,\t0, 0.6, 1\n\t\t];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'AxesHelper';\n\n\t}\n\n\tsetColors( xAxisColor, yAxisColor, zAxisColor ) {\n\n\t\tconst color = new Color();\n\t\tconst array = this.geometry.attributes.color.array;\n\n\t\tcolor.set( xAxisColor );\n\t\tcolor.toArray( array, 0 );\n\t\tcolor.toArray( array, 3 );\n\n\t\tcolor.set( yAxisColor );\n\t\tcolor.toArray( array, 6 );\n\t\tcolor.toArray( array, 9 );\n\n\t\tcolor.set( zAxisColor );\n\t\tcolor.toArray( array, 12 );\n\t\tcolor.toArray( array, 15 );\n\n\t\tthis.geometry.attributes.color.needsUpdate = true;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nclass ShapePath {\n\n\tconstructor() {\n\n\t\tthis.type = 'ShapePath';\n\n\t\tthis.color = new Color();\n\n\t\tthis.subPaths = [];\n\t\tthis.currentPath = null;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPath = new Path();\n\t\tthis.subPaths.push( this.currentPath );\n\t\tthis.currentPath.moveTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tthis.currentPath.lineTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tthis.currentPath.quadraticCurveTo( aCPx, aCPy, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tthis.currentPath.bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts ) {\n\n\t\tthis.currentPath.splineThru( pts );\n\n\t\treturn this;\n\n\t}\n\n\ttoShapes( isCCW ) {\n\n\t\tfunction toShapesNoHoles( inSubpaths ) {\n\n\t\t\tconst shapes = [];\n\n\t\t\tfor ( let i = 0, l = inSubpaths.length; i < l; i ++ ) {\n\n\t\t\t\tconst tmpPath = inSubpaths[ i ];\n\n\t\t\t\tconst tmpShape = new Shape();\n\t\t\t\ttmpShape.curves = tmpPath.curves;\n\n\t\t\t\tshapes.push( tmpShape );\n\n\t\t\t}\n\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tfunction isPointInsidePolygon( inPt, inPolygon ) {\n\n\t\t\tconst polyLen = inPolygon.length;\n\n\t\t\t// inPt on polygon contour => immediate success or\n\t\t\t// toggling of inside/outside at every single! intersection point of an edge\n\t\t\t// with the horizontal line through inPt, left of inPt\n\t\t\t// not counting lowerY endpoints of edges and whole edges on that line\n\t\t\tlet inside = false;\n\t\t\tfor ( let p = polyLen - 1, q = 0; q < polyLen; p = q ++ ) {\n\n\t\t\t\tlet edgeLowPt = inPolygon[ p ];\n\t\t\t\tlet edgeHighPt = inPolygon[ q ];\n\n\t\t\t\tlet edgeDx = edgeHighPt.x - edgeLowPt.x;\n\t\t\t\tlet edgeDy = edgeHighPt.y - edgeLowPt.y;\n\n\t\t\t\tif ( Math.abs( edgeDy ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not parallel\n\t\t\t\t\tif ( edgeDy < 0 ) {\n\n\t\t\t\t\t\tedgeLowPt = inPolygon[ q ]; edgeDx = - edgeDx;\n\t\t\t\t\t\tedgeHighPt = inPolygon[ p ]; edgeDy = - edgeDy;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( inPt.y < edgeLowPt.y ) || ( inPt.y > edgeHighPt.y ) ) \t\tcontinue;\n\n\t\t\t\t\tif ( inPt.y === edgeLowPt.y ) {\n\n\t\t\t\t\t\tif ( inPt.x === edgeLowPt.x )\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\t// continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst perpEdge = edgeDy * ( inPt.x - edgeLowPt.x ) - edgeDx * ( inPt.y - edgeLowPt.y );\n\t\t\t\t\t\tif ( perpEdge === 0 )\t\t\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\tif ( perpEdge < 0 ) \t\t\t\tcontinue;\n\t\t\t\t\t\tinside = ! inside;\t\t// true intersection left of inPt\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// parallel or collinear\n\t\t\t\t\tif ( inPt.y !== edgeLowPt.y ) \t\tcontinue;\t\t\t// parallel\n\t\t\t\t\t// edge lies on the same horizontal line as inPt\n\t\t\t\t\tif ( ( ( edgeHighPt.x <= inPt.x ) && ( inPt.x <= edgeLowPt.x ) ) ||\n\t\t\t\t\t\t ( ( edgeLowPt.x <= inPt.x ) && ( inPt.x <= edgeHighPt.x ) ) )\t\treturn\ttrue;\t// inPt: Point on contour !\n\t\t\t\t\t// continue;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn\tinside;\n\n\t\t}\n\n\t\tconst isClockWise = ShapeUtils.isClockWise;\n\n\t\tconst subPaths = this.subPaths;\n\t\tif ( subPaths.length === 0 ) return [];\n\n\t\tlet solid, tmpPath, tmpShape;\n\t\tconst shapes = [];\n\n\t\tif ( subPaths.length === 1 ) {\n\n\t\t\ttmpPath = subPaths[ 0 ];\n\t\t\ttmpShape = new Shape();\n\t\t\ttmpShape.curves = tmpPath.curves;\n\t\t\tshapes.push( tmpShape );\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tlet holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() );\n\t\tholesFirst = isCCW ? ! holesFirst : holesFirst;\n\n\t\t// console.log(\"Holes first\", holesFirst);\n\n\t\tconst betterShapeHoles = [];\n\t\tconst newShapes = [];\n\t\tlet newShapeHoles = [];\n\t\tlet mainIdx = 0;\n\t\tlet tmpPoints;\n\n\t\tnewShapes[ mainIdx ] = undefined;\n\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\tfor ( let i = 0, l = subPaths.length; i < l; i ++ ) {\n\n\t\t\ttmpPath = subPaths[ i ];\n\t\t\ttmpPoints = tmpPath.getPoints();\n\t\t\tsolid = isClockWise( tmpPoints );\n\t\t\tsolid = isCCW ? ! solid : solid;\n\n\t\t\tif ( solid ) {\n\n\t\t\t\tif ( ( ! holesFirst ) && ( newShapes[ mainIdx ] ) )\tmainIdx ++;\n\n\t\t\t\tnewShapes[ mainIdx ] = { s: new Shape(), p: tmpPoints };\n\t\t\t\tnewShapes[ mainIdx ].s.curves = tmpPath.curves;\n\n\t\t\t\tif ( holesFirst )\tmainIdx ++;\n\t\t\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\t\t\t//console.log('cw', i);\n\n\t\t\t} else {\n\n\t\t\t\tnewShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } );\n\n\t\t\t\t//console.log('ccw', i);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// only Holes? -> probably all Shapes with wrong orientation\n\t\tif ( ! newShapes[ 0 ] )\treturn\ttoShapesNoHoles( subPaths );\n\n\n\t\tif ( newShapes.length > 1 ) {\n\n\t\t\tlet ambiguous = false;\n\t\t\tlet toChange = 0;\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tbetterShapeHoles[ sIdx ] = [];\n\n\t\t\t}\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tconst sho = newShapeHoles[ sIdx ];\n\n\t\t\t\tfor ( let hIdx = 0; hIdx < sho.length; hIdx ++ ) {\n\n\t\t\t\t\tconst ho = sho[ hIdx ];\n\t\t\t\t\tlet hole_unassigned = true;\n\n\t\t\t\t\tfor ( let s2Idx = 0; s2Idx < newShapes.length; s2Idx ++ ) {\n\n\t\t\t\t\t\tif ( isPointInsidePolygon( ho.p, newShapes[ s2Idx ].p ) ) {\n\n\t\t\t\t\t\t\tif ( sIdx !== s2Idx )\ttoChange ++;\n\n\t\t\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\t\t\thole_unassigned = false;\n\t\t\t\t\t\t\t\tbetterShapeHoles[ s2Idx ].push( ho );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tambiguous = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\tbetterShapeHoles[ sIdx ].push( ho );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( toChange > 0 && ambiguous === false ) {\n\n\t\t\t\tnewShapeHoles = betterShapeHoles;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet tmpHoles;\n\n\t\tfor ( let i = 0, il = newShapes.length; i < il; i ++ ) {\n\n\t\t\ttmpShape = newShapes[ i ].s;\n\t\t\tshapes.push( tmpShape );\n\t\t\ttmpHoles = newShapeHoles[ i ];\n\n\t\t\tfor ( let j = 0, jl = tmpHoles.length; j < jl; j ++ ) {\n\n\t\t\t\ttmpShape.holes.push( tmpHoles[ j ].h );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//console.log(\"shape\", shapes);\n\n\t\treturn shapes;\n\n\t}\n\n}\n\nif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: {\n\t\trevision: REVISION,\n\t} } ) );\n\n}\n\nif ( typeof window !== 'undefined' ) {\n\n\tif ( window.__THREE__ ) {\n\n\t\tconsole.warn( 'WARNING: Multiple instances of Three.js being imported.' );\n\n\t} else {\n\n\t\twindow.__THREE__ = REVISION;\n\n\t}\n\n}\n\nexport { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DisplayP3ColorSpace, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Float64BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearDisplayP3ColorSpace, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, P3Primaries, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, Rec709Primaries, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, TwoPassDoubleSide, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoTexture, WebGL1Renderer, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, _SRGBAFormat, createCanvasElement, sRGBEncoding };\n","import {\n\tEventDispatcher,\n\tMOUSE,\n\tQuaternion,\n\tSpherical,\n\tTOUCH,\n\tVector2,\n\tVector3,\n\tPlane,\n\tRay,\n\tMathUtils\n} from 'three';\n\n// OrbitControls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n//\n// Orbit - left mouse / touch: one-finger move\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move\n\nconst _changeEvent = { type: 'change' };\nconst _startEvent = { type: 'start' };\nconst _endEvent = { type: 'end' };\nconst _ray = new Ray();\nconst _plane = new Plane();\nconst TILT_LIMIT = Math.cos( 70 * MathUtils.DEG2RAD );\n\nclass OrbitControls extends EventDispatcher {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper();\n\n\t\tthis.object = object;\n\t\tthis.domElement = domElement;\n\t\tthis.domElement.style.touchAction = 'none'; // disable touch scroll\n\n\t\t// Set to false to disable this control\n\t\tthis.enabled = true;\n\n\t\t// \"target\" sets the location of focus, where the object orbits around\n\t\tthis.target = new Vector3();\n\n\t\t// Sets the 3D cursor (similar to Blender), from which the maxTargetRadius takes effect\n\t\tthis.cursor = new Vector3();\n\n\t\t// How far you can dolly in and out ( PerspectiveCamera only )\n\t\tthis.minDistance = 0;\n\t\tthis.maxDistance = Infinity;\n\n\t\t// How far you can zoom in and out ( OrthographicCamera only )\n\t\tthis.minZoom = 0;\n\t\tthis.maxZoom = Infinity;\n\n\t\t// Limit camera target within a spherical area around the cursor\n\t\tthis.minTargetRadius = 0;\n\t\tthis.maxTargetRadius = Infinity;\n\n\t\t// How far you can orbit vertically, upper and lower limits.\n\t\t// Range is 0 to Math.PI radians.\n\t\tthis.minPolarAngle = 0; // radians\n\t\tthis.maxPolarAngle = Math.PI; // radians\n\n\t\t// How far you can orbit horizontally, upper and lower limits.\n\t\t// If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI )\n\t\tthis.minAzimuthAngle = - Infinity; // radians\n\t\tthis.maxAzimuthAngle = Infinity; // radians\n\n\t\t// Set to true to enable damping (inertia)\n\t\t// If damping is enabled, you must call controls.update() in your animation loop\n\t\tthis.enableDamping = false;\n\t\tthis.dampingFactor = 0.05;\n\n\t\t// This option actually enables dollying in and out; left as \"zoom\" for backwards compatibility.\n\t\t// Set to false to disable zooming\n\t\tthis.enableZoom = true;\n\t\tthis.zoomSpeed = 1.0;\n\n\t\t// Set to false to disable rotating\n\t\tthis.enableRotate = true;\n\t\tthis.rotateSpeed = 1.0;\n\n\t\t// Set to false to disable panning\n\t\tthis.enablePan = true;\n\t\tthis.panSpeed = 1.0;\n\t\tthis.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up\n\t\tthis.keyPanSpeed = 7.0;\t// pixels moved per arrow key push\n\t\tthis.zoomToCursor = false;\n\n\t\t// Set to true to automatically rotate around the target\n\t\t// If auto-rotate is enabled, you must call controls.update() in your animation loop\n\t\tthis.autoRotate = false;\n\t\tthis.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60\n\n\t\t// The four arrow keys\n\t\tthis.keys = { LEFT: 'ArrowLeft', UP: 'ArrowUp', RIGHT: 'ArrowRight', BOTTOM: 'ArrowDown' };\n\n\t\t// Mouse buttons\n\t\tthis.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };\n\n\t\t// Touch fingers\n\t\tthis.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };\n\n\t\t// for reset\n\t\tthis.target0 = this.target.clone();\n\t\tthis.position0 = this.object.position.clone();\n\t\tthis.zoom0 = this.object.zoom;\n\n\t\t// the target DOM element for key events\n\t\tthis._domElementKeyEvents = null;\n\n\t\t//\n\t\t// public methods\n\t\t//\n\n\t\tthis.getPolarAngle = function () {\n\n\t\t\treturn spherical.phi;\n\n\t\t};\n\n\t\tthis.getAzimuthalAngle = function () {\n\n\t\t\treturn spherical.theta;\n\n\t\t};\n\n\t\tthis.getDistance = function () {\n\n\t\t\treturn this.object.position.distanceTo( this.target );\n\n\t\t};\n\n\t\tthis.listenToKeyEvents = function ( domElement ) {\n\n\t\t\tdomElement.addEventListener( 'keydown', onKeyDown );\n\t\t\tthis._domElementKeyEvents = domElement;\n\n\t\t};\n\n\t\tthis.stopListenToKeyEvents = function () {\n\n\t\t\tthis._domElementKeyEvents.removeEventListener( 'keydown', onKeyDown );\n\t\t\tthis._domElementKeyEvents = null;\n\n\t\t};\n\n\t\tthis.saveState = function () {\n\n\t\t\tscope.target0.copy( scope.target );\n\t\t\tscope.position0.copy( scope.object.position );\n\t\t\tscope.zoom0 = scope.object.zoom;\n\n\t\t};\n\n\t\tthis.reset = function () {\n\n\t\t\tscope.target.copy( scope.target0 );\n\t\t\tscope.object.position.copy( scope.position0 );\n\t\t\tscope.object.zoom = scope.zoom0;\n\n\t\t\tscope.object.updateProjectionMatrix();\n\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\tscope.update();\n\n\t\t\tstate = STATE.NONE;\n\n\t\t};\n\n\t\t// this method is exposed, but perhaps it would be better if we can make it private...\n\t\tthis.update = function () {\n\n\t\t\tconst offset = new Vector3();\n\n\t\t\t// so camera.up is the orbit axis\n\t\t\tconst quat = new Quaternion().setFromUnitVectors( object.up, new Vector3( 0, 1, 0 ) );\n\t\t\tconst quatInverse = quat.clone().invert();\n\n\t\t\tconst lastPosition = new Vector3();\n\t\t\tconst lastQuaternion = new Quaternion();\n\t\t\tconst lastTargetPosition = new Vector3();\n\n\t\t\tconst twoPI = 2 * Math.PI;\n\n\t\t\treturn function update( deltaTime = null ) {\n\n\t\t\t\tconst position = scope.object.position;\n\n\t\t\t\toffset.copy( position ).sub( scope.target );\n\n\t\t\t\t// rotate offset to \"y-axis-is-up\" space\n\t\t\t\toffset.applyQuaternion( quat );\n\n\t\t\t\t// angle from z-axis around y-axis\n\t\t\t\tspherical.setFromVector3( offset );\n\n\t\t\t\tif ( scope.autoRotate && state === STATE.NONE ) {\n\n\t\t\t\t\trotateLeft( getAutoRotationAngle( deltaTime ) );\n\n\t\t\t\t}\n\n\t\t\t\tif ( scope.enableDamping ) {\n\n\t\t\t\t\tspherical.theta += sphericalDelta.theta * scope.dampingFactor;\n\t\t\t\t\tspherical.phi += sphericalDelta.phi * scope.dampingFactor;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tspherical.theta += sphericalDelta.theta;\n\t\t\t\t\tspherical.phi += sphericalDelta.phi;\n\n\t\t\t\t}\n\n\t\t\t\t// restrict theta to be between desired limits\n\n\t\t\t\tlet min = scope.minAzimuthAngle;\n\t\t\t\tlet max = scope.maxAzimuthAngle;\n\n\t\t\t\tif ( isFinite( min ) && isFinite( max ) ) {\n\n\t\t\t\t\tif ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;\n\n\t\t\t\t\tif ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI;\n\n\t\t\t\t\tif ( min <= max ) {\n\n\t\t\t\t\t\tspherical.theta = Math.max( min, Math.min( max, spherical.theta ) );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tspherical.theta = ( spherical.theta > ( min + max ) / 2 ) ?\n\t\t\t\t\t\t\tMath.max( min, spherical.theta ) :\n\t\t\t\t\t\t\tMath.min( max, spherical.theta );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// restrict phi to be between desired limits\n\t\t\t\tspherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) );\n\n\t\t\t\tspherical.makeSafe();\n\n\n\t\t\t\t// move target to panned location\n\n\t\t\t\tif ( scope.enableDamping === true ) {\n\n\t\t\t\t\tscope.target.addScaledVector( panOffset, scope.dampingFactor );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tscope.target.add( panOffset );\n\n\t\t\t\t}\n\n\t\t\t\t// Limit the target distance from the cursor to create a sphere around the center of interest\n\t\t\t\tscope.target.sub( scope.cursor );\n\t\t\t\tscope.target.clampLength( scope.minTargetRadius, scope.maxTargetRadius );\n\t\t\t\tscope.target.add( scope.cursor );\n\n\t\t\t\t// adjust the camera position based on zoom only if we're not zooming to the cursor or if it's an ortho camera\n\t\t\t\t// we adjust zoom later in these cases\n\t\t\t\tif ( scope.zoomToCursor && performCursorZoom || scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\tspherical.radius = clampDistance( spherical.radius );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tspherical.radius = clampDistance( spherical.radius * scale );\n\n\t\t\t\t}\n\n\t\t\t\toffset.setFromSpherical( spherical );\n\n\t\t\t\t// rotate offset back to \"camera-up-vector-is-up\" space\n\t\t\t\toffset.applyQuaternion( quatInverse );\n\n\t\t\t\tposition.copy( scope.target ).add( offset );\n\n\t\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\t\tif ( scope.enableDamping === true ) {\n\n\t\t\t\t\tsphericalDelta.theta *= ( 1 - scope.dampingFactor );\n\t\t\t\t\tsphericalDelta.phi *= ( 1 - scope.dampingFactor );\n\n\t\t\t\t\tpanOffset.multiplyScalar( 1 - scope.dampingFactor );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tsphericalDelta.set( 0, 0, 0 );\n\n\t\t\t\t\tpanOffset.set( 0, 0, 0 );\n\n\t\t\t\t}\n\n\t\t\t\t// adjust camera position\n\t\t\t\tlet zoomChanged = false;\n\t\t\t\tif ( scope.zoomToCursor && performCursorZoom ) {\n\n\t\t\t\t\tlet newRadius = null;\n\t\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t\t// move the camera down the pointer ray\n\t\t\t\t\t\t// this method avoids floating point error\n\t\t\t\t\t\tconst prevRadius = offset.length();\n\t\t\t\t\t\tnewRadius = clampDistance( prevRadius * scale );\n\n\t\t\t\t\t\tconst radiusDelta = prevRadius - newRadius;\n\t\t\t\t\t\tscope.object.position.addScaledVector( dollyDirection, radiusDelta );\n\t\t\t\t\t\tscope.object.updateMatrixWorld();\n\n\t\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t\t// adjust the ortho camera position based on zoom changes\n\t\t\t\t\t\tconst mouseBefore = new Vector3( mouse.x, mouse.y, 0 );\n\t\t\t\t\t\tmouseBefore.unproject( scope.object );\n\n\t\t\t\t\t\tscope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / scale ) );\n\t\t\t\t\t\tscope.object.updateProjectionMatrix();\n\t\t\t\t\t\tzoomChanged = true;\n\n\t\t\t\t\t\tconst mouseAfter = new Vector3( mouse.x, mouse.y, 0 );\n\t\t\t\t\t\tmouseAfter.unproject( scope.object );\n\n\t\t\t\t\t\tscope.object.position.sub( mouseAfter ).add( mouseBefore );\n\t\t\t\t\t\tscope.object.updateMatrixWorld();\n\n\t\t\t\t\t\tnewRadius = offset.length();\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.' );\n\t\t\t\t\t\tscope.zoomToCursor = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// handle the placement of the target\n\t\t\t\t\tif ( newRadius !== null ) {\n\n\t\t\t\t\t\tif ( this.screenSpacePanning ) {\n\n\t\t\t\t\t\t\t// position the orbit target in front of the new camera position\n\t\t\t\t\t\t\tscope.target.set( 0, 0, - 1 )\n\t\t\t\t\t\t\t\t.transformDirection( scope.object.matrix )\n\t\t\t\t\t\t\t\t.multiplyScalar( newRadius )\n\t\t\t\t\t\t\t\t.add( scope.object.position );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// get the ray and translation plane to compute target\n\t\t\t\t\t\t\t_ray.origin.copy( scope.object.position );\n\t\t\t\t\t\t\t_ray.direction.set( 0, 0, - 1 ).transformDirection( scope.object.matrix );\n\n\t\t\t\t\t\t\t// if the camera is 20 degrees above the horizon then don't adjust the focus target to avoid\n\t\t\t\t\t\t\t// extremely large values\n\t\t\t\t\t\t\tif ( Math.abs( scope.object.up.dot( _ray.direction ) ) < TILT_LIMIT ) {\n\n\t\t\t\t\t\t\t\tobject.lookAt( scope.target );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t_plane.setFromNormalAndCoplanarPoint( scope.object.up, scope.target );\n\t\t\t\t\t\t\t\t_ray.intersectPlane( _plane, scope.target );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\tscope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / scale ) );\n\t\t\t\t\tscope.object.updateProjectionMatrix();\n\t\t\t\t\tzoomChanged = true;\n\n\t\t\t\t}\n\n\t\t\t\tscale = 1;\n\t\t\t\tperformCursorZoom = false;\n\n\t\t\t\t// update condition is:\n\t\t\t\t// min(camera displacement, camera rotation in radians)^2 > EPS\n\t\t\t\t// using small-angle approximation cos(x/2) = 1 - x^2 / 8\n\n\t\t\t\tif ( zoomChanged ||\n\t\t\t\t\tlastPosition.distanceToSquared( scope.object.position ) > EPS ||\n\t\t\t\t\t8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ||\n\t\t\t\t\tlastTargetPosition.distanceToSquared( scope.target ) > 0 ) {\n\n\t\t\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\t\t\tlastPosition.copy( scope.object.position );\n\t\t\t\t\tlastQuaternion.copy( scope.object.quaternion );\n\t\t\t\t\tlastTargetPosition.copy( scope.target );\n\n\t\t\t\t\tzoomChanged = false;\n\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\n\t\t\t};\n\n\t\t}();\n\n\t\tthis.dispose = function () {\n\n\t\t\tscope.domElement.removeEventListener( 'contextmenu', onContextMenu );\n\n\t\t\tscope.domElement.removeEventListener( 'pointerdown', onPointerDown );\n\t\t\tscope.domElement.removeEventListener( 'pointercancel', onPointerUp );\n\t\t\tscope.domElement.removeEventListener( 'wheel', onMouseWheel );\n\n\t\t\tscope.domElement.removeEventListener( 'pointermove', onPointerMove );\n\t\t\tscope.domElement.removeEventListener( 'pointerup', onPointerUp );\n\n\n\t\t\tif ( scope._domElementKeyEvents !== null ) {\n\n\t\t\t\tscope._domElementKeyEvents.removeEventListener( 'keydown', onKeyDown );\n\t\t\t\tscope._domElementKeyEvents = null;\n\n\t\t\t}\n\n\t\t\t//scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?\n\n\t\t};\n\n\t\t//\n\t\t// internals\n\t\t//\n\n\t\tconst scope = this;\n\n\t\tconst STATE = {\n\t\t\tNONE: - 1,\n\t\t\tROTATE: 0,\n\t\t\tDOLLY: 1,\n\t\t\tPAN: 2,\n\t\t\tTOUCH_ROTATE: 3,\n\t\t\tTOUCH_PAN: 4,\n\t\t\tTOUCH_DOLLY_PAN: 5,\n\t\t\tTOUCH_DOLLY_ROTATE: 6\n\t\t};\n\n\t\tlet state = STATE.NONE;\n\n\t\tconst EPS = 0.000001;\n\n\t\t// current position in spherical coordinates\n\t\tconst spherical = new Spherical();\n\t\tconst sphericalDelta = new Spherical();\n\n\t\tlet scale = 1;\n\t\tconst panOffset = new Vector3();\n\n\t\tconst rotateStart = new Vector2();\n\t\tconst rotateEnd = new Vector2();\n\t\tconst rotateDelta = new Vector2();\n\n\t\tconst panStart = new Vector2();\n\t\tconst panEnd = new Vector2();\n\t\tconst panDelta = new Vector2();\n\n\t\tconst dollyStart = new Vector2();\n\t\tconst dollyEnd = new Vector2();\n\t\tconst dollyDelta = new Vector2();\n\n\t\tconst dollyDirection = new Vector3();\n\t\tconst mouse = new Vector2();\n\t\tlet performCursorZoom = false;\n\n\t\tconst pointers = [];\n\t\tconst pointerPositions = {};\n\n\t\tfunction getAutoRotationAngle( deltaTime ) {\n\n\t\t\tif ( deltaTime !== null ) {\n\n\t\t\t\treturn ( 2 * Math.PI / 60 * scope.autoRotateSpeed ) * deltaTime;\n\n\t\t\t} else {\n\n\t\t\t\treturn 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction getZoomScale() {\n\n\t\t\treturn Math.pow( 0.95, scope.zoomSpeed );\n\n\t\t}\n\n\t\tfunction rotateLeft( angle ) {\n\n\t\t\tsphericalDelta.theta -= angle;\n\n\t\t}\n\n\t\tfunction rotateUp( angle ) {\n\n\t\t\tsphericalDelta.phi -= angle;\n\n\t\t}\n\n\t\tconst panLeft = function () {\n\n\t\t\tconst v = new Vector3();\n\n\t\t\treturn function panLeft( distance, objectMatrix ) {\n\n\t\t\t\tv.setFromMatrixColumn( objectMatrix, 0 ); // get X column of objectMatrix\n\t\t\t\tv.multiplyScalar( - distance );\n\n\t\t\t\tpanOffset.add( v );\n\n\t\t\t};\n\n\t\t}();\n\n\t\tconst panUp = function () {\n\n\t\t\tconst v = new Vector3();\n\n\t\t\treturn function panUp( distance, objectMatrix ) {\n\n\t\t\t\tif ( scope.screenSpacePanning === true ) {\n\n\t\t\t\t\tv.setFromMatrixColumn( objectMatrix, 1 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tv.setFromMatrixColumn( objectMatrix, 0 );\n\t\t\t\t\tv.crossVectors( scope.object.up, v );\n\n\t\t\t\t}\n\n\t\t\t\tv.multiplyScalar( distance );\n\n\t\t\t\tpanOffset.add( v );\n\n\t\t\t};\n\n\t\t}();\n\n\t\t// deltaX and deltaY are in pixels; right and down are positive\n\t\tconst pan = function () {\n\n\t\t\tconst offset = new Vector3();\n\n\t\t\treturn function pan( deltaX, deltaY ) {\n\n\t\t\t\tconst element = scope.domElement;\n\n\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t// perspective\n\t\t\t\t\tconst position = scope.object.position;\n\t\t\t\t\toffset.copy( position ).sub( scope.target );\n\t\t\t\t\tlet targetDistance = offset.length();\n\n\t\t\t\t\t// half of the fov is center to top of screen\n\t\t\t\t\ttargetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 );\n\n\t\t\t\t\t// we use only clientHeight here so aspect ratio does not distort speed\n\t\t\t\t\tpanLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix );\n\t\t\t\t\tpanUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix );\n\n\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t// orthographic\n\t\t\t\t\tpanLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix );\n\t\t\t\t\tpanUp( deltaY * ( scope.object.top - scope.object.bottom ) / scope.object.zoom / element.clientHeight, scope.object.matrix );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// camera neither orthographic nor perspective\n\t\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' );\n\t\t\t\t\tscope.enablePan = false;\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}();\n\n\t\tfunction dollyOut( dollyScale ) {\n\n\t\t\tif ( scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscale /= dollyScale;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );\n\t\t\t\tscope.enableZoom = false;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction dollyIn( dollyScale ) {\n\n\t\t\tif ( scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscale *= dollyScale;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );\n\t\t\t\tscope.enableZoom = false;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction updateMouseParameters( event ) {\n\n\t\t\tif ( ! scope.zoomToCursor ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tperformCursorZoom = true;\n\n\t\t\tconst rect = scope.domElement.getBoundingClientRect();\n\t\t\tconst x = event.clientX - rect.left;\n\t\t\tconst y = event.clientY - rect.top;\n\t\t\tconst w = rect.width;\n\t\t\tconst h = rect.height;\n\n\t\t\tmouse.x = ( x / w ) * 2 - 1;\n\t\t\tmouse.y = - ( y / h ) * 2 + 1;\n\n\t\t\tdollyDirection.set( mouse.x, mouse.y, 1 ).unproject( scope.object ).sub( scope.object.position ).normalize();\n\n\t\t}\n\n\t\tfunction clampDistance( dist ) {\n\n\t\t\treturn Math.max( scope.minDistance, Math.min( scope.maxDistance, dist ) );\n\n\t\t}\n\n\t\t//\n\t\t// event callbacks - update the object state\n\t\t//\n\n\t\tfunction handleMouseDownRotate( event ) {\n\n\t\t\trotateStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseDownDolly( event ) {\n\n\t\t\tupdateMouseParameters( event );\n\t\t\tdollyStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseDownPan( event ) {\n\n\t\t\tpanStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseMoveRotate( event ) {\n\n\t\t\trotateEnd.set( event.clientX, event.clientY );\n\n\t\t\trotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );\n\n\t\t\tconst element = scope.domElement;\n\n\t\t\trotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height\n\n\t\t\trotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );\n\n\t\t\trotateStart.copy( rotateEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseMoveDolly( event ) {\n\n\t\t\tdollyEnd.set( event.clientX, event.clientY );\n\n\t\t\tdollyDelta.subVectors( dollyEnd, dollyStart );\n\n\t\t\tif ( dollyDelta.y > 0 ) {\n\n\t\t\t\tdollyOut( getZoomScale() );\n\n\t\t\t} else if ( dollyDelta.y < 0 ) {\n\n\t\t\t\tdollyIn( getZoomScale() );\n\n\t\t\t}\n\n\t\t\tdollyStart.copy( dollyEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseMovePan( event ) {\n\n\t\t\tpanEnd.set( event.clientX, event.clientY );\n\n\t\t\tpanDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );\n\n\t\t\tpan( panDelta.x, panDelta.y );\n\n\t\t\tpanStart.copy( panEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseWheel( event ) {\n\n\t\t\tupdateMouseParameters( event );\n\n\t\t\tif ( event.deltaY < 0 ) {\n\n\t\t\t\tdollyIn( getZoomScale() );\n\n\t\t\t} else if ( event.deltaY > 0 ) {\n\n\t\t\t\tdollyOut( getZoomScale() );\n\n\t\t\t}\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleKeyDown( event ) {\n\n\t\t\tlet needsUpdate = false;\n\n\t\t\tswitch ( event.code ) {\n\n\t\t\t\tcase scope.keys.UP:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\trotateUp( 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpan( 0, scope.keyPanSpeed );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.BOTTOM:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\trotateUp( - 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpan( 0, - scope.keyPanSpeed );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.LEFT:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\trotateLeft( 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpan( scope.keyPanSpeed, 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.RIGHT:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\trotateLeft( - 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpan( - scope.keyPanSpeed, 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( needsUpdate ) {\n\n\t\t\t\t// prevent the browser from scrolling on cursor keys\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tscope.update();\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tfunction handleTouchStartRotate() {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\trotateStart.set( pointers[ 0 ].pageX, pointers[ 0 ].pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst x = 0.5 * ( pointers[ 0 ].pageX + pointers[ 1 ].pageX );\n\t\t\t\tconst y = 0.5 * ( pointers[ 0 ].pageY + pointers[ 1 ].pageY );\n\n\t\t\t\trotateStart.set( x, y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction handleTouchStartPan() {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\tpanStart.set( pointers[ 0 ].pageX, pointers[ 0 ].pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst x = 0.5 * ( pointers[ 0 ].pageX + pointers[ 1 ].pageX );\n\t\t\t\tconst y = 0.5 * ( pointers[ 0 ].pageY + pointers[ 1 ].pageY );\n\n\t\t\t\tpanStart.set( x, y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction handleTouchStartDolly() {\n\n\t\t\tconst dx = pointers[ 0 ].pageX - pointers[ 1 ].pageX;\n\t\t\tconst dy = pointers[ 0 ].pageY - pointers[ 1 ].pageY;\n\n\t\t\tconst distance = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\tdollyStart.set( 0, distance );\n\n\t\t}\n\n\t\tfunction handleTouchStartDollyPan() {\n\n\t\t\tif ( scope.enableZoom ) handleTouchStartDolly();\n\n\t\t\tif ( scope.enablePan ) handleTouchStartPan();\n\n\t\t}\n\n\t\tfunction handleTouchStartDollyRotate() {\n\n\t\t\tif ( scope.enableZoom ) handleTouchStartDolly();\n\n\t\t\tif ( scope.enableRotate ) handleTouchStartRotate();\n\n\t\t}\n\n\t\tfunction handleTouchMoveRotate( event ) {\n\n\t\t\tif ( pointers.length == 1 ) {\n\n\t\t\t\trotateEnd.set( event.pageX, event.pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\tconst x = 0.5 * ( event.pageX + position.x );\n\t\t\t\tconst y = 0.5 * ( event.pageY + position.y );\n\n\t\t\t\trotateEnd.set( x, y );\n\n\t\t\t}\n\n\t\t\trotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );\n\n\t\t\tconst element = scope.domElement;\n\n\t\t\trotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height\n\n\t\t\trotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );\n\n\t\t\trotateStart.copy( rotateEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMovePan( event ) {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\tpanEnd.set( event.pageX, event.pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\tconst x = 0.5 * ( event.pageX + position.x );\n\t\t\t\tconst y = 0.5 * ( event.pageY + position.y );\n\n\t\t\t\tpanEnd.set( x, y );\n\n\t\t\t}\n\n\t\t\tpanDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );\n\n\t\t\tpan( panDelta.x, panDelta.y );\n\n\t\t\tpanStart.copy( panEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDolly( event ) {\n\n\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\tconst dx = event.pageX - position.x;\n\t\t\tconst dy = event.pageY - position.y;\n\n\t\t\tconst distance = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\tdollyEnd.set( 0, distance );\n\n\t\t\tdollyDelta.set( 0, Math.pow( dollyEnd.y / dollyStart.y, scope.zoomSpeed ) );\n\n\t\t\tdollyOut( dollyDelta.y );\n\n\t\t\tdollyStart.copy( dollyEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDollyPan( event ) {\n\n\t\t\tif ( scope.enableZoom ) handleTouchMoveDolly( event );\n\n\t\t\tif ( scope.enablePan ) handleTouchMovePan( event );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDollyRotate( event ) {\n\n\t\t\tif ( scope.enableZoom ) handleTouchMoveDolly( event );\n\n\t\t\tif ( scope.enableRotate ) handleTouchMoveRotate( event );\n\n\t\t}\n\n\t\t//\n\t\t// event handlers - FSM: listen for events and reset state\n\t\t//\n\n\t\tfunction onPointerDown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.setPointerCapture( event.pointerId );\n\n\t\t\t\tscope.domElement.addEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.addEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\taddPointer( event );\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchStart( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseDown( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchMove( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseMove( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerUp( event ) {\n\n\t\t\tremovePointer( event );\n\n\t\t\tif ( pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.releasePointerCapture( event.pointerId );\n\n\t\t\t\tscope.domElement.removeEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.removeEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t\tstate = STATE.NONE;\n\n\t\t}\n\n\t\tfunction onMouseDown( event ) {\n\n\t\t\tlet mouseAction;\n\n\t\t\tswitch ( event.button ) {\n\n\t\t\t\tcase 0:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.LEFT;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.MIDDLE;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.RIGHT;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tmouseAction = - 1;\n\n\t\t\t}\n\n\t\t\tswitch ( mouseAction ) {\n\n\t\t\t\tcase MOUSE.DOLLY:\n\n\t\t\t\t\tif ( scope.enableZoom === false ) return;\n\n\t\t\t\t\thandleMouseDownDolly( event );\n\n\t\t\t\t\tstate = STATE.DOLLY;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MOUSE.ROTATE:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\thandleMouseDownPan( event );\n\n\t\t\t\t\t\tstate = STATE.PAN;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\thandleMouseDownRotate( event );\n\n\t\t\t\t\t\tstate = STATE.ROTATE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MOUSE.PAN:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\thandleMouseDownRotate( event );\n\n\t\t\t\t\t\tstate = STATE.ROTATE;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\thandleMouseDownPan( event );\n\n\t\t\t\t\t\tstate = STATE.PAN;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t\tif ( state !== STATE.NONE ) {\n\n\t\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseMove( event ) {\n\n\t\t\tswitch ( state ) {\n\n\t\t\t\tcase STATE.ROTATE:\n\n\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleMouseMoveRotate( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.DOLLY:\n\n\t\t\t\t\tif ( scope.enableZoom === false ) return;\n\n\t\t\t\t\thandleMouseMoveDolly( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.PAN:\n\n\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\thandleMouseMovePan( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseWheel( event ) {\n\n\t\t\tif ( scope.enabled === false || scope.enableZoom === false || state !== STATE.NONE ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\thandleMouseWheel( event );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction onKeyDown( event ) {\n\n\t\t\tif ( scope.enabled === false || scope.enablePan === false ) return;\n\n\t\t\thandleKeyDown( event );\n\n\t\t}\n\n\t\tfunction onTouchStart( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( pointers.length ) {\n\n\t\t\t\tcase 1:\n\n\t\t\t\t\tswitch ( scope.touches.ONE ) {\n\n\t\t\t\t\t\tcase TOUCH.ROTATE:\n\n\t\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartRotate();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_ROTATE;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase TOUCH.PAN:\n\n\t\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartPan();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_PAN;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\n\t\t\t\t\tswitch ( scope.touches.TWO ) {\n\n\t\t\t\t\t\tcase TOUCH.DOLLY_PAN:\n\n\t\t\t\t\t\t\tif ( scope.enableZoom === false && scope.enablePan === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartDollyPan();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_DOLLY_PAN;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase TOUCH.DOLLY_ROTATE:\n\n\t\t\t\t\t\t\tif ( scope.enableZoom === false && scope.enableRotate === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartDollyRotate();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_DOLLY_ROTATE;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t\tif ( state !== STATE.NONE ) {\n\n\t\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onTouchMove( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( state ) {\n\n\t\t\t\tcase STATE.TOUCH_ROTATE:\n\n\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleTouchMoveRotate( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_PAN:\n\n\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\thandleTouchMovePan( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_DOLLY_PAN:\n\n\t\t\t\t\tif ( scope.enableZoom === false && scope.enablePan === false ) return;\n\n\t\t\t\t\thandleTouchMoveDollyPan( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_DOLLY_ROTATE:\n\n\t\t\t\t\tif ( scope.enableZoom === false && scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleTouchMoveDollyRotate( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onContextMenu( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t}\n\n\t\tfunction addPointer( event ) {\n\n\t\t\tpointers.push( event );\n\n\t\t}\n\n\t\tfunction removePointer( event ) {\n\n\t\t\tdelete pointerPositions[ event.pointerId ];\n\n\t\t\tfor ( let i = 0; i < pointers.length; i ++ ) {\n\n\t\t\t\tif ( pointers[ i ].pointerId == event.pointerId ) {\n\n\t\t\t\t\tpointers.splice( i, 1 );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction trackPointer( event ) {\n\n\t\t\tlet position = pointerPositions[ event.pointerId ];\n\n\t\t\tif ( position === undefined ) {\n\n\t\t\t\tposition = new Vector2();\n\t\t\t\tpointerPositions[ event.pointerId ] = position;\n\n\t\t\t}\n\n\t\t\tposition.set( event.pageX, event.pageY );\n\n\t\t}\n\n\t\tfunction getSecondPointerPosition( event ) {\n\n\t\t\tconst pointer = ( event.pointerId === pointers[ 0 ].pointerId ) ? pointers[ 1 ] : pointers[ 0 ];\n\n\t\t\treturn pointerPositions[ pointer.pointerId ];\n\n\t\t}\n\n\t\t//\n\n\t\tscope.domElement.addEventListener( 'contextmenu', onContextMenu );\n\n\t\tscope.domElement.addEventListener( 'pointerdown', onPointerDown );\n\t\tscope.domElement.addEventListener( 'pointercancel', onPointerUp );\n\t\tscope.domElement.addEventListener( 'wheel', onMouseWheel, { passive: false } );\n\n\t\t// force an update at start\n\n\t\tthis.update();\n\n\t}\n\n}\n\nexport { OrbitControls };\n","import { Texture, LinearFilter, Color, InstancedBufferGeometry, Sphere, Box3, BackSide, DoubleSide, InstancedBufferAttribute, PlaneGeometry, BufferGeometry, Float32BufferAttribute, Vector2, Vector4, Matrix3, Mesh, FrontSide, MeshBasicMaterial, Matrix4, Vector3 } from 'three';\nimport { defineWorkerModule, terminateWorker } from 'troika-worker-utils';\nimport createSDFGenerator from 'webgl-sdf-generator';\nimport bidiFactory from 'bidi-js';\nimport { createDerivedMaterial, voidMainRegExp } from 'troika-three-utils';\n\n/*!\nCustom build of Typr.ts (https://github.com/fredli74/Typr.ts) for use in Troika text rendering.\nOriginal MIT license applies: https://github.com/fredli74/Typr.ts/blob/master/LICENSE\n*/\nfunction typrFactory(){return \"undefined\"==typeof window&&(self.window=self),function(r){var e={parse:function(r){var t=e._bin,a=new Uint8Array(r);if(\"ttcf\"==t.readASCII(a,0,4)){var n=4;t.readUshort(a,n),n+=2,t.readUshort(a,n),n+=2;var o=t.readUint(a,n);n+=4;for(var s=[],i=0;i>>t&1)&&e++;return e},e._lctf.readClassDef=function(r,t){var a=e._bin,n=[],o=a.readUshort(r,t);if(t+=2,1==o){var s=a.readUshort(r,t);t+=2;var i=a.readUshort(r,t);t+=2;for(var h=0;h0&&(o.featureParams=n+s);var i=a.readUshort(r,t);t+=2,o.tab=[];for(var h=0;h0&&(o.default=e._lctf.readLangSysTable(r,n+s));var i=a.readUshort(r,t);t+=2;for(var h=0;h255?-1:e.CFF.glyphByUnicode(r,e.CFF.tableSE[t])},e.CFF.readEncoding=function(r,t,a){e._bin;var n=[\".notdef\"],o=r[t];if(t++,0!=o)throw \"error: unknown encoding format: \"+o;var s=r[t];t++;for(var i=0;i>4,p=15&v;if(15!=c&&l.push(c),15!=p&&l.push(p),15==p)break}for(var U=\"\",g=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],S=0;S=s.xMax||s.yMin>=s.yMax)return null;if(s.noc>0){s.endPts=[];for(var i=0;i=1&&i.fmt<=2){d=o.readUshort(r,a);a+=2;var f=o.readUshort(r,a);a+=2;var u=e._lctf.numOfOnes(d),l=e._lctf.numOfOnes(f);if(1==i.fmt){i.pairsets=[];var v=o.readUshort(r,a);a+=2;for(var c=0;c=1&&i.fmt<=2){if(1==i.fmt)i.delta=o.readShort(r,a),a+=2;else if(2==i.fmt){var d=o.readUshort(r,a);a+=2,i.newg=o.readUshorts(r,a,d),a+=2*i.newg.length;}}else if(2==t&&1==i.fmt){d=o.readUshort(r,a);a+=2,i.seqs=[];for(var f=0;f>>8;if(0!=(u&=15))throw \"unknown kern table format: \"+u;t=e.kern.readFormat0(r,t,h);}return h},e.kern.parseV1=function(r,t,a,n){var o=e._bin;o.readFixed(r,t),t+=4;var s=o.readUint(r,t);t+=4;for(var i={glyph1:[],rval:[]},h=0;h>>8;if(0!=(f&=15))throw \"unknown kern table format: \"+f;t=e.kern.readFormat0(r,t,i);}return i},e.kern.readFormat0=function(r,t,a){var n=e._bin,o=-1,s=n.readUshort(r,t);t+=2,n.readUshort(r,t),t+=2,n.readUshort(r,t),t+=2,n.readUshort(r,t),t+=2;for(var i=0;i=n.map.length?0:n.map[e];if(4==n.format){for(var o=-1,s=0;se)return 0;return 65535&(0!=n.idRangeOffset[o]?n.glyphIdArray[e-n.startCount[o]+(n.idRangeOffset[o]>>1)-(n.idRangeOffset.length-o)]:e+n.idDelta[o])}if(12==n.format){if(e>n.groups[n.groups.length-1][1])return 0;for(s=0;s-1?e.U._simpleGlyph(n,a):e.U._compoGlyph(n,t,a));},e.U._simpleGlyph=function(r,t){for(var a=0;ao)){for(var v=!0,c=0,p=0;po)){for(v=!0,p=0;p>1,s.length=0,h=!0;else if(\"o3\"==P||\"o23\"==P){s.length%2!=0&&!h&&(d=s.shift()+n.nominalWidthX),i+=s.length>>1,s.length=0,h=!0;}else if(\"o4\"==P)s.length>1&&!h&&(d=s.shift()+n.nominalWidthX,h=!0),f&&e.U.P.closePath(o),v+=s.pop(),e.U.P.moveTo(o,l,v),f=!0;else if(\"o5\"==P)for(;s.length>0;)l+=s.shift(),v+=s.shift(),e.U.P.lineTo(o,l,v);else if(\"o6\"==P||\"o7\"==P)for(var x=s.length,I=\"o6\"==P,w=0;wMath.abs(y-v)?l=b+s.shift():v=y+s.shift(),e.U.P.curveTo(o,c,p,U,g,F,C),e.U.P.curveTo(o,S,m,b,y,l,v));else if(\"o14\"==P){if(s.length>0&&!h&&(d=s.shift()+a.nominalWidthX,h=!0),4==s.length){var O=s.shift(),T=s.shift(),D=s.shift(),B=s.shift(),A=e.CFF.glyphBySE(a,D),R=e.CFF.glyphBySE(a,B);e.U._drawCFF(a.CharStrings[A],t,a,n,o),t.x=O,t.y=T,e.U._drawCFF(a.CharStrings[R],t,a,n,o);}f&&(e.U.P.closePath(o),f=!1);}else if(\"o19\"==P||\"o20\"==P){s.length%2!=0&&!h&&(d=s.shift()+n.nominalWidthX),i+=s.length>>1,s.length=0,h=!0,u+=i+7>>3;}else if(\"o21\"==P)s.length>2&&!h&&(d=s.shift()+n.nominalWidthX,h=!0),v+=s.pop(),l+=s.pop(),f&&e.U.P.closePath(o),e.U.P.moveTo(o,l,v),f=!0;else if(\"o22\"==P)s.length>1&&!h&&(d=s.shift()+n.nominalWidthX,h=!0),l+=s.pop(),f&&e.U.P.closePath(o),e.U.P.moveTo(o,l,v),f=!0;else if(\"o25\"==P){for(;s.length>6;)l+=s.shift(),v+=s.shift(),e.U.P.lineTo(o,l,v);c=l+s.shift(),p=v+s.shift(),U=c+s.shift(),g=p+s.shift(),l=U+s.shift(),v=g+s.shift(),e.U.P.curveTo(o,c,p,U,g,l,v);}else if(\"o26\"==P)for(s.length%2&&(l+=s.shift());s.length>0;)c=l,p=v+s.shift(),l=U=c+s.shift(),v=(g=p+s.shift())+s.shift(),e.U.P.curveTo(o,c,p,U,g,l,v);else if(\"o27\"==P)for(s.length%2&&(v+=s.shift());s.length>0;)p=v,U=(c=l+s.shift())+s.shift(),g=p+s.shift(),l=U+s.shift(),v=g,e.U.P.curveTo(o,c,p,U,g,l,v);else if(\"o10\"==P||\"o29\"==P){var L=\"o10\"==P?n:a;if(0==s.length)console.debug(\"error: empty stack\");else {var W=s.pop(),M=L.Subrs[W+L.Bias];t.x=l,t.y=v,t.nStems=i,t.haveWidth=h,t.width=d,t.open=f,e.U._drawCFF(M,t,a,n,o),l=t.x,v=t.y,i=t.nStems,h=t.haveWidth,d=t.width,f=t.open;}}else if(\"o30\"==P||\"o31\"==P){var V=s.length,E=(G=0,\"o31\"==P);for(G+=V-(x=-3&V);G>>1|(21845&g)<<1;h=(61680&(h=(52428&h)>>>2|(13107&h)<<2))>>>4|(3855&h)<<4,c[g]=((65280&h)>>>8|(255&h)<<8)>>>1;}var w=function(r,e,t){for(var a=r.length,i=0,o=new n(e);i>>v]=s;}else for(f=new n(a),i=0;i>>15-r[i]);return f},d=new e(288);for(g=0;g<144;++g)d[g]=8;for(g=144;g<256;++g)d[g]=9;for(g=256;g<280;++g)d[g]=7;for(g=280;g<288;++g)d[g]=8;var m=new e(32);for(g=0;g<32;++g)m[g]=5;var b=w(d,9,1),p=w(m,5,1),y=function(r){for(var e=r[0],n=1;ne&&(e=r[n]);return e},L=function(r,e,n){var t=e/8|0;return (r[t]|r[t+1]<<8)>>(7&e)&n},U=function(r,e){var n=e/8|0;return (r[n]|r[n+1]<<8|r[n+2]<<16)>>(7&e)},k=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],T=function(r,e,n){var t=new Error(e||k[r]);if(t.code=r,Error.captureStackTrace&&Error.captureStackTrace(t,T),!n)throw t;return t},O=function(r,f,u){var s=r.length;if(!s||u&&!u.l&&s<5)return f||new e(0);var c=!f||u,g=!u||u.i;u||(u={}),f||(f=new e(3*s));var h,d=function(r){var n=f.length;if(r>n){var t=new e(Math.max(2*n,r));t.set(f),f=t;}},m=u.f||0,k=u.p||0,O=u.b||0,A=u.l,x=u.d,E=u.m,D=u.n,M=8*s;do{if(!A){u.f=m=L(r,k,1);var S=L(r,k+1,3);if(k+=3,!S){var V=r[(I=((h=k)/8|0)+(7&h&&1)+4)-4]|r[I-3]<<8,_=I+V;if(_>s){g&&T(0);break}c&&d(O+V),f.set(r.subarray(I,_),O),u.b=O+=V,u.p=k=8*_;continue}if(1==S)A=b,x=p,E=9,D=5;else if(2==S){var j=L(r,k,31)+257,z=L(r,k+10,15)+4,C=j+L(r,k+5,31)+1;k+=14;for(var F=new e(C),P=new e(19),q=0;q>>4)<16)F[q++]=I;else {var K=0,N=0;for(16==I?(N=3+L(r,k,3),k+=2,K=F[q-1]):17==I?(N=3+L(r,k,7),k+=3):18==I&&(N=11+L(r,k,127),k+=7);N--;)F[q++]=K;}}var Q=F.subarray(0,j),R=F.subarray(j);E=y(Q),D=y(R),A=w(Q,E,1),x=w(R,D,1);}else T(1);if(k>M){g&&T(0);break}}c&&d(O+131072);for(var W=(1<>>4;if((k+=15&K)>M){g&&T(0);break}if(K||T(2),Z<256)f[O++]=Z;else {if(256==Z){Y=k,A=null;break}var $=Z-254;if(Z>264){var rr=a[q=Z-257];$=L(r,k,(1<>>4;er||T(3),k+=15&er;R=l[nr];if(nr>3){rr=i[nr];R+=U(r,k)&(1<M){g&&T(0);break}c&&d(O+131072);for(var tr=O+$;Or.length)&&(i=r.length);var o=new(r instanceof n?n:r instanceof t?t:e)(i-a);return o.set(r.subarray(a,i)),o}(f,0,O)},A=new e(0);var x=\"undefined\"!=typeof TextDecoder&&new TextDecoder;try{x.decode(A,{stream:!0}),1;}catch(r){}return r.convert_streams=function(r){var e=new DataView(r),n=0;function t(){var r=e.getUint16(n);return n+=2,r}function a(){var r=e.getUint32(n);return n+=4,r}function i(r){m.setUint16(b,r),b+=2;}function o(r){m.setUint32(b,r),b+=4;}for(var f={signature:a(),flavor:a(),length:a(),numTables:t(),reserved:t(),totalSfntSize:a(),majorVersion:t(),minorVersion:t(),metaOffset:a(),metaLength:a(),metaOrigLength:a(),privOffset:a(),privLength:a()},u=0;Math.pow(2,u)<=f.numTables;)u++;u--;for(var v=16*Math.pow(2,u),s=16*f.numTables-v,l=12,c=[],g=0;g boolean} supportsCodePoint\n * @property {(text:string, fontSize:number, letterSpacing:number, callback) => number} forEachGlyph\n * @property {number} lineGap\n * @property {number} capHeight\n * @property {number} unitsPerEm\n */\n\n/**\n * @typedef {(buffer: ArrayBuffer) => ParsedFont} FontParser\n */\n\n/**\n * @returns {FontParser}\n */\nfunction parserFactory(Typr, woff2otf) {\n const cmdArgLengths = {\n M: 2,\n L: 2,\n Q: 4,\n C: 6,\n Z: 0\n };\n\n // {joinType: \"skip+step,...\"}\n const joiningTypeRawData = {\"C\":\"18g,ca,368,1kz\",\"D\":\"17k,6,2,2+4,5+c,2+6,2+1,10+1,9+f,j+11,2+1,a,2,2+1,15+2,3,j+2,6+3,2+8,2,2,2+1,w+a,4+e,3+3,2,3+2,3+5,23+w,2f+4,3,2+9,2,b,2+3,3,1k+9,6+1,3+1,2+2,2+d,30g,p+y,1,1+1g,f+x,2,sd2+1d,jf3+4,f+3,2+4,2+2,b+3,42,2,4+2,2+1,2,3,t+1,9f+w,2,el+2,2+g,d+2,2l,2+1,5,3+1,2+1,2,3,6,16wm+1v\",\"R\":\"17m+3,2,2,6+3,m,15+2,2+2,h+h,13,3+8,2,2,3+1,2,p+1,x,5+4,5,a,2,2,3,u,c+2,g+1,5,2+1,4+1,5j,6+1,2,b,2+2,f,2+1,1s+2,2,3+1,7,1ez0,2,2+1,4+4,b,4,3,b,42,2+2,4,3,2+1,2,o+3,ae,ep,x,2o+2,3+1,3,5+1,6\",\"L\":\"x9u,jff,a,fd,jv\",\"T\":\"4t,gj+33,7o+4,1+1,7c+18,2,2+1,2+1,2,21+a,2,1b+k,h,2u+6,3+5,3+1,2+3,y,2,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,3,7,6+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+d,1,1+1,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,ek,3+1,r+4,1e+4,6+5,2p+c,1+3,1,1+2,1+b,2db+2,3y,2p+v,ff+3,30+1,n9x,1+2,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,5s,6y+2,ea,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+9,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2,2b+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,470+8,at4+4,1o+6,t5,1s+3,2a,f5l+1,2+3,43o+2,a+7,1+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,1,gzau,v+2n,3l+6n\"};\n\n const JT_LEFT = 1, //indicates that a character joins with the subsequent character, but does not join with the preceding character.\n JT_RIGHT = 2, //indicates that a character joins with the preceding character, but does not join with the subsequent character.\n JT_DUAL = 4, //indicates that a character joins with the preceding character and joins with the subsequent character.\n JT_TRANSPARENT = 8, //indicates that the character does not join with adjacent characters and that the character must be skipped over when the shaping engine is evaluating the joining positions in a sequence of characters. When a JT_TRANSPARENT character is encountered in a sequence, the JOINING_TYPE of the preceding character passes through. Diacritical marks are frequently assigned this value.\n JT_JOIN_CAUSING = 16, //indicates that the character forces the use of joining forms with the preceding and subsequent characters. Kashidas and the Zero Width Joiner (U+200D) are both JOIN_CAUSING characters.\n JT_NON_JOINING = 32; //indicates that a character does not join with the preceding or with the subsequent character.,\n\n let joiningTypeMap;\n function getCharJoiningType(ch) {\n if (!joiningTypeMap) {\n const m = {\n R: JT_RIGHT,\n L: JT_LEFT,\n D: JT_DUAL,\n C: JT_JOIN_CAUSING,\n U: JT_NON_JOINING,\n T: JT_TRANSPARENT\n };\n joiningTypeMap = new Map();\n for (let type in joiningTypeRawData) {\n let lastCode = 0;\n joiningTypeRawData[type].split(',').forEach(range => {\n let [skip, step] = range.split('+');\n skip = parseInt(skip,36);\n step = step ? parseInt(step, 36) : 0;\n joiningTypeMap.set(lastCode += skip, m[type]);\n for (let i = step; i--;) {\n joiningTypeMap.set(++lastCode, m[type]);\n }\n });\n }\n }\n return joiningTypeMap.get(ch) || JT_NON_JOINING\n }\n\n const ISOL = 1, INIT = 2, FINA = 3, MEDI = 4;\n const formsToFeatures = [null, 'isol', 'init', 'fina', 'medi'];\n\n function detectJoiningForms(str) {\n // This implements the algorithm described here:\n // https://github.com/n8willis/opentype-shaping-documents/blob/master/opentype-shaping-arabic-general.md\n const joiningForms = new Uint8Array(str.length);\n let prevJoiningType = JT_NON_JOINING;\n let prevForm = ISOL;\n let prevIndex = -1;\n for (let i = 0; i < str.length; i++) {\n const code = str.codePointAt(i);\n let joiningType = getCharJoiningType(code) | 0;\n let form = ISOL;\n if (joiningType & JT_TRANSPARENT) {\n continue\n }\n if (prevJoiningType & (JT_LEFT | JT_DUAL | JT_JOIN_CAUSING)) {\n if (joiningType & (JT_RIGHT | JT_DUAL | JT_JOIN_CAUSING)) {\n form = FINA;\n // isol->init, fina->medi\n if (prevForm === ISOL || prevForm === FINA) {\n joiningForms[prevIndex]++;\n }\n }\n else if (joiningType & (JT_LEFT | JT_NON_JOINING)) {\n // medi->fina, init->isol\n if (prevForm === INIT || prevForm === MEDI) {\n joiningForms[prevIndex]--;\n }\n }\n }\n else if (prevJoiningType & (JT_RIGHT | JT_NON_JOINING)) {\n // medi->fina, init->isol\n if (prevForm === INIT || prevForm === MEDI) {\n joiningForms[prevIndex]--;\n }\n }\n prevForm = joiningForms[i] = form;\n prevJoiningType = joiningType;\n prevIndex = i;\n if (code > 0xffff) i++;\n }\n // console.log(str.split('').map(ch => ch.codePointAt(0).toString(16)))\n // console.log(str.split('').map(ch => getCharJoiningType(ch.codePointAt(0))))\n // console.log(Array.from(joiningForms).map(f => formsToFeatures[f] || 'none'))\n return joiningForms\n }\n\n function stringToGlyphs (font, str) {\n const glyphIds = [];\n for (let i = 0; i < str.length; i++) {\n const cc = str.codePointAt(i);\n if (cc > 0xffff) i++;\n glyphIds.push(Typr.U.codeToGlyph(font, cc));\n }\n\n const gsub = font['GSUB'];\n if (gsub) {\n const {lookupList, featureList} = gsub;\n let joiningForms;\n const supportedFeatures = /^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws|ccmp)$/;\n const usedLookups = [];\n featureList.forEach(feature => {\n if (supportedFeatures.test(feature.tag)) {\n for (let ti = 0; ti < feature.tab.length; ti++) {\n if (usedLookups[feature.tab[ti]]) continue\n usedLookups[feature.tab[ti]] = true;\n const tab = lookupList[feature.tab[ti]];\n const isJoiningFeature = /^(isol|init|fina|medi)$/.test(feature.tag);\n if (isJoiningFeature && !joiningForms) { //lazy\n joiningForms = detectJoiningForms(str);\n }\n for (let ci = 0; ci < glyphIds.length; ci++) {\n if (!joiningForms || !isJoiningFeature || formsToFeatures[joiningForms[ci]] === feature.tag) {\n Typr.U._applySubs(glyphIds, ci, tab, lookupList);\n }\n }\n }\n }\n });\n }\n\n return glyphIds\n }\n\n // Calculate advances and x/y offsets for each glyph, e.g. kerning and mark\n // attachments. This is a more complete version of Typr.U.getPairAdjustment\n // and should become an upstream replacement eventually.\n function calcGlyphPositions(font, glyphIds) {\n const positions = new Int16Array(glyphIds.length * 3); // [offsetX, offsetY, advanceX, ...]\n let glyphIndex = 0;\n for (; glyphIndex < glyphIds.length; glyphIndex++) {\n const glyphId = glyphIds[glyphIndex];\n if (glyphId === -1) continue;\n\n positions[glyphIndex * 3 + 2] = font.hmtx.aWidth[glyphId]; // populate advanceX in...advance.\n\n const gpos = font.GPOS;\n if (gpos) {\n const llist = gpos.lookupList;\n for (let i = 0; i < llist.length; i++) {\n const lookup = llist[i];\n for (let j = 0; j < lookup.tabs.length; j++) {\n const tab = lookup.tabs[j];\n // Single char placement\n if (lookup.ltype === 1) {\n const ind = Typr._lctf.coverageIndex(tab.coverage, glyphId);\n if (ind !== -1 && tab.pos) {\n applyValueRecord(tab.pos, glyphIndex);\n break\n }\n }\n // Pairs (kerning)\n else if (lookup.ltype === 2) {\n let adj = null;\n let prevGlyphIndex = getPrevGlyphIndex();\n if (prevGlyphIndex !== -1) {\n const coverageIndex = Typr._lctf.coverageIndex(tab.coverage, glyphIds[prevGlyphIndex]);\n if (coverageIndex !== -1) {\n if (tab.fmt === 1) {\n const right = tab.pairsets[coverageIndex];\n for (let k = 0; k < right.length; k++) {\n if (right[k].gid2 === glyphId) adj = right[k];\n }\n } else if (tab.fmt === 2) {\n const c1 = Typr.U._getGlyphClass(glyphIds[prevGlyphIndex], tab.classDef1);\n const c2 = Typr.U._getGlyphClass(glyphId, tab.classDef2);\n adj = tab.matrix[c1][c2];\n }\n if (adj) {\n if (adj.val1) applyValueRecord(adj.val1, prevGlyphIndex);\n if (adj.val2) applyValueRecord(adj.val2, glyphIndex);\n break\n }\n }\n }\n }\n // Mark to base\n else if (lookup.ltype === 4) {\n const markArrIndex = Typr._lctf.coverageIndex(tab.markCoverage, glyphId);\n if (markArrIndex !== -1) {\n const baseGlyphIndex = getPrevGlyphIndex(isBaseGlyph);\n const baseArrIndex = baseGlyphIndex === -1 ? -1 : Typr._lctf.coverageIndex(tab.baseCoverage, glyphIds[baseGlyphIndex]);\n if (baseArrIndex !== -1) {\n const markRecord = tab.markArray[markArrIndex];\n const baseAnchor = tab.baseArray[baseArrIndex][markRecord.markClass];\n positions[glyphIndex * 3] = baseAnchor.x - markRecord.x + positions[baseGlyphIndex * 3] - positions[baseGlyphIndex * 3 + 2];\n positions[glyphIndex * 3 + 1] = baseAnchor.y - markRecord.y + positions[baseGlyphIndex * 3 + 1];\n break;\n }\n }\n }\n // Mark to mark\n else if (lookup.ltype === 6) {\n const mark1ArrIndex = Typr._lctf.coverageIndex(tab.mark1Coverage, glyphId);\n if (mark1ArrIndex !== -1) {\n const prevGlyphIndex = getPrevGlyphIndex();\n if (prevGlyphIndex !== -1) {\n const prevGlyphId = glyphIds[prevGlyphIndex];\n if (getGlyphClass(font, prevGlyphId) === 3) { // only check mark glyphs\n const mark2ArrIndex = Typr._lctf.coverageIndex(tab.mark2Coverage, prevGlyphId);\n if (mark2ArrIndex !== -1) {\n const mark1Record = tab.mark1Array[mark1ArrIndex];\n const mark2Anchor = tab.mark2Array[mark2ArrIndex][mark1Record.markClass];\n positions[glyphIndex * 3] = mark2Anchor.x - mark1Record.x + positions[prevGlyphIndex * 3] - positions[prevGlyphIndex * 3 + 2];\n positions[glyphIndex * 3 + 1] = mark2Anchor.y - mark1Record.y + positions[prevGlyphIndex * 3 + 1];\n break;\n }\n }\n }\n }\n }\n }\n }\n }\n // Check kern table if no GPOS\n else if (font.kern && !font.cff) {\n const prevGlyphIndex = getPrevGlyphIndex();\n if (prevGlyphIndex !== -1) {\n const ind1 = font.kern.glyph1.indexOf(glyphIds[prevGlyphIndex]);\n if (ind1 !== -1) {\n const ind2 = font.kern.rval[ind1].glyph2.indexOf(glyphId);\n if (ind2 !== -1) {\n positions[prevGlyphIndex * 3 + 2] += font.kern.rval[ind1].vals[ind2];\n }\n }\n }\n }\n }\n\n return positions;\n\n function getPrevGlyphIndex(filter) {\n for (let i = glyphIndex - 1; i >=0; i--) {\n if (glyphIds[i] !== -1 && (!filter || filter(glyphIds[i]))) {\n return i\n }\n }\n return -1;\n }\n\n function isBaseGlyph(glyphId) {\n return getGlyphClass(font, glyphId) === 1;\n }\n\n function applyValueRecord(source, gi) {\n for (let i = 0; i < 3; i++) {\n positions[gi * 3 + i] += source[i] || 0;\n }\n }\n }\n\n function getGlyphClass(font, glyphId) {\n const classDef = font.GDEF && font.GDEF.glyphClassDef;\n return classDef ? Typr.U._getGlyphClass(glyphId, classDef) : 0;\n }\n\n function firstNum(...args) {\n for (let i = 0; i < args.length; i++) {\n if (typeof args[i] === 'number') {\n return args[i]\n }\n }\n }\n\n /**\n * @returns ParsedFont\n */\n function wrapFontObj(typrFont) {\n const glyphMap = Object.create(null);\n\n const os2 = typrFont['OS/2'];\n const hhea = typrFont.hhea;\n const unitsPerEm = typrFont.head.unitsPerEm;\n const ascender = firstNum(os2 && os2.sTypoAscender, hhea && hhea.ascender, unitsPerEm);\n\n /** @type ParsedFont */\n const fontObj = {\n unitsPerEm,\n ascender,\n descender: firstNum(os2 && os2.sTypoDescender, hhea && hhea.descender, 0),\n capHeight: firstNum(os2 && os2.sCapHeight, ascender),\n xHeight: firstNum(os2 && os2.sxHeight, ascender),\n lineGap: firstNum(os2 && os2.sTypoLineGap, hhea && hhea.lineGap),\n supportsCodePoint(code) {\n return Typr.U.codeToGlyph(typrFont, code) > 0\n },\n forEachGlyph(text, fontSize, letterSpacing, callback) {\n let penX = 0;\n const fontScale = 1 / fontObj.unitsPerEm * fontSize;\n\n const glyphIds = stringToGlyphs(typrFont, text);\n let charIndex = 0;\n const positions = calcGlyphPositions(typrFont, glyphIds);\n\n glyphIds.forEach((glyphId, i) => {\n // Typr returns a glyph index per string codepoint, with -1s in place of those that\n // were omitted due to ligature substitution. So we can track original index in the\n // string via simple increment, and skip everything else when seeing a -1.\n if (glyphId !== -1) {\n let glyphObj = glyphMap[glyphId];\n if (!glyphObj) {\n const {cmds, crds} = Typr.U.glyphToPath(typrFont, glyphId);\n\n // Build path string\n let path = '';\n let crdsIdx = 0;\n for (let i = 0, len = cmds.length; i < len; i++) {\n const numArgs = cmdArgLengths[cmds[i]];\n path += cmds[i];\n for (let j = 1; j <= numArgs; j++) {\n path += (j > 1 ? ',' : '') + crds[crdsIdx++];\n }\n }\n\n // Find extents - Glyf gives this in metadata but not CFF, and Typr doesn't\n // normalize the two, so it's simplest just to iterate ourselves.\n let xMin, yMin, xMax, yMax;\n if (crds.length) {\n xMin = yMin = Infinity;\n xMax = yMax = -Infinity;\n for (let i = 0, len = crds.length; i < len; i += 2) {\n let x = crds[i];\n let y = crds[i + 1];\n if (x < xMin) xMin = x;\n if (y < yMin) yMin = y;\n if (x > xMax) xMax = x;\n if (y > yMax) yMax = y;\n }\n } else {\n xMin = xMax = yMin = yMax = 0;\n }\n\n glyphObj = glyphMap[glyphId] = {\n index: glyphId,\n advanceWidth: typrFont.hmtx.aWidth[glyphId],\n xMin,\n yMin,\n xMax,\n yMax,\n path,\n };\n }\n\n callback.call(\n null,\n glyphObj,\n penX + positions[i * 3] * fontScale,\n positions[i * 3 + 1] * fontScale,\n charIndex\n );\n\n penX += positions[i * 3 + 2] * fontScale;\n if (letterSpacing) {\n penX += letterSpacing * fontSize;\n }\n }\n charIndex += (text.codePointAt(charIndex) > 0xffff ? 2 : 1);\n });\n\n return penX\n }\n };\n\n return fontObj\n }\n\n /**\n * @type FontParser\n */\n return function parse(buffer) {\n // Look to see if we have a WOFF file and convert it if so:\n const peek = new Uint8Array(buffer, 0, 4);\n const tag = Typr._bin.readASCII(peek, 0, 4);\n if (tag === 'wOFF') {\n buffer = woff2otf(buffer);\n } else if (tag === 'wOF2') {\n throw new Error('woff2 fonts not supported')\n }\n return wrapFontObj(Typr.parse(buffer)[0])\n }\n}\n\n\nconst workerModule = /*#__PURE__*/defineWorkerModule({\n name: 'Typr Font Parser',\n dependencies: [typrFactory, woff2otfFactory, parserFactory],\n init(typrFactory, woff2otfFactory, parserFactory) {\n const Typr = typrFactory();\n const woff2otf = woff2otfFactory();\n return parserFactory(Typr, woff2otf)\n }\n});\n\n/*!\nCustom bundle of @unicode-font-resolver/client v1.0.2 (https://github.com/lojjic/unicode-font-resolver)\nfor use in Troika text rendering. \nOriginal MIT license applies\n*/\nfunction unicodeFontResolverClientFactory(){return function(t){var n=function(){this.buckets=new Map;};n.prototype.add=function(t){var n=t>>5;this.buckets.set(n,(this.buckets.get(n)||0)|1<<(31&t));},n.prototype.has=function(t){var n=this.buckets.get(t>>5);return void 0!==n&&0!=(n&1<<(31&t))},n.prototype.serialize=function(){var t=[];return this.buckets.forEach((function(n,r){t.push((+r).toString(36)+\":\"+n.toString(36));})),t.join(\",\")},n.prototype.deserialize=function(t){var n=this;this.buckets.clear(),t.split(\",\").forEach((function(t){var r=t.split(\":\");n.buckets.set(parseInt(r[0],36),parseInt(r[1],36));}));};var r=Math.pow(2,8),e=r-1,o=~e;function a(t){var n=function(t){return t&o}(t).toString(16),e=function(t){return (t&o)+r-1}(t).toString(16);return \"codepoint-index/plane\"+(t>>16)+\"/\"+n+\"-\"+e+\".json\"}function i(t,n){var r=t&e,o=n.codePointAt(r/6|0);return 0!=((o=(o||48)-48)&1<65535&&(n++,E=n);},E=0;E65535&&(n++,r=n);},r=0;r65535&&(e++,y[e]=y[e-1]);}return {fontUrls:Array.from(h.keys()),chars:y}}))},Object.defineProperty(t,\"__esModule\",{value:!0}),t}({})}\n\n/**\n * @typedef {string | {src:string, label?:string, unicodeRange?:string, lang?:string}} UserFont\n */\n\n/**\n * @typedef {ClientOptions} FontResolverOptions\n * @property {Array|UserFont} [fonts]\n * @property {'normal'|'italic'} [style]\n * @property {'normal'|'bold'|number} [style]\n * @property {string} [unicodeFontsURL]\n */\n\n/**\n * @typedef {Object} FontResolverResult\n * @property {Uint8Array} chars\n * @property {Array} fonts\n */\n\n/**\n * @typedef {function} FontResolver\n * @param {string} text\n * @param {(FontResolverResult) => void} callback\n * @param {FontResolverOptions} [options]\n */\n\n/**\n * Factory for the FontResolver function.\n * @param {FontParser} fontParser\n * @param {{getFontsForString: function, CodePointSet: function}} unicodeFontResolverClient\n * @return {FontResolver}\n */\nfunction createFontResolver(fontParser, unicodeFontResolverClient) {\n /**\n * @type {Record}\n */\n const parsedFonts = Object.create(null);\n\n /**\n * @type {Record void>>}\n */\n const loadingFonts = Object.create(null);\n\n /**\n * Load a given font url\n */\n function doLoadFont(url, callback) {\n const onError = err => {\n console.error(`Failure loading font ${url}`, err);\n };\n try {\n const request = new XMLHttpRequest();\n request.open('get', url, true);\n request.responseType = 'arraybuffer';\n request.onload = function () {\n if (request.status >= 400) {\n onError(new Error(request.statusText));\n }\n else if (request.status > 0) {\n try {\n const fontObj = fontParser(request.response);\n fontObj.src = url;\n callback(fontObj);\n } catch (e) {\n onError(e);\n }\n }\n };\n request.onerror = onError;\n request.send();\n } catch(err) {\n onError(err);\n }\n }\n\n\n /**\n * Load a given font url if needed, invoking a callback when it's loaded. If already\n * loaded, the callback will be called synchronously.\n * @param {string} fontUrl\n * @param {(font: ParsedFont) => void} callback\n */\n function loadFont(fontUrl, callback) {\n let font = parsedFonts[fontUrl];\n if (font) {\n callback(font);\n } else if (loadingFonts[fontUrl]) {\n loadingFonts[fontUrl].push(callback);\n } else {\n loadingFonts[fontUrl] = [callback];\n doLoadFont(fontUrl, fontObj => {\n fontObj.src = fontUrl;\n parsedFonts[fontUrl] = fontObj;\n loadingFonts[fontUrl].forEach(cb => cb(fontObj));\n delete loadingFonts[fontUrl];\n });\n }\n }\n\n /**\n * For a given string of text, determine which fonts are required to fully render it and\n * ensure those fonts are loaded.\n */\n return function (text, callback, {\n lang,\n fonts: userFonts = [],\n style = 'normal',\n weight = 'normal',\n unicodeFontsURL\n } = {}) {\n const charResolutions = new Uint8Array(text.length);\n const fontResolutions = [];\n if (!text.length) {\n allDone();\n }\n\n const fontIndices = new Map();\n const fallbackRanges = []; // [[start, end], ...]\n\n if (style !== 'italic') style = 'normal';\n if (typeof weight !== 'number') {\n weight = weight === 'bold' ? 700 : 400;\n }\n\n if (userFonts && !Array.isArray(userFonts)) {\n userFonts = [userFonts];\n }\n userFonts = userFonts.slice()\n // filter by language\n .filter(def => !def.lang || def.lang.test(lang))\n // switch order for easier iteration\n .reverse();\n if (userFonts.length) {\n const UNKNOWN = 0;\n const RESOLVED = 1;\n const NEEDS_FALLBACK = 2;\n let prevCharResult = UNKNOWN\n\n ;(function resolveUserFonts (startIndex = 0) {\n for (let i = startIndex, iLen = text.length; i < iLen; i++) {\n const codePoint = text.codePointAt(i);\n // Carry previous character's result forward if:\n // - it resolved to a font that also covers this character\n // - this character is whitespace\n if (\n (prevCharResult === RESOLVED && fontResolutions[charResolutions[i - 1]].supportsCodePoint(codePoint)) ||\n /\\s/.test(text[i])\n ) {\n charResolutions[i] = charResolutions[i - 1];\n if (prevCharResult === NEEDS_FALLBACK) {\n fallbackRanges[fallbackRanges.length - 1][1] = i;\n }\n } else {\n for (let j = charResolutions[i], jLen = userFonts.length; j <= jLen; j++) {\n if (j === jLen) {\n // none of the user fonts matched; needs fallback\n const range = prevCharResult === NEEDS_FALLBACK ?\n fallbackRanges[fallbackRanges.length - 1] :\n (fallbackRanges[fallbackRanges.length] = [i, i]);\n range[1] = i;\n prevCharResult = NEEDS_FALLBACK;\n } else {\n charResolutions[i] = j;\n const { src, unicodeRange } = userFonts[j];\n // filter by optional explicit unicode ranges\n if (!unicodeRange || isCodeInRanges(codePoint, unicodeRange)) {\n const fontObj = parsedFonts[src];\n // font not yet loaded, load it and resume\n if (!fontObj) {\n loadFont(src, () => {\n resolveUserFonts(i);\n });\n return;\n }\n // if the font actually contains a glyph for this char, lock it in\n if (fontObj.supportsCodePoint(codePoint)) {\n let fontIndex = fontIndices.get(fontObj);\n if (typeof fontIndex !== 'number') {\n fontIndex = fontResolutions.length;\n fontResolutions.push(fontObj);\n fontIndices.set(fontObj, fontIndex);\n }\n charResolutions[i] = fontIndex;\n prevCharResult = RESOLVED;\n break;\n }\n }\n }\n }\n }\n\n if (codePoint > 0xffff && i + 1 < iLen) {\n charResolutions[i + 1] = charResolutions[i];\n i++;\n if (prevCharResult === NEEDS_FALLBACK) {\n fallbackRanges[fallbackRanges.length - 1][1] = i;\n }\n }\n }\n resolveFallbacks();\n })();\n } else {\n fallbackRanges.push([0, text.length - 1]);\n resolveFallbacks();\n }\n\n function resolveFallbacks() {\n if (fallbackRanges.length) {\n // Combine all fallback substrings into a single string for querying\n const fallbackString = fallbackRanges.map(range => text.substring(range[0], range[1] + 1)).join('\\n');\n unicodeFontResolverClient.getFontsForString(fallbackString, {\n lang: lang || undefined,\n style,\n weight,\n dataUrl: unicodeFontsURL\n }).then(({fontUrls, chars}) => {\n // Extract results and put them back in the main array\n const fontIndexOffset = fontResolutions.length;\n let charIdx = 0;\n fallbackRanges.forEach(range => {\n for (let i = 0, endIdx = range[1] - range[0]; i <= endIdx; i++) {\n charResolutions[range[0] + i] = chars[charIdx++] + fontIndexOffset;\n }\n charIdx++; //skip segment separator\n });\n\n // Load and parse the fallback fonts - avoiding Promise here to prevent polyfills in the worker\n let loadedCount = 0;\n fontUrls.forEach((url, i) => {\n loadFont(url, fontObj => {\n fontResolutions[i + fontIndexOffset] = fontObj;\n if (++loadedCount === fontUrls.length) {\n allDone();\n }\n });\n });\n });\n } else {\n allDone();\n }\n }\n\n function allDone() {\n callback({\n chars: charResolutions,\n fonts: fontResolutions\n });\n }\n\n function isCodeInRanges(code, ranges) {\n // todo optimize search - CodePointSet from unicode-font-resolver?\n for (let k = 0; k < ranges.length; k++) {\n const [start, end = start] = ranges[k];\n if (start <= code && code <= end) {\n return true\n }\n }\n return false\n }\n }\n}\n\nconst fontResolverWorkerModule = /*#__PURE__*/defineWorkerModule({\n name: 'FontResolver',\n dependencies: [\n createFontResolver,\n workerModule,\n unicodeFontResolverClientFactory,\n ],\n init(createFontResolver, fontParser, unicodeFontResolverClientFactory) {\n return createFontResolver(fontParser, unicodeFontResolverClientFactory());\n }\n});\n\n/**\n * @typedef {number|'left'|'center'|'right'} AnchorXValue\n */\n/**\n * @typedef {number|'top'|'top-baseline'|'top-cap'|'top-ex'|'middle'|'bottom-baseline'|'bottom'} AnchorYValue\n */\n\n/**\n * @typedef {object} TypesetParams\n * @property {string} text\n * @property {UserFont|UserFont[]} [font]\n * @property {string} [lang]\n * @property {number} [sdfGlyphSize=64]\n * @property {number} [fontSize=1]\n * @property {number|'normal'|'bold'} [fontWeight='normal']\n * @property {'normal'|'italic'} [fontStyle='normal']\n * @property {number} [letterSpacing=0]\n * @property {'normal'|number} [lineHeight='normal']\n * @property {number} [maxWidth]\n * @property {'ltr'|'rtl'} [direction='ltr']\n * @property {string} [textAlign='left']\n * @property {number} [textIndent=0]\n * @property {'normal'|'nowrap'} [whiteSpace='normal']\n * @property {'normal'|'break-word'} [overflowWrap='normal']\n * @property {AnchorXValue} [anchorX=0]\n * @property {AnchorYValue} [anchorY=0]\n * @property {boolean} [metricsOnly=false]\n * @property {string} [unicodeFontsURL]\n * @property {FontResolverResult} [preResolvedFonts]\n * @property {boolean} [includeCaretPositions=false]\n * @property {number} [chunkedBoundsSize=8192]\n * @property {{[rangeStartIndex]: number}} [colorRanges]\n */\n\n/**\n * @typedef {object} TypesetResult\n * @property {Uint16Array} glyphIds id for each glyph, specific to that glyph's font\n * @property {Uint8Array} glyphFontIndices index into fontData for each glyph\n * @property {Float32Array} glyphPositions x,y of each glyph's origin in layout\n * @property {{[font]: {[glyphId]: {path: string, pathBounds: number[]}}}} glyphData data about each glyph appearing in the text\n * @property {TypesetFontData[]} fontData data about each font used in the text\n * @property {Float32Array} [caretPositions] startX,endX,bottomY caret positions for each char\n * @property {Uint8Array} [glyphColors] color for each glyph, if color ranges supplied\n * chunkedBounds, //total rects per (n=chunkedBoundsSize) consecutive glyphs\n * fontSize, //calculated em height\n * topBaseline: anchorYOffset + lines[0].baseline, //y coordinate of the top line's baseline\n * blockBounds: [ //bounds for the whole block of text, including vertical padding for lineHeight\n * anchorXOffset,\n * anchorYOffset - totalHeight,\n * anchorXOffset + maxLineWidth,\n * anchorYOffset\n * ],\n * visibleBounds, //total bounds of visible text paths, may be larger or smaller than blockBounds\n * timings\n */\n\n/**\n * @typedef {object} TypesetFontData\n * @property src\n * @property unitsPerEm\n * @property ascender\n * @property descender\n * @property lineHeight\n * @property capHeight\n * @property xHeight\n */\n\n/**\n * @typedef {function} TypesetterTypesetFunction - compute fonts and layout for some text.\n * @param {TypesetParams} params\n * @param {(TypesetResult) => void} callback - function called when typesetting is complete.\n * If the params included `preResolvedFonts`, this will be called synchronously.\n */\n\n/**\n * @typedef {function} TypesetterMeasureFunction - compute width/height for some text.\n * @param {TypesetParams} params\n * @param {(width:number, height:number) => void} callback - function called when measurement is complete.\n * If the params included `preResolvedFonts`, this will be called synchronously.\n */\n\n\n/**\n * Factory function that creates a self-contained environment for processing text typesetting requests.\n *\n * It is important that this function has no closure dependencies, so that it can be easily injected\n * into the source for a Worker without requiring a build step or complex dependency loading. All its\n * dependencies must be passed in at initialization.\n *\n * @param {FontResolver} resolveFonts - function to resolve a string to parsed fonts\n * @param {object} bidi - the bidi.js implementation object\n * @return {{typeset: TypesetterTypesetFunction, measure: TypesetterMeasureFunction}}\n */\nfunction createTypesetter(resolveFonts, bidi) {\n const INF = Infinity;\n\n // Set of Unicode Default_Ignorable_Code_Point characters, these will not produce visible glyphs\n // eslint-disable-next-line no-misleading-character-class\n const DEFAULT_IGNORABLE_CHARS = /[\\u00AD\\u034F\\u061C\\u115F-\\u1160\\u17B4-\\u17B5\\u180B-\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u3164\\uFE00-\\uFE0F\\uFEFF\\uFFA0\\uFFF0-\\uFFF8]/;\n\n // This regex (instead of /\\s/) allows us to select all whitespace EXCEPT for non-breaking white spaces\n const lineBreakingWhiteSpace = `[^\\\\S\\\\u00A0]`;\n\n // Incomplete set of characters that allow line breaking after them\n // In the future we may consider a full Unicode line breaking algorithm impl: https://www.unicode.org/reports/tr14\n const BREAK_AFTER_CHARS = new RegExp(`${lineBreakingWhiteSpace}|[\\\\-\\\\u007C\\\\u00AD\\\\u2010\\\\u2012-\\\\u2014\\\\u2027\\\\u2056\\\\u2E17\\\\u2E40]`);\n\n /**\n * Load and parse all the necessary fonts to render a given string of text, then group\n * them into consecutive runs of characters sharing a font.\n */\n function calculateFontRuns({text, lang, fonts, style, weight, preResolvedFonts, unicodeFontsURL}, onDone) {\n const onResolved = ({chars, fonts: parsedFonts}) => {\n let curRun, prevVal;\n const runs = [];\n for (let i = 0; i < chars.length; i++) {\n if (chars[i] !== prevVal) {\n prevVal = chars[i];\n runs.push(curRun = { start: i, end: i, fontObj: parsedFonts[chars[i]]});\n } else {\n curRun.end = i;\n }\n }\n onDone(runs);\n };\n if (preResolvedFonts) {\n onResolved(preResolvedFonts);\n } else {\n resolveFonts(\n text,\n onResolved,\n { lang, fonts, style, weight, unicodeFontsURL }\n );\n }\n }\n\n /**\n * Main entry point.\n * Process a text string with given font and formatting parameters, and return all info\n * necessary to render all its glyphs.\n * @type TypesetterTypesetFunction\n */\n function typeset(\n {\n text='',\n font,\n lang,\n sdfGlyphSize=64,\n fontSize=400,\n fontWeight=1,\n fontStyle='normal',\n letterSpacing=0,\n lineHeight='normal',\n maxWidth=INF,\n direction,\n textAlign='left',\n textIndent=0,\n whiteSpace='normal',\n overflowWrap='normal',\n anchorX = 0,\n anchorY = 0,\n metricsOnly=false,\n unicodeFontsURL,\n preResolvedFonts=null,\n includeCaretPositions=false,\n chunkedBoundsSize=8192,\n colorRanges=null\n },\n callback\n ) {\n const mainStart = now();\n const timings = {fontLoad: 0, typesetting: 0};\n\n // Ensure newlines are normalized\n if (text.indexOf('\\r') > -1) {\n console.info('Typesetter: got text with \\\\r chars; normalizing to \\\\n');\n text = text.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n }\n\n // Ensure we've got numbers not strings\n fontSize = +fontSize;\n letterSpacing = +letterSpacing;\n maxWidth = +maxWidth;\n lineHeight = lineHeight || 'normal';\n textIndent = +textIndent;\n\n calculateFontRuns({\n text,\n lang,\n style: fontStyle,\n weight: fontWeight,\n fonts: typeof font === 'string' ? [{src: font}] : font,\n unicodeFontsURL,\n preResolvedFonts\n }, runs => {\n timings.fontLoad = now() - mainStart;\n const hasMaxWidth = isFinite(maxWidth);\n let glyphIds = null;\n let glyphFontIndices = null;\n let glyphPositions = null;\n let glyphData = null;\n let glyphColors = null;\n let caretPositions = null;\n let visibleBounds = null;\n let chunkedBounds = null;\n let maxLineWidth = 0;\n let renderableGlyphCount = 0;\n let canWrap = whiteSpace !== 'nowrap';\n const metricsByFont = new Map(); // fontObj -> metrics\n const typesetStart = now();\n\n // Distribute glyphs into lines based on wrapping\n let lineXOffset = textIndent;\n let prevRunEndX = 0;\n let currentLine = new TextLine();\n const lines = [currentLine];\n runs.forEach(run => {\n const { fontObj } = run;\n const { ascender, descender, unitsPerEm, lineGap, capHeight, xHeight } = fontObj;\n\n // Calculate metrics for each font used\n let fontData = metricsByFont.get(fontObj);\n if (!fontData) {\n // Find conversion between native font units and fontSize units\n const fontSizeMult = fontSize / unitsPerEm;\n\n // Determine appropriate value for 'normal' line height based on the font's actual metrics\n // This does not guarantee individual glyphs won't exceed the line height, e.g. Roboto; should we use yMin/Max instead?\n const calcLineHeight = lineHeight === 'normal' ?\n (ascender - descender + lineGap) * fontSizeMult : lineHeight * fontSize;\n\n // Determine line height and leading adjustments\n const halfLeading = (calcLineHeight - (ascender - descender) * fontSizeMult) / 2;\n const caretHeight = Math.min(calcLineHeight, (ascender - descender) * fontSizeMult);\n const caretTop = (ascender + descender) / 2 * fontSizeMult + caretHeight / 2;\n fontData = {\n index: metricsByFont.size,\n src: fontObj.src,\n fontObj,\n fontSizeMult,\n unitsPerEm,\n ascender: ascender * fontSizeMult,\n descender: descender * fontSizeMult,\n capHeight: capHeight * fontSizeMult,\n xHeight: xHeight * fontSizeMult,\n lineHeight: calcLineHeight,\n baseline: -halfLeading - ascender * fontSizeMult, // baseline offset from top of line height\n // cap: -halfLeading - capHeight * fontSizeMult, // cap from top of line height\n // ex: -halfLeading - xHeight * fontSizeMult, // ex from top of line height\n caretTop: (ascender + descender) / 2 * fontSizeMult + caretHeight / 2,\n caretBottom: caretTop - caretHeight\n };\n metricsByFont.set(fontObj, fontData);\n }\n const { fontSizeMult } = fontData;\n\n const runText = text.slice(run.start, run.end + 1);\n let prevGlyphX, prevGlyphObj;\n fontObj.forEachGlyph(runText, fontSize, letterSpacing, (glyphObj, glyphX, glyphY, charIndex) => {\n glyphX += prevRunEndX;\n charIndex += run.start;\n prevGlyphX = glyphX;\n prevGlyphObj = glyphObj;\n const char = text.charAt(charIndex);\n const glyphWidth = glyphObj.advanceWidth * fontSizeMult;\n const curLineCount = currentLine.count;\n let nextLine;\n\n // Calc isWhitespace and isEmpty once per glyphObj\n if (!('isEmpty' in glyphObj)) {\n glyphObj.isWhitespace = !!char && new RegExp(lineBreakingWhiteSpace).test(char);\n glyphObj.canBreakAfter = !!char && BREAK_AFTER_CHARS.test(char);\n glyphObj.isEmpty = glyphObj.xMin === glyphObj.xMax || glyphObj.yMin === glyphObj.yMax || DEFAULT_IGNORABLE_CHARS.test(char);\n }\n if (!glyphObj.isWhitespace && !glyphObj.isEmpty) {\n renderableGlyphCount++;\n }\n\n // If a non-whitespace character overflows the max width, we need to soft-wrap\n if (canWrap && hasMaxWidth && !glyphObj.isWhitespace && glyphX + glyphWidth + lineXOffset > maxWidth && curLineCount) {\n // If it's the first char after a whitespace, start a new line\n if (currentLine.glyphAt(curLineCount - 1).glyphObj.canBreakAfter) {\n nextLine = new TextLine();\n lineXOffset = -glyphX;\n } else {\n // Back up looking for a whitespace character to wrap at\n for (let i = curLineCount; i--;) {\n // If we got the start of the line there's no soft break point; make hard break if overflowWrap='break-word'\n if (i === 0 && overflowWrap === 'break-word') {\n nextLine = new TextLine();\n lineXOffset = -glyphX;\n break\n }\n // Found a soft break point; move all chars since it to a new line\n else if (currentLine.glyphAt(i).glyphObj.canBreakAfter) {\n nextLine = currentLine.splitAt(i + 1);\n const adjustX = nextLine.glyphAt(0).x;\n lineXOffset -= adjustX;\n for (let j = nextLine.count; j--;) {\n nextLine.glyphAt(j).x -= adjustX;\n }\n break\n }\n }\n }\n if (nextLine) {\n currentLine.isSoftWrapped = true;\n currentLine = nextLine;\n lines.push(currentLine);\n maxLineWidth = maxWidth; //after soft wrapping use maxWidth as calculated width\n }\n }\n\n let fly = currentLine.glyphAt(currentLine.count);\n fly.glyphObj = glyphObj;\n fly.x = glyphX + lineXOffset;\n fly.y = glyphY;\n fly.width = glyphWidth;\n fly.charIndex = charIndex;\n fly.fontData = fontData;\n\n // Handle hard line breaks\n if (char === '\\n') {\n currentLine = new TextLine();\n lines.push(currentLine);\n lineXOffset = -(glyphX + glyphWidth + (letterSpacing * fontSize)) + textIndent;\n }\n });\n // At the end of a run we must capture the x position as the starting point for the next run\n prevRunEndX = prevGlyphX + prevGlyphObj.advanceWidth * fontSizeMult + letterSpacing * fontSize;\n });\n\n // Calculate width/height/baseline of each line (excluding trailing whitespace) and maximum block width\n let totalHeight = 0;\n lines.forEach(line => {\n let isTrailingWhitespace = true;\n for (let i = line.count; i--;) {\n const glyphInfo = line.glyphAt(i);\n // omit trailing whitespace from width calculation\n if (isTrailingWhitespace && !glyphInfo.glyphObj.isWhitespace) {\n line.width = glyphInfo.x + glyphInfo.width;\n if (line.width > maxLineWidth) {\n maxLineWidth = line.width;\n }\n isTrailingWhitespace = false;\n }\n // use the tallest line height, lowest baseline, and highest cap/ex\n let {lineHeight, capHeight, xHeight, baseline} = glyphInfo.fontData;\n if (lineHeight > line.lineHeight) line.lineHeight = lineHeight;\n const baselineDiff = baseline - line.baseline;\n if (baselineDiff < 0) { //shift all metrics down\n line.baseline += baselineDiff;\n line.cap += baselineDiff;\n line.ex += baselineDiff;\n }\n // compare cap/ex based on new lowest baseline\n line.cap = Math.max(line.cap, line.baseline + capHeight);\n line.ex = Math.max(line.ex, line.baseline + xHeight);\n }\n line.baseline -= totalHeight;\n line.cap -= totalHeight;\n line.ex -= totalHeight;\n totalHeight += line.lineHeight;\n });\n\n // Find overall position adjustments for anchoring\n let anchorXOffset = 0;\n let anchorYOffset = 0;\n if (anchorX) {\n if (typeof anchorX === 'number') {\n anchorXOffset = -anchorX;\n }\n else if (typeof anchorX === 'string') {\n anchorXOffset = -maxLineWidth * (\n anchorX === 'left' ? 0 :\n anchorX === 'center' ? 0.5 :\n anchorX === 'right' ? 1 :\n parsePercent(anchorX)\n );\n }\n }\n if (anchorY) {\n if (typeof anchorY === 'number') {\n anchorYOffset = -anchorY;\n }\n else if (typeof anchorY === 'string') {\n anchorYOffset = anchorY === 'top' ? 0 :\n anchorY === 'top-baseline' ? -lines[0].baseline :\n anchorY === 'top-cap' ? -lines[0].cap :\n anchorY === 'top-ex' ? -lines[0].ex :\n anchorY === 'middle' ? totalHeight / 2 :\n anchorY === 'bottom' ? totalHeight :\n anchorY === 'bottom-baseline' ? lines[lines.length - 1].baseline :\n parsePercent(anchorY) * totalHeight;\n }\n }\n\n if (!metricsOnly) {\n // Resolve bidi levels\n const bidiLevelsResult = bidi.getEmbeddingLevels(text, direction);\n\n // Process each line, applying alignment offsets, adding each glyph to the atlas, and\n // collecting all renderable glyphs into a single collection.\n glyphIds = new Uint16Array(renderableGlyphCount);\n glyphFontIndices = new Uint8Array(renderableGlyphCount);\n glyphPositions = new Float32Array(renderableGlyphCount * 2);\n glyphData = {};\n visibleBounds = [INF, INF, -INF, -INF];\n chunkedBounds = [];\n if (includeCaretPositions) {\n caretPositions = new Float32Array(text.length * 4);\n }\n if (colorRanges) {\n glyphColors = new Uint8Array(renderableGlyphCount * 3);\n }\n let renderableGlyphIndex = 0;\n let prevCharIndex = -1;\n let colorCharIndex = -1;\n let chunk;\n let currentColor;\n lines.forEach((line, lineIndex) => {\n let {count:lineGlyphCount, width:lineWidth} = line;\n\n // Ignore empty lines\n if (lineGlyphCount > 0) {\n // Count trailing whitespaces, we want to ignore these for certain things\n let trailingWhitespaceCount = 0;\n for (let i = lineGlyphCount; i-- && line.glyphAt(i).glyphObj.isWhitespace;) {\n trailingWhitespaceCount++;\n }\n\n // Apply horizontal alignment adjustments\n let lineXOffset = 0;\n let justifyAdjust = 0;\n if (textAlign === 'center') {\n lineXOffset = (maxLineWidth - lineWidth) / 2;\n } else if (textAlign === 'right') {\n lineXOffset = maxLineWidth - lineWidth;\n } else if (textAlign === 'justify' && line.isSoftWrapped) {\n // count non-trailing whitespace characters, and we'll adjust the offsets per character in the next loop\n let whitespaceCount = 0;\n for (let i = lineGlyphCount - trailingWhitespaceCount; i--;) {\n if (line.glyphAt(i).glyphObj.isWhitespace) {\n whitespaceCount++;\n }\n }\n justifyAdjust = (maxLineWidth - lineWidth) / whitespaceCount;\n }\n if (justifyAdjust || lineXOffset) {\n let justifyOffset = 0;\n for (let i = 0; i < lineGlyphCount; i++) {\n let glyphInfo = line.glyphAt(i);\n const glyphObj = glyphInfo.glyphObj;\n glyphInfo.x += lineXOffset + justifyOffset;\n // Expand non-trailing whitespaces for justify alignment\n if (justifyAdjust !== 0 && glyphObj.isWhitespace && i < lineGlyphCount - trailingWhitespaceCount) {\n justifyOffset += justifyAdjust;\n glyphInfo.width += justifyAdjust;\n }\n }\n }\n\n // Perform bidi range flipping\n const flips = bidi.getReorderSegments(\n text, bidiLevelsResult, line.glyphAt(0).charIndex, line.glyphAt(line.count - 1).charIndex\n );\n for (let fi = 0; fi < flips.length; fi++) {\n const [start, end] = flips[fi];\n // Map start/end string indices to indices in the line\n let left = Infinity, right = -Infinity;\n for (let i = 0; i < lineGlyphCount; i++) {\n if (line.glyphAt(i).charIndex >= start) { // gte to handle removed characters\n let startInLine = i, endInLine = i;\n for (; endInLine < lineGlyphCount; endInLine++) {\n let info = line.glyphAt(endInLine);\n if (info.charIndex > end) {\n break\n }\n if (endInLine < lineGlyphCount - trailingWhitespaceCount) { //don't include trailing ws in flip width\n left = Math.min(left, info.x);\n right = Math.max(right, info.x + info.width);\n }\n }\n for (let j = startInLine; j < endInLine; j++) {\n const glyphInfo = line.glyphAt(j);\n glyphInfo.x = right - (glyphInfo.x + glyphInfo.width - left);\n }\n break\n }\n }\n }\n\n // Assemble final data arrays\n let glyphObj;\n const setGlyphObj = g => glyphObj = g;\n for (let i = 0; i < lineGlyphCount; i++) {\n const glyphInfo = line.glyphAt(i);\n glyphObj = glyphInfo.glyphObj;\n const glyphId = glyphObj.index;\n\n // Replace mirrored characters in rtl\n const rtl = bidiLevelsResult.levels[glyphInfo.charIndex] & 1; //odd level means rtl\n if (rtl) {\n const mirrored = bidi.getMirroredCharacter(text[glyphInfo.charIndex]);\n if (mirrored) {\n glyphInfo.fontData.fontObj.forEachGlyph(mirrored, 0, 0, setGlyphObj);\n }\n }\n\n // Add caret positions\n if (includeCaretPositions) {\n const {charIndex, fontData} = glyphInfo;\n const caretLeft = glyphInfo.x + anchorXOffset;\n const caretRight = glyphInfo.x + glyphInfo.width + anchorXOffset;\n caretPositions[charIndex * 4] = rtl ? caretRight : caretLeft; //start edge x\n caretPositions[charIndex * 4 + 1] = rtl ? caretLeft : caretRight; //end edge x\n caretPositions[charIndex * 4 + 2] = line.baseline + fontData.caretBottom + anchorYOffset; //common bottom y\n caretPositions[charIndex * 4 + 3] = line.baseline + fontData.caretTop + anchorYOffset; //common top y\n\n // If we skipped any chars from the previous glyph (due to ligature subs), fill in caret\n // positions for those missing char indices; currently this uses a best-guess by dividing\n // the ligature's width evenly. In the future we may try to use the font's LigatureCaretList\n // table to get better interior caret positions.\n const ligCount = charIndex - prevCharIndex;\n if (ligCount > 1) {\n fillLigatureCaretPositions(caretPositions, prevCharIndex, ligCount);\n }\n prevCharIndex = charIndex;\n }\n\n // Track current color range\n if (colorRanges) {\n const {charIndex} = glyphInfo;\n while(charIndex > colorCharIndex) {\n colorCharIndex++;\n if (colorRanges.hasOwnProperty(colorCharIndex)) {\n currentColor = colorRanges[colorCharIndex];\n }\n }\n }\n\n // Get atlas data for renderable glyphs\n if (!glyphObj.isWhitespace && !glyphObj.isEmpty) {\n const idx = renderableGlyphIndex++;\n const {fontSizeMult, src: fontSrc, index: fontIndex} = glyphInfo.fontData;\n\n // Add this glyph's path data\n const fontGlyphData = glyphData[fontSrc] || (glyphData[fontSrc] = {});\n if (!fontGlyphData[glyphId]) {\n fontGlyphData[glyphId] = {\n path: glyphObj.path,\n pathBounds: [glyphObj.xMin, glyphObj.yMin, glyphObj.xMax, glyphObj.yMax]\n };\n }\n\n // Determine final glyph position and add to glyphPositions array\n const glyphX = glyphInfo.x + anchorXOffset;\n const glyphY = glyphInfo.y + line.baseline + anchorYOffset;\n glyphPositions[idx * 2] = glyphX;\n glyphPositions[idx * 2 + 1] = glyphY;\n\n // Track total visible bounds\n const visX0 = glyphX + glyphObj.xMin * fontSizeMult;\n const visY0 = glyphY + glyphObj.yMin * fontSizeMult;\n const visX1 = glyphX + glyphObj.xMax * fontSizeMult;\n const visY1 = glyphY + glyphObj.yMax * fontSizeMult;\n if (visX0 < visibleBounds[0]) visibleBounds[0] = visX0;\n if (visY0 < visibleBounds[1]) visibleBounds[1] = visY0;\n if (visX1 > visibleBounds[2]) visibleBounds[2] = visX1;\n if (visY1 > visibleBounds[3]) visibleBounds[3] = visY1;\n\n // Track bounding rects for each chunk of N glyphs\n if (idx % chunkedBoundsSize === 0) {\n chunk = {start: idx, end: idx, rect: [INF, INF, -INF, -INF]};\n chunkedBounds.push(chunk);\n }\n chunk.end++;\n const chunkRect = chunk.rect;\n if (visX0 < chunkRect[0]) chunkRect[0] = visX0;\n if (visY0 < chunkRect[1]) chunkRect[1] = visY0;\n if (visX1 > chunkRect[2]) chunkRect[2] = visX1;\n if (visY1 > chunkRect[3]) chunkRect[3] = visY1;\n\n // Add to glyph ids and font indices arrays\n glyphIds[idx] = glyphId;\n glyphFontIndices[idx] = fontIndex;\n\n // Add colors\n if (colorRanges) {\n const start = idx * 3;\n glyphColors[start] = currentColor >> 16 & 255;\n glyphColors[start + 1] = currentColor >> 8 & 255;\n glyphColors[start + 2] = currentColor & 255;\n }\n }\n }\n }\n });\n\n // Fill in remaining caret positions in case the final character was a ligature\n if (caretPositions) {\n const ligCount = text.length - prevCharIndex;\n if (ligCount > 1) {\n fillLigatureCaretPositions(caretPositions, prevCharIndex, ligCount);\n }\n }\n }\n\n // Assemble final data about each font used\n const fontData = [];\n metricsByFont.forEach(({index, src, unitsPerEm, ascender, descender, lineHeight, capHeight, xHeight}) => {\n fontData[index] = {src, unitsPerEm, ascender, descender, lineHeight, capHeight, xHeight};\n });\n\n // Timing stats\n timings.typesetting = now() - typesetStart;\n\n callback({\n glyphIds, //id for each glyph, specific to that glyph's font\n glyphFontIndices, //index into fontData for each glyph\n glyphPositions, //x,y of each glyph's origin in layout\n glyphData, //dict holding data about each glyph appearing in the text\n fontData, //data about each font used in the text\n caretPositions, //startX,endX,bottomY caret positions for each char\n // caretHeight, //height of cursor from bottom to top - todo per glyph?\n glyphColors, //color for each glyph, if color ranges supplied\n chunkedBounds, //total rects per (n=chunkedBoundsSize) consecutive glyphs\n fontSize, //calculated em height\n topBaseline: anchorYOffset + lines[0].baseline, //y coordinate of the top line's baseline\n blockBounds: [ //bounds for the whole block of text, including vertical padding for lineHeight\n anchorXOffset,\n anchorYOffset - totalHeight,\n anchorXOffset + maxLineWidth,\n anchorYOffset\n ],\n visibleBounds, //total bounds of visible text paths, may be larger or smaller than blockBounds\n timings\n });\n });\n }\n\n\n /**\n * For a given text string and font parameters, determine the resulting block dimensions\n * after wrapping for the given maxWidth.\n * @param args\n * @param callback\n */\n function measure(args, callback) {\n typeset({...args, metricsOnly: true}, (result) => {\n const [x0, y0, x1, y1] = result.blockBounds;\n callback({\n width: x1 - x0,\n height: y1 - y0\n });\n });\n }\n\n function parsePercent(str) {\n let match = str.match(/^([\\d.]+)%$/);\n let pct = match ? parseFloat(match[1]) : NaN;\n return isNaN(pct) ? 0 : pct / 100\n }\n\n function fillLigatureCaretPositions(caretPositions, ligStartIndex, ligCount) {\n const ligStartX = caretPositions[ligStartIndex * 4];\n const ligEndX = caretPositions[ligStartIndex * 4 + 1];\n const ligBottom = caretPositions[ligStartIndex * 4 + 2];\n const ligTop = caretPositions[ligStartIndex * 4 + 3];\n const guessedAdvanceX = (ligEndX - ligStartX) / ligCount;\n for (let i = 0; i < ligCount; i++) {\n const startIndex = (ligStartIndex + i) * 4;\n caretPositions[startIndex] = ligStartX + guessedAdvanceX * i;\n caretPositions[startIndex + 1] = ligStartX + guessedAdvanceX * (i + 1);\n caretPositions[startIndex + 2] = ligBottom;\n caretPositions[startIndex + 3] = ligTop;\n }\n }\n\n function now() {\n return (self.performance || Date).now()\n }\n\n // Array-backed structure for a single line's glyphs data\n function TextLine() {\n this.data = [];\n }\n const textLineProps = ['glyphObj', 'x', 'y', 'width', 'charIndex', 'fontData'];\n TextLine.prototype = {\n width: 0,\n lineHeight: 0,\n baseline: 0,\n cap: 0,\n ex: 0,\n isSoftWrapped: false,\n get count() {\n return Math.ceil(this.data.length / textLineProps.length)\n },\n glyphAt(i) {\n let fly = TextLine.flyweight;\n fly.data = this.data;\n fly.index = i;\n return fly\n },\n splitAt(i) {\n let newLine = new TextLine();\n newLine.data = this.data.splice(i * textLineProps.length);\n return newLine\n }\n };\n TextLine.flyweight = textLineProps.reduce((obj, prop, i, all) => {\n Object.defineProperty(obj, prop, {\n get() {\n return this.data[this.index * textLineProps.length + i]\n },\n set(val) {\n this.data[this.index * textLineProps.length + i] = val;\n }\n });\n return obj\n }, {data: null, index: 0});\n\n\n return {\n typeset,\n measure,\n }\n}\n\nconst now = () => (self.performance || Date).now();\n\nconst mainThreadGenerator = /*#__PURE__*/ createSDFGenerator();\n\nlet warned;\n\n/**\n * Generate an SDF texture image for a single glyph path, placing the result into a webgl canvas at a\n * given location and channel. Utilizes the webgl-sdf-generator external package for GPU-accelerated SDF\n * generation when supported.\n */\nfunction generateSDF(width, height, path, viewBox, distance, exponent, canvas, x, y, channel, useWebGL = true) {\n // Allow opt-out\n if (!useWebGL) {\n return generateSDF_JS_Worker(width, height, path, viewBox, distance, exponent, canvas, x, y, channel)\n }\n\n // Attempt GPU-accelerated generation first\n return generateSDF_GL(width, height, path, viewBox, distance, exponent, canvas, x, y, channel).then(\n null,\n err => {\n // WebGL failed either due to a hard error or unexpected results; fall back to JS in workers\n if (!warned) {\n console.warn(`WebGL SDF generation failed, falling back to JS`, err);\n warned = true;\n }\n return generateSDF_JS_Worker(width, height, path, viewBox, distance, exponent, canvas, x, y, channel)\n }\n )\n}\n\nconst queue = [];\nconst chunkTimeBudget = 5; // ms\nlet timer = 0;\n\nfunction nextChunk() {\n const start = now();\n while (queue.length && now() - start < chunkTimeBudget) {\n queue.shift()();\n }\n timer = queue.length ? setTimeout(nextChunk, 0) : 0;\n}\n\n/**\n * WebGL-based implementation executed on the main thread. Requests are executed in time-bounded\n * macrotask chunks to allow render frames to execute in between.\n */\nconst generateSDF_GL = (...args) => {\n return new Promise((resolve, reject) => {\n queue.push(() => {\n const start = now();\n try {\n mainThreadGenerator.webgl.generateIntoCanvas(...args);\n resolve({ timing: now() - start });\n } catch (err) {\n reject(err);\n }\n });\n if (!timer) {\n timer = setTimeout(nextChunk, 0);\n }\n })\n};\n\nconst threadCount = 4; // how many workers to spawn\nconst idleTimeout = 2000; // workers will be terminated after being idle this many milliseconds\nconst threads = {};\nlet callNum = 0;\n\n/**\n * Fallback JS-based implementation, fanned out to a number of worker threads for parallelism\n */\nfunction generateSDF_JS_Worker(width, height, path, viewBox, distance, exponent, canvas, x, y, channel) {\n const workerId = 'TroikaTextSDFGenerator_JS_' + ((callNum++) % threadCount);\n let thread = threads[workerId];\n if (!thread) {\n thread = threads[workerId] = {\n workerModule: defineWorkerModule({\n name: workerId,\n workerId,\n dependencies: [\n createSDFGenerator,\n now\n ],\n init(_createSDFGenerator, now) {\n const generate = _createSDFGenerator().javascript.generate;\n return function (...args) {\n const start = now();\n const textureData = generate(...args);\n return {\n textureData,\n timing: now() - start\n }\n }\n },\n getTransferables(result) {\n return [result.textureData.buffer]\n }\n }),\n requests: 0,\n idleTimer: null\n };\n }\n\n thread.requests++;\n clearTimeout(thread.idleTimer);\n return thread.workerModule(width, height, path, viewBox, distance, exponent)\n .then(({ textureData, timing }) => {\n // copy result data into the canvas\n const start = now();\n // expand single-channel data into rgba\n const imageData = new Uint8Array(textureData.length * 4);\n for (let i = 0; i < textureData.length; i++) {\n imageData[i * 4 + channel] = textureData[i];\n }\n mainThreadGenerator.webglUtils.renderImageData(canvas, imageData, x, y, width, height, 1 << (3 - channel));\n timing += now() - start;\n\n // clean up workers after a while\n if (--thread.requests === 0) {\n thread.idleTimer = setTimeout(() => { terminateWorker(workerId); }, idleTimeout);\n }\n return { timing }\n })\n}\n\nfunction warmUpSDFCanvas(canvas) {\n if (!canvas._warm) {\n mainThreadGenerator.webgl.isSupported(canvas);\n canvas._warm = true;\n }\n}\n\nconst resizeWebGLCanvasWithoutClearing = mainThreadGenerator.webglUtils.resizeWebGLCanvasWithoutClearing;\n\nconst CONFIG = {\n defaultFontURL: null,\n unicodeFontsURL: null,\n sdfGlyphSize: 64,\n sdfMargin: 1 / 16,\n sdfExponent: 9,\n textureWidth: 2048,\n};\nconst tempColor = /*#__PURE__*/new Color();\nlet hasRequested = false;\n\nfunction now$1() {\n return (self.performance || Date).now()\n}\n\n/**\n * Customizes the text builder configuration. This must be called prior to the first font processing\n * request, and applies to all fonts.\n *\n * @param {String} config.defaultFontURL - The URL of the default font to use for text processing\n * requests, in case none is specified or the specifiede font fails to load or parse.\n * Defaults to \"Roboto Regular\" from Google Fonts.\n * @param {String} config.unicodeFontsURL - A custom location for the fallback unicode-font-resolver\n * data and font files, if you don't want to use the default CDN. See\n * https://github.com/lojjic/unicode-font-resolver for details. It can also be\n * configured per text instance, but this lets you do it once globally.\n * @param {Number} config.sdfGlyphSize - The default size of each glyph's SDF (signed distance field)\n * texture used for rendering. Must be a power-of-two number, and applies to all fonts,\n * but note that this can also be overridden per call to `getTextRenderInfo()`.\n * Larger sizes can improve the quality of glyph rendering by increasing the sharpness\n * of corners and preventing loss of very thin lines, at the expense of memory. Defaults\n * to 64 which is generally a good balance of size and quality.\n * @param {Number} config.sdfExponent - The exponent used when encoding the SDF values. A higher exponent\n * shifts the encoded 8-bit values to achieve higher precision/accuracy at texels nearer\n * the glyph's path, with lower precision further away. Defaults to 9.\n * @param {Number} config.sdfMargin - How much space to reserve in the SDF as margin outside the glyph's\n * path, as a percentage of the SDF width. A larger margin increases the quality of\n * extruded glyph outlines, but decreases the precision available for the glyph itself.\n * Defaults to 1/16th of the glyph size.\n * @param {Number} config.textureWidth - The width of the SDF texture; must be a power of 2. Defaults to\n * 2048 which is a safe maximum texture dimension according to the stats at\n * https://webglstats.com/webgl/parameter/MAX_TEXTURE_SIZE and should allow for a\n * reasonably large number of glyphs (default glyph size of 64^2 and safe texture size of\n * 2048^2, times 4 channels, allows for 4096 glyphs.) This can be increased if you need to\n * increase the glyph size and/or have an extraordinary number of glyphs.\n */\nfunction configureTextBuilder(config) {\n if (hasRequested) {\n console.warn('configureTextBuilder called after first font request; will be ignored.');\n } else {\n assign(CONFIG, config);\n }\n}\n\n/**\n * Repository for all font SDF atlas textures and their glyph mappings. There is a separate atlas for\n * each sdfGlyphSize. Each atlas has a single Texture that holds all glyphs for all fonts.\n *\n * {\n * [sdfGlyphSize]: {\n * glyphCount: number,\n * sdfGlyphSize: number,\n * sdfTexture: Texture,\n * sdfCanvas: HTMLCanvasElement,\n * contextLost: boolean,\n * glyphsByFont: Map>\n * }\n * }\n */\nconst atlases = Object.create(null);\n\n/**\n * @typedef {object} TroikaTextRenderInfo - Format of the result from `getTextRenderInfo`.\n * @property {TypesetParams} parameters - The normalized input arguments to the render call.\n * @property {Texture} sdfTexture - The SDF atlas texture.\n * @property {number} sdfGlyphSize - The size of each glyph's SDF; see `configureTextBuilder`.\n * @property {number} sdfExponent - The exponent used in encoding the SDF's values; see `configureTextBuilder`.\n * @property {Float32Array} glyphBounds - List of [minX, minY, maxX, maxY] quad bounds for each glyph.\n * @property {Float32Array} glyphAtlasIndices - List holding each glyph's index in the SDF atlas.\n * @property {Uint8Array} [glyphColors] - List holding each glyph's [r, g, b] color, if `colorRanges` was supplied.\n * @property {Float32Array} [caretPositions] - A list of caret positions for all characters in the string; each is\n * four elements: the starting X, the ending X, the bottom Y, and the top Y for the caret.\n * @property {number} [caretHeight] - An appropriate height for all selection carets.\n * @property {number} ascender - The font's ascender metric.\n * @property {number} descender - The font's descender metric.\n * @property {number} capHeight - The font's cap height metric, based on the height of Latin capital letters.\n * @property {number} xHeight - The font's x height metric, based on the height of Latin lowercase letters.\n * @property {number} lineHeight - The final computed lineHeight measurement.\n * @property {number} topBaseline - The y position of the top line's baseline.\n * @property {Array} blockBounds - The total [minX, minY, maxX, maxY] rect of the whole text block;\n * this can include extra vertical space beyond the visible glyphs due to lineHeight, and is\n * equivalent to the dimensions of a block-level text element in CSS.\n * @property {Array} visibleBounds - The total [minX, minY, maxX, maxY] rect of the whole text block;\n * unlike `blockBounds` this is tightly wrapped to the visible glyph paths.\n * @property {Array} chunkedBounds - List of bounding rects for each consecutive set of N glyphs,\n * in the format `{start:N, end:N, rect:[minX, minY, maxX, maxY]}`.\n * @property {object} timings - Timing info for various parts of the rendering logic including SDF\n * generation, typesetting, etc.\n * @frozen\n */\n\n/**\n * @callback getTextRenderInfo~callback\n * @param {TroikaTextRenderInfo} textRenderInfo\n */\n\n/**\n * Main entry point for requesting the data needed to render a text string with given font parameters.\n * This is an asynchronous call, performing most of the logic in a web worker thread.\n * @param {TypesetParams} args\n * @param {getTextRenderInfo~callback} callback\n */\nfunction getTextRenderInfo(args, callback) {\n hasRequested = true;\n args = assign({}, args);\n const totalStart = now$1();\n\n // Convert relative URL to absolute so it can be resolved in the worker, and add fallbacks.\n // In the future we'll allow args.font to be a list with unicode ranges too.\n const { defaultFontURL } = CONFIG;\n const fonts = [];\n if (defaultFontURL) {\n fonts.push({label: 'default', src: toAbsoluteURL(defaultFontURL)});\n }\n if (args.font) {\n fonts.push({label: 'user', src: toAbsoluteURL(args.font)});\n }\n args.font = fonts;\n\n // Normalize text to a string\n args.text = '' + args.text;\n\n args.sdfGlyphSize = args.sdfGlyphSize || CONFIG.sdfGlyphSize;\n args.unicodeFontsURL = args.unicodeFontsURL || CONFIG.unicodeFontsURL;\n\n // Normalize colors\n if (args.colorRanges != null) {\n let colors = {};\n for (let key in args.colorRanges) {\n if (args.colorRanges.hasOwnProperty(key)) {\n let val = args.colorRanges[key];\n if (typeof val !== 'number') {\n val = tempColor.set(val).getHex();\n }\n colors[key] = val;\n }\n }\n args.colorRanges = colors;\n }\n\n Object.freeze(args);\n\n // Init the atlas if needed\n const {textureWidth, sdfExponent} = CONFIG;\n const {sdfGlyphSize} = args;\n const glyphsPerRow = (textureWidth / sdfGlyphSize * 4);\n let atlas = atlases[sdfGlyphSize];\n if (!atlas) {\n const canvas = document.createElement('canvas');\n canvas.width = textureWidth;\n canvas.height = sdfGlyphSize * 256 / glyphsPerRow; // start tall enough to fit 256 glyphs\n atlas = atlases[sdfGlyphSize] = {\n glyphCount: 0,\n sdfGlyphSize,\n sdfCanvas: canvas,\n sdfTexture: new Texture(\n canvas,\n undefined,\n undefined,\n undefined,\n LinearFilter,\n LinearFilter\n ),\n contextLost: false,\n glyphsByFont: new Map()\n };\n atlas.sdfTexture.generateMipmaps = false;\n initContextLossHandling(atlas);\n }\n\n const {sdfTexture, sdfCanvas} = atlas;\n\n // Issue request to the typesetting engine in the worker\n typesetInWorker(args).then(result => {\n const {glyphIds, glyphFontIndices, fontData, glyphPositions, fontSize, timings} = result;\n const neededSDFs = [];\n const glyphBounds = new Float32Array(glyphIds.length * 4);\n let boundsIdx = 0;\n let positionsIdx = 0;\n const quadsStart = now$1();\n\n const fontGlyphMaps = fontData.map(font => {\n let map = atlas.glyphsByFont.get(font.src);\n if (!map) {\n atlas.glyphsByFont.set(font.src, map = new Map());\n }\n return map\n });\n\n glyphIds.forEach((glyphId, i) => {\n const fontIndex = glyphFontIndices[i];\n const {src: fontSrc, unitsPerEm} = fontData[fontIndex];\n let glyphInfo = fontGlyphMaps[fontIndex].get(glyphId);\n\n // If this is a glyphId not seen before, add it to the atlas\n if (!glyphInfo) {\n const {path, pathBounds} = result.glyphData[fontSrc][glyphId];\n\n // Margin around path edges in SDF, based on a percentage of the glyph's max dimension.\n // Note we add an extra 0.5 px over the configured value because the outer 0.5 doesn't contain\n // useful interpolated values and will be ignored anyway.\n const fontUnitsMargin = Math.max(pathBounds[2] - pathBounds[0], pathBounds[3] - pathBounds[1])\n / sdfGlyphSize * (CONFIG.sdfMargin * sdfGlyphSize + 0.5);\n\n const atlasIndex = atlas.glyphCount++;\n const sdfViewBox = [\n pathBounds[0] - fontUnitsMargin,\n pathBounds[1] - fontUnitsMargin,\n pathBounds[2] + fontUnitsMargin,\n pathBounds[3] + fontUnitsMargin,\n ];\n fontGlyphMaps[fontIndex].set(glyphId, (glyphInfo = { path, atlasIndex, sdfViewBox }));\n\n // Collect those that need SDF generation\n neededSDFs.push(glyphInfo);\n }\n\n // Calculate bounds for renderable quads\n // TODO can we get this back off the main thread?\n const {sdfViewBox} = glyphInfo;\n const posX = glyphPositions[positionsIdx++];\n const posY = glyphPositions[positionsIdx++];\n const fontSizeMult = fontSize / unitsPerEm;\n glyphBounds[boundsIdx++] = posX + sdfViewBox[0] * fontSizeMult;\n glyphBounds[boundsIdx++] = posY + sdfViewBox[1] * fontSizeMult;\n glyphBounds[boundsIdx++] = posX + sdfViewBox[2] * fontSizeMult;\n glyphBounds[boundsIdx++] = posY + sdfViewBox[3] * fontSizeMult;\n\n // Convert glyphId to SDF index for the shader\n glyphIds[i] = glyphInfo.atlasIndex;\n });\n timings.quads = (timings.quads || 0) + (now$1() - quadsStart);\n\n const sdfStart = now$1();\n timings.sdf = {};\n\n // Grow the texture height by power of 2 if needed\n const currentHeight = sdfCanvas.height;\n const neededRows = Math.ceil(atlas.glyphCount / glyphsPerRow);\n const neededHeight = Math.pow(2, Math.ceil(Math.log2(neededRows * sdfGlyphSize)));\n if (neededHeight > currentHeight) {\n // Since resizing the canvas clears its render buffer, it needs special handling to copy the old contents over\n console.info(`Increasing SDF texture size ${currentHeight}->${neededHeight}`);\n resizeWebGLCanvasWithoutClearing(sdfCanvas, textureWidth, neededHeight);\n // As of Three r136 textures cannot be resized once they're allocated on the GPU, we must dispose to reallocate it\n sdfTexture.dispose();\n }\n\n Promise.all(neededSDFs.map(glyphInfo =>\n generateGlyphSDF(glyphInfo, atlas, args.gpuAccelerateSDF).then(({timing}) => {\n timings.sdf[glyphInfo.atlasIndex] = timing;\n })\n )).then(() => {\n if (neededSDFs.length && !atlas.contextLost) {\n safariPre15Workaround(atlas);\n sdfTexture.needsUpdate = true;\n }\n timings.sdfTotal = now$1() - sdfStart;\n timings.total = now$1() - totalStart;\n // console.log(`SDF - ${timings.sdfTotal}, Total - ${timings.total - timings.fontLoad}`)\n\n // Invoke callback with the text layout arrays and updated texture\n callback(Object.freeze({\n parameters: args,\n sdfTexture,\n sdfGlyphSize,\n sdfExponent,\n glyphBounds,\n glyphAtlasIndices: glyphIds,\n glyphColors: result.glyphColors,\n caretPositions: result.caretPositions,\n chunkedBounds: result.chunkedBounds,\n ascender: result.ascender,\n descender: result.descender,\n lineHeight: result.lineHeight,\n capHeight: result.capHeight,\n xHeight: result.xHeight,\n topBaseline: result.topBaseline,\n blockBounds: result.blockBounds,\n visibleBounds: result.visibleBounds,\n timings: result.timings,\n }));\n });\n });\n\n // While the typesetting request is being handled, go ahead and make sure the atlas canvas context is\n // \"warmed up\"; the first request will be the longest due to shader program compilation so this gets\n // a head start on that process before SDFs actually start getting processed.\n Promise.resolve().then(() => {\n if (!atlas.contextLost) {\n warmUpSDFCanvas(sdfCanvas);\n }\n });\n}\n\nfunction generateGlyphSDF({path, atlasIndex, sdfViewBox}, {sdfGlyphSize, sdfCanvas, contextLost}, useGPU) {\n if (contextLost) {\n // If the context is lost there's nothing we can do, just quit silently and let it\n // get regenerated when the context is restored\n return Promise.resolve({timing: -1})\n }\n const {textureWidth, sdfExponent} = CONFIG;\n const maxDist = Math.max(sdfViewBox[2] - sdfViewBox[0], sdfViewBox[3] - sdfViewBox[1]);\n const squareIndex = Math.floor(atlasIndex / 4);\n const x = squareIndex % (textureWidth / sdfGlyphSize) * sdfGlyphSize;\n const y = Math.floor(squareIndex / (textureWidth / sdfGlyphSize)) * sdfGlyphSize;\n const channel = atlasIndex % 4;\n return generateSDF(sdfGlyphSize, sdfGlyphSize, path, sdfViewBox, maxDist, sdfExponent, sdfCanvas, x, y, channel, useGPU)\n}\n\nfunction initContextLossHandling(atlas) {\n const canvas = atlas.sdfCanvas;\n\n /*\n // Begin context loss simulation\n if (!window.WebGLDebugUtils) {\n let script = document.getElementById('WebGLDebugUtilsScript')\n if (!script) {\n script = document.createElement('script')\n script.id = 'WebGLDebugUtils'\n document.head.appendChild(script)\n script.src = 'https://cdn.jsdelivr.net/gh/KhronosGroup/WebGLDeveloperTools@b42e702/src/debug/webgl-debug.js'\n }\n script.addEventListener('load', () => {\n initContextLossHandling(atlas)\n })\n return\n }\n window.WebGLDebugUtils.makeLostContextSimulatingCanvas(canvas)\n canvas.loseContextInNCalls(500)\n canvas.addEventListener('webglcontextrestored', (event) => {\n canvas.loseContextInNCalls(5000)\n })\n // End context loss simulation\n */\n\n canvas.addEventListener('webglcontextlost', (event) => {\n console.log('Context Lost', event);\n event.preventDefault();\n atlas.contextLost = true;\n });\n canvas.addEventListener('webglcontextrestored', (event) => {\n console.log('Context Restored', event);\n atlas.contextLost = false;\n // Regenerate all glyphs into the restored canvas:\n const promises = [];\n atlas.glyphsByFont.forEach(glyphMap => {\n glyphMap.forEach(glyph => {\n promises.push(generateGlyphSDF(glyph, atlas, true));\n });\n });\n Promise.all(promises).then(() => {\n safariPre15Workaround(atlas);\n atlas.sdfTexture.needsUpdate = true;\n });\n });\n}\n\n/**\n * Preload a given font and optionally pre-generate glyph SDFs for one or more character sequences.\n * This can be useful to avoid long pauses when first showing text in a scene, by preloading the\n * needed fonts and glyphs up front along with other assets.\n *\n * @param {object} options\n * @param {string} options.font - URL of the font file to preload. If not given, the default font will\n * be loaded.\n * @param {string|string[]} options.characters - One or more character sequences for which to pre-\n * generate glyph SDFs. Note that this will honor ligature substitution, so you may need\n * to specify ligature sequences in addition to their individual characters to get all\n * possible glyphs, e.g. `[\"t\", \"h\", \"th\"]` to get the \"t\" and \"h\" glyphs plus the \"th\" ligature.\n * @param {number} options.sdfGlyphSize - The size at which to prerender the SDF textures for the\n * specified `characters`.\n * @param {function} callback - A function that will be called when the preloading is complete.\n */\nfunction preloadFont({font, characters, sdfGlyphSize}, callback) {\n let text = Array.isArray(characters) ? characters.join('\\n') : '' + characters;\n getTextRenderInfo({ font, sdfGlyphSize, text }, callback);\n}\n\n\n// Local assign impl so we don't have to import troika-core\nfunction assign(toObj, fromObj) {\n for (let key in fromObj) {\n if (fromObj.hasOwnProperty(key)) {\n toObj[key] = fromObj[key];\n }\n }\n return toObj\n}\n\n// Utility for making URLs absolute\nlet linkEl;\nfunction toAbsoluteURL(path) {\n if (!linkEl) {\n linkEl = typeof document === 'undefined' ? {} : document.createElement('a');\n }\n linkEl.href = path;\n return linkEl.href\n}\n\n/**\n * Safari < v15 seems unable to use the SDF webgl canvas as a texture. This applies a workaround\n * where it reads the pixels out of that canvas and uploads them as a data texture instead, at\n * a slight performance cost.\n */\nfunction safariPre15Workaround(atlas) {\n // Use createImageBitmap support as a proxy for Safari<15, all other mainstream browsers\n // have supported it for a long while so any false positives should be minimal.\n if (typeof createImageBitmap !== 'function') {\n console.info('Safari<15: applying SDF canvas workaround');\n const {sdfCanvas, sdfTexture} = atlas;\n const {width, height} = sdfCanvas;\n const gl = atlas.sdfCanvas.getContext('webgl');\n let pixels = sdfTexture.image.data;\n if (!pixels || pixels.length !== width * height * 4) {\n pixels = new Uint8Array(width * height * 4);\n sdfTexture.image = {width, height, data: pixels};\n sdfTexture.flipY = false;\n sdfTexture.isDataTexture = true;\n }\n gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);\n }\n}\n\nconst typesetterWorkerModule = /*#__PURE__*/defineWorkerModule({\n name: 'Typesetter',\n dependencies: [\n createTypesetter,\n fontResolverWorkerModule,\n bidiFactory,\n ],\n init(createTypesetter, fontResolver, bidiFactory) {\n return createTypesetter(fontResolver, bidiFactory())\n }\n});\n\nconst typesetInWorker = /*#__PURE__*/defineWorkerModule({\n name: 'Typesetter',\n dependencies: [\n typesetterWorkerModule,\n ],\n init(typesetter) {\n return function(args) {\n return new Promise(resolve => {\n typesetter.typeset(args, resolve);\n })\n }\n },\n getTransferables(result) {\n // Mark array buffers as transferable to avoid cloning during postMessage\n const transferables = [];\n for (let p in result) {\n if (result[p] && result[p].buffer) {\n transferables.push(result[p].buffer);\n }\n }\n return transferables\n }\n});\n\nfunction dumpSDFTextures() {\n Object.keys(atlases).forEach(size => {\n const canvas = atlases[size].sdfCanvas;\n const {width, height} = canvas;\n console.log(\"%c.\", `\n background: url(${canvas.toDataURL()});\n background-size: ${width}px ${height}px;\n color: transparent;\n font-size: 0;\n line-height: ${height}px;\n padding-left: ${width}px;\n `);\n });\n}\n\nconst templateGeometries = {};\n\nfunction getTemplateGeometry(detail) {\n let geom = templateGeometries[detail];\n if (!geom) {\n // Geometry is two planes back-to-back, which will always be rendered FrontSide only but\n // appear as DoubleSide by default. FrontSide/BackSide are emulated using drawRange.\n // We do it this way to avoid the performance hit of two draw calls for DoubleSide materials\n // introduced by Three.js in r130 - see https://github.com/mrdoob/three.js/pull/21967\n const front = new PlaneGeometry(1, 1, detail, detail);\n const back = front.clone();\n const frontAttrs = front.attributes;\n const backAttrs = back.attributes;\n const combined = new BufferGeometry();\n const vertCount = frontAttrs.uv.count;\n for (let i = 0; i < vertCount; i++) {\n backAttrs.position.array[i * 3] *= -1; // flip position x\n backAttrs.normal.array[i * 3 + 2] *= -1; // flip normal z\n }\n ['position', 'normal', 'uv'].forEach(name => {\n combined.setAttribute(name, new Float32BufferAttribute(\n [...frontAttrs[name].array, ...backAttrs[name].array],\n frontAttrs[name].itemSize)\n );\n });\n combined.setIndex([...front.index.array, ...back.index.array.map(n => n + vertCount)]);\n combined.translate(0.5, 0.5, 0);\n geom = templateGeometries[detail] = combined;\n }\n return geom\n}\n\nconst glyphBoundsAttrName = 'aTroikaGlyphBounds';\nconst glyphIndexAttrName = 'aTroikaGlyphIndex';\nconst glyphColorAttrName = 'aTroikaGlyphColor';\n\n/**\n@class GlyphsGeometry\n\nA specialized Geometry for rendering a set of text glyphs. Uses InstancedBufferGeometry to\nrender the glyphs using GPU instancing of a single quad, rather than constructing a whole\ngeometry with vertices, for much smaller attribute arraybuffers according to this math:\n\n Where N = number of glyphs...\n\n Instanced:\n - position: 4 * 3\n - index: 2 * 3\n - normal: 4 * 3\n - uv: 4 * 2\n - glyph x/y bounds: N * 4\n - glyph indices: N * 1\n = 5N + 38\n\n Non-instanced:\n - position: N * 4 * 3\n - index: N * 2 * 3\n - normal: N * 4 * 3\n - uv: N * 4 * 2\n - glyph indices: N * 1\n = 39N\n\nA downside of this is the rare-but-possible lack of the instanced arrays extension,\nwhich we could potentially work around with a fallback non-instanced implementation.\n\n*/\nclass GlyphsGeometry extends InstancedBufferGeometry {\n constructor() {\n super();\n\n this.detail = 1;\n this.curveRadius = 0;\n\n // Define groups for rendering text outline as a separate pass; these will only\n // be used when the `material` getter returns an array, i.e. outlineWidth > 0.\n this.groups = [\n {start: 0, count: Infinity, materialIndex: 0},\n {start: 0, count: Infinity, materialIndex: 1}\n ];\n\n // Preallocate empty bounding objects\n this.boundingSphere = new Sphere();\n this.boundingBox = new Box3();\n }\n\n computeBoundingSphere () {\n // No-op; we'll sync the boundingSphere proactively when needed.\n }\n\n computeBoundingBox() {\n // No-op; we'll sync the boundingBox proactively when needed.\n }\n\n // Since our base geometry contains triangles for both front and back sides, we can emulate\n // the \"side\" by restricting the draw range.\n setSide(side) {\n const verts = this.getIndex().count;\n this.setDrawRange(side === BackSide ? verts / 2 : 0, side === DoubleSide ? verts : verts / 2);\n }\n\n set detail(detail) {\n if (detail !== this._detail) {\n this._detail = detail;\n if (typeof detail !== 'number' || detail < 1) {\n detail = 1;\n }\n let tpl = getTemplateGeometry(detail)\n ;['position', 'normal', 'uv'].forEach(attr => {\n this.attributes[attr] = tpl.attributes[attr].clone();\n });\n this.setIndex(tpl.getIndex().clone());\n }\n }\n get detail() {\n return this._detail\n }\n\n set curveRadius(r) {\n if (r !== this._curveRadius) {\n this._curveRadius = r;\n this._updateBounds();\n }\n }\n get curveRadius() {\n return this._curveRadius\n }\n\n /**\n * Update the geometry for a new set of glyphs.\n * @param {Float32Array} glyphBounds - An array holding the planar bounds for all glyphs\n * to be rendered, 4 entries for each glyph: x1,x2,y1,y1\n * @param {Float32Array} glyphAtlasIndices - An array holding the index of each glyph within\n * the SDF atlas texture.\n * @param {Array} blockBounds - An array holding the [minX, minY, maxX, maxY] across all glyphs\n * @param {Array} [chunkedBounds] - An array of objects describing bounds for each chunk of N\n * consecutive glyphs: `{start:N, end:N, rect:[minX, minY, maxX, maxY]}`. This can be\n * used with `applyClipRect` to choose an optimized `instanceCount`.\n * @param {Uint8Array} [glyphColors] - An array holding r,g,b values for each glyph.\n */\n updateGlyphs(glyphBounds, glyphAtlasIndices, blockBounds, chunkedBounds, glyphColors) {\n // Update the instance attributes\n updateBufferAttr(this, glyphBoundsAttrName, glyphBounds, 4);\n updateBufferAttr(this, glyphIndexAttrName, glyphAtlasIndices, 1);\n updateBufferAttr(this, glyphColorAttrName, glyphColors, 3);\n this._blockBounds = blockBounds;\n this._chunkedBounds = chunkedBounds;\n this.instanceCount = glyphAtlasIndices.length;\n this._updateBounds();\n }\n\n _updateBounds() {\n const bounds = this._blockBounds;\n if (bounds) {\n const { curveRadius, boundingBox: bbox } = this;\n if (curveRadius) {\n const { PI, floor, min, max, sin, cos } = Math;\n const halfPi = PI / 2;\n const twoPi = PI * 2;\n const absR = Math.abs(curveRadius);\n const leftAngle = bounds[0] / absR;\n const rightAngle = bounds[2] / absR;\n const minX = floor((leftAngle + halfPi) / twoPi) !== floor((rightAngle + halfPi) / twoPi)\n ? -absR : min(sin(leftAngle) * absR, sin(rightAngle) * absR);\n const maxX = floor((leftAngle - halfPi) / twoPi) !== floor((rightAngle - halfPi) / twoPi)\n ? absR : max(sin(leftAngle) * absR, sin(rightAngle) * absR);\n const maxZ = floor((leftAngle + PI) / twoPi) !== floor((rightAngle + PI) / twoPi)\n ? absR * 2 : max(absR - cos(leftAngle) * absR, absR - cos(rightAngle) * absR);\n bbox.min.set(minX, bounds[1], curveRadius < 0 ? -maxZ : 0);\n bbox.max.set(maxX, bounds[3], curveRadius < 0 ? 0 : maxZ);\n } else {\n bbox.min.set(bounds[0], bounds[1], 0);\n bbox.max.set(bounds[2], bounds[3], 0);\n }\n bbox.getBoundingSphere(this.boundingSphere);\n }\n }\n\n /**\n * Given a clipping rect, and the chunkedBounds from the last updateGlyphs call, choose the lowest\n * `instanceCount` that will show all glyphs within the clipped view. This is an optimization\n * for long blocks of text that are clipped, to skip vertex shader evaluation for glyphs that would\n * be clipped anyway.\n *\n * Note that since `drawElementsInstanced[ANGLE]` only accepts an instance count and not a starting\n * offset, this optimization becomes less effective as the clipRect moves closer to the end of the\n * text block. We could fix that by switching from instancing to a full geometry with a drawRange,\n * but at the expense of much larger attribute buffers (see classdoc above.)\n *\n * @param {Vector4} clipRect\n */\n applyClipRect(clipRect) {\n let count = this.getAttribute(glyphIndexAttrName).count;\n let chunks = this._chunkedBounds;\n if (chunks) {\n for (let i = chunks.length; i--;) {\n count = chunks[i].end;\n let rect = chunks[i].rect;\n // note: both rects are l-b-r-t\n if (rect[1] < clipRect.w && rect[3] > clipRect.y && rect[0] < clipRect.z && rect[2] > clipRect.x) {\n break\n }\n }\n }\n this.instanceCount = count;\n }\n}\n\n\nfunction updateBufferAttr(geom, attrName, newArray, itemSize) {\n const attr = geom.getAttribute(attrName);\n if (newArray) {\n // If length isn't changing, just update the attribute's array data\n if (attr && attr.array.length === newArray.length) {\n attr.array.set(newArray);\n attr.needsUpdate = true;\n } else {\n geom.setAttribute(attrName, new InstancedBufferAttribute(newArray, itemSize));\n // If the new attribute has a different size, we also have to (as of r117) manually clear the\n // internal cached max instance count. See https://github.com/mrdoob/three.js/issues/19706\n // It's unclear if this is a threejs bug or a truly unsupported scenario; discussion in\n // that ticket is ambiguous as to whether replacing a BufferAttribute with one of a\n // different size is supported, but https://github.com/mrdoob/three.js/pull/17418 strongly\n // implies it should be supported. It's possible we need to\n delete geom._maxInstanceCount; //for r117+, could be fragile\n geom.dispose(); //for r118+, more robust feeling, but more heavy-handed than I'd like\n }\n } else if (attr) {\n geom.deleteAttribute(attrName);\n }\n}\n\n// language=GLSL\nconst VERTEX_DEFS = `\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform vec4 uTroikaTotalBounds;\nuniform vec4 uTroikaClipRect;\nuniform mat3 uTroikaOrient;\nuniform bool uTroikaUseGlyphColors;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaBlurRadius;\nuniform vec2 uTroikaPositionOffset;\nuniform float uTroikaCurveRadius;\nattribute vec4 aTroikaGlyphBounds;\nattribute float aTroikaGlyphIndex;\nattribute vec3 aTroikaGlyphColor;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec3 vTroikaGlyphColor;\nvarying vec2 vTroikaGlyphDimensions;\n`;\n\n// language=GLSL prefix=\"void main() {\" suffix=\"}\"\nconst VERTEX_TRANSFORM = `\nvec4 bounds = aTroikaGlyphBounds;\nbounds.xz += uTroikaPositionOffset.x;\nbounds.yw -= uTroikaPositionOffset.y;\n\nvec4 outlineBounds = vec4(\n bounds.xy - uTroikaDistanceOffset - uTroikaBlurRadius,\n bounds.zw + uTroikaDistanceOffset + uTroikaBlurRadius\n);\nvec4 clippedBounds = vec4(\n clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw),\n clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw)\n);\n\nvec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy);\n\nposition.xy = mix(bounds.xy, bounds.zw, clippedXY);\n\nuv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy);\n\nfloat rad = uTroikaCurveRadius;\nif (rad != 0.0) {\n float angle = position.x / rad;\n position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad);\n normal.xz = vec2(sin(angle), cos(angle));\n}\n \nposition = uTroikaOrient * position;\nnormal = uTroikaOrient * normal;\n\nvTroikaGlyphUV = clippedXY.xy;\nvTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]);\n\n${''/* NOTE: it seems important to calculate the glyph's bounding texture UVs here in the\n vertex shader, rather than in the fragment shader, as the latter gives strange artifacts\n on some glyphs (those in the leftmost texture column) on some systems. The exact reason\n isn't understood but doing this here, then mix()-ing in the fragment shader, seems to work. */}\nfloat txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize;\nvec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize;\nvec2 txStartUV = txUvPerSquare * vec2(\n mod(floor(aTroikaGlyphIndex / 4.0), txCols),\n floor(floor(aTroikaGlyphIndex / 4.0) / txCols)\n);\nvTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare);\nvTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0);\n`;\n\n// language=GLSL\nconst FRAGMENT_DEFS = `\nuniform sampler2D uTroikaSDFTexture;\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform float uTroikaSDFExponent;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaFillOpacity;\nuniform float uTroikaOutlineOpacity;\nuniform float uTroikaBlurRadius;\nuniform vec3 uTroikaStrokeColor;\nuniform float uTroikaStrokeWidth;\nuniform float uTroikaStrokeOpacity;\nuniform bool uTroikaSDFDebug;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec2 vTroikaGlyphDimensions;\n\nfloat troikaSdfValueToSignedDistance(float alpha) {\n // Inverse of exponential encoding in webgl-sdf-generator\n ${''/* TODO - there's some slight inaccuracy here when dealing with interpolated alpha values; those\n are linearly interpolated where the encoding is exponential. Look into improving this by rounding\n to nearest 2 whole texels, decoding those exponential values, and linearly interpolating the result.\n */}\n float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y);\n float absDist = (1.0 - pow(2.0 * (alpha > 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension;\n float signedDist = absDist * (alpha > 0.5 ? -1.0 : 1.0);\n return signedDist;\n}\n\nfloat troikaGlyphUvToSdfValue(vec2 glyphUV) {\n vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV);\n vec4 rgba = texture2D(uTroikaSDFTexture, textureUV);\n float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1\n return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a;\n}\n\nfloat troikaGlyphUvToDistance(vec2 uv) {\n return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv));\n}\n\nfloat troikaGetAADist() {\n ${''/*\n When the standard derivatives extension is available, we choose an antialiasing alpha threshold based\n on the potential change in the SDF's alpha from this fragment to its neighbor. This strategy maximizes \n readability and edge crispness at all sizes and screen resolutions.\n */}\n #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300\n return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5;\n #else\n return vTroikaGlyphDimensions.x / 64.0;\n #endif\n}\n\nfloat troikaGetFragDistValue() {\n vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize);\n float distance = troikaGlyphUvToDistance(clampedGlyphUV);\n \n // Extrapolate distance when outside bounds:\n distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : \n length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n\n ${''/* \n // TODO more refined extrapolated distance by adjusting for angle of gradient at edge...\n // This has potential but currently gives very jagged extensions, maybe due to precision issues?\n float uvStep = 1.0 / uTroikaSDFGlyphSize;\n vec2 neighbor1UV = clampedGlyphUV + (\n vTroikaGlyphUV.x != clampedGlyphUV.x ? vec2(0.0, uvStep * sign(0.5 - vTroikaGlyphUV.y)) :\n vTroikaGlyphUV.y != clampedGlyphUV.y ? vec2(uvStep * sign(0.5 - vTroikaGlyphUV.x), 0.0) :\n vec2(0.0)\n );\n vec2 neighbor2UV = clampedGlyphUV + (\n vTroikaGlyphUV.x != clampedGlyphUV.x ? vec2(0.0, uvStep * -sign(0.5 - vTroikaGlyphUV.y)) :\n vTroikaGlyphUV.y != clampedGlyphUV.y ? vec2(uvStep * -sign(0.5 - vTroikaGlyphUV.x), 0.0) :\n vec2(0.0)\n );\n float neighbor1Distance = troikaGlyphUvToDistance(neighbor1UV);\n float neighbor2Distance = troikaGlyphUvToDistance(neighbor2UV);\n float distToUnclamped = length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n float distToNeighbor = length((clampedGlyphUV - neighbor1UV) * vTroikaGlyphDimensions);\n float gradientAngle1 = min(asin(abs(neighbor1Distance - distance) / distToNeighbor), PI / 2.0);\n float gradientAngle2 = min(asin(abs(neighbor2Distance - distance) / distToNeighbor), PI / 2.0);\n distance += (cos(gradientAngle1) + cos(gradientAngle2)) / 2.0 * distToUnclamped;\n */}\n\n return distance;\n}\n\nfloat troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) {\n #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL)\n float alpha = step(-distanceOffset, -distance);\n #else\n\n float alpha = smoothstep(\n distanceOffset + aaDist,\n distanceOffset - aaDist,\n distance\n );\n #endif\n\n return alpha;\n}\n`;\n\n// language=GLSL prefix=\"void main() {\" suffix=\"}\"\nconst FRAGMENT_TRANSFORM = `\nfloat aaDist = troikaGetAADist();\nfloat fragDistance = troikaGetFragDistValue();\nfloat edgeAlpha = uTroikaSDFDebug ?\n troikaGlyphUvToSdfValue(vTroikaGlyphUV) :\n troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius));\n\n#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL)\nvec4 fillRGBA = gl_FragColor;\nfillRGBA.a *= uTroikaFillOpacity;\nvec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity);\nif (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb;\ngl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep(\n -uTroikaStrokeWidth - aaDist,\n -uTroikaStrokeWidth + aaDist,\n fragDistance\n));\ngl_FragColor.a *= edgeAlpha;\n#endif\n\nif (edgeAlpha == 0.0) {\n discard;\n}\n`;\n\n\n/**\n * Create a material for rendering text, derived from a baseMaterial\n */\nfunction createTextDerivedMaterial(baseMaterial) {\n const textMaterial = createDerivedMaterial(baseMaterial, {\n chained: true,\n extensions: {\n derivatives: true\n },\n uniforms: {\n uTroikaSDFTexture: {value: null},\n uTroikaSDFTextureSize: {value: new Vector2()},\n uTroikaSDFGlyphSize: {value: 0},\n uTroikaSDFExponent: {value: 0},\n uTroikaTotalBounds: {value: new Vector4(0,0,0,0)},\n uTroikaClipRect: {value: new Vector4(0,0,0,0)},\n uTroikaDistanceOffset: {value: 0},\n uTroikaOutlineOpacity: {value: 0},\n uTroikaFillOpacity: {value: 1},\n uTroikaPositionOffset: {value: new Vector2()},\n uTroikaCurveRadius: {value: 0},\n uTroikaBlurRadius: {value: 0},\n uTroikaStrokeWidth: {value: 0},\n uTroikaStrokeColor: {value: new Color()},\n uTroikaStrokeOpacity: {value: 1},\n uTroikaOrient: {value: new Matrix3()},\n uTroikaUseGlyphColors: {value: true},\n uTroikaSDFDebug: {value: false}\n },\n vertexDefs: VERTEX_DEFS,\n vertexTransform: VERTEX_TRANSFORM,\n fragmentDefs: FRAGMENT_DEFS,\n fragmentColorTransform: FRAGMENT_TRANSFORM,\n customRewriter({vertexShader, fragmentShader}) {\n let uDiffuseRE = /\\buniform\\s+vec3\\s+diffuse\\b/;\n if (uDiffuseRE.test(fragmentShader)) {\n // Replace all instances of `diffuse` with our varying\n fragmentShader = fragmentShader\n .replace(uDiffuseRE, 'varying vec3 vTroikaGlyphColor')\n .replace(/\\bdiffuse\\b/g, 'vTroikaGlyphColor');\n // Make sure the vertex shader declares the uniform so we can grab it as a fallback\n if (!uDiffuseRE.test(vertexShader)) {\n vertexShader = vertexShader.replace(\n voidMainRegExp,\n 'uniform vec3 diffuse;\\n$&\\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\\n'\n );\n }\n }\n return { vertexShader, fragmentShader }\n }\n });\n\n // Force transparency - TODO is this reasonable?\n textMaterial.transparent = true;\n\n Object.defineProperties(textMaterial, {\n isTroikaTextMaterial: {value: true},\n\n // WebGLShadowMap reverses the side of the shadow material by default, which fails\n // for planes, so here we force the `shadowSide` to always match the main side.\n shadowSide: {\n get() {\n return this.side\n },\n set() {\n //no-op\n }\n }\n });\n\n return textMaterial\n}\n\nconst defaultMaterial = /*#__PURE__*/ new MeshBasicMaterial({\n color: 0xffffff,\n side: DoubleSide,\n transparent: true\n});\nconst defaultStrokeColor = 0x808080;\n\nconst tempMat4 = /*#__PURE__*/ new Matrix4();\nconst tempVec3a = /*#__PURE__*/ new Vector3();\nconst tempVec3b = /*#__PURE__*/ new Vector3();\nconst tempArray = [];\nconst origin = /*#__PURE__*/ new Vector3();\nconst defaultOrient = '+x+y';\n\nfunction first(o) {\n return Array.isArray(o) ? o[0] : o\n}\n\nlet getFlatRaycastMesh = () => {\n const mesh = new Mesh(\n new PlaneGeometry(1, 1),\n defaultMaterial\n );\n getFlatRaycastMesh = () => mesh;\n return mesh\n};\nlet getCurvedRaycastMesh = () => {\n const mesh = new Mesh(\n new PlaneGeometry(1, 1, 32, 1),\n defaultMaterial\n );\n getCurvedRaycastMesh = () => mesh;\n return mesh\n};\n\nconst syncStartEvent = { type: 'syncstart' };\nconst syncCompleteEvent = { type: 'synccomplete' };\n\nconst SYNCABLE_PROPS = [\n 'font',\n 'fontSize',\n 'fontStyle',\n 'fontWeight',\n 'lang',\n 'letterSpacing',\n 'lineHeight',\n 'maxWidth',\n 'overflowWrap',\n 'text',\n 'direction',\n 'textAlign',\n 'textIndent',\n 'whiteSpace',\n 'anchorX',\n 'anchorY',\n 'colorRanges',\n 'sdfGlyphSize'\n];\n\nconst COPYABLE_PROPS = SYNCABLE_PROPS.concat(\n 'material',\n 'color',\n 'depthOffset',\n 'clipRect',\n 'curveRadius',\n 'orientation',\n 'glyphGeometryDetail'\n);\n\n/**\n * @class Text\n *\n * A ThreeJS Mesh that renders a string of text on a plane in 3D space using signed distance\n * fields (SDF).\n */\nclass Text extends Mesh {\n constructor() {\n const geometry = new GlyphsGeometry();\n super(geometry, null);\n\n // === Text layout properties: === //\n\n /**\n * @member {string} text\n * The string of text to be rendered.\n */\n this.text = '';\n\n /**\n * @member {number|string} anchorX\n * Defines the horizontal position in the text block that should line up with the local origin.\n * Can be specified as a numeric x position in local units, a string percentage of the total\n * text block width e.g. `'25%'`, or one of the following keyword strings: 'left', 'center',\n * or 'right'.\n */\n this.anchorX = 0;\n\n /**\n * @member {number|string} anchorY\n * Defines the vertical position in the text block that should line up with the local origin.\n * Can be specified as a numeric y position in local units (note: down is negative y), a string\n * percentage of the total text block height e.g. `'25%'`, or one of the following keyword strings:\n * 'top', 'top-baseline', 'top-cap', 'top-ex', 'middle', 'bottom-baseline', or 'bottom'.\n */\n this.anchorY = 0;\n\n /**\n * @member {number} curveRadius\n * Defines a cylindrical radius along which the text's plane will be curved. Positive numbers put\n * the cylinder's centerline (oriented vertically) that distance in front of the text, for a concave\n * curvature, while negative numbers put it behind the text for a convex curvature. The centerline\n * will be aligned with the text's local origin; you can use `anchorX` to offset it.\n *\n * Since each glyph is by default rendered with a simple quad, each glyph remains a flat plane\n * internally. You can use `glyphGeometryDetail` to add more vertices for curvature inside glyphs.\n */\n this.curveRadius = 0;\n\n /**\n * @member {string} direction\n * Sets the base direction for the text. The default value of \"auto\" will choose a direction based\n * on the text's content according to the bidi spec. A value of \"ltr\" or \"rtl\" will force the direction.\n */\n this.direction = 'auto';\n\n /**\n * @member {string|null} font\n * URL of a custom font to be used. Font files can be in .ttf, .otf, or .woff (not .woff2) formats.\n * Defaults to Noto Sans.\n */\n this.font = null; //will use default from TextBuilder\n\n this.unicodeFontsURL = null; //defaults to CDN\n\n /**\n * @member {number} fontSize\n * The size at which to render the font in local units; corresponds to the em-box height\n * of the chosen `font`.\n */\n this.fontSize = 0.1;\n\n /**\n * @member {number|'normal'|'bold'}\n * The weight of the font. Currently only used for fallback Noto fonts.\n */\n this.fontWeight = 'normal';\n\n /**\n * @member {'normal'|'italic'}\n * The style of the font. Currently only used for fallback Noto fonts.\n */\n this.fontStyle = 'normal';\n\n /**\n * @member {string|null} lang\n * The language code of this text; can be used for explicitly selecting certain CJK fonts.\n */\n this.lang = null;\n\n /**\n * @member {number} letterSpacing\n * Sets a uniform adjustment to spacing between letters after kerning is applied. Positive\n * numbers increase spacing and negative numbers decrease it.\n */\n this.letterSpacing = 0;\n\n /**\n * @member {number|string} lineHeight\n * Sets the height of each line of text, as a multiple of the `fontSize`. Defaults to 'normal'\n * which chooses a reasonable height based on the chosen font's ascender/descender metrics.\n */\n this.lineHeight = 'normal';\n\n /**\n * @member {number} maxWidth\n * The maximum width of the text block, above which text may start wrapping according to the\n * `whiteSpace` and `overflowWrap` properties.\n */\n this.maxWidth = Infinity;\n\n /**\n * @member {string} overflowWrap\n * Defines how text wraps if the `whiteSpace` property is `normal`. Can be either `'normal'`\n * to break at whitespace characters, or `'break-word'` to allow breaking within words.\n * Defaults to `'normal'`.\n */\n this.overflowWrap = 'normal';\n\n /**\n * @member {string} textAlign\n * The horizontal alignment of each line of text within the overall text bounding box.\n */\n this.textAlign = 'left';\n\n /**\n * @member {number} textIndent\n * Indentation for the first character of a line; see CSS `text-indent`.\n */\n this.textIndent = 0;\n\n /**\n * @member {string} whiteSpace\n * Defines whether text should wrap when a line reaches the `maxWidth`. Can\n * be either `'normal'` (the default), to allow wrapping according to the `overflowWrap` property,\n * or `'nowrap'` to prevent wrapping. Note that `'normal'` here honors newline characters to\n * manually break lines, making it behave more like `'pre-wrap'` does in CSS.\n */\n this.whiteSpace = 'normal';\n\n\n // === Presentation properties: === //\n\n /**\n * @member {THREE.Material} material\n * Defines a _base_ material to be used when rendering the text. This material will be\n * automatically replaced with a material derived from it, that adds shader code to\n * decrease the alpha for each fragment (pixel) outside the text glyphs, with antialiasing.\n * By default it will derive from a simple white MeshBasicMaterial, but you can use any\n * of the other mesh materials to gain other features like lighting, texture maps, etc.\n *\n * Also see the `color` shortcut property.\n */\n this.material = null;\n\n /**\n * @member {string|number|THREE.Color} color\n * This is a shortcut for setting the `color` of the text's material. You can use this\n * if you don't want to specify a whole custom `material`. Also, if you do use a custom\n * `material`, this color will only be used for this particuar Text instance, even if\n * that same material instance is shared across multiple Text objects.\n */\n this.color = null;\n\n /**\n * @member {object|null} colorRanges\n * WARNING: This API is experimental and may change.\n * This allows more fine-grained control of colors for individual or ranges of characters,\n * taking precedence over the material's `color`. Its format is an Object whose keys each\n * define a starting character index for a range, and whose values are the color for each\n * range. The color value can be a numeric hex color value, a `THREE.Color` object, or\n * any of the strings accepted by `THREE.Color`.\n */\n this.colorRanges = null;\n\n /**\n * @member {number|string} outlineWidth\n * WARNING: This API is experimental and may change.\n * The width of an outline/halo to be drawn around each text glyph using the `outlineColor` and `outlineOpacity`.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g.\n * `\"12%\"` which is treated as a percentage of the `fontSize`. Defaults to `0`, which means\n * no outline will be drawn unless an `outlineOffsetX/Y` or `outlineBlur` is set.\n */\n this.outlineWidth = 0;\n\n /**\n * @member {string|number|THREE.Color} outlineColor\n * WARNING: This API is experimental and may change.\n * The color of the text outline, if `outlineWidth`/`outlineBlur`/`outlineOffsetX/Y` are set.\n * Defaults to black.\n */\n this.outlineColor = 0x000000;\n\n /**\n * @member {number} outlineOpacity\n * WARNING: This API is experimental and may change.\n * The opacity of the outline, if `outlineWidth`/`outlineBlur`/`outlineOffsetX/Y` are set.\n * Defaults to `1`.\n */\n this.outlineOpacity = 1;\n\n /**\n * @member {number|string} outlineBlur\n * WARNING: This API is experimental and may change.\n * A blur radius applied to the outer edge of the text's outline. If the `outlineWidth` is\n * zero, the blur will be applied at the glyph edge, like CSS's `text-shadow` blur radius.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g.\n * `\"12%\"` which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */\n this.outlineBlur = 0;\n\n /**\n * @member {number|string} outlineOffsetX\n * WARNING: This API is experimental and may change.\n * A horizontal offset for the text outline.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g. `\"12%\"`\n * which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */\n this.outlineOffsetX = 0;\n\n /**\n * @member {number|string} outlineOffsetY\n * WARNING: This API is experimental and may change.\n * A vertical offset for the text outline.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g. `\"12%\"`\n * which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */\n this.outlineOffsetY = 0;\n\n /**\n * @member {number|string} strokeWidth\n * WARNING: This API is experimental and may change.\n * The width of an inner stroke drawn inside each text glyph using the `strokeColor` and `strokeOpacity`.\n * Can be specified as either an absolute number in local units, or as a percentage string e.g. `\"12%\"`\n * which is treated as a percentage of the `fontSize`. Defaults to `0`.\n */\n this.strokeWidth = 0;\n\n /**\n * @member {string|number|THREE.Color} strokeColor\n * WARNING: This API is experimental and may change.\n * The color of the text stroke, if `strokeWidth` is greater than zero. Defaults to gray.\n */\n this.strokeColor = defaultStrokeColor;\n\n /**\n * @member {number} strokeOpacity\n * WARNING: This API is experimental and may change.\n * The opacity of the stroke, if `strokeWidth` is greater than zero. Defaults to `1`.\n */\n this.strokeOpacity = 1;\n\n /**\n * @member {number} fillOpacity\n * WARNING: This API is experimental and may change.\n * The opacity of the glyph's fill from 0 to 1. This behaves like the material's `opacity` but allows\n * giving the fill a different opacity than the `strokeOpacity`. A fillOpacity of `0` makes the\n * interior of the glyph invisible, leaving just the `strokeWidth`. Defaults to `1`.\n */\n this.fillOpacity = 1;\n\n /**\n * @member {number} depthOffset\n * This is a shortcut for setting the material's `polygonOffset` and related properties,\n * which can be useful in preventing z-fighting when this text is laid on top of another\n * plane in the scene. Positive numbers are further from the camera, negatives closer.\n */\n this.depthOffset = 0;\n\n /**\n * @member {Array} clipRect\n * If specified, defines a `[minX, minY, maxX, maxY]` of a rectangle outside of which all\n * pixels will be discarded. This can be used for example to clip overflowing text when\n * `whiteSpace='nowrap'`.\n */\n this.clipRect = null;\n\n /**\n * @member {string} orientation\n * Defines the axis plane on which the text should be laid out when the mesh has no extra\n * rotation transform. It is specified as a string with two axes: the horizontal axis with\n * positive pointing right, and the vertical axis with positive pointing up. By default this\n * is '+x+y', meaning the text sits on the xy plane with the text's top toward positive y\n * and facing positive z. A value of '+x-z' would place it on the xz plane with the text's\n * top toward negative z and facing positive y.\n */\n this.orientation = defaultOrient;\n\n /**\n * @member {number} glyphGeometryDetail\n * Controls number of vertical/horizontal segments that make up each glyph's rectangular\n * plane. Defaults to 1. This can be increased to provide more geometrical detail for custom\n * vertex shader effects, for example.\n */\n this.glyphGeometryDetail = 1;\n\n /**\n * @member {number|null} sdfGlyphSize\n * The size of each glyph's SDF (signed distance field) used for rendering. This must be a\n * power-of-two number. Defaults to 64 which is generally a good balance of size and quality\n * for most fonts. Larger sizes can improve the quality of glyph rendering by increasing\n * the sharpness of corners and preventing loss of very thin lines, at the expense of\n * increased memory footprint and longer SDF generation time.\n */\n this.sdfGlyphSize = null;\n\n /**\n * @member {boolean} gpuAccelerateSDF\n * When `true`, the SDF generation process will be GPU-accelerated with WebGL when possible,\n * making it much faster especially for complex glyphs, and falling back to a JavaScript version\n * executed in web workers when support isn't available. It should automatically detect support,\n * but it's still somewhat experimental, so you can set it to `false` to force it to use the JS\n * version if you encounter issues with it.\n */\n this.gpuAccelerateSDF = true;\n\n this.debugSDF = false;\n }\n\n /**\n * Updates the text rendering according to the current text-related configuration properties.\n * This is an async process, so you can pass in a callback function to be executed when it\n * finishes.\n * @param {function} [callback]\n */\n sync(callback) {\n if (this._needsSync) {\n this._needsSync = false;\n\n // If there's another sync still in progress, queue\n if (this._isSyncing) {\n (this._queuedSyncs || (this._queuedSyncs = [])).push(callback);\n } else {\n this._isSyncing = true;\n this.dispatchEvent(syncStartEvent);\n\n getTextRenderInfo({\n text: this.text,\n font: this.font,\n lang: this.lang,\n fontSize: this.fontSize || 0.1,\n fontWeight: this.fontWeight || 'normal',\n fontStyle: this.fontStyle || 'normal',\n letterSpacing: this.letterSpacing || 0,\n lineHeight: this.lineHeight || 'normal',\n maxWidth: this.maxWidth,\n direction: this.direction || 'auto',\n textAlign: this.textAlign,\n textIndent: this.textIndent,\n whiteSpace: this.whiteSpace,\n overflowWrap: this.overflowWrap,\n anchorX: this.anchorX,\n anchorY: this.anchorY,\n colorRanges: this.colorRanges,\n includeCaretPositions: true, //TODO parameterize\n sdfGlyphSize: this.sdfGlyphSize,\n gpuAccelerateSDF: this.gpuAccelerateSDF,\n unicodeFontsURL: this.unicodeFontsURL,\n }, textRenderInfo => {\n this._isSyncing = false;\n\n // Save result for later use in onBeforeRender\n this._textRenderInfo = textRenderInfo;\n\n // Update the geometry attributes\n this.geometry.updateGlyphs(\n textRenderInfo.glyphBounds,\n textRenderInfo.glyphAtlasIndices,\n textRenderInfo.blockBounds,\n textRenderInfo.chunkedBounds,\n textRenderInfo.glyphColors\n );\n\n // If we had extra sync requests queued up, kick it off\n const queued = this._queuedSyncs;\n if (queued) {\n this._queuedSyncs = null;\n this._needsSync = true;\n this.sync(() => {\n queued.forEach(fn => fn && fn());\n });\n }\n\n this.dispatchEvent(syncCompleteEvent);\n if (callback) {\n callback();\n }\n });\n }\n }\n }\n\n /**\n * Initiate a sync if needed - note it won't complete until next frame at the\n * earliest so if possible it's a good idea to call sync() manually as soon as\n * all the properties have been set.\n * @override\n */\n onBeforeRender(renderer, scene, camera, geometry, material, group) {\n this.sync();\n\n // This may not always be a text material, e.g. if there's a scene.overrideMaterial present\n if (material.isTroikaTextMaterial) {\n this._prepareForRender(material);\n }\n\n // We need to force the material to FrontSide to avoid the double-draw-call performance hit\n // introduced in Three.js r130: https://github.com/mrdoob/three.js/pull/21967 - The sidedness\n // is instead applied via drawRange in the GlyphsGeometry.\n material._hadOwnSide = material.hasOwnProperty('side');\n this.geometry.setSide(material._actualSide = material.side);\n material.side = FrontSide;\n }\n\n onAfterRender(renderer, scene, camera, geometry, material, group) {\n // Restore original material side\n if (material._hadOwnSide) {\n material.side = material._actualSide;\n } else {\n delete material.side; // back to inheriting from base material\n }\n }\n\n /**\n * Shortcut to dispose the geometry specific to this instance.\n * Note: we don't also dispose the derived material here because if anything else is\n * sharing the same base material it will result in a pause next frame as the program\n * is recompiled. Instead users can dispose the base material manually, like normal,\n * and we'll also dispose the derived material at that time.\n */\n dispose() {\n this.geometry.dispose();\n }\n\n /**\n * @property {TroikaTextRenderInfo|null} textRenderInfo\n * @readonly\n * The current processed rendering data for this TextMesh, returned by the TextBuilder after\n * a `sync()` call. This will be `null` initially, and may be stale for a short period until\n * the asynchrous `sync()` process completes.\n */\n get textRenderInfo() {\n return this._textRenderInfo || null\n }\n\n // Handler for automatically wrapping the base material with our upgrades. We do the wrapping\n // lazily on _read_ rather than write to avoid unnecessary wrapping on transient values.\n get material() {\n let derivedMaterial = this._derivedMaterial;\n const baseMaterial = this._baseMaterial || this._defaultMaterial || (this._defaultMaterial = defaultMaterial.clone());\n if (!derivedMaterial || derivedMaterial.baseMaterial !== baseMaterial) {\n derivedMaterial = this._derivedMaterial = createTextDerivedMaterial(baseMaterial);\n // dispose the derived material when its base material is disposed:\n baseMaterial.addEventListener('dispose', function onDispose() {\n baseMaterial.removeEventListener('dispose', onDispose);\n derivedMaterial.dispose();\n });\n }\n // If text outline is configured, render it as a preliminary draw using Three's multi-material\n // feature (see GlyphsGeometry which sets up `groups` for this purpose) Doing it with multi\n // materials ensures the layers are always rendered consecutively in a consistent order.\n // Each layer will trigger onBeforeRender with the appropriate material.\n if (this.outlineWidth || this.outlineBlur || this.outlineOffsetX || this.outlineOffsetY) {\n let outlineMaterial = derivedMaterial._outlineMtl;\n if (!outlineMaterial) {\n outlineMaterial = derivedMaterial._outlineMtl = Object.create(derivedMaterial, {\n id: {value: derivedMaterial.id + 0.1}\n });\n outlineMaterial.isTextOutlineMaterial = true;\n outlineMaterial.depthWrite = false;\n outlineMaterial.map = null; //???\n derivedMaterial.addEventListener('dispose', function onDispose() {\n derivedMaterial.removeEventListener('dispose', onDispose);\n outlineMaterial.dispose();\n });\n }\n return [\n outlineMaterial,\n derivedMaterial\n ]\n } else {\n return derivedMaterial\n }\n }\n set material(baseMaterial) {\n if (baseMaterial && baseMaterial.isTroikaTextMaterial) { //prevent double-derivation\n this._derivedMaterial = baseMaterial;\n this._baseMaterial = baseMaterial.baseMaterial;\n } else {\n this._baseMaterial = baseMaterial;\n }\n }\n\n get glyphGeometryDetail() {\n return this.geometry.detail\n }\n set glyphGeometryDetail(detail) {\n this.geometry.detail = detail;\n }\n\n get curveRadius() {\n return this.geometry.curveRadius\n }\n set curveRadius(r) {\n this.geometry.curveRadius = r;\n }\n\n // Create and update material for shadows upon request:\n get customDepthMaterial() {\n return first(this.material).getDepthMaterial()\n }\n get customDistanceMaterial() {\n return first(this.material).getDistanceMaterial()\n }\n\n _prepareForRender(material) {\n const isOutline = material.isTextOutlineMaterial;\n const uniforms = material.uniforms;\n const textInfo = this.textRenderInfo;\n if (textInfo) {\n const {sdfTexture, blockBounds} = textInfo;\n uniforms.uTroikaSDFTexture.value = sdfTexture;\n uniforms.uTroikaSDFTextureSize.value.set(sdfTexture.image.width, sdfTexture.image.height);\n uniforms.uTroikaSDFGlyphSize.value = textInfo.sdfGlyphSize;\n uniforms.uTroikaSDFExponent.value = textInfo.sdfExponent;\n uniforms.uTroikaTotalBounds.value.fromArray(blockBounds);\n uniforms.uTroikaUseGlyphColors.value = !isOutline && !!textInfo.glyphColors;\n\n let distanceOffset = 0;\n let blurRadius = 0;\n let strokeWidth = 0;\n let fillOpacity;\n let strokeOpacity;\n let strokeColor;\n let offsetX = 0;\n let offsetY = 0;\n\n if (isOutline) {\n let {outlineWidth, outlineOffsetX, outlineOffsetY, outlineBlur, outlineOpacity} = this;\n distanceOffset = this._parsePercent(outlineWidth) || 0;\n blurRadius = Math.max(0, this._parsePercent(outlineBlur) || 0);\n fillOpacity = outlineOpacity;\n offsetX = this._parsePercent(outlineOffsetX) || 0;\n offsetY = this._parsePercent(outlineOffsetY) || 0;\n } else {\n strokeWidth = Math.max(0, this._parsePercent(this.strokeWidth) || 0);\n if (strokeWidth) {\n strokeColor = this.strokeColor;\n uniforms.uTroikaStrokeColor.value.set(strokeColor == null ? defaultStrokeColor : strokeColor);\n strokeOpacity = this.strokeOpacity;\n if (strokeOpacity == null) strokeOpacity = 1;\n }\n fillOpacity = this.fillOpacity;\n }\n\n uniforms.uTroikaDistanceOffset.value = distanceOffset;\n uniforms.uTroikaPositionOffset.value.set(offsetX, offsetY);\n uniforms.uTroikaBlurRadius.value = blurRadius;\n uniforms.uTroikaStrokeWidth.value = strokeWidth;\n uniforms.uTroikaStrokeOpacity.value = strokeOpacity;\n uniforms.uTroikaFillOpacity.value = fillOpacity == null ? 1 : fillOpacity;\n uniforms.uTroikaCurveRadius.value = this.curveRadius || 0;\n\n let clipRect = this.clipRect;\n if (clipRect && Array.isArray(clipRect) && clipRect.length === 4) {\n uniforms.uTroikaClipRect.value.fromArray(clipRect);\n } else {\n // no clipping - choose a finite rect that shouldn't ever be reached by overflowing glyphs or outlines\n const pad = (this.fontSize || 0.1) * 100;\n uniforms.uTroikaClipRect.value.set(\n blockBounds[0] - pad,\n blockBounds[1] - pad,\n blockBounds[2] + pad,\n blockBounds[3] + pad\n );\n }\n this.geometry.applyClipRect(uniforms.uTroikaClipRect.value);\n }\n uniforms.uTroikaSDFDebug.value = !!this.debugSDF;\n material.polygonOffset = !!this.depthOffset;\n material.polygonOffsetFactor = material.polygonOffsetUnits = this.depthOffset || 0;\n\n // Shortcut for setting material color via `color` prop on the mesh; this is\n // applied only to the derived material to avoid mutating a shared base material.\n const color = isOutline ? (this.outlineColor || 0) : this.color;\n\n if (color == null) {\n delete material.color; //inherit from base\n } else {\n const colorObj = material.hasOwnProperty('color') ? material.color : (material.color = new Color());\n if (color !== colorObj._input || typeof color === 'object') {\n colorObj.set(colorObj._input = color);\n }\n }\n\n // base orientation\n let orient = this.orientation || defaultOrient;\n if (orient !== material._orientation) {\n let rotMat = uniforms.uTroikaOrient.value;\n orient = orient.replace(/[^-+xyz]/g, '');\n let match = orient !== defaultOrient && orient.match(/^([-+])([xyz])([-+])([xyz])$/);\n if (match) {\n let [, hSign, hAxis, vSign, vAxis] = match;\n tempVec3a.set(0, 0, 0)[hAxis] = hSign === '-' ? 1 : -1;\n tempVec3b.set(0, 0, 0)[vAxis] = vSign === '-' ? -1 : 1;\n tempMat4.lookAt(origin, tempVec3a.cross(tempVec3b), tempVec3b);\n rotMat.setFromMatrix4(tempMat4);\n } else {\n rotMat.identity();\n }\n material._orientation = orient;\n }\n }\n\n _parsePercent(value) {\n if (typeof value === 'string') {\n let match = value.match(/^(-?[\\d.]+)%$/);\n let pct = match ? parseFloat(match[1]) : NaN;\n value = (isNaN(pct) ? 0 : pct / 100) * this.fontSize;\n }\n return value\n }\n\n /**\n * Translate a point in local space to an x/y in the text plane.\n */\n localPositionToTextCoords(position, target = new Vector2()) {\n target.copy(position); //simple non-curved case is 1:1\n const r = this.curveRadius;\n if (r) { //flatten the curve\n target.x = Math.atan2(position.x, Math.abs(r) - Math.abs(position.z)) * Math.abs(r);\n }\n return target\n }\n\n /**\n * Translate a point in world space to an x/y in the text plane.\n */\n worldPositionToTextCoords(position, target = new Vector2()) {\n tempVec3a.copy(position);\n return this.localPositionToTextCoords(this.worldToLocal(tempVec3a), target)\n }\n\n /**\n * @override Custom raycasting to test against the whole text block's max rectangular bounds\n * TODO is there any reason to make this more granular, like within individual line or glyph rects?\n */\n raycast(raycaster, intersects) {\n const {textRenderInfo, curveRadius} = this;\n if (textRenderInfo) {\n const bounds = textRenderInfo.blockBounds;\n const raycastMesh = curveRadius ? getCurvedRaycastMesh() : getFlatRaycastMesh();\n const geom = raycastMesh.geometry;\n const {position, uv} = geom.attributes;\n for (let i = 0; i < uv.count; i++) {\n let x = bounds[0] + (uv.getX(i) * (bounds[2] - bounds[0]));\n const y = bounds[1] + (uv.getY(i) * (bounds[3] - bounds[1]));\n let z = 0;\n if (curveRadius) {\n z = curveRadius - Math.cos(x / curveRadius) * curveRadius;\n x = Math.sin(x / curveRadius) * curveRadius;\n }\n position.setXYZ(i, x, y, z);\n }\n geom.boundingSphere = this.geometry.boundingSphere;\n geom.boundingBox = this.geometry.boundingBox;\n raycastMesh.matrixWorld = this.matrixWorld;\n raycastMesh.material.side = this.material.side;\n tempArray.length = 0;\n raycastMesh.raycast(raycaster, tempArray);\n for (let i = 0; i < tempArray.length; i++) {\n tempArray[i].object = this;\n intersects.push(tempArray[i]);\n }\n }\n }\n\n copy(source) {\n // Prevent copying the geometry reference so we don't end up sharing attributes between instances\n const geom = this.geometry;\n super.copy(source);\n this.geometry = geom;\n\n COPYABLE_PROPS.forEach(prop => {\n this[prop] = source[prop];\n });\n return this\n }\n\n clone() {\n return new this.constructor().copy(this)\n }\n}\n\n\n// Create setters for properties that affect text layout:\nSYNCABLE_PROPS.forEach(prop => {\n const privateKey = '_private_' + prop;\n Object.defineProperty(Text.prototype, prop, {\n get() {\n return this[privateKey]\n },\n set(value) {\n if (value !== this[privateKey]) {\n this[privateKey] = value;\n this._needsSync = true;\n }\n }\n });\n});\n\n//=== Utility functions for dealing with carets and selection ranges ===//\n\n/**\n * @typedef {object} TextCaret\n * @property {number} x - x position of the caret\n * @property {number} y - y position of the caret's bottom\n * @property {number} height - height of the caret\n * @property {number} charIndex - the index in the original input string of this caret's target\n * character; the caret will be for the position _before_ that character.\n */\n\n/**\n * Given a local x/y coordinate in the text block plane, find the nearest caret position.\n * @param {TroikaTextRenderInfo} textRenderInfo - a result object from TextBuilder#getTextRenderInfo\n * @param {number} x\n * @param {number} y\n * @return {TextCaret | null}\n */\nfunction getCaretAtPoint(textRenderInfo, x, y) {\n let closestCaret = null;\n const rows = groupCaretsByRow(textRenderInfo);\n\n // Find nearest row by y first\n let closestRow = null;\n rows.forEach(row => {\n if (!closestRow || Math.abs(y - (row.top + row.bottom) / 2) < Math.abs(y - (closestRow.top + closestRow.bottom) / 2)) {\n closestRow = row;\n }\n });\n\n // Then find closest caret by x within that row\n closestRow.carets.forEach(caret => {\n if (!closestCaret || Math.abs(x - caret.x) < Math.abs(x - closestCaret.x)) {\n closestCaret = caret;\n }\n });\n return closestCaret\n}\n\n\nconst _rectsCache = new WeakMap();\n\n/**\n * Given start and end character indexes, return a list of rectangles covering all the\n * characters within that selection.\n * @param {TroikaTextRenderInfo} textRenderInfo\n * @param {number} start - index of the first char in the selection\n * @param {number} end - index of the first char after the selection\n * @return {Array<{left, top, right, bottom}> | null}\n */\nfunction getSelectionRects(textRenderInfo, start, end) {\n let rects;\n if (textRenderInfo) {\n // Check cache - textRenderInfo is frozen so it's safe to cache based on it\n let prevResult = _rectsCache.get(textRenderInfo);\n if (prevResult && prevResult.start === start && prevResult.end === end) {\n return prevResult.rects\n }\n\n const {caretPositions} = textRenderInfo;\n\n // Normalize\n if (end < start) {\n const s = start;\n start = end;\n end = s;\n }\n start = Math.max(start, 0);\n end = Math.min(end, caretPositions.length + 1);\n\n // Build list of rects, expanding the current rect for all characters in a run and starting\n // a new rect whenever reaching a new line or a new bidi direction\n rects = [];\n let currentRect = null;\n for (let i = start; i < end; i++) {\n const x1 = caretPositions[i * 4];\n const x2 = caretPositions[i * 4 + 1];\n const left = Math.min(x1, x2);\n const right = Math.max(x1, x2);\n const bottom = caretPositions[i * 4 + 2];\n const top = caretPositions[i * 4 + 3];\n if (!currentRect || bottom !== currentRect.bottom || top !== currentRect.top || left > currentRect.right || right < currentRect.left) {\n currentRect = {\n left: Infinity,\n right: -Infinity,\n bottom,\n top,\n };\n rects.push(currentRect);\n }\n currentRect.left = Math.min(left, currentRect.left);\n currentRect.right = Math.max(right, currentRect.right);\n }\n\n // Merge any overlapping rects, e.g. those formed by adjacent bidi runs\n rects.sort((a, b) => b.bottom - a.bottom || a.left - b.left);\n for (let i = rects.length - 1; i-- > 0;) {\n const rectA = rects[i];\n const rectB = rects[i + 1];\n if (rectA.bottom === rectB.bottom && rectA.top === rectB.top && rectA.left <= rectB.right && rectA.right >= rectB.left) {\n rectB.left = Math.min(rectB.left, rectA.left);\n rectB.right = Math.max(rectB.right, rectA.right);\n rects.splice(i, 1);\n }\n }\n\n _rectsCache.set(textRenderInfo, {start, end, rects});\n }\n return rects\n}\n\nconst _caretsByRowCache = new WeakMap();\n\n/**\n * Group a set of carets by row of text, caching the result. A single row of text may contain carets of\n * differing positions/heights if it has multiple fonts, and they may overlap slightly across rows, so this\n * uses an assumption of \"at least overlapping by half\" to put them in the same row.\n * @return Array<{bottom: number, top: number, carets: TextCaret[]}>\n */\nfunction groupCaretsByRow(textRenderInfo) {\n // textRenderInfo is frozen so it's safe to cache based on it\n let rows = _caretsByRowCache.get(textRenderInfo);\n if (!rows) {\n rows = [];\n const {caretPositions} = textRenderInfo;\n let curRow;\n\n const visitCaret = (x, bottom, top, charIndex) => {\n // new row if not overlapping by at least half\n if (!curRow || (top < (curRow.top + curRow.bottom) / 2)) {\n rows.push(curRow = {bottom, top, carets: []});\n }\n // expand vertical limits if necessary\n if (top > curRow.top) curRow.top = top;\n if (bottom < curRow.bottom) curRow.bottom = bottom;\n curRow.carets.push({\n x,\n y: bottom,\n height: top - bottom,\n charIndex,\n });\n };\n\n let i = 0;\n for (; i < caretPositions.length; i += 4) {\n visitCaret(caretPositions[i], caretPositions[i + 2], caretPositions[i + 3], i / 4);\n }\n // Add one more caret after the final char\n visitCaret(caretPositions[i - 3], caretPositions[i - 2], caretPositions[i - 1], i / 4);\n }\n _caretsByRowCache.set(textRenderInfo, rows);\n return rows\n}\n\nexport { GlyphsGeometry, Text, configureTextBuilder, createTextDerivedMaterial, dumpSDFTextures, fontResolverWorkerModule, getCaretAtPoint, getSelectionRects, getTextRenderInfo, preloadFont, typesetterWorkerModule };\n","/**\n * Main content for the worker that handles the loading and execution of\n * modules within it.\n */\nfunction workerBootstrap() {\n var modules = Object.create(null);\n\n // Handle messages for registering a module\n function registerModule(ref, callback) {\n var id = ref.id;\n var name = ref.name;\n var dependencies = ref.dependencies; if ( dependencies === void 0 ) dependencies = [];\n var init = ref.init; if ( init === void 0 ) init = function(){};\n var getTransferables = ref.getTransferables; if ( getTransferables === void 0 ) getTransferables = null;\n\n // Only register once\n if (modules[id]) { return }\n\n try {\n // If any dependencies are modules, ensure they're registered and grab their value\n dependencies = dependencies.map(function (dep) {\n if (dep && dep.isWorkerModule) {\n registerModule(dep, function (depResult) {\n if (depResult instanceof Error) { throw depResult }\n });\n dep = modules[dep.id].value;\n }\n return dep\n });\n\n // Rehydrate functions\n init = rehydrate((\"<\" + name + \">.init\"), init);\n if (getTransferables) {\n getTransferables = rehydrate((\"<\" + name + \">.getTransferables\"), getTransferables);\n }\n\n // Initialize the module and store its value\n var value = null;\n if (typeof init === 'function') {\n value = init.apply(void 0, dependencies);\n } else {\n console.error('worker module init function failed to rehydrate');\n }\n modules[id] = {\n id: id,\n value: value,\n getTransferables: getTransferables\n };\n callback(value);\n } catch(err) {\n if (!(err && err.noLog)) {\n console.error(err);\n }\n callback(err);\n }\n }\n\n // Handle messages for calling a registered module's result function\n function callModule(ref, callback) {\n var ref$1;\n\n var id = ref.id;\n var args = ref.args;\n if (!modules[id] || typeof modules[id].value !== 'function') {\n callback(new Error((\"Worker module \" + id + \": not found or its 'init' did not return a function\")));\n }\n try {\n var result = (ref$1 = modules[id]).value.apply(ref$1, args);\n if (result && typeof result.then === 'function') {\n result.then(handleResult, function (rej) { return callback(rej instanceof Error ? rej : new Error('' + rej)); });\n } else {\n handleResult(result);\n }\n } catch(err) {\n callback(err);\n }\n function handleResult(result) {\n try {\n var tx = modules[id].getTransferables && modules[id].getTransferables(result);\n if (!tx || !Array.isArray(tx) || !tx.length) {\n tx = undefined; //postMessage is very picky about not passing null or empty transferables\n }\n callback(result, tx);\n } catch(err) {\n console.error(err);\n callback(err);\n }\n }\n }\n\n function rehydrate(name, str) {\n var result = void 0;\n self.troikaDefine = function (r) { return result = r; };\n var url = URL.createObjectURL(\n new Blob(\n [(\"/** \" + (name.replace(/\\*/g, '')) + \" **/\\n\\ntroikaDefine(\\n\" + str + \"\\n)\")],\n {type: 'application/javascript'}\n )\n );\n try {\n importScripts(url);\n } catch(err) {\n console.error(err);\n }\n URL.revokeObjectURL(url);\n delete self.troikaDefine;\n return result\n }\n\n // Handler for all messages within the worker\n self.addEventListener('message', function (e) {\n var ref = e.data;\n var messageId = ref.messageId;\n var action = ref.action;\n var data = ref.data;\n try {\n // Module registration\n if (action === 'registerModule') {\n registerModule(data, function (result) {\n if (result instanceof Error) {\n postMessage({\n messageId: messageId,\n success: false,\n error: result.message\n });\n } else {\n postMessage({\n messageId: messageId,\n success: true,\n result: {isCallable: typeof result === 'function'}\n });\n }\n });\n }\n // Invocation\n if (action === 'callModule') {\n callModule(data, function (result, transferables) {\n if (result instanceof Error) {\n postMessage({\n messageId: messageId,\n success: false,\n error: result.message\n });\n } else {\n postMessage({\n messageId: messageId,\n success: true,\n result: result\n }, transferables || undefined);\n }\n });\n }\n } catch(err) {\n postMessage({\n messageId: messageId,\n success: false,\n error: err.stack\n });\n }\n });\n}\n\n/**\n * Fallback for `defineWorkerModule` that behaves identically but runs in the main\n * thread, for when the execution environment doesn't support web workers or they\n * are disallowed due to e.g. CSP security restrictions.\n */\nfunction defineMainThreadModule(options) {\n var moduleFunc = function() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return moduleFunc._getInitResult().then(function (initResult) {\n if (typeof initResult === 'function') {\n return initResult.apply(void 0, args)\n } else {\n throw new Error('Worker module function was called but `init` did not return a callable function')\n }\n })\n };\n moduleFunc._getInitResult = function() {\n // We can ignore getTransferables in main thread. TODO workerId?\n var dependencies = options.dependencies;\n var init = options.init;\n\n // Resolve dependencies\n dependencies = Array.isArray(dependencies) ? dependencies.map(function (dep) { return dep && dep._getInitResult ? dep._getInitResult() : dep; }\n ) : [];\n\n // Invoke init with the resolved dependencies\n var initPromise = Promise.all(dependencies).then(function (deps) {\n return init.apply(null, deps)\n });\n\n // Cache the resolved promise for subsequent calls\n moduleFunc._getInitResult = function () { return initPromise; };\n\n return initPromise\n };\n return moduleFunc\n}\n\nvar supportsWorkers = function () {\n var supported = false;\n\n // Only attempt worker initialization in browsers; elsewhere it would just be\n // noise e.g. loading into a Node environment for SSR.\n if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {\n try {\n // TODO additional checks for things like importScripts within the worker?\n // Would need to be an async check.\n var worker = new Worker(\n URL.createObjectURL(new Blob([''], { type: 'application/javascript' }))\n );\n worker.terminate();\n supported = true;\n } catch (err) {\n if (typeof process !== 'undefined' && process.env.NODE_ENV === 'test') ; else {\n console.log(\n (\"Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: [\" + (err.message) + \"]\")\n );\n }\n }\n }\n\n // Cached result\n supportsWorkers = function () { return supported; };\n return supported\n};\n\nvar _workerModuleId = 0;\nvar _messageId = 0;\nvar _allowInitAsString = false;\nvar workers = Object.create(null);\nvar registeredModules = Object.create(null); //workerId -> Set\nvar openRequests = Object.create(null);\n\n\n/**\n * Define a module of code that will be executed with a web worker. This provides a simple\n * interface for moving chunks of logic off the main thread, and managing their dependencies\n * among one another.\n *\n * @param {object} options\n * @param {function} options.init\n * @param {array} [options.dependencies]\n * @param {function} [options.getTransferables]\n * @param {string} [options.name]\n * @param {string} [options.workerId]\n * @return {function(...[*]): {then}}\n */\nfunction defineWorkerModule(options) {\n if ((!options || typeof options.init !== 'function') && !_allowInitAsString) {\n throw new Error('requires `options.init` function')\n }\n var dependencies = options.dependencies;\n var init = options.init;\n var getTransferables = options.getTransferables;\n var workerId = options.workerId;\n\n if (!supportsWorkers()) {\n return defineMainThreadModule(options)\n }\n\n if (workerId == null) {\n workerId = '#default';\n }\n var id = \"workerModule\" + (++_workerModuleId);\n var name = options.name || id;\n var registrationPromise = null;\n\n dependencies = dependencies && dependencies.map(function (dep) {\n // Wrap raw functions as worker modules with no dependencies\n if (typeof dep === 'function' && !dep.workerModuleData) {\n _allowInitAsString = true;\n dep = defineWorkerModule({\n workerId: workerId,\n name: (\"<\" + name + \"> function dependency: \" + (dep.name)),\n init: (\"function(){return (\\n\" + (stringifyFunction(dep)) + \"\\n)}\")\n });\n _allowInitAsString = false;\n }\n // Grab postable data for worker modules\n if (dep && dep.workerModuleData) {\n dep = dep.workerModuleData;\n }\n return dep\n });\n\n function moduleFunc() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Register this module if needed\n if (!registrationPromise) {\n registrationPromise = callWorker(workerId,'registerModule', moduleFunc.workerModuleData);\n var unregister = function () {\n registrationPromise = null;\n registeredModules[workerId].delete(unregister);\n }\n ;(registeredModules[workerId] || (registeredModules[workerId] = new Set())).add(unregister);\n }\n\n // Invoke the module, returning a promise\n return registrationPromise.then(function (ref) {\n var isCallable = ref.isCallable;\n\n if (isCallable) {\n return callWorker(workerId,'callModule', {id: id, args: args})\n } else {\n throw new Error('Worker module function was called but `init` did not return a callable function')\n }\n })\n }\n moduleFunc.workerModuleData = {\n isWorkerModule: true,\n id: id,\n name: name,\n dependencies: dependencies,\n init: stringifyFunction(init),\n getTransferables: getTransferables && stringifyFunction(getTransferables)\n };\n return moduleFunc\n}\n\n/**\n * Terminate an active Worker by a workerId that was passed to defineWorkerModule.\n * This only terminates the Worker itself; the worker module will remain available\n * and if you call it again its Worker will be respawned.\n * @param {string} workerId\n */\nfunction terminateWorker(workerId) {\n // Unregister all modules that were registered in that worker\n if (registeredModules[workerId]) {\n registeredModules[workerId].forEach(function (unregister) {\n unregister();\n });\n }\n // Terminate the Worker object\n if (workers[workerId]) {\n workers[workerId].terminate();\n delete workers[workerId];\n }\n}\n\n/**\n * Stringifies a function into a form that can be deserialized in the worker\n * @param fn\n */\nfunction stringifyFunction(fn) {\n var str = fn.toString();\n // If it was defined in object method/property format, it needs to be modified\n if (!/^function/.test(str) && /^\\w+\\s*\\(/.test(str)) {\n str = 'function ' + str;\n }\n return str\n}\n\n\nfunction getWorker(workerId) {\n var worker = workers[workerId];\n if (!worker) {\n // Bootstrap the worker's content\n var bootstrap = stringifyFunction(workerBootstrap);\n\n // Create the worker from the bootstrap function content\n worker = workers[workerId] = new Worker(\n URL.createObjectURL(\n new Blob(\n [(\"/** Worker Module Bootstrap: \" + (workerId.replace(/\\*/g, '')) + \" **/\\n\\n;(\" + bootstrap + \")()\")],\n {type: 'application/javascript'}\n )\n )\n );\n\n // Single handler for response messages from the worker\n worker.onmessage = function (e) {\n var response = e.data;\n var msgId = response.messageId;\n var callback = openRequests[msgId];\n if (!callback) {\n throw new Error('WorkerModule response with empty or unknown messageId')\n }\n delete openRequests[msgId];\n callback(response);\n };\n }\n return worker\n}\n\n// Issue a call to the worker with a callback to handle the response\nfunction callWorker(workerId, action, data) {\n return new Promise(function (resolve, reject) {\n var messageId = ++_messageId;\n openRequests[messageId] = function (response) {\n if (response.success) {\n resolve(response.result);\n } else {\n reject(new Error((\"Error in worker \" + action + \" call: \" + (response.error))));\n }\n };\n getWorker(workerId).postMessage({\n messageId: messageId,\n action: action,\n data: data\n });\n })\n}\n\nexport { defineWorkerModule, stringifyFunction, terminateWorker };\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","function SDFGenerator() {\nvar exports = (function (exports) {\n\n /**\n * Find the point on a quadratic bezier curve at t where t is in the range [0, 1]\n */\n function pointOnQuadraticBezier (x0, y0, x1, y1, x2, y2, t, pointOut) {\n var t2 = 1 - t;\n pointOut.x = t2 * t2 * x0 + 2 * t2 * t * x1 + t * t * x2;\n pointOut.y = t2 * t2 * y0 + 2 * t2 * t * y1 + t * t * y2;\n }\n\n /**\n * Find the point on a cubic bezier curve at t where t is in the range [0, 1]\n */\n function pointOnCubicBezier (x0, y0, x1, y1, x2, y2, x3, y3, t, pointOut) {\n var t2 = 1 - t;\n pointOut.x = t2 * t2 * t2 * x0 + 3 * t2 * t2 * t * x1 + 3 * t2 * t * t * x2 + t * t * t * x3;\n pointOut.y = t2 * t2 * t2 * y0 + 3 * t2 * t2 * t * y1 + 3 * t2 * t * t * y2 + t * t * t * y3;\n }\n\n /**\n * Parse a path string into its constituent line/curve commands, invoking a callback for each.\n * @param {string} pathString - An SVG-like path string to parse; should only contain commands: M/L/Q/C/Z\n * @param {function(\n * command: 'L'|'Q'|'C',\n * startX: number,\n * startY: number,\n * endX: number,\n * endY: number,\n * ctrl1X?: number,\n * ctrl1Y?: number,\n * ctrl2X?: number,\n * ctrl2Y?: number\n * )} commandCallback - A callback function that will be called once for each parsed path command, passing the\n * command identifier (only L/Q/C commands) and its numeric arguments.\n */\n function forEachPathCommand(pathString, commandCallback) {\n var segmentRE = /([MLQCZ])([^MLQCZ]*)/g;\n var match, firstX, firstY, prevX, prevY;\n while ((match = segmentRE.exec(pathString))) {\n var args = match[2]\n .replace(/^\\s*|\\s*$/g, '')\n .split(/[,\\s]+/)\n .map(function (v) { return parseFloat(v); });\n switch (match[1]) {\n case 'M':\n prevX = firstX = args[0];\n prevY = firstY = args[1];\n break\n case 'L':\n if (args[0] !== prevX || args[1] !== prevY) { // yup, some fonts have zero-length line commands\n commandCallback('L', prevX, prevY, (prevX = args[0]), (prevY = args[1]));\n }\n break\n case 'Q': {\n commandCallback('Q', prevX, prevY, (prevX = args[2]), (prevY = args[3]), args[0], args[1]);\n break\n }\n case 'C': {\n commandCallback('C', prevX, prevY, (prevX = args[4]), (prevY = args[5]), args[0], args[1], args[2], args[3]);\n break\n }\n case 'Z':\n if (prevX !== firstX || prevY !== firstY) {\n commandCallback('L', prevX, prevY, firstX, firstY);\n }\n break\n }\n }\n }\n\n /**\n * Convert a path string to a series of straight line segments\n * @param {string} pathString - An SVG-like path string to parse; should only contain commands: M/L/Q/C/Z\n * @param {function(x1:number, y1:number, x2:number, y2:number)} segmentCallback - A callback\n * function that will be called once for every line segment\n * @param {number} [curvePoints] - How many straight line segments to use when approximating a\n * bezier curve in the path. Defaults to 16.\n */\n function pathToLineSegments (pathString, segmentCallback, curvePoints) {\n if ( curvePoints === void 0 ) curvePoints = 16;\n\n var tempPoint = { x: 0, y: 0 };\n forEachPathCommand(pathString, function (command, startX, startY, endX, endY, ctrl1X, ctrl1Y, ctrl2X, ctrl2Y) {\n switch (command) {\n case 'L':\n segmentCallback(startX, startY, endX, endY);\n break\n case 'Q': {\n var prevCurveX = startX;\n var prevCurveY = startY;\n for (var i = 1; i < curvePoints; i++) {\n pointOnQuadraticBezier(\n startX, startY,\n ctrl1X, ctrl1Y,\n endX, endY,\n i / (curvePoints - 1),\n tempPoint\n );\n segmentCallback(prevCurveX, prevCurveY, tempPoint.x, tempPoint.y);\n prevCurveX = tempPoint.x;\n prevCurveY = tempPoint.y;\n }\n break\n }\n case 'C': {\n var prevCurveX$1 = startX;\n var prevCurveY$1 = startY;\n for (var i$1 = 1; i$1 < curvePoints; i$1++) {\n pointOnCubicBezier(\n startX, startY,\n ctrl1X, ctrl1Y,\n ctrl2X, ctrl2Y,\n endX, endY,\n i$1 / (curvePoints - 1),\n tempPoint\n );\n segmentCallback(prevCurveX$1, prevCurveY$1, tempPoint.x, tempPoint.y);\n prevCurveX$1 = tempPoint.x;\n prevCurveY$1 = tempPoint.y;\n }\n break\n }\n }\n });\n }\n\n var viewportQuadVertex = \"precision highp float;attribute vec2 aUV;varying vec2 vUV;void main(){vUV=aUV;gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}\";\n\n var copyTexFragment = \"precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){gl_FragColor=texture2D(tex,vUV);}\";\n\n var cache = new WeakMap();\n\n var glContextParams = {\n premultipliedAlpha: false,\n preserveDrawingBuffer: true,\n antialias: false,\n depth: false,\n };\n\n /**\n * This is a little helper library for WebGL. It assists with state management for a GL context.\n * It's pretty tightly wrapped to the needs of this package, not very general-purpose.\n *\n * @param { WebGLRenderingContext | HTMLCanvasElement | OffscreenCanvas } glOrCanvas - the GL context to wrap\n * @param { ({gl, getExtension, withProgram, withTexture, withTextureFramebuffer, handleContextLoss}) => void } callback\n */\n function withWebGLContext (glOrCanvas, callback) {\n var gl = glOrCanvas.getContext ? glOrCanvas.getContext('webgl', glContextParams) : glOrCanvas;\n var wrapper = cache.get(gl);\n if (!wrapper) {\n var isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext;\n var extensions = {};\n var programs = {};\n var textures = {};\n var textureUnit = -1;\n var framebufferStack = [];\n\n gl.canvas.addEventListener('webglcontextlost', function (e) {\n handleContextLoss();\n e.preventDefault();\n }, false);\n\n function getExtension (name) {\n var ext = extensions[name];\n if (!ext) {\n ext = extensions[name] = gl.getExtension(name);\n if (!ext) {\n throw new Error((name + \" not supported\"))\n }\n }\n return ext\n }\n\n function compileShader (src, type) {\n var shader = gl.createShader(type);\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n // const status = gl.getShaderParameter(shader, gl.COMPILE_STATUS)\n // if (!status && !gl.isContextLost()) {\n // throw new Error(gl.getShaderInfoLog(shader).trim())\n // }\n return shader\n }\n\n function withProgram (name, vert, frag, func) {\n if (!programs[name]) {\n var attributes = {};\n var uniforms = {};\n var program = gl.createProgram();\n gl.attachShader(program, compileShader(vert, gl.VERTEX_SHADER));\n gl.attachShader(program, compileShader(frag, gl.FRAGMENT_SHADER));\n gl.linkProgram(program);\n\n programs[name] = {\n program: program,\n transaction: function transaction (func) {\n gl.useProgram(program);\n func({\n setUniform: function setUniform (type, name) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var uniformLoc = uniforms[name] || (uniforms[name] = gl.getUniformLocation(program, name));\n gl[(\"uniform\" + type)].apply(gl, [ uniformLoc ].concat( values ));\n },\n\n setAttribute: function setAttribute (name, size, usage, instancingDivisor, data) {\n var attr = attributes[name];\n if (!attr) {\n attr = attributes[name] = {\n buf: gl.createBuffer(), // TODO should we destroy our buffers?\n loc: gl.getAttribLocation(program, name),\n data: null\n };\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, attr.buf);\n gl.vertexAttribPointer(attr.loc, size, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(attr.loc);\n if (isWebGL2) {\n gl.vertexAttribDivisor(attr.loc, instancingDivisor);\n } else {\n getExtension('ANGLE_instanced_arrays').vertexAttribDivisorANGLE(attr.loc, instancingDivisor);\n }\n if (data !== attr.data) {\n gl.bufferData(gl.ARRAY_BUFFER, data, usage);\n attr.data = data;\n }\n }\n });\n }\n };\n }\n\n programs[name].transaction(func);\n }\n\n function withTexture (name, func) {\n textureUnit++;\n try {\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\n var texture = textures[name];\n if (!texture) {\n texture = textures[name] = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n func(texture, textureUnit);\n } finally {\n textureUnit--;\n }\n }\n\n function withTextureFramebuffer (texture, textureUnit, func) {\n var framebuffer = gl.createFramebuffer();\n framebufferStack.push(framebuffer);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n try {\n func(framebuffer);\n } finally {\n gl.deleteFramebuffer(framebuffer);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebufferStack[--framebufferStack.length - 1] || null);\n }\n }\n\n function handleContextLoss () {\n extensions = {};\n programs = {};\n textures = {};\n textureUnit = -1;\n framebufferStack.length = 0;\n }\n\n cache.set(gl, wrapper = {\n gl: gl,\n isWebGL2: isWebGL2,\n getExtension: getExtension,\n withProgram: withProgram,\n withTexture: withTexture,\n withTextureFramebuffer: withTextureFramebuffer,\n handleContextLoss: handleContextLoss,\n });\n }\n callback(wrapper);\n }\n\n\n function renderImageData(glOrCanvas, imageData, x, y, width, height, channels, framebuffer) {\n if ( channels === void 0 ) channels = 15;\n if ( framebuffer === void 0 ) framebuffer = null;\n\n withWebGLContext(glOrCanvas, function (ref) {\n var gl = ref.gl;\n var withProgram = ref.withProgram;\n var withTexture = ref.withTexture;\n\n withTexture('copy', function (tex, texUnit) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n withProgram('copy', viewportQuadVertex, copyTexFragment, function (ref) {\n var setUniform = ref.setUniform;\n var setAttribute = ref.setAttribute;\n\n setAttribute('aUV', 2, gl.STATIC_DRAW, 0, new Float32Array([0, 0, 2, 0, 0, 2]));\n setUniform('1i', 'image', texUnit);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer || null);\n gl.disable(gl.BLEND);\n gl.colorMask(channels & 8, channels & 4, channels & 2, channels & 1);\n gl.viewport(x, y, width, height);\n gl.scissor(x, y, width, height);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n });\n });\n });\n }\n\n /**\n * Resizing a canvas clears its contents; this utility copies the previous contents over.\n * @param canvas\n * @param newWidth\n * @param newHeight\n */\n function resizeWebGLCanvasWithoutClearing(canvas, newWidth, newHeight) {\n var width = canvas.width;\n var height = canvas.height;\n withWebGLContext(canvas, function (ref) {\n var gl = ref.gl;\n\n var data = new Uint8Array(width * height * 4);\n gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, data);\n canvas.width = newWidth;\n canvas.height = newHeight;\n renderImageData(gl, data, 0, 0, width, height);\n });\n }\n\n var webglUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n withWebGLContext: withWebGLContext,\n renderImageData: renderImageData,\n resizeWebGLCanvasWithoutClearing: resizeWebGLCanvasWithoutClearing\n });\n\n function generate$2 (sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent) {\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n\n var textureData = new Uint8Array(sdfWidth * sdfHeight);\n\n var viewBoxWidth = viewBox[2] - viewBox[0];\n var viewBoxHeight = viewBox[3] - viewBox[1];\n\n // Decompose all paths into straight line segments and add them to an index\n var segments = [];\n pathToLineSegments(path, function (x1, y1, x2, y2) {\n segments.push({\n x1: x1, y1: y1, x2: x2, y2: y2,\n minX: Math.min(x1, x2),\n minY: Math.min(y1, y2),\n maxX: Math.max(x1, x2),\n maxY: Math.max(y1, y2)\n });\n });\n\n // Sort segments by maxX, this will let us short-circuit some loops below\n segments.sort(function (a, b) { return a.maxX - b.maxX; });\n\n // For each target SDF texel, find the distance from its center to its nearest line segment,\n // map that distance to an alpha value, and write that alpha to the texel\n for (var sdfX = 0; sdfX < sdfWidth; sdfX++) {\n for (var sdfY = 0; sdfY < sdfHeight; sdfY++) {\n var signedDist = findNearestSignedDistance(\n viewBox[0] + viewBoxWidth * (sdfX + 0.5) / sdfWidth,\n viewBox[1] + viewBoxHeight * (sdfY + 0.5) / sdfHeight\n );\n\n // Use an exponential scale to ensure the texels very near the glyph path have adequate\n // precision, while allowing the distance field to cover the entire texture, given that\n // there are only 8 bits available. Formula visualized: https://www.desmos.com/calculator/uiaq5aqiam\n var alpha = Math.pow((1 - Math.abs(signedDist) / maxDistance), sdfExponent) / 2;\n if (signedDist < 0) {\n alpha = 1 - alpha;\n }\n\n alpha = Math.max(0, Math.min(255, Math.round(alpha * 255))); //clamp\n textureData[sdfY * sdfWidth + sdfX] = alpha;\n }\n }\n\n return textureData\n\n /**\n * For a given x/y, search the index for the closest line segment and return\n * its signed distance. Negative = inside, positive = outside, zero = on edge\n * @param x\n * @param y\n * @returns {number}\n */\n function findNearestSignedDistance (x, y) {\n var closestDistSq = Infinity;\n var closestDist = Infinity;\n\n for (var i = segments.length; i--;) {\n var seg = segments[i];\n if (seg.maxX + closestDist <= x) { break } //sorting by maxX means no more can be closer, so we can short-circuit\n if (x + closestDist > seg.minX && y - closestDist < seg.maxY && y + closestDist > seg.minY) {\n var distSq = absSquareDistanceToLineSegment(x, y, seg.x1, seg.y1, seg.x2, seg.y2);\n if (distSq < closestDistSq) {\n closestDistSq = distSq;\n closestDist = Math.sqrt(closestDistSq);\n }\n }\n }\n\n // Flip to negative distance if inside the poly\n if (isPointInPoly(x, y)) {\n closestDist = -closestDist;\n }\n return closestDist\n }\n\n /**\n * Determine whether the given point lies inside or outside the glyph. Uses a simple\n * winding-number ray casting algorithm using a ray pointing east from the point.\n */\n function isPointInPoly (x, y) {\n var winding = 0;\n for (var i = segments.length; i--;) {\n var seg = segments[i];\n if (seg.maxX <= x) { break } //sorting by maxX means no more can cross, so we can short-circuit\n var intersects = ((seg.y1 > y) !== (seg.y2 > y)) && (x < (seg.x2 - seg.x1) * (y - seg.y1) / (seg.y2 - seg.y1) + seg.x1);\n if (intersects) {\n winding += seg.y1 < seg.y2 ? 1 : -1;\n }\n }\n return winding !== 0\n }\n }\n\n function generateIntoCanvas$2(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, x, y, channel) {\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n if ( x === void 0 ) x = 0;\n if ( y === void 0 ) y = 0;\n if ( channel === void 0 ) channel = 0;\n\n generateIntoFramebuffer$1(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, null, x, y, channel);\n }\n\n function generateIntoFramebuffer$1 (sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, glOrCanvas, framebuffer, x, y, channel) {\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n if ( x === void 0 ) x = 0;\n if ( y === void 0 ) y = 0;\n if ( channel === void 0 ) channel = 0;\n\n var data = generate$2(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent);\n // Expand single-channel data to rbga\n var rgbaData = new Uint8Array(data.length * 4);\n for (var i = 0; i < data.length; i++) {\n rgbaData[i * 4 + channel] = data[i];\n }\n renderImageData(glOrCanvas, rgbaData, x, y, sdfWidth, sdfHeight, 1 << (3 - channel), framebuffer);\n }\n\n /**\n * Find the absolute distance from a point to a line segment at closest approach\n */\n function absSquareDistanceToLineSegment (x, y, lineX0, lineY0, lineX1, lineY1) {\n var ldx = lineX1 - lineX0;\n var ldy = lineY1 - lineY0;\n var lengthSq = ldx * ldx + ldy * ldy;\n var t = lengthSq ? Math.max(0, Math.min(1, ((x - lineX0) * ldx + (y - lineY0) * ldy) / lengthSq)) : 0;\n var dx = x - (lineX0 + t * ldx);\n var dy = y - (lineY0 + t * ldy);\n return dx * dx + dy * dy\n }\n\n var javascript = /*#__PURE__*/Object.freeze({\n __proto__: null,\n generate: generate$2,\n generateIntoCanvas: generateIntoCanvas$2,\n generateIntoFramebuffer: generateIntoFramebuffer$1\n });\n\n var mainVertex = \"precision highp float;uniform vec4 uGlyphBounds;attribute vec2 aUV;attribute vec4 aLineSegment;varying vec4 vLineSegment;varying vec2 vGlyphXY;void main(){vLineSegment=aLineSegment;vGlyphXY=mix(uGlyphBounds.xy,uGlyphBounds.zw,aUV);gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}\";\n\n var mainFragment = \"precision highp float;uniform vec4 uGlyphBounds;uniform float uMaxDistance;uniform float uExponent;varying vec4 vLineSegment;varying vec2 vGlyphXY;float absDistToSegment(vec2 point,vec2 lineA,vec2 lineB){vec2 lineDir=lineB-lineA;float lenSq=dot(lineDir,lineDir);float t=lenSq==0.0 ? 0.0 : clamp(dot(point-lineA,lineDir)/lenSq,0.0,1.0);vec2 linePt=lineA+t*lineDir;return distance(point,linePt);}void main(){vec4 seg=vLineSegment;vec2 p=vGlyphXY;float dist=absDistToSegment(p,seg.xy,seg.zw);float val=pow(1.0-clamp(dist/uMaxDistance,0.0,1.0),uExponent)*0.5;bool crossing=(seg.y>p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y bool\n\n function validateSupport (glOrCanvas) {\n if (!isTestingSupport && !isSupported(glOrCanvas)) {\n throw new Error('WebGL generation not supported')\n }\n }\n\n function generate$1 (sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, glOrCanvas) {\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n if ( glOrCanvas === void 0 ) glOrCanvas = null;\n\n if (!glOrCanvas) {\n glOrCanvas = implicitContext;\n if (!glOrCanvas) {\n var canvas = typeof OffscreenCanvas === 'function'\n ? new OffscreenCanvas(1, 1)\n : typeof document !== 'undefined'\n ? document.createElement('canvas')\n : null;\n if (!canvas) {\n throw new Error('OffscreenCanvas or DOM canvas not supported')\n }\n glOrCanvas = implicitContext = canvas.getContext('webgl', { depth: false });\n }\n }\n\n validateSupport(glOrCanvas);\n\n var rgbaData = new Uint8Array(sdfWidth * sdfHeight * 4); //not Uint8ClampedArray, cuz Safari\n\n // Render into a background texture framebuffer\n withWebGLContext(glOrCanvas, function (ref) {\n var gl = ref.gl;\n var withTexture = ref.withTexture;\n var withTextureFramebuffer = ref.withTextureFramebuffer;\n\n withTexture('readable', function (texture, textureUnit) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, sdfWidth, sdfHeight, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n\n withTextureFramebuffer(texture, textureUnit, function (framebuffer) {\n generateIntoFramebuffer(\n sdfWidth,\n sdfHeight,\n path,\n viewBox,\n maxDistance,\n sdfExponent,\n gl,\n framebuffer,\n 0,\n 0,\n 0 // red channel\n );\n gl.readPixels(0, 0, sdfWidth, sdfHeight, gl.RGBA, gl.UNSIGNED_BYTE, rgbaData);\n });\n });\n });\n\n // Throw away all but the red channel\n var data = new Uint8Array(sdfWidth * sdfHeight);\n for (var i = 0, j = 0; i < rgbaData.length; i += 4) {\n data[j++] = rgbaData[i];\n }\n\n return data\n }\n\n function generateIntoCanvas$1(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, x, y, channel) {\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n if ( x === void 0 ) x = 0;\n if ( y === void 0 ) y = 0;\n if ( channel === void 0 ) channel = 0;\n\n generateIntoFramebuffer(sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, canvas, null, x, y, channel);\n }\n\n function generateIntoFramebuffer (sdfWidth, sdfHeight, path, viewBox, maxDistance, sdfExponent, glOrCanvas, framebuffer, x, y, channel) {\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n if ( x === void 0 ) x = 0;\n if ( y === void 0 ) y = 0;\n if ( channel === void 0 ) channel = 0;\n\n // Verify support\n validateSupport(glOrCanvas);\n\n // Compute path segments\n var lineSegmentCoords = [];\n pathToLineSegments(path, function (x1, y1, x2, y2) {\n lineSegmentCoords.push(x1, y1, x2, y2);\n });\n lineSegmentCoords = new Float32Array(lineSegmentCoords);\n\n withWebGLContext(glOrCanvas, function (ref) {\n var gl = ref.gl;\n var isWebGL2 = ref.isWebGL2;\n var getExtension = ref.getExtension;\n var withProgram = ref.withProgram;\n var withTexture = ref.withTexture;\n var withTextureFramebuffer = ref.withTextureFramebuffer;\n var handleContextLoss = ref.handleContextLoss;\n\n withTexture('rawDistances', function (intermediateTexture, intermediateTextureUnit) {\n if (sdfWidth !== intermediateTexture._lastWidth || sdfHeight !== intermediateTexture._lastHeight) {\n gl.texImage2D(\n gl.TEXTURE_2D, 0, gl.RGBA,\n intermediateTexture._lastWidth = sdfWidth,\n intermediateTexture._lastHeight = sdfHeight,\n 0, gl.RGBA, gl.UNSIGNED_BYTE, null\n );\n }\n\n // Unsigned distance pass\n withProgram('main', mainVertex, mainFragment, function (ref) {\n var setAttribute = ref.setAttribute;\n var setUniform = ref.setUniform;\n\n // Init extensions\n var instancingExtension = !isWebGL2 && getExtension('ANGLE_instanced_arrays');\n var blendMinMaxExtension = !isWebGL2 && getExtension('EXT_blend_minmax');\n\n // Init/update attributes\n setAttribute('aUV', 2, gl.STATIC_DRAW, 0, viewportUVs);\n setAttribute('aLineSegment', 4, gl.DYNAMIC_DRAW, 1, lineSegmentCoords);\n\n // Init/update uniforms\n setUniform.apply(void 0, [ '4f', 'uGlyphBounds' ].concat( viewBox ));\n setUniform('1f', 'uMaxDistance', maxDistance);\n setUniform('1f', 'uExponent', sdfExponent);\n\n // Render initial unsigned distance / winding number info to a texture\n withTextureFramebuffer(intermediateTexture, intermediateTextureUnit, function (framebuffer) {\n gl.enable(gl.BLEND);\n gl.colorMask(true, true, true, true);\n gl.viewport(0, 0, sdfWidth, sdfHeight);\n gl.scissor(0, 0, sdfWidth, sdfHeight);\n gl.blendFunc(gl.ONE, gl.ONE);\n // Red+Green channels are incremented (FUNC_ADD) for segment-ray crossings to give a \"winding number\".\n // Alpha holds the closest (MAX) unsigned distance.\n gl.blendEquationSeparate(gl.FUNC_ADD, isWebGL2 ? gl.MAX : blendMinMaxExtension.MAX_EXT);\n gl.clear(gl.COLOR_BUFFER_BIT);\n if (isWebGL2) {\n gl.drawArraysInstanced(gl.TRIANGLES, 0, 3, lineSegmentCoords.length / 4);\n } else {\n instancingExtension.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 3, lineSegmentCoords.length / 4);\n }\n // Debug\n // const debug = new Uint8Array(sdfWidth * sdfHeight * 4)\n // gl.readPixels(0, 0, sdfWidth, sdfHeight, gl.RGBA, gl.UNSIGNED_BYTE, debug)\n // console.log('intermediate texture data: ', debug)\n });\n });\n\n // Use the data stored in the texture to apply inside/outside and write to the output framebuffer rect+channel.\n withProgram('post', viewportQuadVertex, postFragment, function (program) {\n program.setAttribute('aUV', 2, gl.STATIC_DRAW, 0, viewportUVs);\n program.setUniform('1i', 'tex', intermediateTextureUnit);\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n gl.disable(gl.BLEND);\n gl.colorMask(channel === 0, channel === 1, channel === 2, channel === 3);\n gl.viewport(x, y, sdfWidth, sdfHeight);\n gl.scissor(x, y, sdfWidth, sdfHeight);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n });\n });\n\n // Handle context loss occurring during any of the above calls\n if (gl.isContextLost()) {\n handleContextLoss();\n throw new Error('webgl context lost')\n }\n });\n }\n\n function isSupported (glOrCanvas) {\n var key = (!glOrCanvas || glOrCanvas === implicitContext) ? NULL_OBJECT : (glOrCanvas.canvas || glOrCanvas);\n var supported = supportByCanvas.get(key);\n if (supported === undefined) {\n isTestingSupport = true;\n var failReason = null;\n try {\n // Since we can't detect all failure modes up front, let's just do a trial run of a\n // simple path and compare what we get back to the correct expected result. This will\n // also serve to prime the shader compilation.\n var expectedResult = [\n 97, 106, 97, 61,\n 99, 137, 118, 80,\n 80, 118, 137, 99,\n 61, 97, 106, 97\n ];\n var testResult = generate$1(\n 4,\n 4,\n 'M8,8L16,8L24,24L16,24Z',\n [0, 0, 32, 32],\n 24,\n 1,\n glOrCanvas\n );\n supported = testResult && expectedResult.length === testResult.length &&\n testResult.every(function (val, i) { return val === expectedResult[i]; });\n if (!supported) {\n failReason = 'bad trial run results';\n console.info(expectedResult, testResult);\n }\n } catch (err) {\n // TODO if it threw due to webgl context loss, should we maybe leave isSupported as null and try again later?\n supported = false;\n failReason = err.message;\n }\n if (failReason) {\n console.warn('WebGL SDF generation not supported:', failReason);\n }\n isTestingSupport = false;\n supportByCanvas.set(key, supported);\n }\n return supported\n }\n\n var webgl = /*#__PURE__*/Object.freeze({\n __proto__: null,\n generate: generate$1,\n generateIntoCanvas: generateIntoCanvas$1,\n generateIntoFramebuffer: generateIntoFramebuffer,\n isSupported: isSupported\n });\n\n /**\n * Generate an SDF texture image for a 2D path.\n *\n * @param {number} sdfWidth - width of the SDF output image in pixels.\n * @param {number} sdfHeight - height of the SDF output image in pixels.\n * @param {string} path - an SVG-like path string describing the glyph; should only contain commands: M/L/Q/C/Z.\n * @param {number[]} viewBox - [minX, minY, maxX, maxY] in font units aligning with the texture's edges.\n * @param {number} maxDistance - the maximum distance from the glyph path in font units that will be encoded; defaults\n * to half the maximum viewBox dimension.\n * @param {number} [sdfExponent] - specifies an exponent for encoding the SDF's distance values; higher exponents\n * will give greater precision nearer the glyph's path.\n * @return {Uint8Array}\n */\n function generate(\n sdfWidth,\n sdfHeight,\n path,\n viewBox,\n maxDistance,\n sdfExponent\n ) {\n if ( maxDistance === void 0 ) maxDistance = Math.max(viewBox[2] - viewBox[0], viewBox[3] - viewBox[1]) / 2;\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n\n try {\n return generate$1.apply(webgl, arguments)\n } catch(e) {\n console.info('WebGL SDF generation failed, falling back to JS', e);\n return generate$2.apply(javascript, arguments)\n }\n }\n\n /**\n * Generate an SDF texture image for a 2D path, inserting the result into a WebGL `canvas` at a given x/y position\n * and color channel. This is generally much faster than calling `generate` because it does not require reading pixels\n * back from the GPU->CPU -- the `canvas` can be used directly as a WebGL texture image, so it all stays on the GPU.\n *\n * @param {number} sdfWidth - width of the SDF output image in pixels.\n * @param {number} sdfHeight - height of the SDF output image in pixels.\n * @param {string} path - an SVG-like path string describing the glyph; should only contain commands: M/L/Q/C/Z.\n * @param {number[]} viewBox - [minX, minY, maxX, maxY] in font units aligning with the texture's edges.\n * @param {number} maxDistance - the maximum distance from the glyph path in font units that will be encoded; defaults\n * to half the maximum viewBox dimension.\n * @param {number} [sdfExponent] - specifies an exponent for encoding the SDF's distance values; higher exponents\n * will give greater precision nearer the glyph's path.\n * @param {HTMLCanvasElement|OffscreenCanvas} canvas - a WebGL-enabled canvas into which the SDF will be rendered.\n * Only the relevant rect/channel will be modified, the rest will be preserved. To avoid unpredictable results\n * due to shared GL context state, this canvas should be dedicated to use by this library alone.\n * @param {number} x - the x position at which to render the SDF.\n * @param {number} y - the y position at which to render the SDF.\n * @param {number} channel - the color channel index (0-4) into which the SDF will be rendered.\n * @return {Uint8Array}\n */\n function generateIntoCanvas(\n sdfWidth,\n sdfHeight,\n path,\n viewBox,\n maxDistance,\n sdfExponent,\n canvas,\n x,\n y,\n channel\n ) {\n if ( maxDistance === void 0 ) maxDistance = Math.max(viewBox[2] - viewBox[0], viewBox[3] - viewBox[1]) / 2;\n if ( sdfExponent === void 0 ) sdfExponent = 1;\n if ( x === void 0 ) x = 0;\n if ( y === void 0 ) y = 0;\n if ( channel === void 0 ) channel = 0;\n\n try {\n return generateIntoCanvas$1.apply(webgl, arguments)\n } catch(e) {\n console.info('WebGL SDF generation failed, falling back to JS', e);\n return generateIntoCanvas$2.apply(javascript, arguments)\n }\n }\n\n exports.forEachPathCommand = forEachPathCommand;\n exports.generate = generate;\n exports.generateIntoCanvas = generateIntoCanvas;\n exports.javascript = javascript;\n exports.pathToLineSegments = pathToLineSegments;\n exports.webgl = webgl;\n exports.webglUtils = webglUtils;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}({}));\nreturn exports\n}\n\nexport { SDFGenerator as default };\n","function bidiFactory() {\nvar bidi = (function (exports) {\n\n // Bidi character types data, auto generated\n var DATA = {\n \"R\": \"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73\",\n \"EN\": \"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9\",\n \"ES\": \"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2\",\n \"ET\": \"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj\",\n \"AN\": \"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u\",\n \"CS\": \"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b\",\n \"B\": \"a,3,f+2,2v,690\",\n \"S\": \"9,2,k\",\n \"WS\": \"c,k,4f4,1vk+a,u,1j,335\",\n \"ON\": \"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i\",\n \"BN\": \"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1\",\n \"NSM\": \"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n\",\n \"AL\": \"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d\",\n \"LRO\": \"6ct\",\n \"RLO\": \"6cu\",\n \"LRE\": \"6cq\",\n \"RLE\": \"6cr\",\n \"PDF\": \"6cs\",\n \"LRI\": \"6ee\",\n \"RLI\": \"6ef\",\n \"FSI\": \"6eg\",\n \"PDI\": \"6eh\"\n };\n\n var TYPES = {};\n var TYPES_TO_NAMES = {};\n TYPES.L = 1; //L is the default\n TYPES_TO_NAMES[1] = 'L';\n Object.keys(DATA).forEach(function (type, i) {\n TYPES[type] = 1 << (i + 1);\n TYPES_TO_NAMES[TYPES[type]] = type;\n });\n Object.freeze(TYPES);\n\n var ISOLATE_INIT_TYPES = TYPES.LRI | TYPES.RLI | TYPES.FSI;\n var STRONG_TYPES = TYPES.L | TYPES.R | TYPES.AL;\n var NEUTRAL_ISOLATE_TYPES = TYPES.B | TYPES.S | TYPES.WS | TYPES.ON | TYPES.FSI | TYPES.LRI | TYPES.RLI | TYPES.PDI;\n var BN_LIKE_TYPES = TYPES.BN | TYPES.RLE | TYPES.LRE | TYPES.RLO | TYPES.LRO | TYPES.PDF;\n var TRAILING_TYPES = TYPES.S | TYPES.WS | TYPES.B | ISOLATE_INIT_TYPES | TYPES.PDI | BN_LIKE_TYPES;\n\n var map = null;\n\n function parseData () {\n if (!map) {\n //const start = performance.now()\n map = new Map();\n var loop = function ( type ) {\n if (DATA.hasOwnProperty(type)) {\n var lastCode = 0;\n DATA[type].split(',').forEach(function (range) {\n var ref = range.split('+');\n var skip = ref[0];\n var step = ref[1];\n skip = parseInt(skip, 36);\n step = step ? parseInt(step, 36) : 0;\n map.set(lastCode += skip, TYPES[type]);\n for (var i = 0; i < step; i++) {\n map.set(++lastCode, TYPES[type]);\n }\n });\n }\n };\n\n for (var type in DATA) loop( type );\n //console.log(`char types parsed in ${performance.now() - start}ms`)\n }\n }\n\n /**\n * @param {string} char\n * @return {number}\n */\n function getBidiCharType (char) {\n parseData();\n return map.get(char.codePointAt(0)) || TYPES.L\n }\n\n function getBidiCharTypeName(char) {\n return TYPES_TO_NAMES[getBidiCharType(char)]\n }\n\n // Bidi bracket pairs data, auto generated\n var data$1 = {\n \"pairs\": \"14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1\",\n \"canonical\": \"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye\"\n };\n\n /**\n * Parses an string that holds encoded codepoint mappings, e.g. for bracket pairs or\n * mirroring characters, as encoded by scripts/generateBidiData.js. Returns an object\n * holding the `map`, and optionally a `reverseMap` if `includeReverse:true`.\n * @param {string} encodedString\n * @param {boolean} includeReverse - true if you want reverseMap in the output\n * @return {{map: Map, reverseMap?: Map}}\n */\n function parseCharacterMap (encodedString, includeReverse) {\n var radix = 36;\n var lastCode = 0;\n var map = new Map();\n var reverseMap = includeReverse && new Map();\n var prevPair;\n encodedString.split(',').forEach(function visit(entry) {\n if (entry.indexOf('+') !== -1) {\n for (var i = +entry; i--;) {\n visit(prevPair);\n }\n } else {\n prevPair = entry;\n var ref = entry.split('>');\n var a = ref[0];\n var b = ref[1];\n a = String.fromCodePoint(lastCode += parseInt(a, radix));\n b = String.fromCodePoint(lastCode += parseInt(b, radix));\n map.set(a, b);\n includeReverse && reverseMap.set(b, a);\n }\n });\n return { map: map, reverseMap: reverseMap }\n }\n\n var openToClose, closeToOpen, canonical;\n\n function parse$1 () {\n if (!openToClose) {\n //const start = performance.now()\n var ref = parseCharacterMap(data$1.pairs, true);\n var map = ref.map;\n var reverseMap = ref.reverseMap;\n openToClose = map;\n closeToOpen = reverseMap;\n canonical = parseCharacterMap(data$1.canonical, false).map;\n //console.log(`brackets parsed in ${performance.now() - start}ms`)\n }\n }\n\n function openingToClosingBracket (char) {\n parse$1();\n return openToClose.get(char) || null\n }\n\n function closingToOpeningBracket (char) {\n parse$1();\n return closeToOpen.get(char) || null\n }\n\n function getCanonicalBracket (char) {\n parse$1();\n return canonical.get(char) || null\n }\n\n // Local type aliases\n var TYPE_L = TYPES.L;\n var TYPE_R = TYPES.R;\n var TYPE_EN = TYPES.EN;\n var TYPE_ES = TYPES.ES;\n var TYPE_ET = TYPES.ET;\n var TYPE_AN = TYPES.AN;\n var TYPE_CS = TYPES.CS;\n var TYPE_B = TYPES.B;\n var TYPE_S = TYPES.S;\n var TYPE_ON = TYPES.ON;\n var TYPE_BN = TYPES.BN;\n var TYPE_NSM = TYPES.NSM;\n var TYPE_AL = TYPES.AL;\n var TYPE_LRO = TYPES.LRO;\n var TYPE_RLO = TYPES.RLO;\n var TYPE_LRE = TYPES.LRE;\n var TYPE_RLE = TYPES.RLE;\n var TYPE_PDF = TYPES.PDF;\n var TYPE_LRI = TYPES.LRI;\n var TYPE_RLI = TYPES.RLI;\n var TYPE_FSI = TYPES.FSI;\n var TYPE_PDI = TYPES.PDI;\n\n /**\n * @typedef {object} GetEmbeddingLevelsResult\n * @property {{start, end, level}[]} paragraphs\n * @property {Uint8Array} levels\n */\n\n /**\n * This function applies the Bidirectional Algorithm to a string, returning the resolved embedding levels\n * in a single Uint8Array plus a list of objects holding each paragraph's start and end indices and resolved\n * base embedding level.\n *\n * @param {string} string - The input string\n * @param {\"ltr\"|\"rtl\"|\"auto\"} [baseDirection] - Use \"ltr\" or \"rtl\" to force a base paragraph direction,\n * otherwise a direction will be chosen automatically from each paragraph's contents.\n * @return {GetEmbeddingLevelsResult}\n */\n function getEmbeddingLevels (string, baseDirection) {\n var MAX_DEPTH = 125;\n\n // Start by mapping all characters to their unicode type, as a bitmask integer\n var charTypes = new Uint32Array(string.length);\n for (var i = 0; i < string.length; i++) {\n charTypes[i] = getBidiCharType(string[i]);\n }\n\n var charTypeCounts = new Map(); //will be cleared at start of each paragraph\n function changeCharType(i, type) {\n var oldType = charTypes[i];\n charTypes[i] = type;\n charTypeCounts.set(oldType, charTypeCounts.get(oldType) - 1);\n if (oldType & NEUTRAL_ISOLATE_TYPES) {\n charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) - 1);\n }\n charTypeCounts.set(type, (charTypeCounts.get(type) || 0) + 1);\n if (type & NEUTRAL_ISOLATE_TYPES) {\n charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);\n }\n }\n\n var embedLevels = new Uint8Array(string.length);\n var isolationPairs = new Map(); //init->pdi and pdi->init\n\n // === 3.3.1 The Paragraph Level ===\n // 3.3.1 P1: Split the text into paragraphs\n var paragraphs = []; // [{start, end, level}, ...]\n var paragraph = null;\n for (var i$1 = 0; i$1 < string.length; i$1++) {\n if (!paragraph) {\n paragraphs.push(paragraph = {\n start: i$1,\n end: string.length - 1,\n // 3.3.1 P2-P3: Determine the paragraph level\n level: baseDirection === 'rtl' ? 1 : baseDirection === 'ltr' ? 0 : determineAutoEmbedLevel(i$1, false)\n });\n }\n if (charTypes[i$1] & TYPE_B) {\n paragraph.end = i$1;\n paragraph = null;\n }\n }\n\n var FORMATTING_TYPES = TYPE_RLE | TYPE_LRE | TYPE_RLO | TYPE_LRO | ISOLATE_INIT_TYPES | TYPE_PDI | TYPE_PDF | TYPE_B;\n var nextEven = function (n) { return n + ((n & 1) ? 1 : 2); };\n var nextOdd = function (n) { return n + ((n & 1) ? 2 : 1); };\n\n // Everything from here on will operate per paragraph.\n for (var paraIdx = 0; paraIdx < paragraphs.length; paraIdx++) {\n paragraph = paragraphs[paraIdx];\n var statusStack = [{\n _level: paragraph.level,\n _override: 0, //0=neutral, 1=L, 2=R\n _isolate: 0 //bool\n }];\n var stackTop = (void 0);\n var overflowIsolateCount = 0;\n var overflowEmbeddingCount = 0;\n var validIsolateCount = 0;\n charTypeCounts.clear();\n\n // === 3.3.2 Explicit Levels and Directions ===\n for (var i$2 = paragraph.start; i$2 <= paragraph.end; i$2++) {\n var charType = charTypes[i$2];\n stackTop = statusStack[statusStack.length - 1];\n\n // Set initial counts\n charTypeCounts.set(charType, (charTypeCounts.get(charType) || 0) + 1);\n if (charType & NEUTRAL_ISOLATE_TYPES) {\n charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);\n }\n\n // Explicit Embeddings: 3.3.2 X2 - X3\n if (charType & FORMATTING_TYPES) { //prefilter all formatters\n if (charType & (TYPE_RLE | TYPE_LRE)) {\n embedLevels[i$2] = stackTop._level; // 5.2\n var level = (charType === TYPE_RLE ? nextOdd : nextEven)(stackTop._level);\n if (level <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) {\n statusStack.push({\n _level: level,\n _override: 0,\n _isolate: 0\n });\n } else if (!overflowIsolateCount) {\n overflowEmbeddingCount++;\n }\n }\n\n // Explicit Overrides: 3.3.2 X4 - X5\n else if (charType & (TYPE_RLO | TYPE_LRO)) {\n embedLevels[i$2] = stackTop._level; // 5.2\n var level$1 = (charType === TYPE_RLO ? nextOdd : nextEven)(stackTop._level);\n if (level$1 <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) {\n statusStack.push({\n _level: level$1,\n _override: (charType & TYPE_RLO) ? TYPE_R : TYPE_L,\n _isolate: 0\n });\n } else if (!overflowIsolateCount) {\n overflowEmbeddingCount++;\n }\n }\n\n // Isolates: 3.3.2 X5a - X5c\n else if (charType & ISOLATE_INIT_TYPES) {\n // X5c - FSI becomes either RLI or LRI\n if (charType & TYPE_FSI) {\n charType = determineAutoEmbedLevel(i$2 + 1, true) === 1 ? TYPE_RLI : TYPE_LRI;\n }\n\n embedLevels[i$2] = stackTop._level;\n if (stackTop._override) {\n changeCharType(i$2, stackTop._override);\n }\n var level$2 = (charType === TYPE_RLI ? nextOdd : nextEven)(stackTop._level);\n if (level$2 <= MAX_DEPTH && overflowIsolateCount === 0 && overflowEmbeddingCount === 0) {\n validIsolateCount++;\n statusStack.push({\n _level: level$2,\n _override: 0,\n _isolate: 1,\n _isolInitIndex: i$2\n });\n } else {\n overflowIsolateCount++;\n }\n }\n\n // Terminating Isolates: 3.3.2 X6a\n else if (charType & TYPE_PDI) {\n if (overflowIsolateCount > 0) {\n overflowIsolateCount--;\n } else if (validIsolateCount > 0) {\n overflowEmbeddingCount = 0;\n while (!statusStack[statusStack.length - 1]._isolate) {\n statusStack.pop();\n }\n // Add to isolation pairs bidirectional mapping:\n var isolInitIndex = statusStack[statusStack.length - 1]._isolInitIndex;\n if (isolInitIndex != null) {\n isolationPairs.set(isolInitIndex, i$2);\n isolationPairs.set(i$2, isolInitIndex);\n }\n statusStack.pop();\n validIsolateCount--;\n }\n stackTop = statusStack[statusStack.length - 1];\n embedLevels[i$2] = stackTop._level;\n if (stackTop._override) {\n changeCharType(i$2, stackTop._override);\n }\n }\n\n\n // Terminating Embeddings and Overrides: 3.3.2 X7\n else if (charType & TYPE_PDF) {\n if (overflowIsolateCount === 0) {\n if (overflowEmbeddingCount > 0) {\n overflowEmbeddingCount--;\n } else if (!stackTop._isolate && statusStack.length > 1) {\n statusStack.pop();\n stackTop = statusStack[statusStack.length - 1];\n }\n }\n embedLevels[i$2] = stackTop._level; // 5.2\n }\n\n // End of Paragraph: 3.3.2 X8\n else if (charType & TYPE_B) {\n embedLevels[i$2] = paragraph.level;\n }\n }\n\n // Non-formatting characters: 3.3.2 X6\n else {\n embedLevels[i$2] = stackTop._level;\n // NOTE: This exclusion of BN seems to go against what section 5.2 says, but is required for test passage\n if (stackTop._override && charType !== TYPE_BN) {\n changeCharType(i$2, stackTop._override);\n }\n }\n }\n\n // === 3.3.3 Preparations for Implicit Processing ===\n\n // Remove all RLE, LRE, RLO, LRO, PDF, and BN characters: 3.3.3 X9\n // Note: Due to section 5.2, we won't remove them, but we'll use the BN_LIKE_TYPES bitset to\n // easily ignore them all from here on out.\n\n // 3.3.3 X10\n // Compute the set of isolating run sequences as specified by BD13\n var levelRuns = [];\n var currentRun = null;\n for (var i$3 = paragraph.start; i$3 <= paragraph.end; i$3++) {\n var charType$1 = charTypes[i$3];\n if (!(charType$1 & BN_LIKE_TYPES)) {\n var lvl = embedLevels[i$3];\n var isIsolInit = charType$1 & ISOLATE_INIT_TYPES;\n var isPDI = charType$1 === TYPE_PDI;\n if (currentRun && lvl === currentRun._level) {\n currentRun._end = i$3;\n currentRun._endsWithIsolInit = isIsolInit;\n } else {\n levelRuns.push(currentRun = {\n _start: i$3,\n _end: i$3,\n _level: lvl,\n _startsWithPDI: isPDI,\n _endsWithIsolInit: isIsolInit\n });\n }\n }\n }\n var isolatingRunSeqs = []; // [{seqIndices: [], sosType: L|R, eosType: L|R}]\n for (var runIdx = 0; runIdx < levelRuns.length; runIdx++) {\n var run = levelRuns[runIdx];\n if (!run._startsWithPDI || (run._startsWithPDI && !isolationPairs.has(run._start))) {\n var seqRuns = [currentRun = run];\n for (var pdiIndex = (void 0); currentRun && currentRun._endsWithIsolInit && (pdiIndex = isolationPairs.get(currentRun._end)) != null;) {\n for (var i$4 = runIdx + 1; i$4 < levelRuns.length; i$4++) {\n if (levelRuns[i$4]._start === pdiIndex) {\n seqRuns.push(currentRun = levelRuns[i$4]);\n break\n }\n }\n }\n // build flat list of indices across all runs:\n var seqIndices = [];\n for (var i$5 = 0; i$5 < seqRuns.length; i$5++) {\n var run$1 = seqRuns[i$5];\n for (var j = run$1._start; j <= run$1._end; j++) {\n seqIndices.push(j);\n }\n }\n // determine the sos/eos types:\n var firstLevel = embedLevels[seqIndices[0]];\n var prevLevel = paragraph.level;\n for (var i$6 = seqIndices[0] - 1; i$6 >= 0; i$6--) {\n if (!(charTypes[i$6] & BN_LIKE_TYPES)) { //5.2\n prevLevel = embedLevels[i$6];\n break\n }\n }\n var lastIndex = seqIndices[seqIndices.length - 1];\n var lastLevel = embedLevels[lastIndex];\n var nextLevel = paragraph.level;\n if (!(charTypes[lastIndex] & ISOLATE_INIT_TYPES)) {\n for (var i$7 = lastIndex + 1; i$7 <= paragraph.end; i$7++) {\n if (!(charTypes[i$7] & BN_LIKE_TYPES)) { //5.2\n nextLevel = embedLevels[i$7];\n break\n }\n }\n }\n isolatingRunSeqs.push({\n _seqIndices: seqIndices,\n _sosType: Math.max(prevLevel, firstLevel) % 2 ? TYPE_R : TYPE_L,\n _eosType: Math.max(nextLevel, lastLevel) % 2 ? TYPE_R : TYPE_L\n });\n }\n }\n\n // The next steps are done per isolating run sequence\n for (var seqIdx = 0; seqIdx < isolatingRunSeqs.length; seqIdx++) {\n var ref = isolatingRunSeqs[seqIdx];\n var seqIndices$1 = ref._seqIndices;\n var sosType = ref._sosType;\n var eosType = ref._eosType;\n /**\n * All the level runs in an isolating run sequence have the same embedding level.\n * \n * DO NOT change any `embedLevels[i]` within the current scope.\n */\n var embedDirection = ((embedLevels[seqIndices$1[0]]) & 1) ? TYPE_R : TYPE_L;\n\n // === 3.3.4 Resolving Weak Types ===\n\n // W1 + 5.2. Search backward from each NSM to the first character in the isolating run sequence whose\n // bidirectional type is not BN, and set the NSM to ON if it is an isolate initiator or PDI, and to its\n // type otherwise. If the NSM is the first non-BN character, change the NSM to the type of sos.\n if (charTypeCounts.get(TYPE_NSM)) {\n for (var si = 0; si < seqIndices$1.length; si++) {\n var i$8 = seqIndices$1[si];\n if (charTypes[i$8] & TYPE_NSM) {\n var prevType = sosType;\n for (var sj = si - 1; sj >= 0; sj--) {\n if (!(charTypes[seqIndices$1[sj]] & BN_LIKE_TYPES)) { //5.2 scan back to first non-BN\n prevType = charTypes[seqIndices$1[sj]];\n break\n }\n }\n changeCharType(i$8, (prevType & (ISOLATE_INIT_TYPES | TYPE_PDI)) ? TYPE_ON : prevType);\n }\n }\n }\n\n // W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sos)\n // is found. If an AL is found, change the type of the European number to Arabic number.\n if (charTypeCounts.get(TYPE_EN)) {\n for (var si$1 = 0; si$1 < seqIndices$1.length; si$1++) {\n var i$9 = seqIndices$1[si$1];\n if (charTypes[i$9] & TYPE_EN) {\n for (var sj$1 = si$1 - 1; sj$1 >= -1; sj$1--) {\n var prevCharType = sj$1 === -1 ? sosType : charTypes[seqIndices$1[sj$1]];\n if (prevCharType & STRONG_TYPES) {\n if (prevCharType === TYPE_AL) {\n changeCharType(i$9, TYPE_AN);\n }\n break\n }\n }\n }\n }\n }\n\n // W3. Change all ALs to R\n if (charTypeCounts.get(TYPE_AL)) {\n for (var si$2 = 0; si$2 < seqIndices$1.length; si$2++) {\n var i$10 = seqIndices$1[si$2];\n if (charTypes[i$10] & TYPE_AL) {\n changeCharType(i$10, TYPE_R);\n }\n }\n }\n\n // W4. A single European separator between two European numbers changes to a European number. A single common\n // separator between two numbers of the same type changes to that type.\n if (charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) {\n for (var si$3 = 1; si$3 < seqIndices$1.length - 1; si$3++) {\n var i$11 = seqIndices$1[si$3];\n if (charTypes[i$11] & (TYPE_ES | TYPE_CS)) {\n var prevType$1 = 0, nextType = 0;\n for (var sj$2 = si$3 - 1; sj$2 >= 0; sj$2--) {\n prevType$1 = charTypes[seqIndices$1[sj$2]];\n if (!(prevType$1 & BN_LIKE_TYPES)) { //5.2\n break\n }\n }\n for (var sj$3 = si$3 + 1; sj$3 < seqIndices$1.length; sj$3++) {\n nextType = charTypes[seqIndices$1[sj$3]];\n if (!(nextType & BN_LIKE_TYPES)) { //5.2\n break\n }\n }\n if (prevType$1 === nextType && (charTypes[i$11] === TYPE_ES ? prevType$1 === TYPE_EN : (prevType$1 & (TYPE_EN | TYPE_AN)))) {\n changeCharType(i$11, prevType$1);\n }\n }\n }\n }\n\n // W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.\n if (charTypeCounts.get(TYPE_EN)) {\n for (var si$4 = 0; si$4 < seqIndices$1.length; si$4++) {\n var i$12 = seqIndices$1[si$4];\n if (charTypes[i$12] & TYPE_EN) {\n for (var sj$4 = si$4 - 1; sj$4 >= 0 && (charTypes[seqIndices$1[sj$4]] & (TYPE_ET | BN_LIKE_TYPES)); sj$4--) {\n changeCharType(seqIndices$1[sj$4], TYPE_EN);\n }\n for (si$4++; si$4 < seqIndices$1.length && (charTypes[seqIndices$1[si$4]] & (TYPE_ET | BN_LIKE_TYPES | TYPE_EN)); si$4++) {\n if (charTypes[seqIndices$1[si$4]] !== TYPE_EN) {\n changeCharType(seqIndices$1[si$4], TYPE_EN);\n }\n }\n }\n }\n }\n\n // W6. Otherwise, separators and terminators change to Other Neutral.\n if (charTypeCounts.get(TYPE_ET) || charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) {\n for (var si$5 = 0; si$5 < seqIndices$1.length; si$5++) {\n var i$13 = seqIndices$1[si$5];\n if (charTypes[i$13] & (TYPE_ET | TYPE_ES | TYPE_CS)) {\n changeCharType(i$13, TYPE_ON);\n // 5.2 transform adjacent BNs too:\n for (var sj$5 = si$5 - 1; sj$5 >= 0 && (charTypes[seqIndices$1[sj$5]] & BN_LIKE_TYPES); sj$5--) {\n changeCharType(seqIndices$1[sj$5], TYPE_ON);\n }\n for (var sj$6 = si$5 + 1; sj$6 < seqIndices$1.length && (charTypes[seqIndices$1[sj$6]] & BN_LIKE_TYPES); sj$6++) {\n changeCharType(seqIndices$1[sj$6], TYPE_ON);\n }\n }\n }\n }\n\n // W7. Search backward from each instance of a European number until the first strong type (R, L, or sos)\n // is found. If an L is found, then change the type of the European number to L.\n // NOTE: implemented in single forward pass for efficiency\n if (charTypeCounts.get(TYPE_EN)) {\n for (var si$6 = 0, prevStrongType = sosType; si$6 < seqIndices$1.length; si$6++) {\n var i$14 = seqIndices$1[si$6];\n var type = charTypes[i$14];\n if (type & TYPE_EN) {\n if (prevStrongType === TYPE_L) {\n changeCharType(i$14, TYPE_L);\n }\n } else if (type & STRONG_TYPES) {\n prevStrongType = type;\n }\n }\n }\n\n // === 3.3.5 Resolving Neutral and Isolate Formatting Types ===\n\n if (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES)) {\n // N0. Process bracket pairs in an isolating run sequence sequentially in the logical order of the text\n // positions of the opening paired brackets using the logic given below. Within this scope, bidirectional\n // types EN and AN are treated as R.\n var R_TYPES_FOR_N_STEPS = (TYPE_R | TYPE_EN | TYPE_AN);\n var STRONG_TYPES_FOR_N_STEPS = R_TYPES_FOR_N_STEPS | TYPE_L;\n\n // * Identify the bracket pairs in the current isolating run sequence according to BD16.\n var bracketPairs = [];\n {\n var openerStack = [];\n for (var si$7 = 0; si$7 < seqIndices$1.length; si$7++) {\n // NOTE: for any potential bracket character we also test that it still carries a NI\n // type, as that may have been changed earlier. This doesn't seem to be explicitly\n // called out in the spec, but is required for passage of certain tests.\n if (charTypes[seqIndices$1[si$7]] & NEUTRAL_ISOLATE_TYPES) {\n var char = string[seqIndices$1[si$7]];\n var oppositeBracket = (void 0);\n // Opening bracket\n if (openingToClosingBracket(char) !== null) {\n if (openerStack.length < 63) {\n openerStack.push({ char: char, seqIndex: si$7 });\n } else {\n break\n }\n }\n // Closing bracket\n else if ((oppositeBracket = closingToOpeningBracket(char)) !== null) {\n for (var stackIdx = openerStack.length - 1; stackIdx >= 0; stackIdx--) {\n var stackChar = openerStack[stackIdx].char;\n if (stackChar === oppositeBracket ||\n stackChar === closingToOpeningBracket(getCanonicalBracket(char)) ||\n openingToClosingBracket(getCanonicalBracket(stackChar)) === char\n ) {\n bracketPairs.push([openerStack[stackIdx].seqIndex, si$7]);\n openerStack.length = stackIdx; //pop the matching bracket and all following\n break\n }\n }\n }\n }\n }\n bracketPairs.sort(function (a, b) { return a[0] - b[0]; });\n }\n // * For each bracket-pair element in the list of pairs of text positions\n for (var pairIdx = 0; pairIdx < bracketPairs.length; pairIdx++) {\n var ref$1 = bracketPairs[pairIdx];\n var openSeqIdx = ref$1[0];\n var closeSeqIdx = ref$1[1];\n // a. Inspect the bidirectional types of the characters enclosed within the bracket pair.\n // b. If any strong type (either L or R) matching the embedding direction is found, set the type for both\n // brackets in the pair to match the embedding direction.\n var foundStrongType = false;\n var useStrongType = 0;\n for (var si$8 = openSeqIdx + 1; si$8 < closeSeqIdx; si$8++) {\n var i$15 = seqIndices$1[si$8];\n if (charTypes[i$15] & STRONG_TYPES_FOR_N_STEPS) {\n foundStrongType = true;\n var lr = (charTypes[i$15] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;\n if (lr === embedDirection) {\n useStrongType = lr;\n break\n }\n }\n }\n // c. Otherwise, if there is a strong type it must be opposite the embedding direction. Therefore, test\n // for an established context with a preceding strong type by checking backwards before the opening paired\n // bracket until the first strong type (L, R, or sos) is found.\n // 1. If the preceding strong type is also opposite the embedding direction, context is established, so\n // set the type for both brackets in the pair to that direction.\n // 2. Otherwise set the type for both brackets in the pair to the embedding direction.\n if (foundStrongType && !useStrongType) {\n useStrongType = sosType;\n for (var si$9 = openSeqIdx - 1; si$9 >= 0; si$9--) {\n var i$16 = seqIndices$1[si$9];\n if (charTypes[i$16] & STRONG_TYPES_FOR_N_STEPS) {\n var lr$1 = (charTypes[i$16] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;\n if (lr$1 !== embedDirection) {\n useStrongType = lr$1;\n } else {\n useStrongType = embedDirection;\n }\n break\n }\n }\n }\n if (useStrongType) {\n charTypes[seqIndices$1[openSeqIdx]] = charTypes[seqIndices$1[closeSeqIdx]] = useStrongType;\n // * Any number of characters that had original bidirectional character type NSM prior to the application\n // of W1 that immediately follow a paired bracket which changed to L or R under N0 should change to match\n // the type of their preceding bracket.\n if (useStrongType !== embedDirection) {\n for (var si$10 = openSeqIdx + 1; si$10 < seqIndices$1.length; si$10++) {\n if (!(charTypes[seqIndices$1[si$10]] & BN_LIKE_TYPES)) {\n if (getBidiCharType(string[seqIndices$1[si$10]]) & TYPE_NSM) {\n charTypes[seqIndices$1[si$10]] = useStrongType;\n }\n break\n }\n }\n }\n if (useStrongType !== embedDirection) {\n for (var si$11 = closeSeqIdx + 1; si$11 < seqIndices$1.length; si$11++) {\n if (!(charTypes[seqIndices$1[si$11]] & BN_LIKE_TYPES)) {\n if (getBidiCharType(string[seqIndices$1[si$11]]) & TYPE_NSM) {\n charTypes[seqIndices$1[si$11]] = useStrongType;\n }\n break\n }\n }\n }\n }\n }\n\n // N1. A sequence of NIs takes the direction of the surrounding strong text if the text on both sides has the\n // same direction.\n // N2. Any remaining NIs take the embedding direction.\n for (var si$12 = 0; si$12 < seqIndices$1.length; si$12++) {\n if (charTypes[seqIndices$1[si$12]] & NEUTRAL_ISOLATE_TYPES) {\n var niRunStart = si$12, niRunEnd = si$12;\n var prevType$2 = sosType; //si === 0 ? sosType : (charTypes[seqIndices[si - 1]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L\n for (var si2 = si$12 - 1; si2 >= 0; si2--) {\n if (charTypes[seqIndices$1[si2]] & BN_LIKE_TYPES) {\n niRunStart = si2; //5.2 treat BNs adjacent to NIs as NIs\n } else {\n prevType$2 = (charTypes[seqIndices$1[si2]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;\n break\n }\n }\n var nextType$1 = eosType;\n for (var si2$1 = si$12 + 1; si2$1 < seqIndices$1.length; si2$1++) {\n if (charTypes[seqIndices$1[si2$1]] & (NEUTRAL_ISOLATE_TYPES | BN_LIKE_TYPES)) {\n niRunEnd = si2$1;\n } else {\n nextType$1 = (charTypes[seqIndices$1[si2$1]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;\n break\n }\n }\n for (var sj$7 = niRunStart; sj$7 <= niRunEnd; sj$7++) {\n charTypes[seqIndices$1[sj$7]] = prevType$2 === nextType$1 ? prevType$2 : embedDirection;\n }\n si$12 = niRunEnd;\n }\n }\n }\n }\n\n // === 3.3.6 Resolving Implicit Levels ===\n\n for (var i$17 = paragraph.start; i$17 <= paragraph.end; i$17++) {\n var level$3 = embedLevels[i$17];\n var type$1 = charTypes[i$17];\n // I2. For all characters with an odd (right-to-left) embedding level, those of type L, EN or AN go up one level.\n if (level$3 & 1) {\n if (type$1 & (TYPE_L | TYPE_EN | TYPE_AN)) {\n embedLevels[i$17]++;\n }\n }\n // I1. For all characters with an even (left-to-right) embedding level, those of type R go up one level\n // and those of type AN or EN go up two levels.\n else {\n if (type$1 & TYPE_R) {\n embedLevels[i$17]++;\n } else if (type$1 & (TYPE_AN | TYPE_EN)) {\n embedLevels[i$17] += 2;\n }\n }\n\n // 5.2: Resolve any LRE, RLE, LRO, RLO, PDF, or BN to the level of the preceding character if there is one,\n // and otherwise to the base level.\n if (type$1 & BN_LIKE_TYPES) {\n embedLevels[i$17] = i$17 === 0 ? paragraph.level : embedLevels[i$17 - 1];\n }\n\n // 3.4 L1.1-4: Reset the embedding level of segment/paragraph separators, and any sequence of whitespace or\n // isolate formatting characters preceding them or the end of the paragraph, to the paragraph level.\n // NOTE: this will also need to be applied to each individual line ending after line wrapping occurs.\n if (i$17 === paragraph.end || getBidiCharType(string[i$17]) & (TYPE_S | TYPE_B)) {\n for (var j$1 = i$17; j$1 >= 0 && (getBidiCharType(string[j$1]) & TRAILING_TYPES); j$1--) {\n embedLevels[j$1] = paragraph.level;\n }\n }\n }\n }\n\n // DONE! The resolved levels can then be used, after line wrapping, to flip runs of characters\n // according to section 3.4 Reordering Resolved Levels\n return {\n levels: embedLevels,\n paragraphs: paragraphs\n }\n\n function determineAutoEmbedLevel (start, isFSI) {\n // 3.3.1 P2 - P3\n for (var i = start; i < string.length; i++) {\n var charType = charTypes[i];\n if (charType & (TYPE_R | TYPE_AL)) {\n return 1\n }\n if ((charType & (TYPE_B | TYPE_L)) || (isFSI && charType === TYPE_PDI)) {\n return 0\n }\n if (charType & ISOLATE_INIT_TYPES) {\n var pdi = indexOfMatchingPDI(i);\n i = pdi === -1 ? string.length : pdi;\n }\n }\n return 0\n }\n\n function indexOfMatchingPDI (isolateStart) {\n // 3.1.2 BD9\n var isolationLevel = 1;\n for (var i = isolateStart + 1; i < string.length; i++) {\n var charType = charTypes[i];\n if (charType & TYPE_B) {\n break\n }\n if (charType & TYPE_PDI) {\n if (--isolationLevel === 0) {\n return i\n }\n } else if (charType & ISOLATE_INIT_TYPES) {\n isolationLevel++;\n }\n }\n return -1\n }\n }\n\n // Bidi mirrored chars data, auto generated\n var data = \"14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1\";\n\n var mirrorMap;\n\n function parse () {\n if (!mirrorMap) {\n //const start = performance.now()\n var ref = parseCharacterMap(data, true);\n var map = ref.map;\n var reverseMap = ref.reverseMap;\n // Combine both maps into one\n reverseMap.forEach(function (value, key) {\n map.set(key, value);\n });\n mirrorMap = map;\n //console.log(`mirrored chars parsed in ${performance.now() - start}ms`)\n }\n }\n\n function getMirroredCharacter (char) {\n parse();\n return mirrorMap.get(char) || null\n }\n\n /**\n * Given a string and its resolved embedding levels, build a map of indices to replacement chars\n * for any characters in right-to-left segments that have defined mirrored characters.\n * @param string\n * @param embeddingLevels\n * @param [start]\n * @param [end]\n * @return {Map}\n */\n function getMirroredCharactersMap(string, embeddingLevels, start, end) {\n var strLen = string.length;\n start = Math.max(0, start == null ? 0 : +start);\n end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);\n\n var map = new Map();\n for (var i = start; i <= end; i++) {\n if (embeddingLevels[i] & 1) { //only odd (rtl) levels\n var mirror = getMirroredCharacter(string[i]);\n if (mirror !== null) {\n map.set(i, mirror);\n }\n }\n }\n return map\n }\n\n /**\n * Given a start and end denoting a single line within a string, and a set of precalculated\n * bidi embedding levels, produce a list of segments whose ordering should be flipped, in sequence.\n * @param {string} string - the full input string\n * @param {GetEmbeddingLevelsResult} embeddingLevelsResult - the result object from getEmbeddingLevels\n * @param {number} [start] - first character in a subset of the full string\n * @param {number} [end] - last character in a subset of the full string\n * @return {number[][]} - the list of start/end segments that should be flipped, in order.\n */\n function getReorderSegments(string, embeddingLevelsResult, start, end) {\n var strLen = string.length;\n start = Math.max(0, start == null ? 0 : +start);\n end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);\n\n var segments = [];\n embeddingLevelsResult.paragraphs.forEach(function (paragraph) {\n var lineStart = Math.max(start, paragraph.start);\n var lineEnd = Math.min(end, paragraph.end);\n if (lineStart < lineEnd) {\n // Local slice for mutation\n var lineLevels = embeddingLevelsResult.levels.slice(lineStart, lineEnd + 1);\n\n // 3.4 L1.4: Reset any sequence of whitespace characters and/or isolate formatting characters at the\n // end of the line to the paragraph level.\n for (var i = lineEnd; i >= lineStart && (getBidiCharType(string[i]) & TRAILING_TYPES); i--) {\n lineLevels[i] = paragraph.level;\n }\n\n // L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels\n // not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher.\n var maxLevel = paragraph.level;\n var minOddLevel = Infinity;\n for (var i$1 = 0; i$1 < lineLevels.length; i$1++) {\n var level = lineLevels[i$1];\n if (level > maxLevel) { maxLevel = level; }\n if (level < minOddLevel) { minOddLevel = level | 1; }\n }\n for (var lvl = maxLevel; lvl >= minOddLevel; lvl--) {\n for (var i$2 = 0; i$2 < lineLevels.length; i$2++) {\n if (lineLevels[i$2] >= lvl) {\n var segStart = i$2;\n while (i$2 + 1 < lineLevels.length && lineLevels[i$2 + 1] >= lvl) {\n i$2++;\n }\n if (i$2 > segStart) {\n segments.push([segStart + lineStart, i$2 + lineStart]);\n }\n }\n }\n }\n }\n });\n return segments\n }\n\n /**\n * @param {string} string\n * @param {GetEmbeddingLevelsResult} embedLevelsResult\n * @param {number} [start]\n * @param {number} [end]\n * @return {string} the new string with bidi segments reordered\n */\n function getReorderedString(string, embedLevelsResult, start, end) {\n var indices = getReorderedIndices(string, embedLevelsResult, start, end);\n var chars = [].concat( string );\n indices.forEach(function (charIndex, i) {\n chars[i] = (\n (embedLevelsResult.levels[charIndex] & 1) ? getMirroredCharacter(string[charIndex]) : null\n ) || string[charIndex];\n });\n return chars.join('')\n }\n\n /**\n * @param {string} string\n * @param {GetEmbeddingLevelsResult} embedLevelsResult\n * @param {number} [start]\n * @param {number} [end]\n * @return {number[]} an array with character indices in their new bidi order\n */\n function getReorderedIndices(string, embedLevelsResult, start, end) {\n var segments = getReorderSegments(string, embedLevelsResult, start, end);\n // Fill an array with indices\n var indices = [];\n for (var i = 0; i < string.length; i++) {\n indices[i] = i;\n }\n // Reverse each segment in order\n segments.forEach(function (ref) {\n var start = ref[0];\n var end = ref[1];\n\n var slice = indices.slice(start, end + 1);\n for (var i = slice.length; i--;) {\n indices[end - i] = slice[i];\n }\n });\n return indices\n }\n\n exports.closingToOpeningBracket = closingToOpeningBracket;\n exports.getBidiCharType = getBidiCharType;\n exports.getBidiCharTypeName = getBidiCharTypeName;\n exports.getCanonicalBracket = getCanonicalBracket;\n exports.getEmbeddingLevels = getEmbeddingLevels;\n exports.getMirroredCharacter = getMirroredCharacter;\n exports.getMirroredCharactersMap = getMirroredCharactersMap;\n exports.getReorderSegments = getReorderSegments;\n exports.getReorderedIndices = getReorderedIndices;\n exports.getReorderedString = getReorderedString;\n exports.openingToClosingBracket = openingToClosingBracket;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}({}));\nreturn bidi}\n\nexport default bidiFactory;\n","import { ShaderChunk, UniformsUtils, MeshDepthMaterial, RGBADepthPacking, MeshDistanceMaterial, ShaderLib, Matrix4, Vector3, Mesh, CylinderGeometry, Vector2, MeshStandardMaterial, DoubleSide } from 'three';\n\n/**\n * Regular expression for matching the `void main() {` opener line in GLSL.\n * @type {RegExp}\n */\nconst voidMainRegExp = /\\bvoid\\s+main\\s*\\(\\s*\\)\\s*{/g;\n\n/**\n * Recursively expands all `#include ` statements within string of shader code.\n * Copied from three's WebGLProgram#parseIncludes for external use.\n *\n * @param {string} source - The GLSL source code to evaluate\n * @return {string} The GLSL code with all includes expanded\n */\nfunction expandShaderIncludes( source ) {\n const pattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n function replace(match, include) {\n let chunk = ShaderChunk[include];\n return chunk ? expandShaderIncludes(chunk) : match\n }\n return source.replace( pattern, replace )\n}\n\n/*\n * This is a direct copy of MathUtils.generateUUID from Three.js, to preserve compatibility with three\n * versions before 0.113.0 as it was changed from Math to MathUtils in that version.\n * https://github.com/mrdoob/three.js/blob/dd8b5aa3b270c17096b90945cd2d6d1b13aaec53/src/math/MathUtils.js#L16\n */\n\nconst _lut = [];\n\nfor (let i = 0; i < 256; i++) {\n _lut[i] = (i < 16 ? '0' : '') + (i).toString(16);\n}\n\nfunction generateUUID() {\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\n\n const d0 = Math.random() * 0xffffffff | 0;\n const d1 = Math.random() * 0xffffffff | 0;\n const d2 = Math.random() * 0xffffffff | 0;\n const d3 = Math.random() * 0xffffffff | 0;\n const uuid = _lut[d0 & 0xff] + _lut[d0 >> 8 & 0xff] + _lut[d0 >> 16 & 0xff] + _lut[d0 >> 24 & 0xff] + '-' +\n _lut[d1 & 0xff] + _lut[d1 >> 8 & 0xff] + '-' + _lut[d1 >> 16 & 0x0f | 0x40] + _lut[d1 >> 24 & 0xff] + '-' +\n _lut[d2 & 0x3f | 0x80] + _lut[d2 >> 8 & 0xff] + '-' + _lut[d2 >> 16 & 0xff] + _lut[d2 >> 24 & 0xff] +\n _lut[d3 & 0xff] + _lut[d3 >> 8 & 0xff] + _lut[d3 >> 16 & 0xff] + _lut[d3 >> 24 & 0xff];\n\n // .toUpperCase() here flattens concatenated strings to save heap memory space.\n return uuid.toUpperCase()\n\n}\n\n// Local assign polyfill to avoid importing troika-core\nconst assign = Object.assign || function(/*target, ...sources*/) {\n let target = arguments[0];\n for (let i = 1, len = arguments.length; i < len; i++) {\n let source = arguments[i];\n if (source) {\n for (let prop in source) {\n if (Object.prototype.hasOwnProperty.call(source, prop)) {\n target[prop] = source[prop];\n }\n }\n }\n }\n return target\n};\n\n\nconst epoch = Date.now();\nconst CONSTRUCTOR_CACHE = new WeakMap();\nconst SHADER_UPGRADE_CACHE = new Map();\n\n// Material ids must be integers, but we can't access the increment from Three's `Material` module,\n// so let's choose a sufficiently large starting value that should theoretically never collide.\nlet materialInstanceId = 1e10;\n\n/**\n * A utility for creating a custom shader material derived from another material's\n * shaders. This allows you to inject custom shader logic and transforms into the\n * builtin ThreeJS materials without having to recreate them from scratch.\n *\n * @param {THREE.Material} baseMaterial - the original material to derive from\n *\n * @param {Object} options - How the base material should be modified.\n * @param {Object} options.defines - Custom `defines` for the material\n * @param {Object} options.extensions - Custom `extensions` for the material, e.g. `{derivatives: true}`\n * @param {Object} options.uniforms - Custom `uniforms` for use in the modified shader. These can\n * be accessed and manipulated via the resulting material's `uniforms` property, just like\n * in a ShaderMaterial. You do not need to repeat the base material's own uniforms here.\n * @param {String} options.timeUniform - If specified, a uniform of this name will be injected into\n * both shaders, and it will automatically be updated on each render frame with a number of\n * elapsed milliseconds. The \"zero\" epoch time is not significant so don't rely on this as a\n * true calendar time.\n * @param {String} options.vertexDefs - Custom GLSL code to inject into the vertex shader's top-level\n * definitions, above the `void main()` function.\n * @param {String} options.vertexMainIntro - Custom GLSL code to inject at the top of the vertex\n * shader's `void main` function.\n * @param {String} options.vertexMainOutro - Custom GLSL code to inject at the end of the vertex\n * shader's `void main` function.\n * @param {String} options.vertexTransform - Custom GLSL code to manipulate the `position`, `normal`,\n * and/or `uv` vertex attributes. This code will be wrapped within a standalone function with\n * those attributes exposed by their normal names as read/write values.\n * @param {String} options.fragmentDefs - Custom GLSL code to inject into the fragment shader's top-level\n * definitions, above the `void main()` function.\n * @param {String} options.fragmentMainIntro - Custom GLSL code to inject at the top of the fragment\n * shader's `void main` function.\n * @param {String} options.fragmentMainOutro - Custom GLSL code to inject at the end of the fragment\n * shader's `void main` function. You can manipulate `gl_FragColor` here but keep in mind it goes\n * after any of ThreeJS's color postprocessing shader chunks (tonemapping, fog, etc.), so if you\n * want those to apply to your changes use `fragmentColorTransform` instead.\n * @param {String} options.fragmentColorTransform - Custom GLSL code to manipulate the `gl_FragColor`\n * output value. Will be injected near the end of the `void main` function, but before any\n * of ThreeJS's color postprocessing shader chunks (tonemapping, fog, etc.), and before the\n * `fragmentMainOutro`.\n * @param {function<{vertexShader,fragmentShader}>:{vertexShader,fragmentShader}} options.customRewriter - A function\n * for performing custom rewrites of the full shader code. Useful if you need to do something\n * special that's not covered by the other builtin options. This function will be executed before\n * any other transforms are applied.\n * @param {boolean} options.chained - Set to `true` to prototype-chain the derived material to the base\n * material, rather than the default behavior of copying it. This allows the derived material to\n * automatically pick up changes made to the base material and its properties. This can be useful\n * where the derived material is hidden from the user as an implementation detail, allowing them\n * to work with the original material like normal. But it can result in unexpected behavior if not\n * handled carefully.\n *\n * @return {THREE.Material}\n *\n * The returned material will also have two new methods, `getDepthMaterial()` and `getDistanceMaterial()`,\n * which can be called to get a variant of the derived material for use in shadow casting. If the\n * target mesh is expected to cast shadows, then you can assign these to the mesh's `customDepthMaterial`\n * (for directional and spot lights) and/or `customDistanceMaterial` (for point lights) properties to\n * allow the cast shadow to honor your derived shader's vertex transforms and discarded fragments. These\n * will also set a custom `#define IS_DEPTH_MATERIAL` or `#define IS_DISTANCE_MATERIAL` that you can look\n * for in your derived shaders with `#ifdef` to customize their behavior for the depth or distance\n * scenarios, e.g. skipping antialiasing or expensive shader logic.\n */\nfunction createDerivedMaterial(baseMaterial, options) {\n // Generate a key that is unique to the content of these `options`. We'll use this\n // throughout for caching and for generating the upgraded shader code. This increases\n // the likelihood that the resulting shaders will line up across multiple calls so\n // their GL programs can be shared and cached.\n const optionsKey = getKeyForOptions(options);\n\n // First check to see if we've already derived from this baseMaterial using this\n // unique set of options, and if so reuse the constructor to avoid some allocations.\n let ctorsByDerivation = CONSTRUCTOR_CACHE.get(baseMaterial);\n if (!ctorsByDerivation) {\n CONSTRUCTOR_CACHE.set(baseMaterial, (ctorsByDerivation = Object.create(null)));\n }\n if (ctorsByDerivation[optionsKey]) {\n return new ctorsByDerivation[optionsKey]()\n }\n\n const privateBeforeCompileProp = `_onBeforeCompile${optionsKey}`;\n\n // Private onBeforeCompile handler that injects the modified shaders and uniforms when\n // the renderer switches to this material's program\n const onBeforeCompile = function (shaderInfo, renderer) {\n baseMaterial.onBeforeCompile.call(this, shaderInfo, renderer);\n\n // Upgrade the shaders, caching the result by incoming source code\n const cacheKey = this.customProgramCacheKey() + '|' + shaderInfo.vertexShader + '|' + shaderInfo.fragmentShader;\n let upgradedShaders = SHADER_UPGRADE_CACHE[cacheKey];\n if (!upgradedShaders) {\n const upgraded = upgradeShaders(this, shaderInfo, options, optionsKey);\n upgradedShaders = SHADER_UPGRADE_CACHE[cacheKey] = upgraded;\n }\n\n // Inject upgraded shaders and uniforms into the program\n shaderInfo.vertexShader = upgradedShaders.vertexShader;\n shaderInfo.fragmentShader = upgradedShaders.fragmentShader;\n assign(shaderInfo.uniforms, this.uniforms);\n\n // Inject auto-updating time uniform if requested\n if (options.timeUniform) {\n shaderInfo.uniforms[options.timeUniform] = {\n get value() {return Date.now() - epoch}\n };\n }\n\n // Users can still add their own handlers on top of ours\n if (this[privateBeforeCompileProp]) {\n this[privateBeforeCompileProp](shaderInfo);\n }\n };\n\n const DerivedMaterial = function DerivedMaterial() {\n return derive(options.chained ? baseMaterial : baseMaterial.clone())\n };\n\n const derive = function(base) {\n // Prototype chain to the base material\n const derived = Object.create(base, descriptor);\n\n // Store the baseMaterial for reference; this is always the original even when cloning\n Object.defineProperty(derived, 'baseMaterial', { value: baseMaterial });\n\n // Needs its own ids\n Object.defineProperty(derived, 'id', { value: materialInstanceId++ });\n derived.uuid = generateUUID();\n\n // Merge uniforms, defines, and extensions\n derived.uniforms = assign({}, base.uniforms, options.uniforms);\n derived.defines = assign({}, base.defines, options.defines);\n derived.defines[`TROIKA_DERIVED_MATERIAL_${optionsKey}`] = ''; //force a program change from the base material\n derived.extensions = assign({}, base.extensions, options.extensions);\n\n // Don't inherit EventDispatcher listeners\n derived._listeners = undefined;\n\n return derived\n };\n\n const descriptor = {\n constructor: {value: DerivedMaterial},\n isDerivedMaterial: {value: true},\n\n customProgramCacheKey: {\n writable: true,\n configurable: true,\n value: function () {\n return baseMaterial.customProgramCacheKey() + '|' + optionsKey\n }\n },\n\n onBeforeCompile: {\n get() {\n return onBeforeCompile\n },\n set(fn) {\n this[privateBeforeCompileProp] = fn;\n }\n },\n\n copy: {\n writable: true,\n configurable: true,\n value: function (source) {\n baseMaterial.copy.call(this, source);\n if (!baseMaterial.isShaderMaterial && !baseMaterial.isDerivedMaterial) {\n assign(this.extensions, source.extensions);\n assign(this.defines, source.defines);\n assign(this.uniforms, UniformsUtils.clone(source.uniforms));\n }\n return this\n }\n },\n\n clone: {\n writable: true,\n configurable: true,\n value: function () {\n const newBase = new baseMaterial.constructor();\n return derive(newBase).copy(this)\n }\n },\n\n /**\n * Utility to get a MeshDepthMaterial that will honor this derived material's vertex\n * transformations and discarded fragments.\n */\n getDepthMaterial: {\n writable: true,\n configurable: true,\n value: function() {\n let depthMaterial = this._depthMaterial;\n if (!depthMaterial) {\n depthMaterial = this._depthMaterial = createDerivedMaterial(\n baseMaterial.isDerivedMaterial\n ? baseMaterial.getDepthMaterial()\n : new MeshDepthMaterial({ depthPacking: RGBADepthPacking }),\n options\n );\n depthMaterial.defines.IS_DEPTH_MATERIAL = '';\n depthMaterial.uniforms = this.uniforms; //automatically recieve same uniform values\n }\n return depthMaterial\n }\n },\n\n /**\n * Utility to get a MeshDistanceMaterial that will honor this derived material's vertex\n * transformations and discarded fragments.\n */\n getDistanceMaterial: {\n writable: true,\n configurable: true,\n value: function() {\n let distanceMaterial = this._distanceMaterial;\n if (!distanceMaterial) {\n distanceMaterial = this._distanceMaterial = createDerivedMaterial(\n baseMaterial.isDerivedMaterial\n ? baseMaterial.getDistanceMaterial()\n : new MeshDistanceMaterial(),\n options\n );\n distanceMaterial.defines.IS_DISTANCE_MATERIAL = '';\n distanceMaterial.uniforms = this.uniforms; //automatically recieve same uniform values\n }\n return distanceMaterial\n }\n },\n\n dispose: {\n writable: true,\n configurable: true,\n value() {\n const {_depthMaterial, _distanceMaterial} = this;\n if (_depthMaterial) _depthMaterial.dispose();\n if (_distanceMaterial) _distanceMaterial.dispose();\n baseMaterial.dispose.call(this);\n }\n }\n };\n\n ctorsByDerivation[optionsKey] = DerivedMaterial;\n return new DerivedMaterial()\n}\n\n\nfunction upgradeShaders(material, {vertexShader, fragmentShader}, options, key) {\n let {\n vertexDefs,\n vertexMainIntro,\n vertexMainOutro,\n vertexTransform,\n fragmentDefs,\n fragmentMainIntro,\n fragmentMainOutro,\n fragmentColorTransform,\n customRewriter,\n timeUniform\n } = options;\n\n vertexDefs = vertexDefs || '';\n vertexMainIntro = vertexMainIntro || '';\n vertexMainOutro = vertexMainOutro || '';\n fragmentDefs = fragmentDefs || '';\n fragmentMainIntro = fragmentMainIntro || '';\n fragmentMainOutro = fragmentMainOutro || '';\n\n // Expand includes if needed\n if (vertexTransform || customRewriter) {\n vertexShader = expandShaderIncludes(vertexShader);\n }\n if (fragmentColorTransform || customRewriter) {\n // We need to be able to find postprocessing chunks after include expansion in order to\n // put them after the fragmentColorTransform, so mark them with comments first. Even if\n // this particular derivation doesn't have a fragmentColorTransform, other derivations may,\n // so we still mark them.\n fragmentShader = fragmentShader.replace(\n /^[ \\t]*#include <((?:tonemapping|encodings|fog|premultiplied_alpha|dithering)_fragment)>/gm,\n '\\n//!BEGIN_POST_CHUNK $1\\n$&\\n//!END_POST_CHUNK\\n'\n );\n fragmentShader = expandShaderIncludes(fragmentShader);\n }\n\n // Apply custom rewriter function\n if (customRewriter) {\n let res = customRewriter({vertexShader, fragmentShader});\n vertexShader = res.vertexShader;\n fragmentShader = res.fragmentShader;\n }\n\n // The fragmentColorTransform needs to go before any postprocessing chunks, so extract\n // those and re-insert them into the outro in the correct place:\n if (fragmentColorTransform) {\n let postChunks = [];\n fragmentShader = fragmentShader.replace(\n /^\\/\\/!BEGIN_POST_CHUNK[^]+?^\\/\\/!END_POST_CHUNK/gm, // [^]+? = non-greedy match of any chars including newlines\n match => {\n postChunks.push(match);\n return ''\n }\n );\n fragmentMainOutro = `${fragmentColorTransform}\\n${postChunks.join('\\n')}\\n${fragmentMainOutro}`;\n }\n\n // Inject auto-updating time uniform if requested\n if (timeUniform) {\n const code = `\\nuniform float ${timeUniform};\\n`;\n vertexDefs = code + vertexDefs;\n fragmentDefs = code + fragmentDefs;\n }\n\n // Inject a function for the vertexTransform and rename all usages of position/normal/uv\n if (vertexTransform) {\n // Hoist these defs to the very top so they work in other function defs\n vertexShader = `vec3 troika_position_${key};\nvec3 troika_normal_${key};\nvec2 troika_uv_${key};\n${vertexShader}\n`;\n vertexDefs = `${vertexDefs}\nvoid troikaVertexTransform${key}(inout vec3 position, inout vec3 normal, inout vec2 uv) {\n ${vertexTransform}\n}\n`;\n vertexMainIntro = `\ntroika_position_${key} = vec3(position);\ntroika_normal_${key} = vec3(normal);\ntroika_uv_${key} = vec2(uv);\ntroikaVertexTransform${key}(troika_position_${key}, troika_normal_${key}, troika_uv_${key});\n${vertexMainIntro}\n`;\n vertexShader = vertexShader.replace(/\\b(position|normal|uv)\\b/g, (match, match1, index, fullStr) => {\n return /\\battribute\\s+vec[23]\\s+$/.test(fullStr.substr(0, index)) ? match1 : `troika_${match1}_${key}`\n });\n\n // Three r152 introduced the MAP_UV token, replace it too if it's pointing to the main 'uv'\n // Perhaps the other textures too going forward?\n if (!(material.map && material.map.channel > 0)) {\n vertexShader = vertexShader.replace(/\\bMAP_UV\\b/g, `troika_uv_${key}`);\n }\n }\n\n // Inject defs and intro/outro snippets\n vertexShader = injectIntoShaderCode(vertexShader, key, vertexDefs, vertexMainIntro, vertexMainOutro);\n fragmentShader = injectIntoShaderCode(fragmentShader, key, fragmentDefs, fragmentMainIntro, fragmentMainOutro);\n\n return {\n vertexShader,\n fragmentShader\n }\n}\n\nfunction injectIntoShaderCode(shaderCode, id, defs, intro, outro) {\n if (intro || outro || defs) {\n shaderCode = shaderCode.replace(voidMainRegExp, `\n${defs}\nvoid troikaOrigMain${id}() {`\n );\n shaderCode += `\nvoid main() {\n ${intro}\n troikaOrigMain${id}();\n ${outro}\n}`;\n }\n return shaderCode\n}\n\n\nfunction optionsJsonReplacer(key, value) {\n return key === 'uniforms' ? undefined : typeof value === 'function' ? value.toString() : value\n}\n\nlet _idCtr = 0;\nconst optionsHashesToIds = new Map();\nfunction getKeyForOptions(options) {\n const optionsHash = JSON.stringify(options, optionsJsonReplacer);\n let id = optionsHashesToIds.get(optionsHash);\n if (id == null) {\n optionsHashesToIds.set(optionsHash, (id = ++_idCtr));\n }\n return id\n}\n\n// Copied from threejs WebGLPrograms.js so we can resolve builtin materials to their shaders\n// TODO how can we keep this from getting stale?\nconst MATERIAL_TYPES_TO_SHADERS = {\n MeshDepthMaterial: 'depth',\n MeshDistanceMaterial: 'distanceRGBA',\n MeshNormalMaterial: 'normal',\n MeshBasicMaterial: 'basic',\n MeshLambertMaterial: 'lambert',\n MeshPhongMaterial: 'phong',\n MeshToonMaterial: 'toon',\n MeshStandardMaterial: 'physical',\n MeshPhysicalMaterial: 'physical',\n MeshMatcapMaterial: 'matcap',\n LineBasicMaterial: 'basic',\n LineDashedMaterial: 'dashed',\n PointsMaterial: 'points',\n ShadowMaterial: 'shadow',\n SpriteMaterial: 'sprite'\n};\n\n/**\n * Given a Three.js `Material` instance, find the shaders/uniforms that will be\n * used to render that material.\n *\n * @param material - the Material instance\n * @return {object} - the material's shader info: `{uniforms:{}, fragmentShader:'', vertexShader:''}`\n */\nfunction getShadersForMaterial(material) {\n let builtinType = MATERIAL_TYPES_TO_SHADERS[material.type];\n return builtinType ? ShaderLib[builtinType] : material //TODO fallback for unknown type?\n}\n\n/**\n * Find all uniforms and their types within a shader code string.\n *\n * @param {string} shader - The shader code to parse\n * @return {object} mapping of uniform names to their glsl type\n */\nfunction getShaderUniformTypes(shader) {\n let uniformRE = /\\buniform\\s+(int|float|vec[234]|mat[34])\\s+([A-Za-z_][\\w]*)/g;\n let uniforms = Object.create(null);\n let match;\n while ((match = uniformRE.exec(shader)) !== null) {\n uniforms[match[2]] = match[1];\n }\n return uniforms\n}\n\n/**\n * Helper for smoothing out the `m.getInverse(x)` --> `m.copy(x).invert()` conversion\n * that happened in ThreeJS r123.\n * @param {Matrix4} srcMatrix\n * @param {Matrix4} [tgtMatrix]\n */\nfunction invertMatrix4(srcMatrix, tgtMatrix = new Matrix4()) {\n if (typeof tgtMatrix.invert === 'function') {\n tgtMatrix.copy(srcMatrix).invert();\n } else {\n tgtMatrix.getInverse(srcMatrix);\n }\n return tgtMatrix\n}\n\n/*\nInput geometry is a cylinder with r=1, height in y dimension from 0 to 1,\ndivided into a reasonable number of height segments.\n*/\n\nconst vertexDefs = `\nuniform vec3 pointA;\nuniform vec3 controlA;\nuniform vec3 controlB;\nuniform vec3 pointB;\nuniform float radius;\nvarying float bezierT;\n\nvec3 cubicBezier(vec3 p1, vec3 c1, vec3 c2, vec3 p2, float t) {\n float t2 = 1.0 - t;\n float b0 = t2 * t2 * t2;\n float b1 = 3.0 * t * t2 * t2;\n float b2 = 3.0 * t * t * t2;\n float b3 = t * t * t;\n return b0 * p1 + b1 * c1 + b2 * c2 + b3 * p2;\n}\n\nvec3 cubicBezierDerivative(vec3 p1, vec3 c1, vec3 c2, vec3 p2, float t) {\n float t2 = 1.0 - t;\n return -3.0 * p1 * t2 * t2 +\n c1 * (3.0 * t2 * t2 - 6.0 * t2 * t) +\n c2 * (6.0 * t2 * t - 3.0 * t * t) +\n 3.0 * p2 * t * t;\n}\n`;\n\nconst vertexTransform = `\nfloat t = position.y;\nbezierT = t;\nvec3 bezierCenterPos = cubicBezier(pointA, controlA, controlB, pointB, t);\nvec3 bezierDir = normalize(cubicBezierDerivative(pointA, controlA, controlB, pointB, t));\n\n// Make \"sideways\" always perpendicular to the camera ray; this ensures that any twists\n// in the cylinder occur where you won't see them: \nvec3 viewDirection = normalMatrix * vec3(0.0, 0.0, 1.0);\nif (bezierDir == viewDirection) {\n bezierDir = normalize(cubicBezierDerivative(pointA, controlA, controlB, pointB, t == 1.0 ? t - 0.0001 : t + 0.0001));\n}\nvec3 sideways = normalize(cross(bezierDir, viewDirection));\nvec3 upish = normalize(cross(sideways, bezierDir));\n\n// Build a matrix for transforming this disc in the cylinder:\nmat4 discTx;\ndiscTx[0].xyz = sideways * radius;\ndiscTx[1].xyz = bezierDir * radius;\ndiscTx[2].xyz = upish * radius;\ndiscTx[3].xyz = bezierCenterPos;\ndiscTx[3][3] = 1.0;\n\n// Apply transform, ignoring original y\nposition = (discTx * vec4(position.x, 0.0, position.z, 1.0)).xyz;\nnormal = normalize(mat3(discTx) * normal);\n`;\n\nconst fragmentDefs = `\nuniform vec3 dashing;\nvarying float bezierT;\n`;\n\nconst fragmentMainIntro = `\nif (dashing.x + dashing.y > 0.0) {\n float dashFrac = mod(bezierT - dashing.z, dashing.x + dashing.y);\n if (dashFrac > dashing.x) {\n discard;\n }\n}\n`;\n\n// Debugging: separate color for each of the 6 sides:\n// const fragmentColorTransform = `\n// float sideNum = floor(vUV.x * 6.0);\n// vec3 mixColor = sideNum < 1.0 ? vec3(1.0, 0.0, 0.0) :\n// sideNum < 2.0 ? vec3(0.0, 1.0, 1.0) :\n// sideNum < 3.0 ? vec3(1.0, 1.0, 0.0) :\n// sideNum < 4.0 ? vec3(0.0, 0.0, 1.0) :\n// sideNum < 5.0 ? vec3(0.0, 1.0, 0.0) :\n// vec3(1.0, 0.0, 1.0);\n// gl_FragColor.xyz = mix(gl_FragColor.xyz, mixColor, 0.5);\n// `\n\n\n\nfunction createBezierMeshMaterial(baseMaterial) {\n return createDerivedMaterial(\n baseMaterial,\n {\n chained: true,\n uniforms: {\n pointA: {value: new Vector3()},\n controlA: {value: new Vector3()},\n controlB: {value: new Vector3()},\n pointB: {value: new Vector3()},\n radius: {value: 0.01},\n dashing: {value: new Vector3()} //on, off, offset\n },\n vertexDefs,\n vertexTransform,\n fragmentDefs,\n fragmentMainIntro\n }\n )\n}\n\nlet geometry = null;\n\nconst defaultBaseMaterial = /*#__PURE__*/new MeshStandardMaterial({color: 0xffffff, side: DoubleSide});\n\n\n/**\n * A ThreeJS `Mesh` that bends a tube shape along a 3D cubic bezier path. The bending is done\n * by deforming a straight cylindrical geometry in the vertex shader based on a set of four\n * control point uniforms. It patches the necessary GLSL into the mesh's assigned `material`\n * automatically.\n *\n * The cubiz bezier path is determined by its four `Vector3` properties:\n * - `pointA`\n * - `controlA`\n * - `controlB`\n * - `pointB`\n *\n * The tube's radius is controlled by its `radius` property, which defaults to `0.01`.\n *\n * You can also give the tube a dashed appearance with two properties:\n *\n * - `dashArray` - an array of two numbers, defining the length of \"on\" and \"off\" parts of\n * the dash. Each is a 0-1 ratio of the entire path's length. (Actually this is the `t` length\n * used as input to the cubic bezier function, not its visible length.)\n * - `dashOffset` - offset of where the dash starts. You can animate this to make the dashes move.\n *\n * Note that the dashes will appear like a hollow tube, not solid. This will be more apparent on\n * thicker tubes.\n *\n * TODO: proper geometry bounding sphere and raycasting\n * TODO: allow control of the geometry's segment counts\n */\nclass BezierMesh extends Mesh {\n static getGeometry() {\n return geometry || (geometry =\n new CylinderGeometry(1, 1, 1, 6, 64).translate(0, 0.5, 0)\n )\n }\n\n constructor() {\n super(\n BezierMesh.getGeometry(),\n defaultBaseMaterial\n );\n\n this.pointA = new Vector3();\n this.controlA = new Vector3();\n this.controlB = new Vector3();\n this.pointB = new Vector3();\n this.radius = 0.01;\n this.dashArray = new Vector2();\n this.dashOffset = 0;\n\n // TODO - disabling frustum culling until I figure out how to customize the\n // geometry's bounding sphere that gets used\n this.frustumCulled = false;\n }\n\n // Handler for automatically wrapping the base material with our upgrades. We do the wrapping\n // lazily on _read_ rather than write to avoid unnecessary wrapping on transient values.\n get material() {\n let derivedMaterial = this._derivedMaterial;\n const baseMaterial = this._baseMaterial || this._defaultMaterial || (this._defaultMaterial = defaultBaseMaterial.clone());\n if (!derivedMaterial || derivedMaterial.baseMaterial !== baseMaterial) {\n derivedMaterial = this._derivedMaterial = createBezierMeshMaterial(baseMaterial);\n // dispose the derived material when its base material is disposed:\n baseMaterial.addEventListener('dispose', function onDispose() {\n baseMaterial.removeEventListener('dispose', onDispose);\n derivedMaterial.dispose();\n });\n }\n return derivedMaterial\n }\n set material(baseMaterial) {\n this._baseMaterial = baseMaterial;\n }\n\n // Create and update material for shadows upon request:\n get customDepthMaterial() {\n return this.material.getDepthMaterial()\n }\n get customDistanceMaterial() {\n return this.material.getDistanceMaterial()\n }\n\n onBeforeRender() {\n const {uniforms} = this.material;\n const {pointA, controlA, controlB, pointB, radius, dashArray, dashOffset} = this;\n uniforms.pointA.value.copy(pointA);\n uniforms.controlA.value.copy(controlA);\n uniforms.controlB.value.copy(controlB);\n uniforms.pointB.value.copy(pointB);\n uniforms.radius.value = radius;\n uniforms.dashing.value.set(dashArray.x, dashArray.y, dashOffset || 0);\n }\n\n raycast(/*raycaster, intersects*/) {\n // TODO - just fail for now\n }\n}\n\nexport { BezierMesh, createDerivedMaterial, expandShaderIncludes, getShaderUniformTypes, getShadersForMaterial, invertMatrix4, voidMainRegExp };\n","import {\n\tFileLoader,\n\tLoader,\n\tShapePath\n} from 'three';\n\nclass FontLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tconst font = scope.parse( JSON.parse( text ) );\n\n\t\t\tif ( onLoad ) onLoad( font );\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\treturn new Font( json );\n\n\t}\n\n}\n\n//\n\nclass Font {\n\n\tconstructor( data ) {\n\n\t\tthis.isFont = true;\n\n\t\tthis.type = 'Font';\n\n\t\tthis.data = data;\n\n\t}\n\n\tgenerateShapes( text, size = 100 ) {\n\n\t\tconst shapes = [];\n\t\tconst paths = createPaths( text, size, this.data );\n\n\t\tfor ( let p = 0, pl = paths.length; p < pl; p ++ ) {\n\n\t\t\tshapes.push( ...paths[ p ].toShapes() );\n\n\t\t}\n\n\t\treturn shapes;\n\n\t}\n\n}\n\nfunction createPaths( text, size, data ) {\n\n\tconst chars = Array.from( text );\n\tconst scale = size / data.resolution;\n\tconst line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;\n\n\tconst paths = [];\n\n\tlet offsetX = 0, offsetY = 0;\n\n\tfor ( let i = 0; i < chars.length; i ++ ) {\n\n\t\tconst char = chars[ i ];\n\n\t\tif ( char === '\\n' ) {\n\n\t\t\toffsetX = 0;\n\t\t\toffsetY -= line_height;\n\n\t\t} else {\n\n\t\t\tconst ret = createPath( char, scale, offsetX, offsetY, data );\n\t\t\toffsetX += ret.offsetX;\n\t\t\tpaths.push( ret.path );\n\n\t\t}\n\n\t}\n\n\treturn paths;\n\n}\n\nfunction createPath( char, scale, offsetX, offsetY, data ) {\n\n\tconst glyph = data.glyphs[ char ] || data.glyphs[ '?' ];\n\n\tif ( ! glyph ) {\n\n\t\tconsole.error( 'THREE.Font: character \"' + char + '\" does not exists in font family ' + data.familyName + '.' );\n\n\t\treturn;\n\n\t}\n\n\tconst path = new ShapePath();\n\n\tlet x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2;\n\n\tif ( glyph.o ) {\n\n\t\tconst outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) );\n\n\t\tfor ( let i = 0, l = outline.length; i < l; ) {\n\n\t\t\tconst action = outline[ i ++ ];\n\n\t\t\tswitch ( action ) {\n\n\t\t\t\tcase 'm': // moveTo\n\n\t\t\t\t\tx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\ty = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.moveTo( x, y );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'l': // lineTo\n\n\t\t\t\t\tx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\ty = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.lineTo( x, y );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'q': // quadraticCurveTo\n\n\t\t\t\t\tcpx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx1 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy1 = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.quadraticCurveTo( cpx1, cpy1, cpx, cpy );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'b': // bezierCurveTo\n\n\t\t\t\t\tcpx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx1 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy1 = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx2 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy2 = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn { offsetX: glyph.ha * scale, path: path };\n\n}\n\nexport { FontLoader, Font };\n","/**\n * Text = 3D Text\n *\n * parameters = {\n * font: , // font\n *\n * size: , // size of the text\n * height: , // thickness to extrude text\n * curveSegments: , // number of points on the curves\n *\n * bevelEnabled: , // turn on bevel\n * bevelThickness: , // how deep into text bevel goes\n * bevelSize: , // how far from text outline (including bevelOffset) is bevel\n * bevelOffset: // how far from text outline does bevel start\n * }\n */\n\nimport {\n\tExtrudeGeometry\n} from 'three';\n\nclass TextGeometry extends ExtrudeGeometry {\n\n\tconstructor( text, parameters = {} ) {\n\n\t\tconst font = parameters.font;\n\n\t\tif ( font === undefined ) {\n\n\t\t\tsuper(); // generate default extrude geometry\n\n\t\t} else {\n\n\t\t\tconst shapes = font.generateShapes( text, parameters.size );\n\n\t\t\t// translate parameters to ExtrudeGeometry API\n\n\t\t\tparameters.depth = parameters.height !== undefined ? parameters.height : 50;\n\n\t\t\t// defaults\n\n\t\t\tif ( parameters.bevelThickness === undefined ) parameters.bevelThickness = 10;\n\t\t\tif ( parameters.bevelSize === undefined ) parameters.bevelSize = 8;\n\t\t\tif ( parameters.bevelEnabled === undefined ) parameters.bevelEnabled = false;\n\n\t\t\tsuper( shapes, parameters );\n\n\t\t}\n\n\t\tthis.type = 'TextGeometry';\n\n\t}\n\n}\n\n\nexport { TextGeometry };\n","{ \"glyphs\": { \"ο\": { \"x_min\": 0, \"x_max\": 712, \"ha\": 815, \"o\": \"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 \" }, \"S\": { \"x_min\": 0, \"x_max\": 788, \"ha\": 890, \"o\": \"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 \" }, \"¦\": { \"x_min\": 343, \"x_max\": 449, \"ha\": 792, \"o\": \"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \" }, \"/\": { \"x_min\": 183.25, \"x_max\": 608.328125, \"ha\": 792, \"o\": \"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 \" }, \"Τ\": { \"x_min\": -0.4375, \"x_max\": 777.453125, \"ha\": 839, \"o\": \"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 \" }, \"y\": { \"x_min\": 0, \"x_max\": 684.78125, \"ha\": 771, \"o\": \"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 \" }, \"Π\": { \"x_min\": 0, \"x_max\": 803, \"ha\": 917, \"o\": \"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 \" }, \"ΐ\": { \"x_min\": -111, \"x_max\": 339, \"ha\": 361, \"o\": \"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 \" }, \"g\": { \"x_min\": 0, \"x_max\": 686, \"ha\": 838, \"o\": \"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 \" }, \"²\": { \"x_min\": 0, \"x_max\": 442, \"ha\": 539, \"o\": \"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 \" }, \"–\": { \"x_min\": 0, \"x_max\": 705.5625, \"ha\": 803, \"o\": \"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \" }, \"Κ\": { \"x_min\": 0, \"x_max\": 819.5625, \"ha\": 893, \"o\": \"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \" }, \"ƒ\": { \"x_min\": -46.265625, \"x_max\": 392, \"ha\": 513, \"o\": \"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 \" }, \"e\": { \"x_min\": 0, \"x_max\": 714, \"ha\": 813, \"o\": \"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 \" }, \"ό\": { \"x_min\": 0, \"x_max\": 712, \"ha\": 815, \"o\": \"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 \" }, \"J\": { \"x_min\": 0, \"x_max\": 588, \"ha\": 699, \"o\": \"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 \" }, \"»\": { \"x_min\": -1, \"x_max\": 503, \"ha\": 601, \"o\": \"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 \" }, \"©\": { \"x_min\": -3, \"x_max\": 1008, \"ha\": 1106, \"o\": \"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 \" }, \"ώ\": { \"x_min\": 0, \"x_max\": 922, \"ha\": 1030, \"o\": \"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 \" }, \"^\": { \"x_min\": 193.0625, \"x_max\": 598.609375, \"ha\": 792, \"o\": \"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 \" }, \"«\": { \"x_min\": 0, \"x_max\": 507.203125, \"ha\": 604, \"o\": \"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 \" }, \"D\": { \"x_min\": 0, \"x_max\": 828, \"ha\": 935, \"o\": \"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 \" }, \"∙\": { \"x_min\": 0, \"x_max\": 142, \"ha\": 239, \"o\": \"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \" }, \"ÿ\": { \"x_min\": 0, \"x_max\": 47, \"ha\": 125, \"o\": \"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 \" }, \"w\": { \"x_min\": 0, \"x_max\": 1009.71875, \"ha\": 1100, \"o\": \"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 \" }, \"$\": { \"x_min\": 0, \"x_max\": 700, \"ha\": 793, \"o\": \"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 \" }, \"\\\\\": { \"x_min\": -0.015625, \"x_max\": 425.0625, \"ha\": 522, \"o\": \"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 \" }, \"µ\": { \"x_min\": 0, \"x_max\": 697.21875, \"ha\": 747, \"o\": \"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 \" }, \"Ι\": { \"x_min\": 42, \"x_max\": 181, \"ha\": 297, \"o\": \"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 \" }, \"Ύ\": { \"x_min\": 0, \"x_max\": 1144.5, \"ha\": 1214, \"o\": \"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \" }, \"’\": { \"x_min\": 0, \"x_max\": 139, \"ha\": 236, \"o\": \"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \" }, \"Ν\": { \"x_min\": 0, \"x_max\": 801, \"ha\": 915, \"o\": \"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 \" }, \"-\": { \"x_min\": 8.71875, \"x_max\": 350.390625, \"ha\": 478, \"o\": \"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 \" }, \"Q\": { \"x_min\": 0, \"x_max\": 968, \"ha\": 1072, \"o\": \"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 \" }, \"ς\": { \"x_min\": 1, \"x_max\": 676.28125, \"ha\": 740, \"o\": \"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 \" }, \"M\": { \"x_min\": 0, \"x_max\": 954, \"ha\": 1067, \"o\": \"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 \" }, \"Ψ\": { \"x_min\": 0, \"x_max\": 1006, \"ha\": 1094, \"o\": \"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 \" }, \"C\": { \"x_min\": 0, \"x_max\": 886, \"ha\": 944, \"o\": \"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 \" }, \"!\": { \"x_min\": 0, \"x_max\": 138, \"ha\": 236, \"o\": \"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 \" }, \"{\": { \"x_min\": 0, \"x_max\": 480.5625, \"ha\": 578, \"o\": \"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 \" }, \"X\": { \"x_min\": -0.015625, \"x_max\": 854.15625, \"ha\": 940, \"o\": \"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 \" }, \"#\": { \"x_min\": 0, \"x_max\": 963.890625, \"ha\": 1061, \"o\": \"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 \" }, \"ι\": { \"x_min\": 42, \"x_max\": 284, \"ha\": 361, \"o\": \"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 \" }, \"Ά\": { \"x_min\": 0, \"x_max\": 906.953125, \"ha\": 982, \"o\": \"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \" }, \")\": { \"x_min\": 0, \"x_max\": 318, \"ha\": 415, \"o\": \"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 \" }, \"ε\": { \"x_min\": 0, \"x_max\": 634.71875, \"ha\": 714, \"o\": \"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 \" }, \"Δ\": { \"x_min\": 0, \"x_max\": 952.78125, \"ha\": 1028, \"o\": \"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 \" }, \"}\": { \"x_min\": 0, \"x_max\": 481, \"ha\": 578, \"o\": \"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 \" }, \"‰\": { \"x_min\": -3, \"x_max\": 1672, \"ha\": 1821, \"o\": \"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 \" }, \"a\": { \"x_min\": 0, \"x_max\": 698.609375, \"ha\": 794, \"o\": \"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 \" }, \"—\": { \"x_min\": 0, \"x_max\": 941.671875, \"ha\": 1039, \"o\": \"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 \" }, \"=\": { \"x_min\": 8.71875, \"x_max\": 780.953125, \"ha\": 792, \"o\": \"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 \" }, \"N\": { \"x_min\": 0, \"x_max\": 801, \"ha\": 914, \"o\": \"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 \" }, \"ρ\": { \"x_min\": 0, \"x_max\": 712, \"ha\": 797, \"o\": \"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 \" }, \"2\": { \"x_min\": 59, \"x_max\": 731, \"ha\": 792, \"o\": \"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 \" }, \"¯\": { \"x_min\": 0, \"x_max\": 941.671875, \"ha\": 938, \"o\": \"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 \" }, \"Z\": { \"x_min\": 0, \"x_max\": 779, \"ha\": 849, \"o\": \"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 \" }, \"u\": { \"x_min\": 0, \"x_max\": 617, \"ha\": 729, \"o\": \"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 \" }, \"k\": { \"x_min\": 0, \"x_max\": 612.484375, \"ha\": 697, \"o\": \"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 \" }, \"Η\": { \"x_min\": 0, \"x_max\": 803, \"ha\": 917, \"o\": \"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \" }, \"Α\": { \"x_min\": 0, \"x_max\": 906.953125, \"ha\": 985, \"o\": \"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \" }, \"s\": { \"x_min\": 0, \"x_max\": 604, \"ha\": 697, \"o\": \"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 \" }, \"B\": { \"x_min\": 0, \"x_max\": 778, \"ha\": 876, \"o\": \"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 \" }, \"…\": { \"x_min\": 0, \"x_max\": 614, \"ha\": 708, \"o\": \"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 \" }, \"?\": { \"x_min\": 0, \"x_max\": 607, \"ha\": 704, \"o\": \"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 \" }, \"H\": { \"x_min\": 0, \"x_max\": 803, \"ha\": 915, \"o\": \"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \" }, \"ν\": { \"x_min\": 0, \"x_max\": 675, \"ha\": 761, \"o\": \"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 \" }, \"c\": { \"x_min\": 1, \"x_max\": 701.390625, \"ha\": 775, \"o\": \"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 \" }, \"¶\": { \"x_min\": 0, \"x_max\": 566.671875, \"ha\": 678, \"o\": \"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 \" }, \"β\": { \"x_min\": 0, \"x_max\": 660, \"ha\": 745, \"o\": \"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 \" }, \"Μ\": { \"x_min\": 0, \"x_max\": 954, \"ha\": 1068, \"o\": \"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 \" }, \"Ό\": { \"x_min\": 0.109375, \"x_max\": 1120, \"ha\": 1217, \"o\": \"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \" }, \"Ή\": { \"x_min\": 0, \"x_max\": 1158, \"ha\": 1275, \"o\": \"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \" }, \"•\": { \"x_min\": 0, \"x_max\": 663.890625, \"ha\": 775, \"o\": \"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 \" }, \"¥\": { \"x_min\": 0.1875, \"x_max\": 819.546875, \"ha\": 886, \"o\": \"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 \" }, \"(\": { \"x_min\": 0, \"x_max\": 318.0625, \"ha\": 415, \"o\": \"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 \" }, \"U\": { \"x_min\": 0, \"x_max\": 796, \"ha\": 904, \"o\": \"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 \" }, \"γ\": { \"x_min\": 0.5, \"x_max\": 744.953125, \"ha\": 822, \"o\": \"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 \" }, \"α\": { \"x_min\": 0, \"x_max\": 765.5625, \"ha\": 809, \"o\": \"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 \" }, \"F\": { \"x_min\": 0, \"x_max\": 683.328125, \"ha\": 717, \"o\": \"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 \" }, \"­\": { \"x_min\": 0, \"x_max\": 705.5625, \"ha\": 803, \"o\": \"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \" }, \":\": { \"x_min\": 0, \"x_max\": 142, \"ha\": 239, \"o\": \"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \" }, \"Χ\": { \"x_min\": 0, \"x_max\": 854.171875, \"ha\": 935, \"o\": \"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 \" }, \"*\": { \"x_min\": 116, \"x_max\": 674, \"ha\": 792, \"o\": \"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 \" }, \"†\": { \"x_min\": 0, \"x_max\": 777, \"ha\": 835, \"o\": \"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 \" }, \"°\": { \"x_min\": 0, \"x_max\": 347, \"ha\": 444, \"o\": \"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 \" }, \"V\": { \"x_min\": 0, \"x_max\": 862.71875, \"ha\": 940, \"o\": \"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 \" }, \"Ξ\": { \"x_min\": 0, \"x_max\": 734.71875, \"ha\": 763, \"o\": \"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 \" }, \" \": { \"x_min\": 0, \"x_max\": 0, \"ha\": 853 }, \"Ϋ\": { \"x_min\": 0.328125, \"x_max\": 819.515625, \"ha\": 889, \"o\": \"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 \" }, \"0\": { \"x_min\": 73, \"x_max\": 715, \"ha\": 792, \"o\": \"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 \" }, \"”\": { \"x_min\": 0, \"x_max\": 347, \"ha\": 454, \"o\": \"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 \" }, \"@\": { \"x_min\": 0, \"x_max\": 1260, \"ha\": 1357, \"o\": \"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 \" }, \"Ί\": { \"x_min\": 0, \"x_max\": 499, \"ha\": 613, \"o\": \"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 \" }, \"i\": { \"x_min\": 14, \"x_max\": 136, \"ha\": 275, \"o\": \"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 \" }, \"Β\": { \"x_min\": 0, \"x_max\": 778, \"ha\": 877, \"o\": \"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 \" }, \"υ\": { \"x_min\": 0, \"x_max\": 617, \"ha\": 725, \"o\": \"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 \" }, \"]\": { \"x_min\": 0, \"x_max\": 275, \"ha\": 372, \"o\": \"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 \" }, \"m\": { \"x_min\": 0, \"x_max\": 1019, \"ha\": 1128, \"o\": \"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 \" }, \"χ\": { \"x_min\": 8.328125, \"x_max\": 780.5625, \"ha\": 815, \"o\": \"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 \" }, \"8\": { \"x_min\": 55, \"x_max\": 736, \"ha\": 792, \"o\": \"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 \" }, \"ί\": { \"x_min\": 42, \"x_max\": 326.71875, \"ha\": 361, \"o\": \"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 \" }, \"Ζ\": { \"x_min\": 0, \"x_max\": 779.171875, \"ha\": 850, \"o\": \"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 \" }, \"R\": { \"x_min\": 0, \"x_max\": 781.953125, \"ha\": 907, \"o\": \"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 \" }, \"o\": { \"x_min\": 0, \"x_max\": 713, \"ha\": 821, \"o\": \"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 \" }, \"5\": { \"x_min\": 54.171875, \"x_max\": 738, \"ha\": 792, \"o\": \"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 \" }, \"7\": { \"x_min\": 58.71875, \"x_max\": 730.953125, \"ha\": 792, \"o\": \"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 \" }, \"K\": { \"x_min\": 0, \"x_max\": 819.46875, \"ha\": 906, \"o\": \"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \" }, \",\": { \"x_min\": 0, \"x_max\": 142, \"ha\": 239, \"o\": \"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 \" }, \"d\": { \"x_min\": 0, \"x_max\": 683, \"ha\": 796, \"o\": \"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 \" }, \"¨\": { \"x_min\": -109, \"x_max\": 247, \"ha\": 232, \"o\": \"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 \" }, \"E\": { \"x_min\": 0, \"x_max\": 736.109375, \"ha\": 789, \"o\": \"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \" }, \"Y\": { \"x_min\": 0, \"x_max\": 820, \"ha\": 886, \"o\": \"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 \" }, \"\\\"\": { \"x_min\": 0, \"x_max\": 299, \"ha\": 396, \"o\": \"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \" }, \"‹\": { \"x_min\": 17.984375, \"x_max\": 773.609375, \"ha\": 792, \"o\": \"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \" }, \"„\": { \"x_min\": 0, \"x_max\": 364, \"ha\": 467, \"o\": \"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 \" }, \"δ\": { \"x_min\": 1, \"x_max\": 710, \"ha\": 810, \"o\": \"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 \" }, \"έ\": { \"x_min\": 0, \"x_max\": 634.71875, \"ha\": 714, \"o\": \"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 \" }, \"ω\": { \"x_min\": 0, \"x_max\": 922, \"ha\": 1031, \"o\": \"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 \" }, \"´\": { \"x_min\": 0, \"x_max\": 96, \"ha\": 251, \"o\": \"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \" }, \"±\": { \"x_min\": 11, \"x_max\": 781, \"ha\": 792, \"o\": \"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 \" }, \"|\": { \"x_min\": 343, \"x_max\": 449, \"ha\": 792, \"o\": \"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \" }, \"ϋ\": { \"x_min\": 0, \"x_max\": 617, \"ha\": 725, \"o\": \"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 \" }, \"§\": { \"x_min\": 0, \"x_max\": 593, \"ha\": 690, \"o\": \"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 \" }, \"b\": { \"x_min\": 0, \"x_max\": 685, \"ha\": 783, \"o\": \"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 \" }, \"q\": { \"x_min\": 0, \"x_max\": 683, \"ha\": 876, \"o\": \"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 \" }, \"Ω\": { \"x_min\": -0.171875, \"x_max\": 969.5625, \"ha\": 1068, \"o\": \"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 \" }, \"ύ\": { \"x_min\": 0, \"x_max\": 617, \"ha\": 725, \"o\": \"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 \" }, \"z\": { \"x_min\": -0.015625, \"x_max\": 613.890625, \"ha\": 697, \"o\": \"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 \" }, \"™\": { \"x_min\": 0, \"x_max\": 894, \"ha\": 1000, \"o\": \"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 \" }, \"ή\": { \"x_min\": 0.78125, \"x_max\": 697, \"ha\": 810, \"o\": \"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 \" }, \"Θ\": { \"x_min\": 0, \"x_max\": 960, \"ha\": 1056, \"o\": \"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 \" }, \"®\": { \"x_min\": -3, \"x_max\": 1008, \"ha\": 1106, \"o\": \"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 \" }, \"~\": { \"x_min\": 0, \"x_max\": 833, \"ha\": 931, \"o\": \"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 \" }, \"Ε\": { \"x_min\": 0, \"x_max\": 736.21875, \"ha\": 778, \"o\": \"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \" }, \"³\": { \"x_min\": 0, \"x_max\": 450, \"ha\": 547, \"o\": \"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 \" }, \"[\": { \"x_min\": 0, \"x_max\": 273.609375, \"ha\": 371, \"o\": \"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 \" }, \"L\": { \"x_min\": 0, \"x_max\": 645.828125, \"ha\": 696, \"o\": \"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 \" }, \"σ\": { \"x_min\": 0, \"x_max\": 803.390625, \"ha\": 894, \"o\": \"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 \" }, \"ζ\": { \"x_min\": 0, \"x_max\": 573, \"ha\": 642, \"o\": \"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 \" }, \"θ\": { \"x_min\": 0, \"x_max\": 674, \"ha\": 778, \"o\": \"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 \" }, \"Ο\": { \"x_min\": 0, \"x_max\": 958, \"ha\": 1054, \"o\": \"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 \" }, \"Γ\": { \"x_min\": 0, \"x_max\": 705.28125, \"ha\": 749, \"o\": \"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 \" }, \" \": { \"x_min\": 0, \"x_max\": 0, \"ha\": 375 }, \"%\": { \"x_min\": -3, \"x_max\": 1089, \"ha\": 1186, \"o\": \"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 \" }, \"P\": { \"x_min\": 0, \"x_max\": 726, \"ha\": 806, \"o\": \"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 \" }, \"Έ\": { \"x_min\": 0, \"x_max\": 1078.21875, \"ha\": 1118, \"o\": \"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \" }, \"Ώ\": { \"x_min\": 0.125, \"x_max\": 1136.546875, \"ha\": 1235, \"o\": \"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 \" }, \"_\": { \"x_min\": 0, \"x_max\": 705.5625, \"ha\": 803, \"o\": \"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 \" }, \"Ϊ\": { \"x_min\": -110, \"x_max\": 246, \"ha\": 275, \"o\": \"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 \" }, \"+\": { \"x_min\": 23, \"x_max\": 768, \"ha\": 792, \"o\": \"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 \" }, \"½\": { \"x_min\": 0, \"x_max\": 1050, \"ha\": 1149, \"o\": \"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 \" }, \"Ρ\": { \"x_min\": 0, \"x_max\": 720, \"ha\": 783, \"o\": \"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 \" }, \"'\": { \"x_min\": 0, \"x_max\": 139, \"ha\": 236, \"o\": \"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \" }, \"ª\": { \"x_min\": 0, \"x_max\": 350, \"ha\": 397, \"o\": \"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 \" }, \"΅\": { \"x_min\": 0, \"x_max\": 450, \"ha\": 553, \"o\": \"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 \" }, \"T\": { \"x_min\": 0, \"x_max\": 777, \"ha\": 835, \"o\": \"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 \" }, \"Φ\": { \"x_min\": 0, \"x_max\": 915, \"ha\": 997, \"o\": \"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 \" }, \"⁋\": { \"x_min\": 0, \"x_max\": 0, \"ha\": 694 }, \"j\": { \"x_min\": -77.78125, \"x_max\": 167, \"ha\": 349, \"o\": \"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 \" }, \"Σ\": { \"x_min\": 0, \"x_max\": 756.953125, \"ha\": 819, \"o\": \"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 \" }, \"1\": { \"x_min\": 215.671875, \"x_max\": 574, \"ha\": 792, \"o\": \"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 \" }, \"›\": { \"x_min\": 18.0625, \"x_max\": 774, \"ha\": 792, \"o\": \"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \" }, \"<\": { \"x_min\": 17.984375, \"x_max\": 773.609375, \"ha\": 792, \"o\": \"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \" }, \"£\": { \"x_min\": 0, \"x_max\": 704.484375, \"ha\": 801, \"o\": \"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 \" }, \"t\": { \"x_min\": 0, \"x_max\": 367, \"ha\": 458, \"o\": \"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 \" }, \"¬\": { \"x_min\": 0, \"x_max\": 706, \"ha\": 803, \"o\": \"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 \" }, \"λ\": { \"x_min\": 0, \"x_max\": 750, \"ha\": 803, \"o\": \"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 \" }, \"W\": { \"x_min\": 0, \"x_max\": 1263.890625, \"ha\": 1351, \"o\": \"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 \" }, \">\": { \"x_min\": 18.0625, \"x_max\": 774, \"ha\": 792, \"o\": \"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \" }, \"v\": { \"x_min\": 0, \"x_max\": 675.15625, \"ha\": 761, \"o\": \"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 \" }, \"τ\": { \"x_min\": 0.28125, \"x_max\": 644.5, \"ha\": 703, \"o\": \"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 \" }, \"ξ\": { \"x_min\": 0, \"x_max\": 624.9375, \"ha\": 699, \"o\": \"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 \" }, \"&\": { \"x_min\": -3, \"x_max\": 894.25, \"ha\": 992, \"o\": \"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 \" }, \"Λ\": { \"x_min\": 0, \"x_max\": 862.5, \"ha\": 942, \"o\": \"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 \" }, \"I\": { \"x_min\": 41, \"x_max\": 180, \"ha\": 293, \"o\": \"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 \" }, \"G\": { \"x_min\": 0, \"x_max\": 921, \"ha\": 1011, \"o\": \"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 \" }, \"ΰ\": { \"x_min\": 0, \"x_max\": 617, \"ha\": 725, \"o\": \"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 \" }, \"`\": { \"x_min\": 0, \"x_max\": 138.890625, \"ha\": 236, \"o\": \"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 \" }, \"·\": { \"x_min\": 0, \"x_max\": 142, \"ha\": 239, \"o\": \"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \" }, \"Υ\": { \"x_min\": 0.328125, \"x_max\": 819.515625, \"ha\": 889, \"o\": \"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 \" }, \"r\": { \"x_min\": 0, \"x_max\": 355.5625, \"ha\": 432, \"o\": \"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 \" }, \"x\": { \"x_min\": 0, \"x_max\": 675, \"ha\": 764, \"o\": \"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 \" }, \"μ\": { \"x_min\": 0, \"x_max\": 696.609375, \"ha\": 747, \"o\": \"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 \" }, \"h\": { \"x_min\": 0, \"x_max\": 615, \"ha\": 724, \"o\": \"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 \" }, \".\": { \"x_min\": 0, \"x_max\": 142, \"ha\": 239, \"o\": \"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \" }, \"φ\": { \"x_min\": -2, \"x_max\": 878, \"ha\": 974, \"o\": \"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 \" }, \";\": { \"x_min\": 0, \"x_max\": 142, \"ha\": 239, \"o\": \"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 \" }, \"f\": { \"x_min\": 0, \"x_max\": 378, \"ha\": 472, \"o\": \"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 \" }, \"“\": { \"x_min\": 1, \"x_max\": 348.21875, \"ha\": 454, \"o\": \"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 \" }, \"A\": { \"x_min\": 0.03125, \"x_max\": 906.953125, \"ha\": 1008, \"o\": \"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 \" }, \"6\": { \"x_min\": 53, \"x_max\": 739, \"ha\": 792, \"o\": \"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 \" }, \"‘\": { \"x_min\": 1, \"x_max\": 139.890625, \"ha\": 236, \"o\": \"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 \" }, \"ϊ\": { \"x_min\": -70, \"x_max\": 283, \"ha\": 361, \"o\": \"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 \" }, \"π\": { \"x_min\": -0.21875, \"x_max\": 773.21875, \"ha\": 857, \"o\": \"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 \" }, \"ά\": { \"x_min\": 0, \"x_max\": 765.5625, \"ha\": 809, \"o\": \"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 \" }, \"O\": { \"x_min\": 0, \"x_max\": 958, \"ha\": 1057, \"o\": \"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 \" }, \"n\": { \"x_min\": 0, \"x_max\": 615, \"ha\": 724, \"o\": \"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 \" }, \"3\": { \"x_min\": 54, \"x_max\": 737, \"ha\": 792, \"o\": \"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 \" }, \"9\": { \"x_min\": 53, \"x_max\": 739, \"ha\": 792, \"o\": \"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 \" }, \"l\": { \"x_min\": 41, \"x_max\": 166, \"ha\": 279, \"o\": \"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 \" }, \"¤\": { \"x_min\": 40.09375, \"x_max\": 728.796875, \"ha\": 825, \"o\": \"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 \" }, \"κ\": { \"x_min\": 0, \"x_max\": 632.328125, \"ha\": 679, \"o\": \"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 \" }, \"4\": { \"x_min\": 48, \"x_max\": 742.453125, \"ha\": 792, \"o\": \"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 \" }, \"p\": { \"x_min\": 0, \"x_max\": 685, \"ha\": 786, \"o\": \"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 \" }, \"‡\": { \"x_min\": 0, \"x_max\": 777, \"ha\": 835, \"o\": \"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 \" }, \"ψ\": { \"x_min\": 0, \"x_max\": 808, \"ha\": 907, \"o\": \"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 \" }, \"η\": { \"x_min\": 0.78125, \"x_max\": 697, \"ha\": 810, \"o\": \"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 \" } }, \"cssFontWeight\": \"normal\", \"ascender\": 1189, \"underlinePosition\": -100, \"cssFontStyle\": \"normal\", \"boundingBox\": { \"yMin\": -334, \"xMin\": -111, \"yMax\": 1189, \"xMax\": 1672 }, \"resolution\": 1000, \"original_font_information\": { \"postscript_name\": \"Helvetiker-Regular\", \"version_string\": \"Version 1.00 2004 initial release\", \"vendor_url\": \"http://www.magenta.gr/\", \"full_font_name\": \"Helvetiker\", \"font_family_name\": \"Helvetiker\", \"copyright\": \"Copyright (c) Μagenta ltd, 2004\", \"description\": \"\", \"trademark\": \"\", \"designer\": \"\", \"designer_url\": \"\", \"unique_font_identifier\": \"Μagenta ltd:Helvetiker:22-10-104\", \"license_url\": \"http://www.ellak.gr/fonts/MgOpen/license.html\", \"license_description\": \"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\\r\\n\\r\\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\\\"Fonts\\\") and associated documentation files (the \\\"Font Software\\\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \\r\\n\\r\\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\\r\\n\\r\\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \\\"MgOpen\\\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\\r\\n\\r\\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \\\"MgOpen\\\" name.\\r\\n\\r\\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \\r\\n\\r\\nTHE FONT SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.\", \"manufacturer_name\": \"Μagenta ltd\", \"font_sub_family_name\": \"Regular\" }, \"descender\": -334, \"familyName\": \"Helvetiker\", \"lineHeight\": 1522, \"underlineThickness\": 50 }\n","import { Vector3 } from \"three\";\nimport { Frame, Greek, Label, ScatterPlot, VectorPlot, getRandomPoints } from \"../../dist/index\";\n\nconst canvas1 = document.getElementById(\"canvas1\") as HTMLCanvasElement;\nconst canvas2 = document.getElementById(\"canvas2\") as HTMLCanvasElement;\nconst canvas3 = document.getElementById(\"canvas3\") as HTMLCanvasElement;\n\nconst points = getRandomPoints(200);\nconst scatterPlot = new ScatterPlot(points);\n\nconst frame1 = new Frame(canvas1, 10);\nframe1.addPlot(scatterPlot);\n\nconst frame2 = new Frame(canvas2, 10);\nframe2.addLabel(new Label(new Vector3(3, 3, 3), Greek.lowercaseAlpha, 1));\n\nconst frame3 = new Frame(canvas3, 10);\nframe3.addPlot(new VectorPlot(new Vector3(0, 0, 0), new Vector3(2.3, 3.2, 4.1), { angle: true, xy: true }));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRandomPoints = exports.Greek = exports.Label = exports.VectorPlot = exports.ScatterPlot = exports.Frame = void 0;\nvar frame_1 = require(\"./frame\");\nObject.defineProperty(exports, \"Frame\", { enumerable: true, get: function () { return frame_1.Frame; } });\nvar scatterplot_1 = require(\"./plots/scatterplot\");\nObject.defineProperty(exports, \"ScatterPlot\", { enumerable: true, get: function () { return scatterplot_1.ScatterPlot; } });\nvar vectorplot_1 = require(\"./plots/vectorplot\");\nObject.defineProperty(exports, \"VectorPlot\", { enumerable: true, get: function () { return vectorplot_1.VectorPlot; } });\nvar label_1 = require(\"./label\");\nObject.defineProperty(exports, \"Label\", { enumerable: true, get: function () { return label_1.Label; } });\nvar greek_1 = require(\"./greek\");\nObject.defineProperty(exports, \"Greek\", { enumerable: true, get: function () { return greek_1.Greek; } });\nvar data_1 = require(\"./data\");\nObject.defineProperty(exports, \"getRandomPoints\", { enumerable: true, get: function () { return data_1.getRandomPoints; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Frame = void 0;\nconst three_1 = require(\"three\");\nconst OrbitControls_1 = require(\"three/examples/jsm/controls/OrbitControls\");\nconst axes_1 = require(\"./axes\");\nclass Frame extends three_1.Scene {\n // TODO: at the moment only one size bc grid can only be squared\n // look into this for solution https://discourse.threejs.org/t/rectangular-gridhelper-possibility/37812\n constructor(canvas, size = 10) {\n super();\n this.canvas = canvas;\n this.size = size;\n this.observer = new ResizeObserver(() => this.update());\n this.scene = new three_1.Scene();\n this.scene.background = new three_1.Color(0xffffff);\n const { clientWidth, clientHeight } = canvas;\n this.renderer = new three_1.WebGLRenderer({ canvas });\n this.renderer.setSize(clientWidth, clientHeight);\n this.setCamera(clientWidth, clientHeight);\n this.setControls();\n this.setAxes();\n this.updateOnChanges();\n this.update();\n }\n setCamera(width, height) {\n this.camera = new three_1.PerspectiveCamera(45, width / height, 0.1, 1000);\n this.camera.position.set(this.size * 2, this.size * 2, this.size * 2);\n this.scene.add(this.camera);\n }\n setControls() {\n this.controls = new OrbitControls_1.OrbitControls(this.camera, this.canvas);\n this.controls.target.set(0, 0, 0);\n }\n setAxes() {\n this.axes = new axes_1.Axes(this.size, this.size, this.size);\n this.scene.add(this.axes.x);\n this.scene.add(this.axes.y);\n this.scene.add(this.axes.z);\n this.scene.add(this.axes.gridXY);\n this.scene.add(this.axes.gridXZ);\n this.scene.add(this.axes.gridYZ);\n }\n updateOnChanges() {\n this.controls.addEventListener(\"change\", () => this.update());\n this.observer.observe(this.canvas);\n }\n update() {\n this.renderer.render(this.scene, this.camera);\n }\n capture() {\n const base64 = this.canvas.toDataURL(\"img/png\");\n }\n addPlot(plot) {\n this.scene.add(...plot.getFrameable());\n this.update();\n }\n async addFallbackLabel(text) {\n this.scene.add(...text.getFrameable());\n this.update();\n }\n async addLabel(text) {\n this.scene.add(...text.getFrameable());\n text.text.addEventListener(\"synccomplete\", () => {\n this.update();\n });\n }\n}\nexports.Frame = Frame;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Axes = exports.PlaneAxes = exports.UnitVector = void 0;\nconst three_1 = require(\"three\");\nexports.UnitVector = {\n i: new three_1.Vector3(1, 0, 0),\n j: new three_1.Vector3(0, 1, 0),\n k: new three_1.Vector3(0, 0, 1),\n};\nexports.PlaneAxes = {\n xy: { normal: exports.UnitVector.k, unit: { x: exports.UnitVector.i, y: exports.UnitVector.j } },\n xz: { normal: exports.UnitVector.j, unit: { x: exports.UnitVector.i, z: exports.UnitVector.k } },\n yz: { normal: exports.UnitVector.i, unit: { y: exports.UnitVector.j, z: exports.UnitVector.k } },\n};\nclass Axis extends three_1.ArrowHelper {\n constructor(direction, length) {\n super(direction, new three_1.Vector3(0, 0, 0), length);\n }\n}\nclass Axes {\n constructor(lengthX, lengthY, lengthZ) {\n this.lengthX = lengthX;\n this.lengthY = lengthY;\n this.lengthZ = lengthZ;\n this.x = new Axis(new three_1.Vector3(1, 0, 0), this.lengthX * 1.1);\n this.y = new Axis(new three_1.Vector3(0, 1, 0), this.lengthY * 1.1);\n this.z = new Axis(new three_1.Vector3(0, 0, 1), this.lengthZ * 1.1);\n this.setGrids();\n }\n setGrids() {\n this.gridXZ = new three_1.GridHelper(Math.max(this.lengthX, this.lengthZ));\n this.gridXZ.position.setX(this.lengthX / 2);\n this.gridXZ.position.setZ(this.lengthZ / 2);\n this.gridXY = new three_1.GridHelper(Math.max(this.lengthX, this.lengthY));\n this.gridXY.position.setX(this.lengthX / 2);\n this.gridXY.position.setY(this.lengthY / 2);\n this.gridXY.rotateOnAxis(new three_1.Vector3(1, 0, 0), Math.PI / 2);\n this.gridYZ = new three_1.GridHelper(Math.max(this.lengthY, this.lengthZ));\n this.gridYZ.position.setY(this.lengthY / 2);\n this.gridYZ.position.setZ(this.lengthZ / 2);\n this.gridYZ.rotateOnAxis(new three_1.Vector3(0, 0, 1), Math.PI / 2);\n }\n}\nexports.Axes = Axes;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ScatterPlot = void 0;\nconst three_1 = require(\"three\");\nconst plot_1 = require(\"../plot\");\nclass ScatterPlot extends plot_1.Plot {\n constructor(points, pointRadius = 0.2) {\n super();\n this.points = points.map((v) => {\n const geometry = new three_1.SphereGeometry(pointRadius);\n const material = new three_1.MeshBasicMaterial({ color: 0x00ff00 });\n const obj = new three_1.Mesh(geometry, material);\n obj.position.set(v.x, v.y, v.z);\n return obj;\n });\n }\n getFrameable() {\n return this.points;\n }\n}\nexports.ScatterPlot = ScatterPlot;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Plot = void 0;\nclass Plot {\n}\nexports.Plot = Plot;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VectorPlot = void 0;\nconst three_1 = require(\"three\");\nconst plot_1 = require(\"../plot\");\nconst axes_1 = require(\"../axes\");\nconst vectorplot_config_1 = require(\"./vectorplot.config\");\nclass VectorPlot extends plot_1.Plot {\n constructor(origin, target, config) {\n super();\n this.origin = origin;\n this.target = target;\n this.config = new vectorplot_config_1.VectorPlotConfigurationParams(config);\n this.drawables = [];\n this.drawables.push(this.createVector(origin, target));\n for (const p in axes_1.PlaneAxes) {\n const plane = p;\n const conf = this.config[plane];\n if (conf === null || conf === void 0 ? void 0 : conf.projection)\n this.drawables.push(this.createProjection(plane));\n if (conf === null || conf === void 0 ? void 0 : conf.component)\n this.drawables.push(this.createComponent(plane));\n if (conf === null || conf === void 0 ? void 0 : conf.projectionAngle)\n this.drawables.push(this.createAngleToProjection(plane));\n }\n if (this.config.angle)\n this.drawables.push(this.createAngleToTarget(\"y\"));\n }\n createVector(origin, target) {\n const length = Math.abs(origin.distanceTo(target));\n return new three_1.ArrowHelper(target.clone().normalize(), origin, length, this.config.color, length * 0.2, length * 0.1);\n }\n createAngleToProjection(planeIdx) {\n const plane = axes_1.PlaneAxes[planeIdx];\n const planeNormal = plane.normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const radius = projectedVector.distanceTo(this.origin) * 0.5;\n let initialRotation = 0;\n let angleToProjection = projectedVector.angleTo(axes_1.UnitVector.i);\n if (planeIdx === \"xz\") {\n initialRotation = -Math.PI / 2;\n angleToProjection = projectedVector.angleTo(axes_1.UnitVector.k);\n }\n if (planeIdx === \"yz\") {\n initialRotation = Math.PI / 2;\n angleToProjection = projectedVector.angleTo(axes_1.UnitVector.j);\n }\n const curve = new three_1.EllipseCurve(this.origin.x, this.origin.y, radius, radius, 0, angleToProjection, false, initialRotation);\n const material = new three_1.LineBasicMaterial({ color: 0x000000 });\n const geometry = new three_1.BufferGeometry().setFromPoints(curve.getPoints(50));\n const rotation = new three_1.Quaternion().setFromUnitVectors(axes_1.UnitVector.k, plane.normal);\n geometry.applyQuaternion(rotation);\n return new three_1.Line(geometry, material);\n }\n createAngleToTarget(axis) {\n const radius = this.target.clone().distanceTo(this.origin);\n const projectedVector = this.target.clone().projectOnPlane(axes_1.UnitVector.j);\n const curve = new three_1.EllipseCurve(this.origin.x, this.origin.y, radius, radius, 0, this.target.angleTo(projectedVector), false, 0);\n const material = new three_1.LineBasicMaterial(this.config.angle);\n const geometry = new three_1.BufferGeometry().setFromPoints(curve.getPoints(50));\n geometry.applyQuaternion(new three_1.Quaternion().setFromAxisAngle(axes_1.UnitVector.j, -axes_1.UnitVector.i.angleTo(projectedVector)));\n return new three_1.Line(geometry, material);\n }\n createProjection(plane) {\n const { linetype, linestyle } = this.config[plane].projection;\n const lineMaterialType = linetype === \"dashed\" ? three_1.LineDashedMaterial : three_1.LineBasicMaterial;\n const lineMaterial = new lineMaterialType(linestyle);\n const planeNormal = axes_1.PlaneAxes[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const projectionGeometry = new three_1.BufferGeometry().setFromPoints([projectedVector, this.origin]);\n return new three_1.Line(projectionGeometry, lineMaterial).computeLineDistances();\n }\n createComponent(plane) {\n const { linetype, linestyle } = this.config[plane].component;\n const lineMaterialType = linetype === \"dashed\" ? three_1.LineDashedMaterial : three_1.LineBasicMaterial;\n const lineMaterial = new lineMaterialType(linestyle);\n const planeNormal = axes_1.PlaneAxes[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const connectionGeometry = new three_1.BufferGeometry().setFromPoints([projectedVector, this.target]);\n return new three_1.Line(connectionGeometry, lineMaterial).computeLineDistances();\n }\n getFrameable() {\n return this.drawables;\n }\n}\nexports.VectorPlot = VectorPlot;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VectorPlotPlaneConfigParams = exports.VectorPlotConfigurationParams = void 0;\nclass VectorPlotConfigurationParams {\n constructor(config) {\n const { angle, color, xy, xz, yz } = config;\n this.setColorOrDefault(color);\n if (angle)\n this.setAngle(angle);\n if (xy)\n this.xy = new VectorPlotPlaneConfigParams(xy);\n if (xz)\n this.xz = new VectorPlotPlaneConfigParams(xz);\n if (yz)\n this.xz = new VectorPlotPlaneConfigParams(yz);\n }\n setColorOrDefault(colorHex) {\n colorHex = colorHex || 0x000000;\n this.color = colorHex;\n }\n setAngle(angle) {\n this.angle = angle === true ? { color: 0x000000 } : angle;\n }\n}\nexports.VectorPlotConfigurationParams = VectorPlotConfigurationParams;\nclass VectorPlotPlaneConfigParams {\n constructor(plane) {\n plane = plane === true ? { projection: true, component: true, projectionAngle: true } : plane;\n const { component, projection, projectionAngle } = plane;\n if (projection)\n this.setProjection(projection);\n if (component)\n this.setComponent(component);\n if (projectionAngle)\n this.setProjectionAngle(projectionAngle);\n }\n setProjection(projection) {\n this.projection = projection === true ? defaultDashedLine : projection;\n }\n setComponent(component) {\n this.component = component === true ? defaultDashedLine : component;\n }\n setProjectionAngle(projectionAngle) {\n this.projectionAngle = projectionAngle === true ? defaultDashedLine : projectionAngle;\n }\n}\nexports.VectorPlotPlaneConfigParams = VectorPlotPlaneConfigParams;\nconst defaultDashedLine = {\n linetype: \"dashed\",\n linestyle: {\n color: 0x000000,\n linewidth: 1,\n scale: 1,\n dashSize: 0.25,\n gapSize: 0.1,\n },\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FallbackLabel = exports.Label = void 0;\nconst three_1 = require(\"three\");\nconst troika_three_text_1 = require(\"troika-three-text\");\nconst FontLoader_1 = require(\"three/examples/jsm/loaders/FontLoader\");\nconst TextGeometry_1 = require(\"three/examples/jsm/geometries/TextGeometry\");\nconst helvetiker_regular_typeface_json_1 = __importDefault(require(\"./fonts/helvetiker_regular.typeface.json\"));\nclass Label {\n constructor(position, text, size = 0.2, color = 0x000000) {\n this.text = new troika_three_text_1.Text();\n this.text.text = text;\n this.text.position.x = position.x;\n this.text.position.y = position.y;\n this.text.position.z = position.z;\n this.text.anchorX = \"center\";\n this.text.anchorY = \"middle\";\n this.text.fontSize = size;\n this.text.color = color;\n }\n getFrameable() {\n this.text.sync();\n return [this.text];\n }\n}\nexports.Label = Label;\nclass FallbackLabel {\n constructor(position, text, size = 1, color = 0x000000) {\n this.position = position;\n this.text = text;\n this.size = size;\n this.color = color;\n const geometry = new TextGeometry_1.TextGeometry(this.text, {\n font: new FontLoader_1.Font(helvetiker_regular_typeface_json_1.default),\n size: this.size,\n height: 0.01,\n curveSegments: 25,\n bevelEnabled: false,\n });\n const material = new three_1.MeshBasicMaterial({ color: this.color });\n this.drawable = new three_1.Mesh(geometry, material);\n this.drawable.position.set(...this.position.toArray());\n }\n getFrameable() {\n return [this.drawable];\n }\n}\nexports.FallbackLabel = FallbackLabel;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Greek = void 0;\nclass Greek {\n}\nexports.Greek = Greek;\nGreek.uppercaseHeta = \"\\u{0370}\";\nGreek.lowercaseHeta = \"\\u{0371}\";\nGreek.uppercaseArchaicSampi = \"\\u{0372}\";\nGreek.lowercaseArchaicSampi = \"\\u{0373}\";\nGreek.numeralSign = \"\\u{0374}\";\nGreek.lowerNumeralSign = \"\\u{0375}\";\nGreek.uppercasePamphylianDigamma = \"\\u{0376}\";\nGreek.lowercasePamphylianDigamma = \"\\u{0377}\";\nGreek.ypogegrammeni = \"\\u{037A}\";\nGreek.smallReversedLunateSigmaSymbol = \"\\u{037B}\";\nGreek.smallDottedLunateSigmaSymbol = \"\\u{037C}\";\nGreek.smallReversedDottedLunateSigmaSymbol = \"\\u{037D}\";\nGreek.questionMark = \"\\u{037E}\";\nGreek.uppercaseYot = \"\\u{037F}\";\nGreek.acuteaccent = \"\\u{0384}\";\nGreek.diaeresiswithacuteaccent = \"\\u{0385}\";\nGreek.uppercaseAwithacuteaccent = \"\\u{0386}\";\nGreek.anoTeleia = \"\\u{0387}\";\nGreek.uppercaseEpsilonwithacuteaccent = \"\\u{0388}\";\nGreek.uppercaseEtawithacuteaccent = \"\\u{0389}\";\nGreek.uppercaseIotawithacuteaccent = \"\\u{038A}\";\nGreek.uppercaseOmicronwithacuteaccent = \"\\u{038C}\";\nGreek.uppercaseUpsilonwithacuteaccent = \"\\u{038E}\";\nGreek.uppercaseOmegawithacuteaccent = \"\\u{038F}\";\nGreek.lowercaseIotawithdiaeresisandacuteaccent = \"\\u{0390}\";\nGreek.uppercaseAlpha = \"\\u{0391}\";\nGreek.uppercaseBeta = \"\\u{0392}\";\nGreek.uppercaseGamma = \"\\u{0393}\";\nGreek.uppercaseDelta = \"\\u{0394}\";\nGreek.uppercaseEpsilon = \"\\u{0395}\";\nGreek.uppercaseZeta = \"\\u{0396}\";\nGreek.uppercaseEta = \"\\u{0397}\";\nGreek.uppercaseTheta = \"\\u{0398}\";\nGreek.uppercaseIota = \"\\u{0399}\";\nGreek.uppercaseKappa = \"\\u{039A}\";\nGreek.uppercaseLambda = \"\\u{039B}\";\nGreek.uppercaseMu = \"\\u{039C}\";\nGreek.uppercaseNu = \"\\u{039D}\";\nGreek.uppercaseXi = \"\\u{039E}\";\nGreek.uppercaseOmicron = \"\\u{039F}\";\nGreek.uppercasePi = \"\\u{03A0}\";\nGreek.uppercaseRho = \"\\u{03A1}\";\nGreek.uppercaseSigma = \"\\u{03A3}\";\nGreek.uppercaseTau = \"\\u{03A4}\";\nGreek.uppercaseUpsilon = \"\\u{03A5}\";\nGreek.uppercasePhi = \"\\u{03A6}\";\nGreek.uppercaseChi = \"\\u{03A7}\";\nGreek.uppercasePsi = \"\\u{03A8}\";\nGreek.uppercaseOmega = \"\\u{03A9}\";\nGreek.uppercaseIotawithdiaeresis = \"\\u{03AA}\";\nGreek.uppercaseUpsilonwithdiaeresis = \"\\u{03AB}\";\nGreek.lowercaseAlphawithacuteaccent = \"\\u{03AC}\";\nGreek.lowercaseEpsilonwithacuteaccent = \"\\u{03AD}\";\nGreek.lowercaseEtawithacuteaccent = \"\\u{03AE}\";\nGreek.lowercaseIotawithacuteaccent = \"\\u{03AF}\";\nGreek.lowercaseUpsilonwithdiaeresisandacuteaccent = \"\\u{03B0}\";\nGreek.lowercaseAlpha = \"\\u{03B1}\";\nGreek.lowercaseBeta = \"\\u{03B2}\";\nGreek.lowercaseGamma = \"\\u{03B3}\";\nGreek.lowercaseDelta = \"\\u{03B4}\";\nGreek.lowercaseEpsilon = \"\\u{03B5}\";\nGreek.lowercaseZeta = \"\\u{03B6}\";\nGreek.lowercaseEta = \"\\u{03B7}\";\nGreek.lowercaseTheta = \"\\u{03B8}\";\nGreek.lowercaseIota = \"\\u{03B9}\";\nGreek.lowercaseKappa = \"\\u{03BA}\";\nGreek.lowercaseLambda = \"\\u{03BB}\";\nGreek.lowercaseMu = \"\\u{03BC}\";\nGreek.lowercaseNu = \"\\u{03BD}\";\nGreek.lowercaseXi = \"\\u{03BE}\";\nGreek.lowercaseOmicron = \"\\u{03BF}\";\nGreek.lowercasePi = \"\\u{03C0}\";\nGreek.lowercaseRho = \"\\u{03C1}\";\nGreek.lowercaseFinalSigma = \"\\u{03C2}\";\nGreek.lowercaseSigma = \"\\u{03C3}\";\nGreek.lowercaseTau = \"\\u{03C4}\";\nGreek.lowercaseUpsilon = \"\\u{03C5}\";\nGreek.lowercasePhi = \"\\u{03C6}\";\nGreek.lowercaseChi = \"\\u{03C7}\";\nGreek.lowercasePsi = \"\\u{03C8}\";\nGreek.lowercaseOmega = \"\\u{03C9}\";\nGreek.lowercaseIotawithdiaeresis = \"\\u{03CA}\";\nGreek.lowercaseUpsilonwithdiaeresis = \"\\u{03CB}\";\nGreek.lowercaseOmicronwithacuteaccent = \"\\u{03CC}\";\nGreek.lowercaseUpsilonwithacuteaccent = \"\\u{03CD}\";\nGreek.lowercaseOmegawithacuteaccent = \"\\u{03CE}\";\nGreek.uppercaseKaiSymbol = \"\\u{03CF}\";\nGreek.betaSymbol = \"\\u{03D0}\";\nGreek.thetaSymbol = \"\\u{03D1}\";\nGreek.upsilonwithhookSymbol = \"\\u{03D2}\";\nGreek.upsilonwithacuteandhookSymbol = \"\\u{03D3}\";\nGreek.upsilonwithdiaeresisandhookSymbol = \"\\u{03D4}\";\nGreek.phiSymbol = \"\\u{03D5}\";\nGreek.piSymbol = \"\\u{03D6}\";\nGreek.kaiSymbol = \"\\u{03D7}\";\nGreek.letterQoppa = \"\\u{03D8}\";\nGreek.lowercaseQoppa = \"\\u{03D9}\";\nGreek.letterStigma = \"\\u{03DA}\";\nGreek.lowercaseStigma = \"\\u{03DB}\";\nGreek.letterDigamma = \"\\u{03DC}\";\nGreek.lowercaseDigamma = \"\\u{03DD}\";\nGreek.letterKoppa = \"\\u{03DE}\";\nGreek.lowercaseKoppa = \"\\u{03DF}\";\nGreek.letterSampi = \"\\u{03E0}\";\nGreek.lowercaseSampi = \"\\u{03E1}\";\nGreek.copticuppercaseShei = \"\\u{03E2}\";\nGreek.copticlowercaseShei = \"\\u{03E3}\";\nGreek.copticuppercaseFei = \"\\u{03E4}\";\nGreek.copticlowercaseFei = \"\\u{03E5}\";\nGreek.copticuppercaseKhei = \"\\u{03E6}\";\nGreek.copticlowercaseKhei = \"\\u{03E7}\";\nGreek.copticuppercaseHori = \"\\u{03E8}\";\nGreek.copticlowercaseHori = \"\\u{03E9}\";\nGreek.copticuppercaseGangia = \"\\u{03EA}\";\nGreek.copticlowercaseGangia = \"\\u{03EB}\";\nGreek.copticuppercaseShima = \"\\u{03EC}\";\nGreek.copticlowercaseShima = \"\\u{03ED}\";\nGreek.copticuppercaseDei = \"\\u{03EE}\";\nGreek.copticlowercaseDei = \"\\u{03EF}\";\nGreek.kappaSymbol = \"\\u{03F0}\";\nGreek.rhoSymbol = \"\\u{03F1}\";\nGreek.lunateSigmaSymbol = \"\\u{03F2}\";\nGreek.letterYot = \"\\u{03F3}\";\nGreek.uppercaseThetaSymbol = \"\\u{03F4}\";\nGreek.lunateEpsilonSymbol = \"\\u{03F5}\";\nGreek.reversedLunateEpsilonSymbol = \"\\u{03F6}\";\nGreek.uppercaseSho = \"\\u{03F7}\";\nGreek.lowercaseSho = \"\\u{03F8}\";\nGreek.uppercaseLunateSigmaSymbol = \"\\u{03F9}\";\nGreek.uppercaseSan = \"\\u{03FA}\";\nGreek.lowercaseSan = \"\\u{03FB}\";\nGreek.rhowithstrokeSymbol = \"\\u{03FC}\";\nGreek.uppercaseReversedLunateSigmaSymbol = \"\\u{03FD}\";\nGreek.uppercaseDottedLunateSigmaSymbol = \"\\u{03FE}\";\nGreek.uppercaseReversedDottedLunateSigmaSymbol = \"\\u{03FF}\";\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRandomPoints = void 0;\nconst three_1 = require(\"three\");\nconst getRandomPoints = (n = 100, scale = 10) => {\n const points = [];\n for (let index = 0; index < n; index++) {\n const x = Math.random() * scale;\n const y = Math.random() * scale;\n const z = Math.random() * scale;\n points.push(new three_1.Vector3(x, y, z));\n }\n return points;\n};\nexports.getRandomPoints = getRandomPoints;\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$d5b33d7c30034067$var$_canvas","$d5b33d7c30034067$var$_lineGeometry","$d5b33d7c30034067$var$_coneGeometry","$d5b33d7c30034067$export$7177b3e430c2d7ca","$d5b33d7c30034067$export$d46bd3ead7cc759b","$d5b33d7c30034067$export$2ede184fc2998901","$d5b33d7c30034067$export$d9f0486e75b5ace","$d5b33d7c30034067$export$3b296b6f144d5b03","$d5b33d7c30034067$export$8a72f490b25c56c8","$d5b33d7c30034067$export$8f910f4c4f73df11","$d5b33d7c30034067$export$ec8b666c5fe2c75a","$d5b33d7c30034067$export$6a7ef315a0d1ef07","$d5b33d7c30034067$export$c977b3e384af9ae1","$d5b33d7c30034067$export$8ff26dafa08918","$d5b33d7c30034067$export$5431306cf43de24a","$d5b33d7c30034067$export$fa7daccca11cdbe3","$d5b33d7c30034067$export$23d6a54f0bbc85a3","$d5b33d7c30034067$export$64b5c384219d3699","$d5b33d7c30034067$export$6f7d5a9418ab2aa3","$d5b33d7c30034067$export$805e8b72413ccaba","$d5b33d7c30034067$export$a186db52eed6d40e","$d5b33d7c30034067$export$2ae72fc923e5eb5","$d5b33d7c30034067$export$892596cec99bc70e","$d5b33d7c30034067$export$55cbcc9b622fe1f5","$d5b33d7c30034067$export$cbe7a62641830ebd","$d5b33d7c30034067$export$b7be63a67df8959","$d5b33d7c30034067$export$e176487c05830cc5","$d5b33d7c30034067$export$d8ecdf8615bfea69","$d5b33d7c30034067$export$74e4ae24825f68d7","$d5b33d7c30034067$export$7ff5ac152ef991b0","$d5b33d7c30034067$export$967d831af31f69ce","$d5b33d7c30034067$export$955f9f2e84c43c8b","$d5b33d7c30034067$export$bee4a7d47f8f5014","$d5b33d7c30034067$export$2698c22ec13825db","$d5b33d7c30034067$export$33e187ed002f2a19","$d5b33d7c30034067$export$f6cc00ef28d7cf97","$d5b33d7c30034067$export$38af1803e3442a7f","$d5b33d7c30034067$export$32ea87a8b54d744a","$d5b33d7c30034067$export$fbaaa33907730a0c","$d5b33d7c30034067$export$17d680238e50603e","$d5b33d7c30034067$export$3f87a931616cde04","$d5b33d7c30034067$export$68f745719dbe5198","$d5b33d7c30034067$export$598697a1efa63ca7","$d5b33d7c30034067$export$1b417fc3b307a251","$d5b33d7c30034067$export$f2980790215acccd","$d5b33d7c30034067$export$327886a3efaeaebe","$d5b33d7c30034067$export$3b0d6d7590275603","$d5b33d7c30034067$export$98435a25b5cf7b2b","$d5b33d7c30034067$export$231f009cbe414146","$d5b33d7c30034067$export$d712cd887b4a00f7","$d5b33d7c30034067$export$3875d39926561055","$d5b33d7c30034067$export$a3008e7bd8d2cbe7","$d5b33d7c30034067$export$148534a3c727230b","LEFT","MIDDLE","RIGHT","ROTATE","DOLLY","PAN","DOLLY_PAN","DOLLY_ROTATE","$d5b33d7c30034067$export$561f394b24edfcaa","$d5b33d7c30034067$export$42429b3acfb233a4","$d5b33d7c30034067$export$626af19ae879bdf6","$d5b33d7c30034067$export$c0dc1bc7e964761","$d5b33d7c30034067$export$f197347d588c1b4a","$d5b33d7c30034067$export$8d0a61916cc26abb","$d5b33d7c30034067$export$ce9118f9eaae3bb2","$d5b33d7c30034067$export$f63012db5506e7dd","addEventListener","type","listener","undefined","_listeners","listeners","indexOf","push","hasEventListener","removeEventListener","listenerArray","index","splice","dispatchEvent","event","target","array","slice","i","l","length","$d5b33d7c30034067$var$_lut","$d5b33d7c30034067$var$_seed","$d5b33d7c30034067$var$DEG2RAD","Math","PI","$d5b33d7c30034067$var$RAD2DEG","$d5b33d7c30034067$var$generateUUID","d0","random","d1","d2","d3","uuid","toLowerCase","$d5b33d7c30034067$var$clamp","value","min","max","$d5b33d7c30034067$var$euclideanModulo","m","$d5b33d7c30034067$var$lerp","x","y","t","$d5b33d7c30034067$var$isPowerOfTwo","$d5b33d7c30034067$var$floorPowerOfTwo","pow","floor","log","LN2","$d5b33d7c30034067$var$denormalize","constructor","Float32Array","Uint32Array","Uint16Array","Uint8Array","Int32Array","Int16Array","Int8Array","$d5b33d7c30034067$var$normalize","round","DEG2RAD","RAD2DEG","generateUUID","clamp","euclideanModulo","mapLinear","a1","a2","b1","b2","inverseLerp","lerp","damp","lambda","dt","exp","pingpong","abs","smoothstep","smootherstep","randInt","low","high","randFloat","randFloatSpread","range","seededRandom","imul","degToRad","degrees","radToDeg","radians","isPowerOfTwo","ceilPowerOfTwo","ceil","floorPowerOfTwo","setQuaternionFromProperEuler","q","a","b","c","order","cos","sin","c2","s2","c13","s13","c1_3","s1_3","c3_1","s3_1","console","warn","normalize","denormalize","prototype","isVector2","width","height","setScalar","scalar","setX","setY","setComponent","getComponent","clone","copy","add","addScalar","addVectors","addScaledVector","sub","subScalar","subVectors","multiply","multiplyScalar","divide","divideScalar","applyMatrix3","elements","clampScalar","minVal","maxVal","clampLength","roundToZero","trunc","negate","dot","cross","lengthSq","sqrt","manhattanLength","angle","atan2","angleTo","denominator","acos","distanceTo","distanceToSquared","dx","dy","manhattanDistanceTo","setLength","alpha","lerpVectors","v1","v2","equals","fromArray","offset","toArray","fromBufferAttribute","attribute","getX","getY","rotateAround","center","Symbol","iterator","n11","n12","n13","n21","n22","n23","n31","n32","n33","isMatrix3","te","identity","me","extractBasis","xAxis","yAxis","zAxis","setFromMatrix3Column","setFromMatrix4","multiplyMatrices","premultiply","ae","be","a11","a12","a13","a21","a22","a23","a31","a32","a33","b11","b12","b13","b21","b22","b23","b31","b32","b33","determinant","d","f","g","h","invert","t11","t12","t13","det","detInv","transpose","tmp","getNormalMatrix","matrix4","transposeIntoArray","r","setUvTransform","tx","ty","sx","sy","rotation","cx","cy","scale","$d5b33d7c30034067$var$_m3","makeScale","rotate","theta","makeRotation","translate","makeTranslation","matrix","$d5b33d7c30034067$var$arrayNeedsUint32","$d5b33d7c30034067$var$createElementNS","name","document","createElementNS","Uint8ClampedArray","Float64Array","$d5b33d7c30034067$var$_cache","$d5b33d7c30034067$var$warnOnce","message","$d5b33d7c30034067$var$LINEAR_SRGB_TO_LINEAR_DISPLAY_P3","$d5b33d7c30034067$var$LINEAR_DISPLAY_P3_TO_LINEAR_SRGB","$d5b33d7c30034067$var$COLOR_SPACES","transfer","primaries","toReference","color","fromReference","convertSRGBToLinear","convertLinearToSRGB","$d5b33d7c30034067$var$SUPPORTED_WORKING_COLOR_SPACES","Set","$d5b33d7c30034067$export$5e6fd513f44698c","enabled","_workingColorSpace","legacyMode","workingColorSpace","colorSpace","has","convert","sourceColorSpace","targetColorSpace","sourceToReference","targetFromReference","fromWorkingColorSpace","toWorkingColorSpace","getPrimaries","colorSpace1","getTransfer","$d5b33d7c30034067$var$SRGBToLinear","$d5b33d7c30034067$var$LinearToSRGB","$d5b33d7c30034067$export$698882cf06df44aa","getDataURL","image","canvas","test","src","HTMLCanvasElement","context","getContext","ImageData","putImageData","drawImage","toDataURL","sRGBToLinear","HTMLImageElement","ImageBitmap","imageData","getImageData","data","$d5b33d7c30034067$var$_sourceId","$d5b33d7c30034067$export$1d2df86270c81ecb","isSource","version","needsUpdate","toJSON","meta","isRootObject","images","output","url","Array","isArray","isDataTexture","$d5b33d7c30034067$var$serializeImage","from","$d5b33d7c30034067$var$_textureId","DEFAULT_IMAGE","mapping","DEFAULT_MAPPING","wrapS","wrapT","magFilter","minFilter","format","anisotropy","DEFAULT_ANISOTROPY","isTexture","source","mipmaps","channel","internalFormat","repeat","matrixAutoUpdate","generateMipmaps","premultiplyAlpha","flipY","unpackAlignment","userData","onUpdate","isRenderTargetTexture","needsPMREMUpdate","updateMatrix","JSON","parse","stringify","textures","metadata","generator","wrap","keys","dispose","transformUv","uv","encoding","z","w","isVector4","setZ","setW","applyMatrix4","setAxisAngleFromQuaternion","setAxisAngleFromRotationMatrix","m11","m12","m13","m21","m22","m23","m31","m32","m33","xx","yy","zz","xy","xz","yz","getZ","getW","$d5b33d7c30034067$export$efcb1f8bf367cbfb","options","isRenderTarget","depth","scissor","scissorTest","viewport","assign","depthBuffer","stencilBuffer","depthTexture","samples","texture","setSize","$d5b33d7c30034067$export$3c052beb2e51e23f","isWebGLRenderTarget","$d5b33d7c30034067$export$dfac6c8e811406a3","isDataArrayTexture","wrapR","isQuaternion","_x","_y","_z","_w","slerpFlat","dst","dstOffset","src0","srcOffset0","src1","srcOffset1","x0","y0","z0","w0","x1","y1","z1","w1","dir","sqrSin","Number","EPSILON","len","tDir","multiplyQuaternionsFlat","_onChangeCallback","quaternion","setFromEuler","euler","update","_order","c1","c3","s1","s3","setFromAxisAngle","axis","halfAngle","setFromRotationMatrix","trace","setFromUnitVectors","vFrom","vTo","rotateTowards","step","slerp","conjugate","multiplyQuaternions","qax","qay","qaz","qaw","qbx","qby","qbz","qbw","qb","cosHalfTheta","sqrSinHalfTheta","sinHalfTheta","halfTheta","ratioA","ratioB","slerpQuaternions","qa","u1","sqrt1u1","sqrtu1","u2","u3","_onChange","callback","isVector3","multiplyVectors","applyEuler","applyQuaternion","$d5b33d7c30034067$var$_quaternion$4","applyAxisAngle","applyNormalMatrix","vx","vy","vz","qx","qy","qz","qw","tz","project","camera","matrixWorldInverse","projectionMatrix","unproject","projectionMatrixInverse","matrixWorld","transformDirection","crossVectors","ax","ay","az","bx","by","bz","projectOnVector","projectOnPlane","planeNormal","$d5b33d7c30034067$var$_vector$b","reflect","normal","dz","setFromSpherical","setFromSphericalCoords","radius","phi","sinPhiRadius","setFromCylindrical","setFromCylindricalCoords","setFromMatrixPosition","setFromMatrixScale","setFromMatrixColumn","sz","setFromColor","randomDirection","u","Infinity","isBox3","setFromArray","makeEmpty","il","expandByPoint","$d5b33d7c30034067$var$_vector$a","setFromBufferAttribute","count","setFromPoints","points","setFromCenterAndSize","size","halfSize","setFromObject","object","precise","expandByObject","box","isEmpty","getCenter","getSize","point","expandByVector","vector","expandByScalar","updateWorldMatrix","geometry","positionAttribute","getAttribute","isInstancedMesh","isMesh","getVertexPosition","boundingBox","computeBoundingBox","$d5b33d7c30034067$var$_box$3","union","children","containsPoint","containsBox","getParameter","intersectsBox","intersectsSphere","sphere","clampPoint","intersectsPlane","plane","constant","intersectsTriangle","triangle","$d5b33d7c30034067$var$_center","$d5b33d7c30034067$var$_extents","$d5b33d7c30034067$var$_v0$2","$d5b33d7c30034067$var$_v1$7","$d5b33d7c30034067$var$_v2$4","$d5b33d7c30034067$var$_f0","$d5b33d7c30034067$var$_f1","$d5b33d7c30034067$var$_f2","axes","$d5b33d7c30034067$var$satForAxes","$d5b33d7c30034067$var$_triangleNormal","distanceToPoint","getBoundingSphere","intersect","$d5b33d7c30034067$var$_points","$d5b33d7c30034067$var$_testAxis","v0","extents","j","p0","p1","p2","$d5b33d7c30034067$var$_box$2","$d5b33d7c30034067$var$_v1$6","$d5b33d7c30034067$var$_v2$3","optionalCenter","maxRadiusSq","radiusSum","deltaLengthSq","getBoundingBox","getMaxScaleOnAxis","delta","$d5b33d7c30034067$var$_vector$9","$d5b33d7c30034067$var$_segCenter","$d5b33d7c30034067$var$_segDir","$d5b33d7c30034067$var$_diff","$d5b33d7c30034067$var$_edge1","$d5b33d7c30034067$var$_edge2","$d5b33d7c30034067$var$_normal$1","origin","direction","ray","at","lookAt","recast","closestPointToPoint","directionDistance","distanceSqToPoint","distanceSqToSegment","optionalPointOnRay","optionalPointOnSegment","s0","sqrDist","extDet","segExtent","a01","b0","invDet","intersectSphere","tca","radius2","thc","t0","t1","distanceToPlane","intersectPlane","distToPoint","intersectBox","tmin","tmax","tymin","tymax","tzmin","tzmax","invdirx","invdiry","invdirz","isNaN","intersectTriangle","backfaceCulling","sign","DdN","DdQxE2","DdE1xQ","QdN","n14","n24","n34","n41","n42","n43","n44","isMatrix4","copyPosition","setFromMatrix3","makeBasis","extractRotation","scaleX","$d5b33d7c30034067$var$_v1$5","scaleY","scaleZ","makeRotationFromEuler","af","bf","ce","cf","de","df","ac","ad","bc","bd","makeRotationFromQuaternion","compose","$d5b33d7c30034067$var$_zero","$d5b33d7c30034067$var$_one","eye","up","$d5b33d7c30034067$var$_z","$d5b33d7c30034067$var$_x","$d5b33d7c30034067$var$_y","a14","a24","a34","a41","a42","a43","a44","b14","b24","b34","b41","b42","b43","b44","setPosition","t14","makeRotationX","makeRotationY","makeRotationZ","makeRotationAxis","makeShear","yx","zx","zy","position","x2","y2","z2","wx","wy","wz","decompose","$d5b33d7c30034067$var$_m1$2","invSX","invSY","invSZ","makePerspective","left","right","top","bottom","near","far","coordinateSystem","makeOrthographic","zInv","p","$d5b33d7c30034067$var$_matrix","$d5b33d7c30034067$var$_quaternion$3","$d5b33d7c30034067$export$d93cc409a0768c5f","DEFAULT_ORDER","isEuler","asin","setFromQuaternion","setFromVector3","reorder","newOrder","$d5b33d7c30034067$export$89312ce47c0ca777","mask","enable","enableAll","toggle","disable","disableAll","layers","isEnabled","$d5b33d7c30034067$var$_object3DId","$d5b33d7c30034067$var$_v1$4","$d5b33d7c30034067$var$_q1","$d5b33d7c30034067$var$_m1$1","$d5b33d7c30034067$var$_target","$d5b33d7c30034067$var$_position$3","$d5b33d7c30034067$var$_scale$2","$d5b33d7c30034067$var$_quaternion$2","$d5b33d7c30034067$var$_xAxis","$d5b33d7c30034067$var$_yAxis","$d5b33d7c30034067$var$_zAxis","$d5b33d7c30034067$var$_addedEvent","$d5b33d7c30034067$var$_removedEvent","$d5b33d7c30034067$export$e4dd07dff30cc924","isObject3D","parent","DEFAULT_UP","defineProperties","modelViewMatrix","normalMatrix","DEFAULT_MATRIX_AUTO_UPDATE","matrixWorldNeedsUpdate","matrixWorldAutoUpdate","DEFAULT_MATRIX_WORLD_AUTO_UPDATE","visible","castShadow","receiveShadow","frustumCulled","renderOrder","animations","onBeforeRender","onAfterRender","setRotationFromAxisAngle","setRotationFromEuler","setRotationFromMatrix","setRotationFromQuaternion","rotateOnAxis","rotateOnWorldAxis","rotateX","rotateY","rotateZ","translateOnAxis","distance","translateX","translateY","translateZ","localToWorld","worldToLocal","isCamera","isLight","arguments","error","remove","removeFromParent","clear","attach","getObjectById","getObjectByProperty","getObjectByName","child","getObjectsByProperty","result","childResult","concat","getWorldPosition","getWorldQuaternion","getWorldScale","getWorldDirection","raycast","traverse","traverseVisible","traverseAncestors","updateMatrixWorld","force","updateParents","updateChildren","geometries","materials","shapes","skeletons","nodes","serialize","library","element","instanceMatrix","instanceColor","isScene","background","isColor","environment","isLine","isPoints","parameters","shape","isSkinnedMesh","bindMode","bindMatrix","skeleton","material","uuids","animation","extractFromCache","cache","values","key","recursive","$d5b33d7c30034067$var$_v0$1","$d5b33d7c30034067$var$_v1$3","$d5b33d7c30034067$var$_v2$2","$d5b33d7c30034067$var$_v3$1","$d5b33d7c30034067$var$_vab","$d5b33d7c30034067$var$_vac","$d5b33d7c30034067$var$_vbc","$d5b33d7c30034067$var$_vap","$d5b33d7c30034067$var$_vbp","$d5b33d7c30034067$var$_vcp","$d5b33d7c30034067$var$warnedGetUV","$d5b33d7c30034067$export$5a465592bfe74b48","getNormal","targetLengthSq","getBarycoord","dot00","dot01","dot02","dot11","dot12","denom","invDenom","getUV","p3","uv1","uv2","uv3","getInterpolation","v3","isFrontFacing","setFromPointsAndIndices","i0","i1","i2","setFromAttributeAndIndices","getArea","getMidpoint","getPlane","setFromCoplanarPoints","d4","vc","d5","d6","vb","va","$d5b33d7c30034067$var$_colorKeywords","$d5b33d7c30034067$var$_hslA","$d5b33d7c30034067$var$_hslB","$d5b33d7c30034067$var$hue2rgb","setHex","setStyle","setRGB","hex","setHSL","style","handleAlpha","string","parseFloat","exec","components","parseInt","charAt","setColorName","copySRGBToLinear","copyLinearToSRGB","getHex","$d5b33d7c30034067$var$_color","getHexString","toString","getHSL","hue","saturation","lightness","getRGB","getStyle","toFixed","offsetHSL","addColors","color1","color2","lerpColors","lerpHSL","NAMES","$d5b33d7c30034067$var$_materialId","$d5b33d7c30034067$export$a2d8b23205c25948","isMaterial","blending","side","vertexColors","opacity","transparent","alphaHash","blendSrc","blendDst","blendEquation","blendSrcAlpha","blendDstAlpha","blendEquationAlpha","blendColor","blendAlpha","depthFunc","depthTest","depthWrite","stencilWriteMask","stencilFunc","stencilRef","stencilFuncMask","stencilFail","stencilZFail","stencilZPass","stencilWrite","clippingPlanes","clipIntersection","clipShadows","shadowSide","colorWrite","precision","polygonOffset","polygonOffsetFactor","polygonOffsetUnits","dithering","alphaToCoverage","premultipliedAlpha","forceSinglePass","toneMapped","_alphaTest","alphaTest","onBuild","onBeforeCompile","customProgramCacheKey","setValues","newValue","currentValue","roughness","metalness","sheen","sheenColor","sheenRoughness","emissive","emissiveIntensity","specular","specularIntensity","specularColor","shininess","clearcoat","clearcoatRoughness","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","clearcoatNormalScale","iridescence","iridescenceIOR","iridescenceThicknessRange","iridescenceMap","iridescenceThicknessMap","anisotropyRotation","anisotropyMap","map","matcap","alphaMap","lightMap","lightMapIntensity","aoMap","aoMapIntensity","bumpMap","bumpScale","normalMap","normalMapType","normalScale","displacementMap","displacementScale","displacementBias","roughnessMap","metalnessMap","emissiveMap","specularMap","specularIntensityMap","specularColorMap","envMap","combine","envMapIntensity","reflectivity","refractionRatio","gradientMap","transmission","transmissionMap","thickness","thicknessMap","attenuationDistance","attenuationColor","sizeAttenuation","linewidth","dashSize","gapSize","wireframe","wireframeLinewidth","wireframeLinecap","wireframeLinejoin","flatShading","fog","srcPlanes","dstPlanes","isMeshBasicMaterial","$d5b33d7c30034067$var$_vector$8","$d5b33d7c30034067$var$_vector2$1","$d5b33d7c30034067$export$8dea267bd6bde117","itemSize","normalized","TypeError","isBufferAttribute","usage","updateRange","gpuType","onUploadCallback","setUsage","copyAt","index1","index2","copyArray","setXY","setXYZ","component","setXYZW","onUpload","$d5b33d7c30034067$export$640a853f68025f2e","$d5b33d7c30034067$export$7eb8c9fa25cd5bd6","$d5b33d7c30034067$var$_id$2","$d5b33d7c30034067$var$_m1","$d5b33d7c30034067$var$_obj","$d5b33d7c30034067$var$_offset","$d5b33d7c30034067$var$_box$1","$d5b33d7c30034067$var$_boxMorphTargets","$d5b33d7c30034067$var$_vector$7","isBufferGeometry","attributes","morphAttributes","morphTargetsRelative","groups","boundingSphere","drawRange","start","getIndex","setIndex","setAttribute","deleteAttribute","hasAttribute","addGroup","materialIndex","clearGroups","setDrawRange","tangent","computeBoundingSphere","morphAttributesPosition","isGLBufferAttribute","morphAttribute","jl","computeTangents","indices","positions","normals","uvs","nVertices","tangents","tan1","tan2","vA","vB","vC","uvA","uvB","uvC","sdir","tdir","group","handleTriangle","isFinite","tmp2","n2","handleVertex","computeVertexNormals","normalAttribute","pA","pB","pC","nA","nB","nC","cb","ab","normalizeNormals","toNonIndexed","convertBufferAttribute","array2","isInterleavedBufferAttribute","stride","geometry2","newAttribute","morphArray","hasMorphAttributes","attributeArray","$d5b33d7c30034067$var$_inverseMatrix$3","$d5b33d7c30034067$var$_ray$3","$d5b33d7c30034067$var$_sphere$5","$d5b33d7c30034067$var$_sphereHitAt","$d5b33d7c30034067$var$_vA$1","$d5b33d7c30034067$var$_vB$1","$d5b33d7c30034067$var$_vC$1","$d5b33d7c30034067$var$_tempA","$d5b33d7c30034067$var$_morphA","$d5b33d7c30034067$var$_uvA$1","$d5b33d7c30034067$var$_uvB$1","$d5b33d7c30034067$var$_uvC$1","$d5b33d7c30034067$var$_normalA","$d5b33d7c30034067$var$_normalB","$d5b33d7c30034067$var$_normalC","$d5b33d7c30034067$var$_intersectionPoint","$d5b33d7c30034067$var$_intersectionPointWorld","updateMorphTargets","morphTargetInfluences","morphTargetDictionary","ml","String","morphPosition","morphInfluences","influence","raycaster","intersects","_computeIntersections","rayLocalSpace","intersection","groupMaterial","end","$d5b33d7c30034067$var$checkGeometryIntersection","faceIndex","face","$d5b33d7c30034067$var$checkIntersection","$d5b33d7c30034067$export$33e43285f7406bd5","widthSegments","heightSegments","depthSegments","scope","vertices","numberOfVertices","groupStart","buildPlane","udir","vdir","gridX","gridY","segmentWidth","segmentHeight","widthHalf","heightHalf","depthHalf","gridX1","gridY1","vertexCounter","groupCount","iy","ix","fromJSON","$d5b33d7c30034067$var$cloneUniforms","property","$d5b33d7c30034067$var$mergeUniforms","uniforms","merged","$d5b33d7c30034067$var$getUnlitUniformColorSpace","renderer","getRenderTarget","outputColorSpace","merge","$d5b33d7c30034067$export$83c7d75d550a8b0d","isShaderMaterial","defines","uniformsGroups","vertexShader","fragmentShader","lights","clipping","extensions","derivatives","fragDepth","drawBuffers","shaderTextureLOD","defaultAttributeValues","index0AttributeName","uniformsNeedUpdate","glslVersion","$d5b33d7c30034067$var$cloneUniformsGroups","uniform","$d5b33d7c30034067$export$79f141de891a5fed","fov","aspect","isPerspectiveCamera","zoom","focus","view","filmGauge","filmOffset","updateProjectionMatrix","setFocalLength","focalLength","vExtentSlope","getFilmHeight","atan","getFocalLength","tan","getEffectiveFOV","getFilmWidth","setViewOffset","fullWidth","fullHeight","offsetX","offsetY","clearViewOffset","skew","$d5b33d7c30034067$export$d0cdd0bd804995de","renderTarget","activeMipmapLevel","cameraPX","cameraNX","cameraPY","cameraNY","cameraPZ","cameraNZ","updateCoordinateSystem","cameras","scene","currentRenderTarget","currentActiveCubeFace","getActiveCubeFace","currentActiveMipmapLevel","getActiveMipmapLevel","currentXrEnabled","xr","setRenderTarget","render","$d5b33d7c30034067$export$ee2e5a18258a4049","isCubeTexture","$d5b33d7c30034067$export$ac386671d651941e","isWebGLCubeRenderTarget","fromEquirectangularTexture","shader","tEquirect","mesh","currentMinFilter","stencil","$d5b33d7c30034067$var$_vector1","$d5b33d7c30034067$var$_vector2","$d5b33d7c30034067$var$_normalMatrix","isPlane","setComponents","setFromNormalAndCoplanarPoint","inverseNormalLength","distanceToSphere","projectPoint","intersectLine","line","intersectsLine","startSign","endSign","coplanarPoint","optionalNormalMatrix","referencePoint","$d5b33d7c30034067$var$_sphere$4","$d5b33d7c30034067$var$_vector$6","$d5b33d7c30034067$export$35efe6f4c85463d2","p4","p5","planes","frustum","setFromProjectionMatrix","me0","me1","me2","me3","me4","me5","me6","me7","me8","me9","me10","me11","me12","me13","me14","me15","intersectsObject","intersectsSprite","sprite","negRadius","$d5b33d7c30034067$var$WebGLAnimation","isAnimating","animationLoop","requestId","onAnimationFrame","time","frame","requestAnimationFrame","stop","cancelAnimationFrame","setAnimationLoop","setContext","$d5b33d7c30034067$var$WebGLAttributes","gl","capabilities","isWebGL2","buffers","WeakMap","deleteBuffer","buffer","delete","bufferType","cached","bytesPerElement","elementSize","createBuffer","bindBuffer","bufferData","FLOAT","isFloat16BufferAttribute","HALF_FLOAT","UNSIGNED_SHORT","SHORT","UNSIGNED_INT","INT","BYTE","UNSIGNED_BYTE","BYTES_PER_ELEMENT","updateBuffer","bufferSubData","subarray","width_half","height_half","segment_width","segment_height","alphahash_fragment","alphahash_pars_fragment","alphamap_fragment","alphamap_pars_fragment","alphatest_fragment","alphatest_pars_fragment","aomap_fragment","aomap_pars_fragment","begin_vertex","beginnormal_vertex","bsdfs","iridescence_fragment","bumpmap_pars_fragment","clipping_planes_fragment","clipping_planes_pars_fragment","clipping_planes_pars_vertex","clipping_planes_vertex","color_fragment","color_pars_fragment","color_pars_vertex","color_vertex","common","cube_uv_reflection_fragment","defaultnormal_vertex","displacementmap_pars_vertex","displacementmap_vertex","emissivemap_fragment","emissivemap_pars_fragment","colorspace_fragment","colorspace_pars_fragment","envmap_fragment","envmap_common_pars_fragment","envmap_pars_fragment","envmap_pars_vertex","envmap_physical_pars_fragment","envmap_vertex","fog_vertex","fog_pars_vertex","fog_fragment","fog_pars_fragment","gradientmap_pars_fragment","lightmap_fragment","lightmap_pars_fragment","lights_lambert_fragment","lights_lambert_pars_fragment","lights_pars_begin","lights_toon_fragment","lights_toon_pars_fragment","lights_phong_fragment","lights_phong_pars_fragment","lights_physical_fragment","lights_physical_pars_fragment","lights_fragment_begin","lights_fragment_maps","lights_fragment_end","logdepthbuf_fragment","logdepthbuf_pars_fragment","logdepthbuf_pars_vertex","logdepthbuf_vertex","map_fragment","map_pars_fragment","map_particle_fragment","map_particle_pars_fragment","metalnessmap_fragment","metalnessmap_pars_fragment","morphcolor_vertex","morphnormal_vertex","morphtarget_pars_vertex","morphtarget_vertex","normal_fragment_begin","normal_fragment_maps","normal_pars_fragment","normal_pars_vertex","normal_vertex","normalmap_pars_fragment","clearcoat_normal_fragment_begin","clearcoat_normal_fragment_maps","clearcoat_pars_fragment","iridescence_pars_fragment","opaque_fragment","packing","premultiplied_alpha_fragment","project_vertex","dithering_fragment","dithering_pars_fragment","roughnessmap_fragment","roughnessmap_pars_fragment","shadowmap_pars_fragment","shadowmap_pars_vertex","shadowmap_vertex","shadowmask_pars_fragment","skinbase_vertex","skinning_pars_vertex","skinning_vertex","skinnormal_vertex","specularmap_fragment","specularmap_pars_fragment","tonemapping_fragment","tonemapping_pars_fragment","transmission_fragment","transmission_pars_fragment","uv_pars_fragment","uv_pars_vertex","uv_vertex","worldpos_vertex","background_vert","background_frag","backgroundCube_vert","backgroundCube_frag","cube_vert","cube_frag","depth_vert","depth_frag","distanceRGBA_vert","distanceRGBA_frag","equirect_vert","equirect_frag","linedashed_vert","linedashed_frag","meshbasic_vert","meshbasic_frag","meshlambert_vert","meshlambert_frag","meshmatcap_vert","meshmatcap_frag","meshnormal_vert","meshnormal_frag","meshphong_vert","meshphong_frag","meshphysical_vert","meshphysical_frag","meshtoon_vert","meshtoon_frag","points_vert","points_frag","shadow_vert","shadow_frag","sprite_vert","sprite_frag","$d5b33d7c30034067$export$6643083551874bf5","diffuse","mapTransform","alphaMapTransform","specularmap","specularMapTransform","envmap","flipEnvMap","ior","aomap","aoMapTransform","lightmap","lightMapTransform","bumpmap","bumpMapTransform","normalmap","normalMapTransform","displacementmap","displacementMapTransform","emissivemap","emissiveMapTransform","metalnessmap","metalnessMapTransform","roughnessmap","roughnessMapTransform","gradientmap","fogDensity","fogNear","fogFar","fogColor","ambientLightColor","lightProbe","directionalLights","properties","directionalLightShadows","shadowBias","shadowNormalBias","shadowRadius","shadowMapSize","directionalShadowMap","directionalShadowMatrix","spotLights","coneCos","penumbraCos","decay","spotLightShadows","spotLightMap","spotShadowMap","spotLightMatrix","pointLights","pointLightShadows","shadowCameraNear","shadowCameraFar","pointShadowMap","pointShadowMatrix","hemisphereLights","skyColor","groundColor","rectAreaLights","ltc_1","ltc_2","uvTransform","basic","lambert","phong","standard","toon","dashed","totalSize","t2D","backgroundIntensity","backgroundCube","backgroundBlurriness","cube","tCube","tFlip","equirect","distanceRGBA","referencePosition","nearDistance","farDistance","shadow","physical","clearcoatMapTransform","clearcoatNormalMapTransform","clearcoatRoughnessMapTransform","iridescenceMapTransform","iridescenceThicknessMinimum","iridescenceThicknessMaximum","iridescenceThicknessMapTransform","sheenColorMap","sheenColorMapTransform","sheenRoughnessMap","sheenRoughnessMapTransform","transmissionMapTransform","transmissionSamplerSize","transmissionSamplerMap","thicknessMapTransform","specularColorMapTransform","specularIntensityMapTransform","anisotropyVector","anisotropyMapTransform","$d5b33d7c30034067$var$_rgb","$d5b33d7c30034067$var$WebGLBackground","cubemaps","cubeuvmaps","state","objects","planeMesh","boxMesh","clearColor","clearAlpha","currentBackground","currentBackgroundVersion","currentTonemapping","setClear","getClearColor","setClearColor","getClearAlpha","setClearAlpha","renderList","forceClear","usePMREM","environmentBlendMode","getEnvironmentBlendMode","autoClear","autoClearColor","autoClearDepth","autoClearStencil","toneMapping","unshift","$d5b33d7c30034067$var$WebGLBindingStates","maxVertexAttributes","MAX_VERTEX_ATTRIBS","extension","vaoAvailable","bindingStates","defaultState","createBindingState","currentState","forceUpdate","bindVertexArrayObject","vao","bindVertexArray","bindVertexArrayOES","deleteVertexArrayObject","deleteVertexArray","deleteVertexArrayOES","newAttributes","enabledAttributes","attributeDivisors","program","initAttributes","enableAttribute","enableAttributeAndDivisor","meshPerAttribute","enableVertexAttribArray","disableUnusedAttributes","disableVertexAttribArray","vertexAttribPointer","integer","vertexAttribIPointer","reset","resetDefaultState","setup","updateBuffers","getBindingState","programMap","stateMap","createVertexArray","createVertexArrayOES","cachedAttributes","geometryAttributes","attributesNum","programAttributes","getAttributes","programAttribute","location","cachedAttribute","geometryAttribute","saveCache","ELEMENT_ARRAY_BUFFER","setupVertexAttributes","isInstancedBufferGeometry","materialDefaultAttributeValues","isInstancedInterleavedBuffer","locationSize","_maxInstanceCount","ARRAY_BUFFER","isInstancedBufferAttribute","vertexAttrib2fv","vertexAttrib3fv","vertexAttrib4fv","vertexAttrib1fv","geometryId","programId","releaseStatesOfGeometry","releaseStatesOfProgram","$d5b33d7c30034067$var$WebGLBufferRenderer","info","mode","setMode","drawArrays","renderInstances","primcount","methodName","$d5b33d7c30034067$var$WebGLCapabilities","maxAnisotropy","getMaxPrecision","getShaderPrecisionFormat","VERTEX_SHADER","HIGH_FLOAT","FRAGMENT_SHADER","MEDIUM_FLOAT","WebGL2RenderingContext","maxPrecision","logarithmicDepthBuffer","maxTextures","MAX_TEXTURE_IMAGE_UNITS","maxVertexTextures","MAX_VERTEX_TEXTURE_IMAGE_UNITS","maxTextureSize","MAX_TEXTURE_SIZE","maxCubemapSize","MAX_CUBE_MAP_TEXTURE_SIZE","maxAttributes","maxVertexUniforms","MAX_VERTEX_UNIFORM_VECTORS","maxVaryings","MAX_VARYING_VECTORS","maxFragmentUniforms","MAX_FRAGMENT_UNIFORM_VECTORS","vertexTextures","floatFragmentTextures","maxSamples","MAX_SAMPLES","getMaxAnisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT","floatVertexTextures","$d5b33d7c30034067$var$WebGLClipping","globalState","numGlobalPlanes","localClippingEnabled","renderingShadows","viewNormalMatrix","projectPlanes","skipTransform","nPlanes","dstArray","flatSize","viewMatrix","i4","numPlanes","numIntersection","enableLocalClipping","beginShadows","endShadows","setGlobalState","setState","useCache","materialProperties","nGlobal","lGlobal","clippingState","$d5b33d7c30034067$var$WebGLCubeMaps","mapTextureMapping","onTextureDispose","cubemap","$d5b33d7c30034067$var$EXTRA_LOD_SIGMA","$d5b33d7c30034067$var$_flatCamera","isOrthographicCamera","scaleW","scaleH","$d5b33d7c30034067$var$_clearColor","$d5b33d7c30034067$var$_oldTarget","$d5b33d7c30034067$var$_oldActiveCubeFace","$d5b33d7c30034067$var$_oldActiveMipmapLevel","$d5b33d7c30034067$var$PHI","$d5b33d7c30034067$var$INV_PHI","$d5b33d7c30034067$var$_axisDirections","$d5b33d7c30034067$export$6add42717753e221","_renderer","_pingPongRenderTarget","_lodMax","_cubeSize","_lodPlanes","_sizeLods","_sigmas","_blurMaterial","_cubemapMaterial","_equirectMaterial","_compileMaterial","fromScene","sigma","_setSize","cubeUVRenderTarget","_allocateTargets","_sceneToCubeUV","_blur","_applyPMREM","_cleanup","fromEquirectangular","equirectangular","_fromTexture","fromCubemap","compileCubemapShader","$d5b33d7c30034067$var$_getCubemapMaterial","compileEquirectangularShader","$d5b33d7c30034067$var$_getEquirectMaterial","_dispose","cubeSize","log2","outputTarget","$d5b33d7c30034067$var$_setViewport","_textureToCubeUV","params","$d5b33d7c30034067$var$_createRenderTarget","sizeLods","lodPlanes","sigmas","$d5b33d7c30034067$var$_createPlanes","lodMax","lod","totalLods","sizeLod","texelSize","positionSize","uvSize","faceIndexSize","coordinates","fill","$d5b33d7c30034067$var$_getCommonVertexShader","tmpMesh","compile","cubeCamera","upSign","forwardSign","originalAutoClear","backgroundMaterial","backgroundBox","useSolidColor","col","poleAxis","lodIn","lodOut","pingPongRenderTarget","_halfBlur","targetIn","targetOut","sigmaRadians","blurMaterial","blurMesh","blurUniforms","pixels","radiansPerPixel","sigmaPixels","STANDARD_DEVIATIONS","weights","sum","weight","outputSize","$d5b33d7c30034067$var$WebGLCubeUVMaps","cubeUVmaps","pmremGenerator","cubemapUV","isEquirectMap","isCubeMap","isCubeTextureComplete","$d5b33d7c30034067$var$WebGLExtensions","getExtension","$d5b33d7c30034067$var$WebGLGeometries","wireframeAttributes","onGeometryDispose","memory","updateWireframeAttribute","geometryIndex","geometryPosition","previousAttribute","getWireframeAttribute","currentAttribute","$d5b33d7c30034067$var$WebGLIndexedBufferRenderer","drawElements","$d5b33d7c30034067$var$WebGLInfo","calls","triangles","lines","programs","autoReset","instanceCount","TRIANGLES","LINES","LINE_STRIP","LINE_LOOP","POINTS","$d5b33d7c30034067$var$numericalSort","$d5b33d7c30034067$var$absNumericalSort","$d5b33d7c30034067$var$WebGLMorphtargets","influencesList","morphTextures","morph","workInfluences","objectInfluences","morphTargetsCount","entry","hasMorphPosition","hasMorphNormals","hasMorphColors","morphTargets","morphNormals","morphColors","vertexDataCount","vertexDataStride","morphTarget","morphNormal","morphColor","disposeTexture","morphInfluencesSum","morphBaseInfluence","getUniforms","setValue","influences","sort","MAX_SAFE_INTEGER","$d5b33d7c30034067$var$WebGLObjects","updateMap","onInstancedMeshDispose","instancedMesh","buffergeometry","$d5b33d7c30034067$var$emptyTexture","$d5b33d7c30034067$var$emptyArrayTexture","$d5b33d7c30034067$var$empty3dTexture","isData3DTexture","$d5b33d7c30034067$var$emptyCubeTexture","$d5b33d7c30034067$var$arrayCacheF32","$d5b33d7c30034067$var$arrayCacheI32","$d5b33d7c30034067$var$mat4array","$d5b33d7c30034067$var$mat3array","$d5b33d7c30034067$var$mat2array","$d5b33d7c30034067$var$flatten","nBlocks","blockSize","firstElem","$d5b33d7c30034067$var$arraysEqual","$d5b33d7c30034067$var$copyArray","$d5b33d7c30034067$var$allocTexUnits","allocateTextureUnit","$d5b33d7c30034067$var$setValueV1f","uniform1f","addr","$d5b33d7c30034067$var$setValueV2f","uniform2f","uniform2fv","$d5b33d7c30034067$var$setValueV3f","uniform3f","uniform3fv","$d5b33d7c30034067$var$setValueV4f","uniform4f","uniform4fv","$d5b33d7c30034067$var$setValueM2","uniformMatrix2fv","$d5b33d7c30034067$var$setValueM3","uniformMatrix3fv","$d5b33d7c30034067$var$setValueM4","uniformMatrix4fv","$d5b33d7c30034067$var$setValueV1i","uniform1i","$d5b33d7c30034067$var$setValueV2i","uniform2i","uniform2iv","$d5b33d7c30034067$var$setValueV3i","uniform3i","uniform3iv","$d5b33d7c30034067$var$setValueV4i","uniform4i","uniform4iv","$d5b33d7c30034067$var$setValueV1ui","uniform1ui","$d5b33d7c30034067$var$setValueV2ui","uniform2ui","uniform2uiv","$d5b33d7c30034067$var$setValueV3ui","uniform3ui","uniform3uiv","$d5b33d7c30034067$var$setValueV4ui","uniform4ui","uniform4uiv","$d5b33d7c30034067$var$setValueT1","unit","setTexture2D","$d5b33d7c30034067$var$setValueT3D1","setTexture3D","$d5b33d7c30034067$var$setValueT6","setTextureCube","$d5b33d7c30034067$var$setValueT2DArray1","setTexture2DArray","$d5b33d7c30034067$var$setValueV1fArray","uniform1fv","$d5b33d7c30034067$var$setValueV2fArray","$d5b33d7c30034067$var$setValueV3fArray","$d5b33d7c30034067$var$setValueV4fArray","$d5b33d7c30034067$var$setValueM2Array","$d5b33d7c30034067$var$setValueM3Array","$d5b33d7c30034067$var$setValueM4Array","$d5b33d7c30034067$var$setValueV1iArray","uniform1iv","$d5b33d7c30034067$var$setValueV2iArray","$d5b33d7c30034067$var$setValueV3iArray","$d5b33d7c30034067$var$setValueV4iArray","$d5b33d7c30034067$var$setValueV1uiArray","uniform1uiv","$d5b33d7c30034067$var$setValueV2uiArray","$d5b33d7c30034067$var$setValueV3uiArray","$d5b33d7c30034067$var$setValueV4uiArray","$d5b33d7c30034067$var$setValueT1Array","units","$d5b33d7c30034067$var$setValueT3DArray","$d5b33d7c30034067$var$setValueT6Array","$d5b33d7c30034067$var$setValueT2DArrayArray","$d5b33d7c30034067$var$SingleUniform","activeInfo","$d5b33d7c30034067$var$getSingularSetter","$d5b33d7c30034067$var$PureArrayUniform","$d5b33d7c30034067$var$getPureArraySetter","$d5b33d7c30034067$var$StructuredUniform","seq","$d5b33d7c30034067$var$RePathPart","$d5b33d7c30034067$var$addUniform","container","uniformObject","$d5b33d7c30034067$var$WebGLUniforms","getProgramParameter","ACTIVE_UNIFORMS","getActiveUniform","getUniformLocation","$d5b33d7c30034067$var$parseUniform","path","pathLength","lastIndex","match","matchEnd","idIsIndex","subscript","next","setOptional","upload","seqWithValue","$d5b33d7c30034067$var$WebGLShader","createShader","shaderSource","compileShader","$d5b33d7c30034067$var$programIdCount","$d5b33d7c30034067$var$getShaderErrors","status","getShaderParameter","COMPILE_STATUS","errors","getShaderInfoLog","trim","errorMatches","errorLine","toUpperCase","$d5b33d7c30034067$var$handleSource","split","lines2","to","join","getShaderSource","$d5b33d7c30034067$var$filterEmptyLine","$d5b33d7c30034067$var$replaceLightNums","numSpotLightCoords","numSpotLightShadows","numSpotLightMaps","numSpotLightShadowsWithMaps","replace","numDirLights","numSpotLights","numRectAreaLights","numPointLights","numHemiLights","numDirLightShadows","numPointLightShadows","$d5b33d7c30034067$var$replaceClippingPlaneNums","numClippingPlanes","numClipIntersection","$d5b33d7c30034067$var$includePattern","$d5b33d7c30034067$var$resolveIncludes","$d5b33d7c30034067$var$includeReplacer","$d5b33d7c30034067$var$shaderChunkMap","Map","include","newInclude","$d5b33d7c30034067$var$unrollLoopPattern","$d5b33d7c30034067$var$unrollLoops","$d5b33d7c30034067$var$loopReplacer","snippet","$d5b33d7c30034067$var$generatePrecision","precisionstring","$d5b33d7c30034067$var$WebGLProgram","cacheKey","prefixVertex","prefixFragment","cachedUniforms","shadowMapTypeDefine","envMapModeDefine","shadowMapType","envMapTypeDefine","$d5b33d7c30034067$var$generateEnvMapTypeDefine","envMapMode","envMapBlendingDefine","$d5b33d7c30034067$var$generateEnvMapBlendingDefine","envMapCubeUVSize","$d5b33d7c30034067$var$generateCubeUVSize","imageHeight","envMapCubeUVHeight","maxMip","texelWidth","texelHeight","customExtensions","chunks","extensionDerivatives","normalMapTangentSpace","shaderID","extensionFragDepth","rendererExtensionFragDepth","extensionDrawBuffers","rendererExtensionDrawBuffers","extensionShaderTextureLOD","rendererExtensionShaderTextureLod","filter","customDefines","$d5b33d7c30034067$var$generateDefines","createProgram","versionString","isRawShaderMaterial","shaderType","shaderName","instancing","instancingColor","useFog","fogExp2","normalMapObjectSpace","mapUv","alphaMapUv","lightMapUv","aoMapUv","emissiveMapUv","bumpMapUv","normalMapUv","displacementMapUv","metalnessMapUv","roughnessMapUv","anisotropyMapUv","clearcoatMapUv","clearcoatNormalMapUv","clearcoatRoughnessMapUv","iridescenceMapUv","iridescenceThicknessMapUv","sheenColorMapUv","sheenRoughnessMapUv","specularMapUv","specularColorMapUv","specularIntensityMapUv","transmissionMapUv","thicknessMapUv","vertexTangents","vertexAlphas","vertexUv1s","vertexUv2s","vertexUv3s","pointsUvs","skinning","morphTextureStride","doubleSided","flipSided","shadowMapEnabled","numLightProbes","useLegacyLights","decodeVideoTexture","$d5b33d7c30034067$var$getToneMappingFunction","functionName","toneMappingName","opaque","$d5b33d7c30034067$var$getTexelEncodingFunction","$d5b33d7c30034067$var$getEncodingComponents","gamutMapping","workingPrimaries","encodingPrimaries","useDepthPacking","depthPacking","vertexGlsl","fragmentGlsl","glVertexShader","glFragmentShader","onFirstUse","self1","debug","checkShaderErrors","programLog","getProgramInfoLog","vertexLog","fragmentLog","runnable","haveDiagnostics","LINK_STATUS","onShaderError","vertexErrors","fragmentErrors","getError","VALIDATE_STATUS","diagnostics","prefix","deleteShader","$d5b33d7c30034067$var$fetchAttributeLocations","ACTIVE_ATTRIBUTES","getActiveAttrib","FLOAT_MAT2","FLOAT_MAT3","FLOAT_MAT4","getAttribLocation","attachShader","bindAttribLocation","linkProgram","programReady","rendererExtensionParallelShaderCompile","isReady","destroy","deleteProgram","usedTimes","$d5b33d7c30034067$var$_id$1","$d5b33d7c30034067$var$WebGLShaderCache","shaderCache","materialCache","vertexShaderStage","_getShaderStage","fragmentShaderStage","materialShaders","_getShaderCacheForMaterial","shaderStage","getVertexShaderID","getFragmentShaderID","stage","$d5b33d7c30034067$var$WebGLShaderStage","$d5b33d7c30034067$var$WebGLPrograms","_programLayers","_customShaders","IS_WEBGL2","SUPPORTS_VERTEX_TEXTURES","shaderIDs","MeshDepthMaterial","MeshDistanceMaterial","MeshNormalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial","MeshStandardMaterial","MeshPhysicalMaterial","MeshMatcapMaterial","LineBasicMaterial","LineDashedMaterial","PointsMaterial","ShadowMaterial","SpriteMaterial","getChannel","getParameters","shadows","customVertexShaderID","customFragmentShaderID","isMeshStandardMaterial","IS_INSTANCEDMESH","HAS_MAP","HAS_MATCAP","HAS_ENVMAP","HAS_AOMAP","HAS_LIGHTMAP","HAS_BUMPMAP","HAS_NORMALMAP","HAS_DISPLACEMENTMAP","HAS_EMISSIVEMAP","HAS_METALNESSMAP","HAS_ROUGHNESSMAP","HAS_ANISOTROPY","HAS_CLEARCOAT","HAS_IRIDESCENCE","HAS_SHEEN","HAS_TRANSMISSION","HAS_ANISOTROPYMAP","HAS_CLEARCOATMAP","HAS_CLEARCOAT_NORMALMAP","HAS_CLEARCOAT_ROUGHNESSMAP","HAS_IRIDESCENCEMAP","HAS_IRIDESCENCE_THICKNESSMAP","HAS_SHEEN_COLORMAP","HAS_SHEEN_ROUGHNESSMAP","HAS_SPECULARMAP","HAS_SPECULAR_COLORMAP","HAS_SPECULAR_INTENSITYMAP","HAS_TRANSMISSIONMAP","HAS_THICKNESSMAP","HAS_GRADIENTMAP","HAS_ALPHAMAP","HAS_ALPHATEST","HAS_ALPHAHASH","HAS_EXTENSIONS","HAS_ATTRIBUTE_UV1","HAS_ATTRIBUTE_UV2","HAS_ATTRIBUTE_UV3","isXRRenderTarget","supportsVertexTextures","isFogExp2","directional","spot","rectArea","hemi","shadowMap","_useLegacyLights","isVideoTexture","getProgramCacheKey","morphAttributeCount","acquireProgram","pl","preexistingProgram","releaseProgram","pop","releaseShaderCache","$d5b33d7c30034067$var$WebGLProperties","$d5b33d7c30034067$var$painterSortStable","groupOrder","$d5b33d7c30034067$var$reversePainterSortStable","$d5b33d7c30034067$var$WebGLRenderList","renderItems","renderItemsIndex","transmissive","getNextRenderItem","renderItem","finish","customOpaqueSort","customTransparentSort","$d5b33d7c30034067$var$WebGLRenderLists","lists","renderCallDepth","list","listArray","$d5b33d7c30034067$var$UniformsCache","light","halfWidth","halfHeight","$d5b33d7c30034067$var$nextVersion","$d5b33d7c30034067$var$shadowCastingAndTexturingLightsFirst","lightA","lightB","$d5b33d7c30034067$var$WebGLLights","shadowCache","$d5b33d7c30034067$var$ShadowUniformsCache","hash","directionalLength","pointLength","spotLength","rectAreaLength","hemiLength","numDirectionalShadows","numPointShadows","numSpotShadows","numSpotMaps","ambient","probe","directionalShadow","spotShadow","rectAreaLTC1","rectAreaLTC2","pointShadow","vector3","matrix42","numSpotShadowsWithMaps","scaleFactor","intensity","isAmbientLight","isLightProbe","sh","coefficients","isDirectionalLight","shadowUniforms","bias","normalBias","mapSize","isSpotLight","penumbra","updateMatrices","isRectAreaLight","isPointLight","isHemisphereLight","LTC_FLOAT_1","LTC_FLOAT_2","LTC_HALF_1","LTC_HALF_2","setupView","$d5b33d7c30034067$var$WebGLRenderState","lightsArray","shadowsArray","setupLights","setupLightsView","pushLight","pushShadow","shadowLight","$d5b33d7c30034067$var$WebGLRenderStates","renderStates","renderState","renderStateArray","isMeshDepthMaterial","isMeshDistanceMaterial","$d5b33d7c30034067$var$WebGLShadowMap","_objects","_capabilities","_frustum","_shadowMapSize","_viewportSize","_viewport","_depthMaterial","_distanceMaterial","_materialCache","_maxTextureSize","shadowMaterialVertical","VSM_SAMPLES","shadow_pass","resolution","shadowMaterialHorizontal","HORIZONTAL_PASS","fullScreenTri","fullScreenMesh","autoUpdate","_previousType","getDepthMaterial","customMaterial","customDistanceMaterial","customDepthMaterial","keyA","keyB","materialsForVariant","cachedMaterial","activeCubeFace","_state","setBlending","setTest","setScissorTest","toVSM","fromVSM","shadowFrameExtents","getFrameExtents","pars","viewportCount","getViewportCount","vp","getViewport","getFrustum","renderObject","shadowCamera","k","kl","depthMaterial","renderBufferDirect","isPointLightShadow","VSMPass","blurSamples","mapPass","$d5b33d7c30034067$var$WebGLState","colorBuffer","locked","currentColorMask","currentColorClear","setMask","colorMask","setLocked","lock","currentDepthMask","currentDepthFunc","currentDepthClear","DEPTH_TEST","depthMask","setFunc","NEVER","ALWAYS","LESS","LEQUAL","EQUAL","GEQUAL","GREATER","NOTEQUAL","clearDepth","currentStencilMask","currentStencilFunc","currentStencilRef","currentStencilFuncMask","currentStencilFail","currentStencilZFail","currentStencilZPass","currentStencilClear","stencilTest","STENCIL_TEST","stencilMask","setOp","stencilOp","clearStencil","uboBindings","uboProgramMap","enabledCapabilities","currentBoundFramebuffers","currentDrawbuffers","defaultDrawbuffers","currentProgram","currentBlendingEnabled","currentBlending","currentBlendEquation","currentBlendSrc","currentBlendDst","currentBlendEquationAlpha","currentBlendSrcAlpha","currentBlendDstAlpha","currentBlendColor","currentBlendAlpha","currentPremultipledAlpha","currentFlipSided","currentCullFace","currentLineWidth","currentPolygonOffsetFactor","currentPolygonOffsetUnits","MAX_COMBINED_TEXTURE_IMAGE_UNITS","lineWidthAvailable","glVersion","VERSION","currentTextureSlot","currentBoundTextures","scissorParam","SCISSOR_BOX","viewportParam","VIEWPORT","currentScissor","currentViewport","createTexture","dimensions","bindTexture","texParameteri","TEXTURE_MIN_FILTER","NEAREST","TEXTURE_MAG_FILTER","TEXTURE_3D","TEXTURE_2D_ARRAY","texImage3D","RGBA","texImage2D","emptyTextures","TEXTURE_2D","TEXTURE_CUBE_MAP","TEXTURE_CUBE_MAP_POSITIVE_X","setFlipSided","setCullFace","CULL_FACE","equationToGL","FUNC_ADD","FUNC_SUBTRACT","FUNC_REVERSE_SUBTRACT","MIN","MAX","MIN_EXT","MAX_EXT","factorToGL","ZERO","ONE","SRC_COLOR","SRC_ALPHA","SRC_ALPHA_SATURATE","DST_COLOR","DST_ALPHA","ONE_MINUS_SRC_COLOR","ONE_MINUS_SRC_ALPHA","ONE_MINUS_DST_COLOR","ONE_MINUS_DST_ALPHA","CONSTANT_COLOR","ONE_MINUS_CONSTANT_COLOR","CONSTANT_ALPHA","ONE_MINUS_CONSTANT_ALPHA","BLEND","blendFuncSeparate","blendFunc","blendEquationSeparate","frontFace","CW","CCW","cullFace","BACK","FRONT","FRONT_AND_BACK","setPolygonOffset","factor","POLYGON_OFFSET_FILL","bindFramebuffer","framebuffer","DRAW_FRAMEBUFFER","FRAMEBUFFER","isWebGLMultipleRenderTargets","COLOR_ATTACHMENT0","drawBuffersWEBGL","useProgram","setMaterial","frontFaceCW","SAMPLE_ALPHA_TO_COVERAGE","setLineWidth","lineWidth","SCISSOR_TEST","activeTexture","webglSlot","TEXTURE0","webglType","webglTexture","boundTexture","unbindTexture","compressedTexImage2D","apply","compressedTexImage3D","updateUBOMapping","uniformsGroup","blockIndex","getUniformBlockIndex","uniformBlockBinding","__bindingPointIndex","texStorage2D","texStorage3D","texSubImage2D","texSubImage3D","compressedTexSubImage2D","compressedTexSubImage3D","KEEP","READ_FRAMEBUFFER","$d5b33d7c30034067$var$WebGLTextures","_gl","utils","_canvas","multisampledRTTExt","supportsInvalidateFramebuffer","navigator","userAgent","_videoTextures","_sources","useOffscreenCanvas","OffscreenCanvas","createCanvas","resizeImage","needsPowerOfTwo","needsNewCanvas","maxSize","isPowerOfTwo$1","textureNeedsGenerateMipmaps","supportsMips","generateMipmap","getInternalFormat","internalFormatName","glFormat","glType","forceLinearTransfer","RED","R32F","R16F","R8","RED_INTEGER","R8UI","R16UI","R32UI","R8I","R16I","R32I","RG","RG32F","RG16F","RG8","RGBA32F","RGBA16F","SRGB8_ALPHA8","RGBA8","UNSIGNED_SHORT_4_4_4_4","RGBA4","UNSIGNED_SHORT_5_5_5_1","RGB5_A1","getMipLevels","isFramebufferTexture","isCompressedTexture","filterFallback","LINEAR","deallocateTexture","textureProperties","__webglInit","webglTextures","__cacheKey","deleteTexture","onRenderTargetDispose","deallocateRenderTarget","renderTargetProperties","__webglTexture","__webglFramebuffer","level","deleteFramebuffer","__webglDepthbuffer","deleteRenderbuffer","__webglMultisampledFramebuffer","__webglColorRenderbuffer","__webglDepthRenderbuffer","attachmentProperties","textureUnits","slot","updateVideoTexture","__version","complete","uploadTexture","wrappingToGL","REPEAT","CLAMP_TO_EDGE","MIRRORED_REPEAT","filterToGL","NEAREST_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_NEAREST","LINEAR_MIPMAP_LINEAR","compareToGL","setTextureParameters","textureType","TEXTURE_WRAP_S","TEXTURE_WRAP_T","TEXTURE_WRAP_R","compareFunction","TEXTURE_COMPARE_MODE","COMPARE_REF_TO_TEXTURE","TEXTURE_COMPARE_FUNC","__currentAnisotropy","texParameterf","TEXTURE_MAX_ANISOTROPY_EXT","initTexture","forceUpload","textureCacheKey","getTextureCacheKey","isCompressedArrayTexture","sourceProperties","mipmap","texturePrimaries","unpackConversion","NONE","BROWSER_DEFAULT_WEBGL","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","UNPACK_ALIGNMENT","UNPACK_COLORSPACE_CONVERSION_WEBGL","verifyColorSpace","glInternalFormat","useTexStorage","allocateMemory","levels","isDepthTexture","DEPTH_COMPONENT","DEPTH_COMPONENT32F","DEPTH_COMPONENT24","DEPTH24_STENCIL8","DEPTH_COMPONENT16","DEPTH_STENCIL","setupFrameBufferTexture","attachment","textureTarget","__hasExternalTextures","useMultisampledRTT","framebufferTexture2DMultisampleEXT","getRenderTargetSamples","TEXTURE_CUBE_MAP_NEGATIVE_Z","framebufferTexture2D","setupRenderBufferStorage","renderbuffer","isMultisample","bindRenderbuffer","RENDERBUFFER","renderbufferStorageMultisampleEXT","renderbufferStorageMultisample","renderbufferStorage","framebufferRenderbuffer","DEPTH_ATTACHMENT","DEPTH_STENCIL_ATTACHMENT","setupDepthRenderbuffer","isCube","__autoAllocateDepthBuffer","setupDepthTexture","webglDepthTexture","createRenderbuffer","__useRenderToTexture","textureUnit","resetTextureUnits","uploadCubeTexture","isCompressed","cubeImage","mipmapImage","rebindTextures","colorTexture","setupRenderTarget","isMultipleRenderTargets","createFramebuffer","glTextureType","isWebGL3DRenderTarget","isWebGLArrayRenderTarget","updateRenderTargetMipmap","updateMultisampleRenderTarget","COLOR_BUFFER_BIT","invalidationArray","depthStyle","ignoreDepthValues","__ignoreDepthValues","DEPTH_BUFFER_BIT","STENCIL_BUFFER_BIT","invalidateFramebuffer","blitFramebuffer","$d5b33d7c30034067$export$ddaebcad857649a8","HALF_FLOAT_OES","ALPHA","LUMINANCE","LUMINANCE_ALPHA","SRGB_ALPHA_EXT","RG_INTEGER","RGBA_INTEGER","COMPRESSED_SRGB_S3TC_DXT1_EXT","COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT","COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT","COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT","COMPRESSED_RGB_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT3_EXT","COMPRESSED_RGBA_S3TC_DXT5_EXT","COMPRESSED_RGB_PVRTC_4BPPV1_IMG","COMPRESSED_RGB_PVRTC_2BPPV1_IMG","COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","COMPRESSED_RGB_ETC1_WEBGL","COMPRESSED_SRGB8_ETC2","COMPRESSED_RGB8_ETC2","COMPRESSED_SRGB8_ALPHA8_ETC2_EAC","COMPRESSED_RGBA8_ETC2_EAC","COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR","COMPRESSED_RGBA_ASTC_4x4_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR","COMPRESSED_RGBA_ASTC_5x4_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR","COMPRESSED_RGBA_ASTC_5x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR","COMPRESSED_RGBA_ASTC_6x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR","COMPRESSED_RGBA_ASTC_6x6_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR","COMPRESSED_RGBA_ASTC_8x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR","COMPRESSED_RGBA_ASTC_8x6_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR","COMPRESSED_RGBA_ASTC_8x8_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR","COMPRESSED_RGBA_ASTC_10x5_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR","COMPRESSED_RGBA_ASTC_10x6_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR","COMPRESSED_RGBA_ASTC_10x8_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR","COMPRESSED_RGBA_ASTC_10x10_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR","COMPRESSED_RGBA_ASTC_12x10_KHR","COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR","COMPRESSED_RGBA_ASTC_12x12_KHR","COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT","COMPRESSED_RGBA_BPTC_UNORM_EXT","COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT","COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT","COMPRESSED_RED_RGTC1_EXT","COMPRESSED_SIGNED_RED_RGTC1_EXT","COMPRESSED_RED_GREEN_RGTC2_EXT","COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT","UNSIGNED_INT_24_8","UNSIGNED_INT_24_8_WEBGL","$d5b33d7c30034067$export$56b937d9e5581166","isArrayCamera","$d5b33d7c30034067$export$eb2fcfdbd7ba97d4","isGroup","$d5b33d7c30034067$var$_moveEvent","$d5b33d7c30034067$var$WebXRController","_targetRay","_grip","_hand","getHandSpace","joints","inputState","pinching","getTargetRaySpace","hasLinearVelocity","linearVelocity","hasAngularVelocity","angularVelocity","getGripSpace","connect","inputSource","hand","inputjoint","_getHandJoint","disconnect","referenceSpace","inputPose","gripPose","handPose","targetRay","grip","session","visibilityState","jointPose","getJointPose","joint","transform","jointRadius","indexTip","thumbTip","distanceToPinch","handedness","gripSpace","getPose","targetRaySpace","jointName","$d5b33d7c30034067$export$fc830aa069cc8c2f","$d5b33d7c30034067$var$WebXRManager","framebufferScaleFactor","referenceSpaceType","foveation","customReferenceSpace","pose","glBinding","glProjLayer","glBaseLayer","xrFrame","getContextAttributes","initialRenderTarget","newRenderTarget","controllers","controllerInputSources","cameraL","cameraR","cameraXR","_currentDepthNear","_currentDepthFar","onSessionEvent","controllerIndex","controller","onSessionEnd","onInputSourcesChange","isPresenting","removed","added","cameraAutoUpdate","getController","getControllerGrip","getHand","setFramebufferScaleFactor","setReferenceSpaceType","getReferenceSpace","setReferenceSpace","space","getBaseLayer","getBinding","getFrame","getSession","setSession","xrCompatible","makeXRCompatible","layerInit","antialias","XRWebGLLayer","updateRenderState","baseLayer","framebufferWidth","framebufferHeight","depthFormat","depthType","glDepthFormat","projectionlayerInit","colorFormat","XRWebGLBinding","createProjectionLayer","textureWidth","textureHeight","setFoveation","requestReferenceSpace","cameraLPos","cameraRPos","updateCamera","depthNear","depthFar","setProjectionFromUnion","ipd","projL","projR","topFov","bottomFov","leftFov","rightFov","zOffset","xOffset","near2","far2","getCamera","getFoveation","fixedFoveation","onAnimationFrameCallback","getViewerPose","views","setRenderTargetFramebuffer","cameraXRNeedsUpdate","glSubImage","getViewSubImage","setRenderTargetTextures","depthStencilTexture","detectedPlanes","$d5b33d7c30034067$var$WebGLMaterials","refreshTransformUniform","refreshUniformsCommon","refreshFogUniforms","isFog","density","refreshMaterialUniforms","pixelRatio","transmissionRenderTarget","isMeshLambertMaterial","isMeshToonMaterial","isMeshPhongMaterial","isMeshPhysicalMaterial","isMeshMatcapMaterial","refreshUniformsDistance","isMeshNormalMaterial","isLineBasicMaterial","isLineDashedMaterial","isPointsMaterial","isSpriteMaterial","isShadowMaterial","$d5b33d7c30034067$var$WebGLUniformsGroups","updateList","allocatedBindingPoints","maxBindingPoints","MAX_UNIFORM_BUFFER_BINDINGS","getUniformSize","boundary","storage","onUniformsGroupsDispose","bind","webglProgram","prepareUniformsGroup","chunkOffset","infos","__data","__offset","remainingSizeInChunk","chunkSize","__size","__cache","bindingPointIndex","allocateBindingPointIndex","UNIFORM_BUFFER","bindBufferBase","updateBufferData","hasUniformChanged","tempValues","cachedObjects","cachedObject","arrayOffset","_alpha","programCache","renderLists","morphtargets","bufferRenderer","indexedBufferRenderer","$d5b33d7c30034067$export$1033a2df66368859","display","preserveDrawingBuffer","powerPreference","failIfMajorPerformanceCaveat","isWebGLRenderer","uintClearColor","intClearColor","currentRenderList","currentRenderState","renderListStack","renderStateStack","domElement","sortObjects","_outputColorSpace","toneMappingExposure","_this","_isContextLost","_currentActiveCubeFace","_currentActiveMipmapLevel","_currentRenderTarget","_currentMaterialId","_currentCamera","_currentViewport","_currentScissor","_currentScissorTest","_currentClearColor","_currentClearAlpha","_width","_height","_pixelRatio","_opaqueSort","_transparentSort","_scissor","_scissorTest","_clippingEnabled","_localClippingEnabled","_transmissionRenderTarget","_projScreenMatrix","_vector2","_vector3","_emptyScene","overrideMaterial","getTargetPixelRatio","contextNames","contextAttributes","contextName","onContextLost","onContextRestore","onContextCreationError","isWebGL1Renderer","shift","WebGLRenderingContext","initGLContext","preventDefault","infoAutoReset","shadowMapAutoUpdate","shadowMapNeedsUpdate","statusMessage","onMaterialDispose","releaseMaterialProgramReferences","forEach","prepareMaterial","getProgram","forceContextLoss","loseContext","forceContextRestore","restoreContext","getPixelRatio","setPixelRatio","updateStyle","setViewport","getDrawingBufferSize","setDrawingBufferSize","getCurrentViewport","getScissor","setScissor","getScissorTest","boolean","setOpaqueSort","method","setTransparentSort","bits","isIntegerFormat","targetFormat","targetType","clearBufferuiv","COLOR","clearBufferiv","onXRSessionStart","onXRSessionEnd","setProgram","needsProgramChange","needsLights","lightsStateVersion","refreshProgram","refreshMaterial","refreshLights","p_uniforms","m_uniforms","uCamPos","cameraPosition","boneTexture","computeBoneTexture","boneTextureSize","isMeshGouraudMaterial","getUniformList","rangeFactor","drawStart","drawEnd","drawCount","isLineSegments","isLineLoop","isSprite","maxInstanceCount","targetScene","material2","compileAsync","Promise","resolve","checkMaterialsReady","setTimeout","renderScene","opaqueObjects","transmissiveObjects","transparentObjects","renderTransmissionPass","currentToneMapping","renderObjects","renderTargetNeedsUpdate","currentSide","programCacheKey","updateCommonMaterialProperties","uniformsList","progUniforms","self","projectObject","isLOD","camera2","defaultFramebuffer","__useDefaultFramebuffer","useDefaultFramebuffer","isRenderTarget3D","framebufferTextureLayer","readRenderTargetPixels","activeCubeFaceIndex","textureFormat","IMPLEMENTATION_COLOR_READ_FORMAT","halfFloatSupportedByExt","IMPLEMENTATION_COLOR_READ_TYPE","readPixels","copyFramebufferToTexture","levelScale","copyTexSubImage2D","copyTextureToTexture","srcTexture","dstTexture","copyTextureToTexture3D","sourceBox","glTarget","unpackRowLen","UNPACK_ROW_LENGTH","unpackImageHeight","UNPACK_IMAGE_HEIGHT","unpackSkipPixels","UNPACK_SKIP_PIXELS","unpackSkipRows","UNPACK_SKIP_ROWS","unpackSkipImages","UNPACK_SKIP_IMAGES","resetState","__THREE_DEVTOOLS__","CustomEvent","detail","drawingBufferColorSpace","unpackColorSpace","physicallyCorrectLights","outputEncoding","$d5b33d7c30034067$export$a2f65229194348f9","linecap","linejoin","$d5b33d7c30034067$var$_start$1","$d5b33d7c30034067$var$_end$1","$d5b33d7c30034067$var$_inverseMatrix$1","$d5b33d7c30034067$var$_ray$1","$d5b33d7c30034067$var$_sphere$1","computeLineDistances","lineDistances","threshold","Line","localThreshold","localThresholdSq","vStart","vEnd","interSegment","interRay","distSq","$d5b33d7c30034067$var$_start","$d5b33d7c30034067$var$_end","$d5b33d7c30034067$export$ff1ed10fedfdd604","$d5b33d7c30034067$export$b0e83c3ef8d2db1","arcLengthDivisions","getPoint","getPointAt","optionalTarget","getUtoTmapping","getPoints","divisions","getSpacedPoints","getLength","lengths","getLengths","cacheArcLengths","current","last","updateArcLengths","targetArcLength","arcLengths","comparison","lengthBefore","lengthAfter","getTangent","t2","pt1","pt2","getTangentAt","computeFrenetFrames","segments","closed","binormals","vec","mat","MAX_VALUE","json","aX","aY","xRadius","yRadius","aStartAngle","aEndAngle","aClockwise","aRotation","isEllipseCurve","twoPi","deltaAngle","samePoints","$d5b33d7c30034067$var$CubicPoly","c0","initCatmullRom","x3","tension","initNonuniformCatmullRom","dt0","dt1","dt2","calc","$d5b33d7c30034067$var$tmp","$d5b33d7c30034067$var$px","$d5b33d7c30034067$var$py","$d5b33d7c30034067$var$pz","$d5b33d7c30034067$var$CatmullRom","$d5b33d7c30034067$var$QuadraticBezier","$d5b33d7c30034067$var$QuadraticBezierP0","$d5b33d7c30034067$var$CubicBezier","$d5b33d7c30034067$var$CubicBezierP0","$d5b33d7c30034067$var$CubicBezierP1","$d5b33d7c30034067$export$e36650d36468bb39","isCubicBezierCurve","$d5b33d7c30034067$export$ab2e07e76531a47e","isLineCurve","$d5b33d7c30034067$export$5938c4ee491a43ad","isQuadraticBezierCurve","$d5b33d7c30034067$export$bf3f4c7e459f90fc","isQuadraticBezierCurve3","$d5b33d7c30034067$export$d3bdd77da77afc1b","isSplineCurve","intPoint","$d5b33d7c30034067$var$Curves","freeze","__proto__","ArcCurve","aRadius","isArcCurve","CatmullRomCurve3","curveType","isCatmullRomCurve3","CubicBezierCurve","CubicBezierCurve3","isCubicBezierCurve3","EllipseCurve","LineCurve","LineCurve3","isLineCurve3","QuadraticBezierCurve","QuadraticBezierCurve3","SplineCurve","$d5b33d7c30034067$export$4aaf9b66af1bbf2c","curves","autoClose","curve","closePath","startPoint","endPoint","lineType","curveLengths","getCurveLengths","diff","segmentLength","lens","cacheLengths","sums","pts","$d5b33d7c30034067$export$4b2950bdac9b6ee9","currentPoint","moveTo","lineTo","quadraticCurveTo","aCPx","aCPy","bezierCurveTo","aCP1x","aCP1y","aCP2x","aCP2y","splineThru","arc","absarc","absellipse","ellipse","firstPoint","lastPoint","$d5b33d7c30034067$export$6d839803fcd1882c","phiStart","phiLength","initNormals","inverseSegments","vertex","curNormal","prevNormal","base","$d5b33d7c30034067$export$41680e8551036033","capSegments","radialSegments","$d5b33d7c30034067$export$d5c0e8d607467193","thetaStart","thetaLength","segment","radiusTop","radiusBottom","openEnded","indexArray","generateCap","centerIndexStart","centerIndexEnd","cosTheta","sinTheta","generateTorso","slope","indexRow","$d5b33d7c30034067$export$a7a48974f285c9b3","$d5b33d7c30034067$export$60e57a7d3f20ff65","vertexBuffer","uvBuffer","pushVertex","getVertexByIndex","correctUV","azimuth","subdivide","subdivideFace","cols","aj","bj","rows","applyRadius","generateUVs","inclination","correctUVs","centroid","azi","correctSeam","details","$d5b33d7c30034067$export$c0babfeb8708fc9c","$d5b33d7c30034067$export$6428a7f2611ef1fa","holes","getPointsHoles","holesPts","extractPoints","hole","$d5b33d7c30034067$var$Earcut","triangulate","holeIndices","dim","minX","minY","maxX","maxY","invSize","hasHoles","outerLen","outerNode","$d5b33d7c30034067$var$linkedList","prev","$d5b33d7c30034067$var$eliminateHoles","queue","steiner","$d5b33d7c30034067$var$getLeftmost","leftmost","$d5b33d7c30034067$var$compareX","$d5b33d7c30034067$var$eliminateHole","bridge","$d5b33d7c30034067$var$findHoleBridge","hx","hy","mx","my","tanMin","$d5b33d7c30034067$var$pointInTriangle","$d5b33d7c30034067$var$locallyInside","$d5b33d7c30034067$var$area","bridgeReverse","$d5b33d7c30034067$var$splitPolygon","$d5b33d7c30034067$var$filterPoints","$d5b33d7c30034067$var$earcutLinked","ear","pass","$d5b33d7c30034067$var$indexCurve","$d5b33d7c30034067$var$zOrder","prevZ","nextZ","$d5b33d7c30034067$var$sortLinked","tail","numMerges","pSize","qSize","inSize","$d5b33d7c30034067$var$isEarHashed","minZ","maxZ","$d5b33d7c30034067$var$isEar","$d5b33d7c30034067$var$removeNode","$d5b33d7c30034067$var$cureLocalIntersections","$d5b33d7c30034067$var$equals","$d5b33d7c30034067$var$intersects","$d5b33d7c30034067$var$splitEarcut","$d5b33d7c30034067$var$intersectsPolygon","$d5b33d7c30034067$var$middleInside","inside","px","py","clockwise","$d5b33d7c30034067$var$signedArea","$d5b33d7c30034067$var$insertNode","again","q1","q2","o1","$d5b33d7c30034067$var$sign","o2","o3","o4","$d5b33d7c30034067$var$onSegment","num","$d5b33d7c30034067$var$Node","an","bp","$d5b33d7c30034067$export$96bdf6d9c66d7ba8","area","contour","isClockWise","triangulateShape","faces","$d5b33d7c30034067$var$removeDupEndPts","$d5b33d7c30034067$var$addContour","holeIndex","verticesArray","uvArray","addShape","splineTube","binormal","position2","placeholder","curveSegments","steps","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","extrudePath","uvgen","UVGenerator","$d5b33d7c30034067$var$WorldUVGenerator","extrudePts","extrudeByPath","shapePoints","reverse","hl","ahole","scalePt2","pt","vlen","flen","getBevelVec","inPt","inPrev","inNext","v_trans_x","v_trans_y","shrink_by","v_prev_x","v_prev_y","v_next_x","v_next_y","v_prev_lensq","v_prev_len","v_next_len","ptPrevShift_x","ptPrevShift_y","sf","ptNextShift_x","ptNextShift_y","v_trans_lensq","direction_eq","contourMovements","holesMovements","oneHoleMovements","verticesMovements","bs","vert","sidewalls","layeroffset","sl","slen1","slen2","f4","addVertex","nextIndex","generateSideWallUV","addUV","f3","generateTopUV","vector2","buildLidFaces","buildSideFaces","$d5b33d7c30034067$var$toJSON$1","geometryShapes","indexA","indexB","indexC","a_x","a_y","b_x","b_y","c_x","c_y","indexD","a_z","b_z","c_z","d_x","d_y","d_z","$d5b33d7c30034067$export$9567cc828c9535da","$d5b33d7c30034067$export$1954e2b809fe361e","$d5b33d7c30034067$export$68cb731f50f614af","innerRadius","outerRadius","thetaSegments","phiSegments","radiusStep","thetaSegmentLevel","$d5b33d7c30034067$export$57a29a1c803e9065","indexOffset","shapeVertices","shapeHoles","shapeHole","$d5b33d7c30034067$var$toJSON","thetaEnd","grid","verticesRow","uOffset","$d5b33d7c30034067$export$fb3f7adc68bd6e02","$d5b33d7c30034067$export$a2312a2a1fa56495","tube","tubularSegments","$d5b33d7c30034067$export$77e9bfadfb9ab8c8","P1","P2","B","T","N","calculatePositionOnCurve","quOverP","cs","$d5b33d7c30034067$export$7897d9d48904490c","frames","P","generateSegment","generateBufferData","generateIndices","$d5b33d7c30034067$var$convertArray","forceClone","$d5b33d7c30034067$export$b558baee9c0f72d3","parameterPositions","sampleValues","sampleSize","resultBuffer","_cachedIndex","valueSize","settings","DefaultSettings_","evaluate","pp","validate_interval","seek","linear_scan","forward_scan","giveUpAt","copySampleValue_","t1global","mid","intervalChanged_","interpolate_","getSettings_","$d5b33d7c30034067$export$3646682e7a3959","_weightPrev","_offsetPrev","_weightNext","_offsetNext","endingStart","endingEnd","iPrev","iNext","tPrev","tNext","halfDt","o0","oP","oN","wP","wN","ppp","sP","sN","$d5b33d7c30034067$export$a8e6009059f51e1a","offset1","offset0","weight1","weight0","$d5b33d7c30034067$export$fb9758ef7ef8d5cc","$d5b33d7c30034067$export$b0e479f45b7006d6","times","interpolation","TimeBufferType","ValueBufferType","setInterpolation","DefaultInterpolation","track","trackType","ValueTypeName","InterpolantFactoryMethodDiscrete","getValueSize","InterpolantFactoryMethodLinear","InterpolantFactoryMethodSmooth","factoryMethod","createInterpolant","timeOffset","timeScale","startTime","endTime","nKeys","validate","valid","prevTime","currTime","ArrayBuffer","isView","DataView","optimize","smoothInterpolation","writeIndex","keep","offsetP","offsetN","readOffset","writeOffset","$d5b33d7c30034067$export$d3a344b98cf0b775","$d5b33d7c30034067$export$83444c5d885347d8","$d5b33d7c30034067$export$d45f0d1a4d9a9314","$d5b33d7c30034067$export$2db1cfb7923d931e","$d5b33d7c30034067$export$b8043f12b5aafbd7","$d5b33d7c30034067$export$6ce41d4f3a8df9cd","$d5b33d7c30034067$export$5ce2dcb4cc9f2bff","$d5b33d7c30034067$export$94affb487e701bf2","files","file","$d5b33d7c30034067$export$b033c3f9a95c6a16","onLoad","onProgress","onError","urlModifier","isLoading","itemsLoaded","itemsTotal","handlers","onStart","itemStart","itemEnd","itemError","resolveURL","setURLModifier","addHandler","regex","loader","removeHandler","getHandler","global","manager","crossOrigin","withCredentials","resourcePath","requestHeader","load","loadAsync","reject","setCrossOrigin","setWithCredentials","setPath","setResourcePath","setRequestHeader","DEFAULT_MATERIAL_NAME","$d5b33d7c30034067$var$loading","$d5b33d7c30034067$var$HttpError","response","req","Request","headers","Headers","credentials","mimeType","responseType","fetch","then","ReadableStream","body","getReader","callbacks","reader","contentLength","total","lengthComputable","loaded","stream","readData","read","done","close","byteLength","ProgressEvent","enqueue","Response","statusText","arrayBuffer","blob","text","parser","DOMParser","parseFromString","re","label","decoder","TextDecoder","decode","catch","finally","setResponseType","setMimeType","$d5b33d7c30034067$var$_RESERVED_CHARS_RE","$d5b33d7c30034067$var$_reservedRe","RegExp","$d5b33d7c30034067$var$_wordChar","$d5b33d7c30034067$var$_wordCharOrDot","$d5b33d7c30034067$var$_directoryRe","$d5b33d7c30034067$var$_trackRe","$d5b33d7c30034067$var$_supportedObjectNames","$d5b33d7c30034067$export$7bf70fcf9f891893","rootNode","parsedPath","parseTrackName","node","findNode","nodeName","getValue","_getValue_unbound","_setValue_unbound","create","root","isAnimationObjectGroup","Composite","sanitizeNodeName","trackName","matches","results","objectName","objectIndex","propertyName","propertyIndex","lastDot","lastIndexOf","substring","bone","getBoneByName","searchNodeSubtree","childNode","subTreeNode","_getValue_unavailable","_setValue_unavailable","_getValue_direct","targetObject","_getValue_array","resolvedProperty","_getValue_arrayElement","_getValue_toArray","_setValue_direct","_setValue_direct_setNeedsUpdate","_setValue_direct_setMatrixWorldNeedsUpdate","_setValue_array","dest","_setValue_array_setNeedsUpdate","_setValue_array_setMatrixWorldNeedsUpdate","_setValue_arrayElement","_setValue_arrayElement_setNeedsUpdate","_setValue_arrayElement_setMatrixWorldNeedsUpdate","_setValue_fromArray","_setValue_fromArray_setNeedsUpdate","_setValue_fromArray_setMatrixWorldNeedsUpdate","targetArray","sourceArray","bones","nodeProperty","versioning","Versioning","None","NeedsUpdate","MatrixWorldNeedsUpdate","bindingType","BindingType","Direct","ArrayElement","HasFromToArray","EntireArray","GetterByBindingType","SetterByBindingTypeAndVersioning","unbind","targetGroup","optionalParsedPath","_targetGroup","_bindings","subscribe_","firstValidIndex","nCachedObjects_","binding","bindings","other","makeSafe","setFromCartesianCoords","colors","$d5b33d7c30034067$var$_axis","headLength","headWidth","cone","setDirection","setColor","subPaths","currentPath","toShapes","isCCW","solid","tmpPath","tmpShape","tmpPoints","tmpHoles","holesFirst","betterShapeHoles","newShapes","newShapeHoles","mainIdx","toShapesNoHoles","inSubpaths","ambiguous","toChange","sIdx","sLen","sho","hIdx","ho","hole_unassigned","s2Idx","isPointInsidePolygon","inPolygon","polyLen","edgeLowPt","edgeHighPt","edgeDx","edgeDy","perpEdge","revision","window","__THREE__","$443c013b983d0324$export$8ff7788029dfdf52","$ilwiq","$443c013b983d0324$var$_changeEvent","$443c013b983d0324$var$_startEvent","$443c013b983d0324$var$_endEvent","$443c013b983d0324$var$_ray","Ray","$443c013b983d0324$var$_plane","Plane","$443c013b983d0324$var$TILT_LIMIT","MathUtils","EventDispatcher","touchAction","Vector3","cursor","minDistance","maxDistance","minZoom","maxZoom","minTargetRadius","maxTargetRadius","minPolarAngle","maxPolarAngle","minAzimuthAngle","maxAzimuthAngle","enableDamping","dampingFactor","enableZoom","zoomSpeed","enableRotate","rotateSpeed","enablePan","panSpeed","screenSpacePanning","keyPanSpeed","zoomToCursor","autoRotate","autoRotateSpeed","UP","BOTTOM","mouseButtons","MOUSE","touches","TOUCH","TWO","target0","position0","zoom0","_domElementKeyEvents","getPolarAngle","spherical","getAzimuthalAngle","getDistance","listenToKeyEvents","onKeyDown","stopListenToKeyEvents","saveState","STATE","quat","Quaternion","quatInverse","lastPosition","lastQuaternion","lastTargetPosition","twoPI","deltaTime","rotateLeft","sphericalDelta","panOffset","performCursorZoom","clampDistance","zoomChanged","newRadius","prevRadius","radiusDelta","dollyDirection","mouseBefore","mouse","mouseAfter","EPS","onContextMenu","onPointerDown","onPointerUp","onMouseWheel","onPointerMove","TOUCH_ROTATE","TOUCH_PAN","TOUCH_DOLLY_PAN","TOUCH_DOLLY_ROTATE","Spherical","rotateStart","Vector2","rotateEnd","rotateDelta","panStart","panEnd","panDelta","dollyStart","dollyEnd","dollyDelta","pointers","pointerPositions","getZoomScale","rotateUp","panLeft","objectMatrix","panUp","pan","deltaX","deltaY","targetDistance","clientHeight","clientWidth","dollyOut","dollyScale","dollyIn","updateMouseParameters","rect","getBoundingClientRect","clientX","clientY","dist","handleMouseDownRotate","handleMouseDownPan","handleTouchStartRotate","pageX","pageY","handleTouchStartPan","handleTouchStartDolly","handleTouchMoveRotate","getSecondPointerPosition","handleTouchMovePan","handleTouchMoveDolly","setPointerCapture","pointerId","pointerType","onTouchStart","trackPointer","onMouseDown","mouseAction","button","ctrlKey","metaKey","shiftKey","onTouchMove","onMouseMove","handleMouseMoveRotate","removePointer","releasePointerCapture","handleKeyDown","pointer","passive","$bc7831423112e56a$var$warned","$bc7831423112e56a$var$linkEl","$bc7831423112e56a$export$5f1af8db9871e1d6","$8ue7g","$ix9ca","$2y8EL","$4kOkh","$bc7831423112e56a$var$workerModule","defineWorkerModule","dependencies","_bin","readASCII","readUshort","o","readUint","_readFont","readFixed","_data","_offset","_tabOffset","readF2dot14","readShort","readInt","_view","getInt32","readInt8","getInt8","getInt16","getUint16","readUshorts","getUint32","readUint64","fromCharCode","readUnicode","_tdec","readUTF8","readBytes","readASCIIArray","_dataView","byteOffset","_lctf","scriptList","readScriptList","featureList","readFeatureList","lookupList","readLookupList","readLookupTable","tabs","ltype","flag","numOfOnes","readClassDef","getInterval","readCoverage","fmt","tab","coverageIndex","readFeatureTable","tag","featureParams","readScriptTable","default","readLangSysTable","reqFeature","features","CFF","readIndex","readDict","readSubrs","CharStrings","ROS","FDArray","_readFDict","FDSelect","U","Encoding","readEncoding","charset","readCharset","Private","Subrs","Bias","tableSE","glyphByUnicode","glyphBySE","getCharString","val","readCharString","S","cmap","tables","parse0","parse4","parse6","parse12","searchRange","entrySelector","rangeShift","endCount","startCount","idDelta","idRangeOffset","glyphIdArray","firstCode","glyf","maxp","numGlyphs","_parseGlyf","loca","noc","xMin","yMin","xMax","yMax","endPts","instructions","flags","xs","ys","parts","glyphIndex","instr","GDEF","glyphClassDef","GPOS","subt","coverage","pos","readValueRecord","pairsets","gid2","val1","val2","F","C","classDef1","classDef2","_","markCoverage","baseCoverage","markClassCount","markArray","readMarkArray","baseArray","readBaseArray","mark1Coverage","mark2Coverage","mark1Array","mark2Array","I","readAnchorRecord","markClass","GSUB","newg","seqs","vals","readLigatureSet","cDef","scset","readSubClassSet","backCvg","inptCvg","ahedCvg","lookupRec","readSubstLookupRecords","readSubClassRule","input","substLookupRecords","readChainSubClassSet","readChainSubClassRule","subst","readLigature","chain","nglyph","head","fontRevision","unitsPerEm","created","modified","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","hhea","ascender","descender","lineGap","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfHMetrics","hmtx","aWidth","lsBearing","kern","parseV1","glyph1","rval","readFormat0","glyph2","maxPoints","maxContours","maxCompositePoints","maxCompositeContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","_lang","postScriptName","version0","version1","version2","version5","xAvgCharWidth","usWeightClass","usWidthClass","fsType","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","sFamilyClass","panose","ulUnicodeRange1","ulUnicodeRange2","ulUnicodeRange3","ulUnicodeRange4","achVendID","fsSelection","usFirstCharIndex","usLastCharIndex","sTypoAscender","sTypoDescender","sTypoLineGap","usWinAscent","usWinDescent","ulCodePageRange1","ulCodePageRange2","sxHeight","sCapHeight","usDefault","usBreak","usMaxContext","usLowerOpticalPointSize","usUpperOpticalPointSize","post","italicAngle","underlinePosition","underlineThickness","codeToGlyph","p0e4","p3e1","p1e0","p0e3","glyphToPath","cmds","crds","SVG","entries","toPath","stack","nStems","haveWidth","defaultWidthX","open","_drawCFF","_drawGlyf","_simpleGlyph","_compoGlyph","qcurveTo","_getGlyphClass","_applySubs","_glsCovered","glyphsToPath","getPairAdjustment","curveTo","nominalWidthX","G","O","D","A","R","L","W","M","V","E","Typr","captureStackTrace","H","J","K","Q","X","Y","Z","$","rr","er","nr","tr","convert_streams","setUint16","setUint32","signature","flavor","numTables","reserved","totalSfntSize","majorVersion","minorVersion","metaOffset","metaLength","metaOrigLength","privOffset","privLength","compLength","origLength","origChecksum","reduce","outOffset","woff2otf","joiningTypeMap","cmdArgLengths","joiningTypeRawData","formsToFeatures","getGlyphClass","font","glyphId","classDef","firstNum","args","peek","wrapFontObj","typrFont","glyphMap","os2","fontObj","capHeight","xHeight","supportsCodePoint","forEachGlyph","fontSize","letterSpacing","penX","fontScale","glyphIds","stringToGlyphs","str","cc","codePointAt","gsub","joiningForms","supportedFeatures","usedLookups","feature","ti","isJoiningFeature","detectJoiningForms","prevJoiningType","prevForm","prevIndex","joiningType","getCharJoiningType","ch","lastCode","skip","form","JT_LEFT","JT_RIGHT","ci","charIndex","calcGlyphPositions","gpos","llist","lookup","ind","applyValueRecord","adj","prevGlyphIndex","getPrevGlyphIndex","markArrIndex","baseGlyphIndex","isBaseGlyph","baseArrIndex","markRecord","baseAnchor","mark1ArrIndex","prevGlyphId","mark2ArrIndex","mark1Record","mark2Anchor","cff","ind1","ind2","gi","glyphObj","crdsIdx","numArgs","advanceWidth","typrFactory","woff2otfFactory","parserFactory","$bc7831423112e56a$export$85a5d697a084610","fontParser","unicodeFontResolverClient","parsedFonts","loadingFonts","loadFont","fontUrl","doLoadFont","request","XMLHttpRequest","onload","onerror","send","lang","fonts","userFonts","unicodeFontsURL","charResolutions","fontResolutions","allDone","fontIndices","fallbackRanges","def","prevCharResult","resolveUserFonts","startIndex","iLen","codePoint","jLen","unicodeRange","isCodeInRanges","ranges","fontIndex","resolveFallbacks","fallbackString","getFontsForString","dataUrl","fontUrls","chars","fontIndexOffset","charIdx","endIdx","loadedCount","buckets","deserialize","CodePointSet","clearCache","category","ok","all","typeforms","includes","createFontResolver","unicodeFontResolverClientFactory","$bc7831423112e56a$var$now","performance","Date","now","$bc7831423112e56a$var$mainThreadGenerator","$bc7831423112e56a$var$queue","$bc7831423112e56a$var$timer","$bc7831423112e56a$var$nextChunk","$bc7831423112e56a$var$generateSDF_GL","webgl","generateIntoCanvas","timing","$bc7831423112e56a$var$threads","$bc7831423112e56a$var$callNum","$bc7831423112e56a$var$generateSDF_JS_Worker","viewBox","exponent","workerId","thread","workerModule","_createSDFGenerator","generate","javascript","textureData","getTransferables","requests","idleTimer","clearTimeout","webglUtils","renderImageData","terminateWorker","$bc7831423112e56a$var$resizeWebGLCanvasWithoutClearing","resizeWebGLCanvasWithoutClearing","$bc7831423112e56a$var$CONFIG","defaultFontURL","sdfGlyphSize","sdfMargin","sdfExponent","$bc7831423112e56a$var$tempColor","Color","$bc7831423112e56a$var$now$1","$bc7831423112e56a$var$atlases","$bc7831423112e56a$var$generateGlyphSDF","atlasIndex","sdfViewBox","sdfCanvas","contextLost","useGPU","maxDist","squareIndex","$bc7831423112e56a$var$generateSDF","useWebGL","$bc7831423112e56a$var$toAbsoluteURL","createElement","href","$bc7831423112e56a$var$safariPre15Workaround","atlas","createImageBitmap","sdfTexture","$bc7831423112e56a$export$adeaafcde0994a07","resolveFonts","bidi","INF","DEFAULT_IGNORABLE_CHARS","lineBreakingWhiteSpace","BREAK_AFTER_CHARS","typeset","fontWeight","fontStyle","lineHeight","maxWidth","textAlign","textIndent","whiteSpace","overflowWrap","anchorX","anchorY","metricsOnly","preResolvedFonts","includeCaretPositions","chunkedBoundsSize","colorRanges","mainStart","timings","fontLoad","typesetting","calculateFontRuns","onDone","onResolved","curRun","prevVal","runs","hasMaxWidth","glyphFontIndices","glyphPositions","glyphData","glyphColors","caretPositions","visibleBounds","chunkedBounds","maxLineWidth","renderableGlyphCount","canWrap","metricsByFont","typesetStart","lineXOffset","prevRunEndX","currentLine","TextLine","run","prevGlyphX","prevGlyphObj","fontData","fontSizeMult","calcLineHeight","halfLeading","caretHeight","caretTop","baseline","caretBottom","runText","glyphX","glyphY","nextLine","char","glyphWidth","curLineCount","isWhitespace","canBreakAfter","glyphAt","adjustX","splitAt","isSoftWrapped","fly","totalHeight","isTrailingWhitespace","glyphInfo","baselineDiff","cap","ex","anchorXOffset","anchorYOffset","parsePercent","chunk","currentColor","bidiLevelsResult","getEmbeddingLevels","renderableGlyphIndex","prevCharIndex","colorCharIndex","lineIndex","lineGlyphCount","trailingWhitespaceCount","justifyAdjust","whitespaceCount","justifyOffset","flips","getReorderSegments","fi","startInLine","endInLine","setGlyphObj","rtl","mirrored","getMirroredCharacter","caretLeft","caretRight","ligCount","fillLigatureCaretPositions","hasOwnProperty","idx","fontSrc","fontGlyphData","pathBounds","visX0","visY0","visX1","visY1","chunkRect","topBaseline","blockBounds","pct","NaN","ligStartIndex","ligStartX","ligEndX","ligBottom","ligTop","guessedAdvanceX","textLineProps","flyweight","newLine","obj","prop","measure","createTypesetter","fontResolver","bidiFactory","$bc7831423112e56a$var$typesetInWorker","typesetter","transferables","$bc7831423112e56a$var$templateGeometries","$bc7831423112e56a$var$glyphIndexAttrName","$bc7831423112e56a$export$16fe3b8f85ab6e35","InstancedBufferGeometry","curveRadius","Sphere","Box3","setSide","verts","BackSide","DoubleSide","_detail","tpl","$bc7831423112e56a$var$getTemplateGeometry","geom","front","PlaneGeometry","back","frontAttrs","backAttrs","combined","BufferGeometry","vertCount","Float32BufferAttribute","attr","_curveRadius","_updateBounds","updateGlyphs","glyphBounds","glyphAtlasIndices","$bc7831423112e56a$var$updateBufferAttr","_blockBounds","_chunkedBounds","bounds","bbox","halfPi","absR","leftAngle","rightAngle","applyClipRect","clipRect","attrName","newArray","InstancedBufferAttribute","$bc7831423112e56a$var$VERTEX_DEFS","$bc7831423112e56a$var$VERTEX_TRANSFORM","$bc7831423112e56a$var$FRAGMENT_DEFS","$bc7831423112e56a$var$FRAGMENT_TRANSFORM","$bc7831423112e56a$var$defaultMaterial","$bc7831423112e56a$var$tempMat4","Matrix4","$bc7831423112e56a$var$tempVec3a","$bc7831423112e56a$var$tempVec3b","$bc7831423112e56a$var$tempArray","$bc7831423112e56a$var$origin","$bc7831423112e56a$var$defaultOrient","$bc7831423112e56a$var$first","$bc7831423112e56a$var$getFlatRaycastMesh","Mesh","$bc7831423112e56a$var$getCurvedRaycastMesh","$bc7831423112e56a$var$syncStartEvent","$bc7831423112e56a$var$syncCompleteEvent","$bc7831423112e56a$var$SYNCABLE_PROPS","$bc7831423112e56a$var$COPYABLE_PROPS","outlineWidth","outlineColor","outlineOpacity","outlineBlur","outlineOffsetX","outlineOffsetY","strokeWidth","strokeColor","strokeOpacity","fillOpacity","depthOffset","orientation","glyphGeometryDetail","gpuAccelerateSDF","debugSDF","sync","_needsSync","_isSyncing","_queuedSyncs","$bc7831423112e56a$export$8a83a1532cd0ce42","$bc7831423112e56a$var$assign","toObj","fromObj","totalStart","glyphsPerRow","glyphCount","Texture","LinearFilter","glyphsByFont","$bc7831423112e56a$var$initContextLossHandling","promises","glyph","neededSDFs","boundsIdx","positionsIdx","quadsStart","fontGlyphMaps","fontUnitsMargin","posX","posY","quads","sdfStart","sdf","currentHeight","neededHeight","neededRows","sdfTotal","_warm","isSupported","textRenderInfo","_textRenderInfo","queued","fn","isTroikaTextMaterial","_prepareForRender","_hadOwnSide","_actualSide","FrontSide","derivedMaterial","_derivedMaterial","baseMaterial","_baseMaterial","_defaultMaterial","$bc7831423112e56a$export$ec8c2d2c0fe50886","textMaterial","createDerivedMaterial","chained","uTroikaSDFTexture","uTroikaSDFTextureSize","uTroikaSDFGlyphSize","uTroikaSDFExponent","uTroikaTotalBounds","Vector4","uTroikaClipRect","uTroikaDistanceOffset","uTroikaOutlineOpacity","uTroikaFillOpacity","uTroikaPositionOffset","uTroikaCurveRadius","uTroikaBlurRadius","uTroikaStrokeWidth","uTroikaStrokeColor","uTroikaStrokeOpacity","uTroikaOrient","Matrix3","uTroikaUseGlyphColors","uTroikaSDFDebug","vertexDefs","vertexTransform","fragmentDefs","fragmentColorTransform","customRewriter","uDiffuseRE","voidMainRegExp","onDispose","outlineMaterial","_outlineMtl","isTextOutlineMaterial","getDistanceMaterial","isOutline","textInfo","distanceOffset","blurRadius","_parsePercent","pad","colorObj","_input","orient","_orientation","rotMat","hSign","hAxis","vSign","vAxis","localPositionToTextCoords","worldPositionToTextCoords","raycastMesh","privateKey","$62dc134116dcb5c9$var$workerBootstrap","modules","rehydrate","troikaDefine","URL","createObjectURL","Blob","importScripts","revokeObjectURL","ref","messageId","action","registerModule","dep","isWorkerModule","depResult","noLog","postMessage","success","isCallable","callModule","ref$1","handleResult","rej","$62dc134116dcb5c9$export$e2063b0a5e3f6023","$62dc134116dcb5c9$var$_allowInitAsString","moduleFunc","$62dc134116dcb5c9$var$supportsWorkers","_getInitResult","initResult","initPromise","deps","$62dc134116dcb5c9$var$_workerModuleId","registrationPromise","$62dc134116dcb5c9$var$callWorker","workerModuleData","unregister","$62dc134116dcb5c9$var$registeredModules","$62dc134116dcb5c9$export$d62b0b738687b4b2","$62dc134116dcb5c9$export$a61a973ac243a75e","supported","worker","Worker","terminate","$62dc134116dcb5c9$var$_messageId","$62dc134116dcb5c9$var$workers","$62dc134116dcb5c9$var$openRequests","$62dc134116dcb5c9$var$getWorker","bootstrap","onmessage","msgId","$cfae44f0dfdf62c0$var$cachedSetTimeout","$cfae44f0dfdf62c0$var$cachedClearTimeout","$cfae44f0dfdf62c0$var$currentQueue","$cfae44f0dfdf62c0$var$process","$cfae44f0dfdf62c0$var$defaultSetTimout","$cfae44f0dfdf62c0$var$defaultClearTimeout","$cfae44f0dfdf62c0$var$runTimeout","fun","$cfae44f0dfdf62c0$var$queue","$cfae44f0dfdf62c0$var$draining","$cfae44f0dfdf62c0$var$queueIndex","$cfae44f0dfdf62c0$var$cleanUpNextTick","$cfae44f0dfdf62c0$var$drainQueue","timeout","$cfae44f0dfdf62c0$var$runClearTimeout","marker","$cfae44f0dfdf62c0$var$Item","$cfae44f0dfdf62c0$var$noop","nextTick","title","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","cwd","chdir","umask","$a7b056c205977ae3$export$2e2bcd8739ae039","forEachPathCommand","pathString","commandCallback","firstX","firstY","prevX","prevY","segmentRE","pathToLineSegments","segmentCallback","curvePoints","tempPoint","command","startX","startY","endX","endY","ctrl1X","ctrl1Y","ctrl2X","ctrl2Y","prevCurveX","prevCurveY","pointOnQuadraticBezier","pointOut","prevCurveX$1","prevCurveY$1","i$1","pointOnCubicBezier","y3","viewportQuadVertex","glContextParams","withWebGLContext","glOrCanvas","wrapper","framebufferStack","ext","handleContextLoss","withProgram","frag","func","transaction","setUniform","uniformLoc","instancingDivisor","buf","loc","vertexAttribDivisor","vertexAttribDivisorANGLE","withTexture","withTextureFramebuffer","channels","tex","texUnit","STATIC_DRAW","newWidth","newHeight","generate$2","sdfWidth","sdfHeight","viewBoxWidth","viewBoxHeight","sdfX","sdfY","signedDist","findNearestSignedDistance","closestDistSq","closestDist","seg","absSquareDistanceToLineSegment","lineX0","lineY0","lineX1","lineY1","ldx","ldy","isPointInPoly","winding","generateIntoCanvas$2","generateIntoFramebuffer$1","rgbaData","generateIntoFramebuffer","viewportUVs","implicitContext","isTestingSupport","NULL_OBJECT","supportByCanvas","validateSupport","generate$1","generateIntoCanvas$1","lineSegmentCoords","intermediateTexture","intermediateTextureUnit","_lastWidth","_lastHeight","instancingExtension","blendMinMaxExtension","DYNAMIC_DRAW","drawArraysInstanced","drawArraysInstancedANGLE","isContextLost","failReason","expectedResult","testResult","every","$39f838faf692eed9$export$2e2bcd8739ae039","openToClose","closeToOpen","canonical","mirrorMap","DATA","TYPES","TYPES_TO_NAMES","ISOLATE_INIT_TYPES","LRI","RLI","FSI","STRONG_TYPES","AL","NEUTRAL_ISOLATE_TYPES","WS","ON","PDI","BN_LIKE_TYPES","BN","RLE","LRE","RLO","LRO","PDF","TRAILING_TYPES","getBidiCharType","parseData","loop","data$1","parseCharacterMap","encodedString","includeReverse","prevPair","reverseMap","visit","fromCodePoint","parse$1","pairs","openingToClosingBracket","closingToOpeningBracket","getCanonicalBracket","TYPE_L","TYPE_R","TYPE_EN","EN","TYPE_ES","ES","TYPE_ET","ET","TYPE_AN","AN","TYPE_CS","CS","TYPE_B","TYPE_S","TYPE_ON","TYPE_BN","TYPE_NSM","NSM","TYPE_AL","TYPE_LRO","TYPE_RLO","TYPE_LRE","TYPE_RLE","TYPE_PDF","TYPE_LRI","TYPE_RLI","TYPE_FSI","TYPE_PDI","embeddingLevelsResult","strLen","paragraphs","paragraph","lineStart","lineEnd","lineLevels","maxLevel","minOddLevel","lvl","i$2","segStart","getReorderedIndices","embedLevelsResult","getBidiCharTypeName","baseDirection","charTypes","charTypeCounts","changeCharType","oldType","embedLevels","isolationPairs","determineAutoEmbedLevel","FORMATTING_TYPES","nextEven","nextOdd","paraIdx","statusStack","_level","_override","_isolate","stackTop","overflowIsolateCount","overflowEmbeddingCount","validIsolateCount","charType","level$1","level$2","_isolInitIndex","isolInitIndex","levelRuns","currentRun","i$3","charType$1","isIsolInit","isPDI","_end","_endsWithIsolInit","_start","_startsWithPDI","isolatingRunSeqs","runIdx","seqRuns","pdiIndex","i$4","seqIndices","i$5","run$1","firstLevel","prevLevel","i$6","lastLevel","nextLevel","i$7","_seqIndices","_sosType","_eosType","seqIdx","seqIndices$1","sosType","eosType","embedDirection","si","i$8","prevType","sj","si$1","i$9","sj$1","prevCharType","si$2","i$10","si$3","i$11","prevType$1","nextType","sj$2","sj$3","si$4","sj$4","si$5","i$13","sj$5","sj$6","si$6","prevStrongType","i$14","R_TYPES_FOR_N_STEPS","STRONG_TYPES_FOR_N_STEPS","bracketPairs","openerStack","si$7","oppositeBracket","seqIndex","stackIdx","stackChar","pairIdx","openSeqIdx","closeSeqIdx","foundStrongType","useStrongType","si$8","i$15","lr","si$9","i$16","lr$1","si$10","si$11","si$12","niRunStart","niRunEnd","prevType$2","si2","nextType$1","si2$1","sj$7","i$17","level$3","type$1","j$1","isFSI","pdi","indexOfMatchingPDI","isolateStart","isolationLevel","getMirroredCharactersMap","embeddingLevels","mirror","getReorderedString","$3280116647888dc9$export$f402b5c74ecf5e1e","$3280116647888dc9$export$9251ec91c7de57b5","optionsKey","$3280116647888dc9$var$getKeyForOptions","optionsHash","$3280116647888dc9$var$optionsJsonReplacer","$3280116647888dc9$var$optionsHashesToIds","$3280116647888dc9$var$_idCtr","ctorsByDerivation","$3280116647888dc9$var$CONSTRUCTOR_CACHE","privateBeforeCompileProp","shaderInfo","upgradedShaders","$3280116647888dc9$var$SHADER_UPGRADE_CACHE","upgraded","$3280116647888dc9$var$upgradeShaders","vertexMainIntro","vertexMainOutro","fragmentMainIntro","fragmentMainOutro","timeUniform","$3280116647888dc9$export$bec7143e67d6a2ef","res","postChunks","match1","fullStr","substr","$3280116647888dc9$var$injectIntoShaderCode","$3280116647888dc9$var$assign","$3280116647888dc9$var$epoch","DerivedMaterial","derive","derived","descriptor","$3280116647888dc9$var$materialInstanceId","$3280116647888dc9$var$generateUUID","$3280116647888dc9$var$_lut","isDerivedMaterial","writable","UniformsUtils","RGBADepthPacking","IS_DEPTH_MATERIAL","distanceMaterial","IS_DISTANCE_MATERIAL","ShaderChunk","shaderCode","defs","intro","outro","$ad6aefaf36d08024$export$89abf52a030e56ee","isFont","generateShapes","paths","$ad6aefaf36d08024$var$createPaths","line_height","ret","$ad6aefaf36d08024$var$createPath","cpx","cpy","cpx1","cpy1","cpx2","cpy2","glyphs","familyName","ShapePath","outline","_cachedOutline","ha","$66837798a125d1c7$export$684b774b4473ba5f","ExtrudeGeometry","$44f51f21f2de7984$exports","getRandomPoints","Greek","Label","VectorPlot","ScatterPlot","Frame","$534535ea6fa02995$exports","$5Rd1x","$95aa5a476424c24a$exports","Axes","PlaneAxes","UnitVector","$95aa5a476424c24a$var$Axis","ArrowHelper","lengthX","lengthY","lengthZ","setGrids","gridXZ","GridHelper","gridXY","gridYZ","$534535ea6fa02995$var$Frame","Scene","observer","ResizeObserver","WebGLRenderer","setCamera","setControls","setAxes","updateOnChanges","PerspectiveCamera","controls","OrbitControls","observe","capture","addPlot","plot","getFrameable","addFallbackLabel","addLabel","$7ca493bb23e24892$exports","$046ae06aacf9449d$exports","Plot","$7ca493bb23e24892$var$ScatterPlot","pointRadius","SphereGeometry","$4240c9e1ae051d71$exports","$65606e7fd6491b22$exports","VectorPlotPlaneConfigParams","VectorPlotConfigurationParams","config","setColorOrDefault","setAngle","$65606e7fd6491b22$var$VectorPlotPlaneConfigParams","colorHex","projection","projectionAngle","setProjection","setProjectionAngle","$65606e7fd6491b22$var$defaultDashedLine","linetype","linestyle","$4240c9e1ae051d71$var$VectorPlot","drawables","createVector","conf","createProjection","createComponent","createAngleToProjection","createAngleToTarget","planeIdx","projectedVector","initialRotation","angleToProjection","lineMaterial","projectionGeometry","connectionGeometry","$ced6b895e1dcd19b$exports","$ced6b895e1dcd19b$var$__importDefault","__importDefault","mod","__esModule","FallbackLabel","$gbdyO","$eT66s","$8NFZ6","$ced6b895e1dcd19b$var$helvetiker_regular_typeface_json_1","Text","TextGeometry","Font","drawable","$fccd514c3b000f9a$exports","$fccd514c3b000f9a$var$Greek","uppercaseHeta","lowercaseHeta","uppercaseArchaicSampi","lowercaseArchaicSampi","numeralSign","lowerNumeralSign","uppercasePamphylianDigamma","lowercasePamphylianDigamma","ypogegrammeni","smallReversedLunateSigmaSymbol","smallDottedLunateSigmaSymbol","smallReversedDottedLunateSigmaSymbol","questionMark","uppercaseYot","acuteaccent","diaeresiswithacuteaccent","uppercaseAwithacuteaccent","anoTeleia","uppercaseEpsilonwithacuteaccent","uppercaseEtawithacuteaccent","uppercaseIotawithacuteaccent","uppercaseOmicronwithacuteaccent","uppercaseUpsilonwithacuteaccent","uppercaseOmegawithacuteaccent","lowercaseIotawithdiaeresisandacuteaccent","uppercaseAlpha","uppercaseBeta","uppercaseGamma","uppercaseDelta","uppercaseEpsilon","uppercaseZeta","uppercaseEta","uppercaseTheta","uppercaseIota","uppercaseKappa","uppercaseLambda","uppercaseMu","uppercaseNu","uppercaseXi","uppercaseOmicron","uppercasePi","uppercaseRho","uppercaseSigma","uppercaseTau","uppercaseUpsilon","uppercasePhi","uppercaseChi","uppercasePsi","uppercaseOmega","uppercaseIotawithdiaeresis","uppercaseUpsilonwithdiaeresis","lowercaseAlphawithacuteaccent","lowercaseEpsilonwithacuteaccent","lowercaseEtawithacuteaccent","lowercaseIotawithacuteaccent","lowercaseUpsilonwithdiaeresisandacuteaccent","lowercaseAlpha","lowercaseBeta","lowercaseGamma","lowercaseDelta","lowercaseEpsilon","lowercaseZeta","lowercaseEta","lowercaseTheta","lowercaseIota","lowercaseKappa","lowercaseLambda","lowercaseMu","lowercaseNu","lowercaseXi","lowercaseOmicron","lowercasePi","lowercaseRho","lowercaseFinalSigma","lowercaseSigma","lowercaseTau","lowercaseUpsilon","lowercasePhi","lowercaseChi","lowercasePsi","lowercaseOmega","lowercaseIotawithdiaeresis","lowercaseUpsilonwithdiaeresis","lowercaseOmicronwithacuteaccent","lowercaseUpsilonwithacuteaccent","lowercaseOmegawithacuteaccent","uppercaseKaiSymbol","betaSymbol","thetaSymbol","upsilonwithhookSymbol","upsilonwithacuteandhookSymbol","upsilonwithdiaeresisandhookSymbol","phiSymbol","piSymbol","kaiSymbol","letterQoppa","lowercaseQoppa","letterStigma","lowercaseStigma","letterDigamma","lowercaseDigamma","letterKoppa","lowercaseKoppa","letterSampi","lowercaseSampi","copticuppercaseShei","copticlowercaseShei","copticuppercaseFei","copticlowercaseFei","copticuppercaseKhei","copticlowercaseKhei","copticuppercaseHori","copticlowercaseHori","copticuppercaseGangia","copticlowercaseGangia","copticuppercaseShima","copticlowercaseShima","copticuppercaseDei","copticlowercaseDei","kappaSymbol","rhoSymbol","lunateSigmaSymbol","letterYot","uppercaseThetaSymbol","lunateEpsilonSymbol","reversedLunateEpsilonSymbol","uppercaseSho","lowercaseSho","uppercaseLunateSigmaSymbol","uppercaseSan","lowercaseSan","rhowithstrokeSymbol","uppercaseReversedLunateSigmaSymbol","uppercaseDottedLunateSigmaSymbol","uppercaseReversedDottedLunateSigmaSymbol","$b98b910d088d419a$exports","$b5fd02dc7fc08a57$var$canvas1","getElementById","$b5fd02dc7fc08a57$var$canvas2","$b5fd02dc7fc08a57$var$canvas3","$b5fd02dc7fc08a57$var$points","$b5fd02dc7fc08a57$var$scatterPlot","$b5fd02dc7fc08a57$var$frame1","$b5fd02dc7fc08a57$var$frame2","$b5fd02dc7fc08a57$var$frame3"],"version":3,"file":"index.41dfc637.js.map"} \ No newline at end of file diff --git a/docs/index.f9a4f1dc.js.map b/docs/index.f9a4f1dc.js.map index 151510d..efedd80 100644 --- a/docs/index.f9a4f1dc.js.map +++ b/docs/index.f9a4f1dc.js.map @@ -1 +1 @@ -{"mappings":"A,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,S,E,S,I,E,E,SGEO,MAAM,EAAa,CACxB,EAAG,IAAI,EAAA,OAAM,CAAE,EAAG,EAAG,GACrB,EAAG,IAAI,EAAA,OAAM,CAAE,EAAG,EAAG,GACrB,EAAG,IAAI,EAAA,OAAM,CAAE,EAAG,EAAG,EACvB,CAGgB,CAAA,EAAW,CAAC,CAAa,EAAW,CAAC,CAAK,EAAW,CAAC,CACtD,EAAW,CAAC,CAAa,EAAW,CAAC,CAAK,EAAW,CAAC,CACtD,EAAW,CAAC,CAAa,EAAW,CAAC,CAAK,EAAW,CAAC,C,I,G,E,S,E,S,E,U,E,S,E,S,E,SKXrD,KAAK,KAAK,CAAC,kn7DCArB,OAAM,EACG,OAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,8BAAA,CAAiC,GAAjC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,4BAAA,CAA+B,GAA/B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,oCAAA,CAAuC,GAAvC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,wBAAA,CAA2B,GAA3B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,yBAAA,CAA4B,GAA5B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,2BAAA,CAA8B,GAA9B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,4BAAA,CAA+B,GAA/B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,wCAAA,CAA2C,GAA3C,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,eAAA,CAAkB,GAAlB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,2BAAA,CAA8B,GAA9B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,4BAAA,CAA+B,GAA/B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,2CAAA,CAA8C,GAA9C,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAkB,GAAlB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,UAAA,CAAa,GAAb,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,iCAAA,CAAoC,GAApC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,QAAA,CAAW,GAAX,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAkB,GAAlB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,oBAAA,CAAuB,GAAvB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,oBAAA,CAAuB,GAAvB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,iBAAA,CAAoB,GAApB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,oBAAA,CAAuB,GAAvB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,2BAAA,CAA8B,GAA9B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kCAAA,CAAqC,GAArC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gCAAA,CAAmC,GAAnC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,wCAAA,CAA2C,GAA3C,AAChB,C,I,E,E","sources":["","src/index.ts","src/frame.ts","src/axes.ts","src/scatterplot.ts","src/plot.ts","src/vectorplot.ts","src/label.ts","src/fonts/helvetiker_regular.typeface.json","src/greek.ts","src/data.ts"],"sourcesContent":["\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire9513\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire9513\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\nvar $5Rd1x = parcelRequire(\"5Rd1x\");\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nconst $06989a4a8159123e$export$60bbd10bdffb2e81 = {\n i: new (0, $ilwiq.Vector3)(1, 0, 0),\n j: new (0, $ilwiq.Vector3)(0, 1, 0),\n k: new (0, $ilwiq.Vector3)(0, 0, 1)\n};\nconst $06989a4a8159123e$export$bb7594b552f278d7 = {\n xy: {\n normal: $06989a4a8159123e$export$60bbd10bdffb2e81.k,\n unit: {\n x: $06989a4a8159123e$export$60bbd10bdffb2e81.i,\n y: $06989a4a8159123e$export$60bbd10bdffb2e81.j\n }\n },\n xz: {\n normal: $06989a4a8159123e$export$60bbd10bdffb2e81.j,\n unit: {\n x: $06989a4a8159123e$export$60bbd10bdffb2e81.i,\n z: $06989a4a8159123e$export$60bbd10bdffb2e81.k\n }\n },\n yz: {\n normal: $06989a4a8159123e$export$60bbd10bdffb2e81.i,\n unit: {\n y: $06989a4a8159123e$export$60bbd10bdffb2e81.j,\n z: $06989a4a8159123e$export$60bbd10bdffb2e81.k\n }\n }\n};\nclass $06989a4a8159123e$var$Axis extends (0, $ilwiq.ArrowHelper) {\n constructor(direction, length){\n super(direction, new (0, $ilwiq.Vector3)(0, 0, 0), length);\n }\n}\nclass $06989a4a8159123e$export$387a78ab20784494 {\n constructor(lengthX, lengthY, lengthZ){\n this.lengthX = lengthX;\n this.lengthY = lengthY;\n this.lengthZ = lengthZ;\n this.x = new $06989a4a8159123e$var$Axis(new (0, $ilwiq.Vector3)(1, 0, 0), this.lengthX * 1.1);\n this.y = new $06989a4a8159123e$var$Axis(new (0, $ilwiq.Vector3)(0, 1, 0), this.lengthY * 1.1);\n this.z = new $06989a4a8159123e$var$Axis(new (0, $ilwiq.Vector3)(0, 0, 1), this.lengthZ * 1.1);\n this.setGrids();\n }\n setGrids() {\n this.gridXZ = new (0, $ilwiq.GridHelper)(Math.max(this.lengthX, this.lengthZ));\n this.gridXZ.position.setX(this.lengthX / 2);\n this.gridXZ.position.setZ(this.lengthZ / 2);\n this.gridXY = new (0, $ilwiq.GridHelper)(Math.max(this.lengthX, this.lengthY));\n this.gridXY.position.setX(this.lengthX / 2);\n this.gridXY.position.setY(this.lengthY / 2);\n this.gridXY.rotateOnAxis(new (0, $ilwiq.Vector3)(1, 0, 0), Math.PI / 2);\n this.gridYZ = new (0, $ilwiq.GridHelper)(Math.max(this.lengthY, this.lengthZ));\n this.gridYZ.position.setY(this.lengthY / 2);\n this.gridYZ.position.setZ(this.lengthZ / 2);\n this.gridYZ.rotateOnAxis(new (0, $ilwiq.Vector3)(0, 0, 1), Math.PI / 2);\n }\n}\n\n\nclass $f5cd7ec90b5fdafd$export$b89a827e9254211a extends (0, $ilwiq.Scene) {\n // TODO: at the moment only one size bc grid can only be squared\n // look into this for solution https://discourse.threejs.org/t/rectangular-gridhelper-possibility/37812\n constructor(canvas, size = 10){\n super();\n this.canvas = canvas;\n this.size = size;\n this.observer = new ResizeObserver(()=>this.update());\n this.scene = new (0, $ilwiq.Scene)();\n this.scene.background = new (0, $ilwiq.Color)(0xffffff);\n const { clientWidth: clientWidth, clientHeight: clientHeight } = canvas;\n this.renderer = new (0, $ilwiq.WebGLRenderer)({\n canvas: canvas\n });\n this.renderer.setSize(clientWidth, clientHeight);\n this.setCamera(clientWidth, clientHeight);\n this.setControls();\n this.setAxes();\n this.updateOnChanges();\n this.update();\n }\n setCamera(width, height) {\n this.camera = new (0, $ilwiq.PerspectiveCamera)(45, width / height, 0.1, 1000);\n this.camera.position.set(this.size * 2, this.size * 2, this.size * 2);\n this.scene.add(this.camera);\n }\n setControls() {\n this.controls = new (0, $5Rd1x.OrbitControls)(this.camera, this.canvas);\n this.controls.target.set(0, 0, 0);\n }\n setAxes() {\n this.axes = new (0, $06989a4a8159123e$export$387a78ab20784494)(this.size, this.size, this.size);\n this.scene.add(this.axes.x);\n this.scene.add(this.axes.y);\n this.scene.add(this.axes.z);\n this.scene.add(this.axes.gridXY);\n this.scene.add(this.axes.gridXZ);\n this.scene.add(this.axes.gridYZ);\n }\n updateOnChanges() {\n this.controls.addEventListener(\"change\", ()=>this.update());\n this.observer.observe(this.canvas);\n }\n update() {\n this.renderer.render(this.scene, this.camera);\n }\n capture() {\n const base64 = this.canvas.toDataURL(\"img/png\");\n }\n addPlot(plot) {\n this.scene.add(...plot.getFrameable());\n this.update();\n }\n async addFallbackLabel(text) {\n this.scene.add(...text.getFrameable());\n this.update();\n }\n async addLabel(text) {\n this.scene.add(...text.getFrameable());\n text.text.addEventListener(\"synccomplete\", ()=>{\n this.update();\n });\n }\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nclass $fc905a1390663dee$export$c78ca4d5ae878870 {\n}\n\n\nclass $a0c7c0ee0c5f7a27$export$eec270bd176da5f5 extends (0, $fc905a1390663dee$export$c78ca4d5ae878870) {\n constructor(points, pointRadius = 0.2){\n super();\n this.points = points.map((v)=>{\n const geometry = new (0, $ilwiq.SphereGeometry)(pointRadius);\n const material = new (0, $ilwiq.MeshBasicMaterial)({\n color: 0x00ff00\n });\n const obj = new (0, $ilwiq.Mesh)(geometry, material);\n obj.position.set(v.x, v.y, v.z);\n return obj;\n });\n }\n getFrameable() {\n return this.points;\n }\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\n\nclass $8d22bec9ee525254$export$cb49ab3f965133d4 extends (0, $fc905a1390663dee$export$c78ca4d5ae878870) {\n constructor(origin, target){\n super();\n this.origin = origin;\n this.target = target;\n this.drawables = [];\n this.drawables.push(this.createVector(origin, target));\n this.drawables.push(...this.createProjection(\"xy\"));\n this.drawables.push(...this.createProjection(\"yz\"));\n this.drawables.push(...this.createProjection(\"xz\"));\n this.drawables.push(this.createAngleToProjection(\"xz\"));\n this.drawables.push(this.createAngleToProjection(\"xy\"));\n this.drawables.push(this.createAngleToProjection(\"yz\"));\n this.drawables.push(this.createAngleToTarget(\"y\"));\n }\n createVector(origin, target) {\n const length = Math.abs(origin.distanceTo(target));\n return new (0, $ilwiq.ArrowHelper)(target.clone().normalize(), origin, length, 0x000000, length * 0.2, length * 0.1);\n }\n createAngleToProjection(planeIdx) {\n const plane = (0, $06989a4a8159123e$export$bb7594b552f278d7)[planeIdx];\n const planeNormal = plane.normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const radius = projectedVector.distanceTo(this.origin) * 0.5;\n let initialRotation = 0;\n let angleToProjection = projectedVector.angleTo((0, $06989a4a8159123e$export$60bbd10bdffb2e81).i);\n if (planeIdx === \"xz\") {\n initialRotation = -Math.PI / 2;\n angleToProjection = projectedVector.angleTo((0, $06989a4a8159123e$export$60bbd10bdffb2e81).k);\n }\n if (planeIdx === \"yz\") {\n initialRotation = Math.PI / 2;\n angleToProjection = projectedVector.angleTo((0, $06989a4a8159123e$export$60bbd10bdffb2e81).j);\n }\n const curve = new (0, $ilwiq.EllipseCurve)(this.origin.x, this.origin.y, radius, radius, 0, angleToProjection, false, initialRotation);\n const material = new (0, $ilwiq.LineBasicMaterial)({\n color: 0x000000\n });\n const geometry = new (0, $ilwiq.BufferGeometry)().setFromPoints(curve.getPoints(50));\n const rotation = new (0, $ilwiq.Quaternion)().setFromUnitVectors((0, $06989a4a8159123e$export$60bbd10bdffb2e81).k, plane.normal);\n geometry.applyQuaternion(rotation);\n return new (0, $ilwiq.Line)(geometry, material);\n }\n createAngleToTarget(axis) {\n const radius = this.target.clone().distanceTo(this.origin);\n const projectedVector = this.target.clone().projectOnPlane((0, $06989a4a8159123e$export$60bbd10bdffb2e81).j);\n const curve = new (0, $ilwiq.EllipseCurve)(this.origin.x, this.origin.y, radius, radius, 0, this.target.angleTo(projectedVector), false, 0);\n const material = new (0, $ilwiq.LineBasicMaterial)({\n color: 0x000000\n });\n const geometry = new (0, $ilwiq.BufferGeometry)().setFromPoints(curve.getPoints(50));\n geometry.applyQuaternion(new (0, $ilwiq.Quaternion)().setFromAxisAngle((0, $06989a4a8159123e$export$60bbd10bdffb2e81).j, -(0, $06989a4a8159123e$export$60bbd10bdffb2e81).i.angleTo(projectedVector)));\n return new (0, $ilwiq.Line)(geometry, material);\n }\n createProjection(plane) {\n const lineMaterial = new (0, $ilwiq.LineDashedMaterial)({\n color: 0x000000,\n linewidth: 1,\n scale: 1,\n dashSize: 0.25,\n gapSize: 0.1\n });\n const planeNormal = (0, $06989a4a8159123e$export$bb7594b552f278d7)[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const projectionGeometry = new (0, $ilwiq.BufferGeometry)().setFromPoints([\n projectedVector,\n this.origin\n ]);\n const connectionGeometry = new (0, $ilwiq.BufferGeometry)().setFromPoints([\n projectedVector,\n this.target\n ]);\n return [\n new (0, $ilwiq.Line)(projectionGeometry, lineMaterial).computeLineDistances(),\n new (0, $ilwiq.Line)(connectionGeometry, lineMaterial).computeLineDistances()\n ];\n }\n getFrameable() {\n return this.drawables;\n }\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\nvar $gbdyO = parcelRequire(\"gbdyO\");\n\nvar $eT66s = parcelRequire(\"eT66s\");\n\nvar $8NFZ6 = parcelRequire(\"8NFZ6\");\nvar $5ba80d09f4079c63$exports = {};\n$5ba80d09f4079c63$exports = JSON.parse('{\"glyphs\":{\"0\":{\"x_min\":73,\"x_max\":715,\"ha\":792,\"o\":\"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 \"},\"1\":{\"x_min\":215.671875,\"x_max\":574,\"ha\":792,\"o\":\"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 \"},\"2\":{\"x_min\":59,\"x_max\":731,\"ha\":792,\"o\":\"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 \"},\"3\":{\"x_min\":54,\"x_max\":737,\"ha\":792,\"o\":\"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 \"},\"4\":{\"x_min\":48,\"x_max\":742.453125,\"ha\":792,\"o\":\"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 \"},\"5\":{\"x_min\":54.171875,\"x_max\":738,\"ha\":792,\"o\":\"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 \"},\"6\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 \"},\"7\":{\"x_min\":58.71875,\"x_max\":730.953125,\"ha\":792,\"o\":\"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 \"},\"8\":{\"x_min\":55,\"x_max\":736,\"ha\":792,\"o\":\"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 \"},\"9\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 \"},\"\\u03BF\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 \"},\"S\":{\"x_min\":0,\"x_max\":788,\"ha\":890,\"o\":\"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 \"},\"\\xa6\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"/\":{\"x_min\":183.25,\"x_max\":608.328125,\"ha\":792,\"o\":\"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 \"},\"\\u03A4\":{\"x_min\":-0.4375,\"x_max\":777.453125,\"ha\":839,\"o\":\"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 \"},\"y\":{\"x_min\":0,\"x_max\":684.78125,\"ha\":771,\"o\":\"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 \"},\"\\u03A0\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 \"},\"\\u0390\":{\"x_min\":-111,\"x_max\":339,\"ha\":361,\"o\":\"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 \"},\"g\":{\"x_min\":0,\"x_max\":686,\"ha\":838,\"o\":\"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 \"},\"\\xb2\":{\"x_min\":0,\"x_max\":442,\"ha\":539,\"o\":\"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 \"},\"\\u2013\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\"\\u039A\":{\"x_min\":0,\"x_max\":819.5625,\"ha\":893,\"o\":\"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\"\\u0192\":{\"x_min\":-46.265625,\"x_max\":392,\"ha\":513,\"o\":\"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 \"},\"e\":{\"x_min\":0,\"x_max\":714,\"ha\":813,\"o\":\"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 \"},\"\\u03CC\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 \"},\"J\":{\"x_min\":0,\"x_max\":588,\"ha\":699,\"o\":\"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 \"},\"\\xbb\":{\"x_min\":-1,\"x_max\":503,\"ha\":601,\"o\":\"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 \"},\"\\xa9\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 \"},\"\\u03CE\":{\"x_min\":0,\"x_max\":922,\"ha\":1030,\"o\":\"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 \"},\"^\":{\"x_min\":193.0625,\"x_max\":598.609375,\"ha\":792,\"o\":\"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 \"},\"\\xab\":{\"x_min\":0,\"x_max\":507.203125,\"ha\":604,\"o\":\"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 \"},\"D\":{\"x_min\":0,\"x_max\":828,\"ha\":935,\"o\":\"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 \"},\"\\u2219\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"\\xff\":{\"x_min\":0,\"x_max\":47,\"ha\":125,\"o\":\"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 \"},\"w\":{\"x_min\":0,\"x_max\":1009.71875,\"ha\":1100,\"o\":\"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 \"},\"$\":{\"x_min\":0,\"x_max\":700,\"ha\":793,\"o\":\"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 \"},\"\\\\\\\\\":{\"x_min\":-0.015625,\"x_max\":425.0625,\"ha\":522,\"o\":\"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 \"},\"\\xb5\":{\"x_min\":0,\"x_max\":697.21875,\"ha\":747,\"o\":\"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 \"},\"\\u0399\":{\"x_min\":42,\"x_max\":181,\"ha\":297,\"o\":\"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 \"},\"\\u038E\":{\"x_min\":0,\"x_max\":1144.5,\"ha\":1214,\"o\":\"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u2019\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"\\u039D\":{\"x_min\":0,\"x_max\":801,\"ha\":915,\"o\":\"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 \"},\"-\":{\"x_min\":8.71875,\"x_max\":350.390625,\"ha\":478,\"o\":\"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 \"},\"Q\":{\"x_min\":0,\"x_max\":968,\"ha\":1072,\"o\":\"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 \"},\"\\u03C2\":{\"x_min\":1,\"x_max\":676.28125,\"ha\":740,\"o\":\"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 \"},\"M\":{\"x_min\":0,\"x_max\":954,\"ha\":1067,\"o\":\"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 \"},\"\\u03A8\":{\"x_min\":0,\"x_max\":1006,\"ha\":1094,\"o\":\"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 \"},\"C\":{\"x_min\":0,\"x_max\":886,\"ha\":944,\"o\":\"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 \"},\"!\":{\"x_min\":0,\"x_max\":138,\"ha\":236,\"o\":\"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 \"},\"{\":{\"x_min\":0,\"x_max\":480.5625,\"ha\":578,\"o\":\"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 \"},\"X\":{\"x_min\":-0.015625,\"x_max\":854.15625,\"ha\":940,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 \"},\"#\":{\"x_min\":0,\"x_max\":963.890625,\"ha\":1061,\"o\":\"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 \"},\"\\u03B9\":{\"x_min\":42,\"x_max\":284,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 \"},\"\\u0386\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":982,\"o\":\"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\")\":{\"x_min\":0,\"x_max\":318,\"ha\":415,\"o\":\"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 \"},\"\\u03B5\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 \"},\"\\u0394\":{\"x_min\":0,\"x_max\":952.78125,\"ha\":1028,\"o\":\"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 \"},\"}\":{\"x_min\":0,\"x_max\":481,\"ha\":578,\"o\":\"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 \"},\"\\u2030\":{\"x_min\":-3,\"x_max\":1672,\"ha\":1821,\"o\":\"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 \"},\"a\":{\"x_min\":0,\"x_max\":698.609375,\"ha\":794,\"o\":\"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 \"},\"\\u2014\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":1039,\"o\":\"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 \"},\"=\":{\"x_min\":8.71875,\"x_max\":780.953125,\"ha\":792,\"o\":\"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 \"},\"N\":{\"x_min\":0,\"x_max\":801,\"ha\":914,\"o\":\"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 \"},\"\\u03C1\":{\"x_min\":0,\"x_max\":712,\"ha\":797,\"o\":\"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 \"},\"\\xaf\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":938,\"o\":\"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 \"},\"Z\":{\"x_min\":0,\"x_max\":779,\"ha\":849,\"o\":\"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 \"},\"u\":{\"x_min\":0,\"x_max\":617,\"ha\":729,\"o\":\"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 \"},\"k\":{\"x_min\":0,\"x_max\":612.484375,\"ha\":697,\"o\":\"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 \"},\"\\u0397\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"\\u0391\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":985,\"o\":\"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\"s\":{\"x_min\":0,\"x_max\":604,\"ha\":697,\"o\":\"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 \"},\"B\":{\"x_min\":0,\"x_max\":778,\"ha\":876,\"o\":\"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 \"},\"\\u2026\":{\"x_min\":0,\"x_max\":614,\"ha\":708,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 \"},\"?\":{\"x_min\":0,\"x_max\":607,\"ha\":704,\"o\":\"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 \"},\"H\":{\"x_min\":0,\"x_max\":803,\"ha\":915,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"\\u03BD\":{\"x_min\":0,\"x_max\":675,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 \"},\"c\":{\"x_min\":1,\"x_max\":701.390625,\"ha\":775,\"o\":\"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 \"},\"\\xb6\":{\"x_min\":0,\"x_max\":566.671875,\"ha\":678,\"o\":\"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 \"},\"\\u03B2\":{\"x_min\":0,\"x_max\":660,\"ha\":745,\"o\":\"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 \"},\"\\u039C\":{\"x_min\":0,\"x_max\":954,\"ha\":1068,\"o\":\"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 \"},\"\\u038C\":{\"x_min\":0.109375,\"x_max\":1120,\"ha\":1217,\"o\":\"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u0389\":{\"x_min\":0,\"x_max\":1158,\"ha\":1275,\"o\":\"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u2022\":{\"x_min\":0,\"x_max\":663.890625,\"ha\":775,\"o\":\"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 \"},\"\\xa5\":{\"x_min\":0.1875,\"x_max\":819.546875,\"ha\":886,\"o\":\"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 \"},\"(\":{\"x_min\":0,\"x_max\":318.0625,\"ha\":415,\"o\":\"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 \"},\"U\":{\"x_min\":0,\"x_max\":796,\"ha\":904,\"o\":\"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 \"},\"\\u03B3\":{\"x_min\":0.5,\"x_max\":744.953125,\"ha\":822,\"o\":\"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 \"},\"\\u03B1\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 \"},\"F\":{\"x_min\":0,\"x_max\":683.328125,\"ha\":717,\"o\":\"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 \"},\"\\xad\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\":\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"\\u03A7\":{\"x_min\":0,\"x_max\":854.171875,\"ha\":935,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 \"},\"*\":{\"x_min\":116,\"x_max\":674,\"ha\":792,\"o\":\"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 \"},\"\\u2020\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 \"},\"\\xb0\":{\"x_min\":0,\"x_max\":347,\"ha\":444,\"o\":\"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 \"},\"V\":{\"x_min\":0,\"x_max\":862.71875,\"ha\":940,\"o\":\"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 \"},\"\\u039E\":{\"x_min\":0,\"x_max\":734.71875,\"ha\":763,\"o\":\"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 \"},\"\\xa0\":{\"x_min\":0,\"x_max\":0,\"ha\":853},\"\\u03AB\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 \"},\"\\u201D\":{\"x_min\":0,\"x_max\":347,\"ha\":454,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 \"},\"@\":{\"x_min\":0,\"x_max\":1260,\"ha\":1357,\"o\":\"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 \"},\"\\u038A\":{\"x_min\":0,\"x_max\":499,\"ha\":613,\"o\":\"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 \"},\"i\":{\"x_min\":14,\"x_max\":136,\"ha\":275,\"o\":\"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 \"},\"\\u0392\":{\"x_min\":0,\"x_max\":778,\"ha\":877,\"o\":\"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 \"},\"\\u03C5\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 \"},\"]\":{\"x_min\":0,\"x_max\":275,\"ha\":372,\"o\":\"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 \"},\"m\":{\"x_min\":0,\"x_max\":1019,\"ha\":1128,\"o\":\"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 \"},\"\\u03C7\":{\"x_min\":8.328125,\"x_max\":780.5625,\"ha\":815,\"o\":\"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 \"},\"\\u03AF\":{\"x_min\":42,\"x_max\":326.71875,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 \"},\"\\u0396\":{\"x_min\":0,\"x_max\":779.171875,\"ha\":850,\"o\":\"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 \"},\"R\":{\"x_min\":0,\"x_max\":781.953125,\"ha\":907,\"o\":\"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 \"},\"o\":{\"x_min\":0,\"x_max\":713,\"ha\":821,\"o\":\"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 \"},\"K\":{\"x_min\":0,\"x_max\":819.46875,\"ha\":906,\"o\":\"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\",\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"d\":{\"x_min\":0,\"x_max\":683,\"ha\":796,\"o\":\"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 \"},\"\\xa8\":{\"x_min\":-109,\"x_max\":247,\"ha\":232,\"o\":\"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 \"},\"E\":{\"x_min\":0,\"x_max\":736.109375,\"ha\":789,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"Y\":{\"x_min\":0,\"x_max\":820,\"ha\":886,\"o\":\"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 \"},\"\\\\\"\":{\"x_min\":0,\"x_max\":299,\"ha\":396,\"o\":\"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"\\u2039\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"\\u201E\":{\"x_min\":0,\"x_max\":364,\"ha\":467,\"o\":\"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 \"},\"\\u03B4\":{\"x_min\":1,\"x_max\":710,\"ha\":810,\"o\":\"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 \"},\"\\u03AD\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 \"},\"\\u03C9\":{\"x_min\":0,\"x_max\":922,\"ha\":1031,\"o\":\"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 \"},\"\\xb4\":{\"x_min\":0,\"x_max\":96,\"ha\":251,\"o\":\"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"\\xb1\":{\"x_min\":11,\"x_max\":781,\"ha\":792,\"o\":\"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 \"},\"|\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"\\u03CB\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 \"},\"\\xa7\":{\"x_min\":0,\"x_max\":593,\"ha\":690,\"o\":\"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 \"},\"b\":{\"x_min\":0,\"x_max\":685,\"ha\":783,\"o\":\"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 \"},\"q\":{\"x_min\":0,\"x_max\":683,\"ha\":876,\"o\":\"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 \"},\"\\u03A9\":{\"x_min\":-0.171875,\"x_max\":969.5625,\"ha\":1068,\"o\":\"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 \"},\"\\u03CD\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 \"},\"z\":{\"x_min\":-0.015625,\"x_max\":613.890625,\"ha\":697,\"o\":\"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 \"},\"\\u2122\":{\"x_min\":0,\"x_max\":894,\"ha\":1000,\"o\":\"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 \"},\"\\u03AE\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 \"},\"\\u0398\":{\"x_min\":0,\"x_max\":960,\"ha\":1056,\"o\":\"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 \"},\"\\xae\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 \"},\"~\":{\"x_min\":0,\"x_max\":833,\"ha\":931,\"o\":\"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 \"},\"\\u0395\":{\"x_min\":0,\"x_max\":736.21875,\"ha\":778,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"\\xb3\":{\"x_min\":0,\"x_max\":450,\"ha\":547,\"o\":\"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 \"},\"[\":{\"x_min\":0,\"x_max\":273.609375,\"ha\":371,\"o\":\"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 \"},\"L\":{\"x_min\":0,\"x_max\":645.828125,\"ha\":696,\"o\":\"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 \"},\"\\u03C3\":{\"x_min\":0,\"x_max\":803.390625,\"ha\":894,\"o\":\"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 \"},\"\\u03B6\":{\"x_min\":0,\"x_max\":573,\"ha\":642,\"o\":\"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 \"},\"\\u03B8\":{\"x_min\":0,\"x_max\":674,\"ha\":778,\"o\":\"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 \"},\"\\u039F\":{\"x_min\":0,\"x_max\":958,\"ha\":1054,\"o\":\"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 \"},\"\\u0393\":{\"x_min\":0,\"x_max\":705.28125,\"ha\":749,\"o\":\"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 \"},\" \":{\"x_min\":0,\"x_max\":0,\"ha\":375},\"%\":{\"x_min\":-3,\"x_max\":1089,\"ha\":1186,\"o\":\"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 \"},\"P\":{\"x_min\":0,\"x_max\":726,\"ha\":806,\"o\":\"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 \"},\"\\u0388\":{\"x_min\":0,\"x_max\":1078.21875,\"ha\":1118,\"o\":\"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u038F\":{\"x_min\":0.125,\"x_max\":1136.546875,\"ha\":1235,\"o\":\"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 \"},\"_\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 \"},\"\\u03AA\":{\"x_min\":-110,\"x_max\":246,\"ha\":275,\"o\":\"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 \"},\"+\":{\"x_min\":23,\"x_max\":768,\"ha\":792,\"o\":\"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 \"},\"\\xbd\":{\"x_min\":0,\"x_max\":1050,\"ha\":1149,\"o\":\"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 \"},\"\\u03A1\":{\"x_min\":0,\"x_max\":720,\"ha\":783,\"o\":\"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 \"},\"\\'\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"\\xaa\":{\"x_min\":0,\"x_max\":350,\"ha\":397,\"o\":\"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 \"},\"\\u0385\":{\"x_min\":0,\"x_max\":450,\"ha\":553,\"o\":\"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 \"},\"T\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 \"},\"\\u03A6\":{\"x_min\":0,\"x_max\":915,\"ha\":997,\"o\":\"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 \"},\"\\u204B\":{\"x_min\":0,\"x_max\":0,\"ha\":694},\"j\":{\"x_min\":-77.78125,\"x_max\":167,\"ha\":349,\"o\":\"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 \"},\"\\u03A3\":{\"x_min\":0,\"x_max\":756.953125,\"ha\":819,\"o\":\"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 \"},\"\\u203A\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"<\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"\\xa3\":{\"x_min\":0,\"x_max\":704.484375,\"ha\":801,\"o\":\"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 \"},\"t\":{\"x_min\":0,\"x_max\":367,\"ha\":458,\"o\":\"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 \"},\"\\xac\":{\"x_min\":0,\"x_max\":706,\"ha\":803,\"o\":\"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 \"},\"\\u03BB\":{\"x_min\":0,\"x_max\":750,\"ha\":803,\"o\":\"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 \"},\"W\":{\"x_min\":0,\"x_max\":1263.890625,\"ha\":1351,\"o\":\"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 \"},\">\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"v\":{\"x_min\":0,\"x_max\":675.15625,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 \"},\"\\u03C4\":{\"x_min\":0.28125,\"x_max\":644.5,\"ha\":703,\"o\":\"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 \"},\"\\u03BE\":{\"x_min\":0,\"x_max\":624.9375,\"ha\":699,\"o\":\"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 \"},\"&\":{\"x_min\":-3,\"x_max\":894.25,\"ha\":992,\"o\":\"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 \"},\"\\u039B\":{\"x_min\":0,\"x_max\":862.5,\"ha\":942,\"o\":\"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 \"},\"I\":{\"x_min\":41,\"x_max\":180,\"ha\":293,\"o\":\"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 \"},\"G\":{\"x_min\":0,\"x_max\":921,\"ha\":1011,\"o\":\"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 \"},\"\\u03B0\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 \"},\"`\":{\"x_min\":0,\"x_max\":138.890625,\"ha\":236,\"o\":\"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 \"},\"\\xb7\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"\\u03A5\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 \"},\"r\":{\"x_min\":0,\"x_max\":355.5625,\"ha\":432,\"o\":\"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 \"},\"x\":{\"x_min\":0,\"x_max\":675,\"ha\":764,\"o\":\"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 \"},\"\\u03BC\":{\"x_min\":0,\"x_max\":696.609375,\"ha\":747,\"o\":\"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 \"},\"h\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 \"},\".\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"\\u03C6\":{\"x_min\":-2,\"x_max\":878,\"ha\":974,\"o\":\"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 \"},\";\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"f\":{\"x_min\":0,\"x_max\":378,\"ha\":472,\"o\":\"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 \"},\"\\u201C\":{\"x_min\":1,\"x_max\":348.21875,\"ha\":454,\"o\":\"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 \"},\"A\":{\"x_min\":0.03125,\"x_max\":906.953125,\"ha\":1008,\"o\":\"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 \"},\"\\u2018\":{\"x_min\":1,\"x_max\":139.890625,\"ha\":236,\"o\":\"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 \"},\"\\u03CA\":{\"x_min\":-70,\"x_max\":283,\"ha\":361,\"o\":\"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 \"},\"\\u03C0\":{\"x_min\":-0.21875,\"x_max\":773.21875,\"ha\":857,\"o\":\"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 \"},\"\\u03AC\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 \"},\"O\":{\"x_min\":0,\"x_max\":958,\"ha\":1057,\"o\":\"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 \"},\"n\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 \"},\"l\":{\"x_min\":41,\"x_max\":166,\"ha\":279,\"o\":\"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 \"},\"\\xa4\":{\"x_min\":40.09375,\"x_max\":728.796875,\"ha\":825,\"o\":\"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 \"},\"\\u03BA\":{\"x_min\":0,\"x_max\":632.328125,\"ha\":679,\"o\":\"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 \"},\"p\":{\"x_min\":0,\"x_max\":685,\"ha\":786,\"o\":\"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 \"},\"\\u2021\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 \"},\"\\u03C8\":{\"x_min\":0,\"x_max\":808,\"ha\":907,\"o\":\"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 \"},\"\\u03B7\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 \"}},\"cssFontWeight\":\"normal\",\"ascender\":1189,\"underlinePosition\":-100,\"cssFontStyle\":\"normal\",\"boundingBox\":{\"yMin\":-334,\"xMin\":-111,\"yMax\":1189,\"xMax\":1672},\"resolution\":1000,\"original_font_information\":{\"postscript_name\":\"Helvetiker-Regular\",\"version_string\":\"Version 1.00 2004 initial release\",\"vendor_url\":\"http://www.magenta.gr/\",\"full_font_name\":\"Helvetiker\",\"font_family_name\":\"Helvetiker\",\"copyright\":\"Copyright (c) \\u039Cagenta ltd, 2004\",\"description\":\"\",\"trademark\":\"\",\"designer\":\"\",\"designer_url\":\"\",\"unique_font_identifier\":\"\\u039Cagenta ltd:Helvetiker:22-10-104\",\"license_url\":\"http://www.ellak.gr/fonts/MgOpen/license.html\",\"license_description\":\"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\\\\r\\\\n\\\\r\\\\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\\\\\"Fonts\\\\\") and associated documentation files (the \\\\\"Font Software\\\\\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \\\\r\\\\n\\\\r\\\\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\\\\r\\\\n\\\\r\\\\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \\\\\"MgOpen\\\\\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\\\\r\\\\n\\\\r\\\\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \\\\\"MgOpen\\\\\" name.\\\\r\\\\n\\\\r\\\\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \\\\r\\\\n\\\\r\\\\nTHE FONT SOFTWARE IS PROVIDED \\\\\"AS IS\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.\",\"manufacturer_name\":\"\\u039Cagenta ltd\",\"font_sub_family_name\":\"Regular\"},\"descender\":-334,\"familyName\":\"Helvetiker\",\"lineHeight\":1522,\"underlineThickness\":50}');\n\n\nclass $9405c84d589e06ee$export$b04be29aa201d4f5 {\n constructor(position, text, size = 0.2, color = 0x000000){\n this.text = new (0, $gbdyO.Text)();\n this.text.text = text;\n this.text.position.x = position.x;\n this.text.position.y = position.y;\n this.text.position.z = position.z;\n this.text.anchorX = \"center\";\n this.text.anchorY = \"middle\";\n this.text.fontSize = size;\n this.text.color = color;\n }\n getFrameable() {\n this.text.sync();\n return [\n this.text\n ];\n }\n}\nclass $9405c84d589e06ee$export$4380db2bf9335825 {\n constructor(position, text, size = 1, color = 0x000000){\n this.position = position;\n this.text = text;\n this.size = size;\n this.color = color;\n const geometry = new (0, $8NFZ6.TextGeometry)(this.text, {\n font: new (0, $eT66s.Font)((0, (/*@__PURE__*/$parcel$interopDefault($5ba80d09f4079c63$exports)))),\n size: this.size,\n height: 0.01,\n curveSegments: 25,\n bevelEnabled: false\n });\n const material = new (0, $ilwiq.MeshBasicMaterial)({\n color: this.color\n });\n this.drawable = new (0, $ilwiq.Mesh)(geometry, material);\n this.drawable.position.set(...this.position.toArray());\n }\n getFrameable() {\n return [\n this.drawable\n ];\n }\n}\n\n\nclass $c6f6e730d515f156$export$a1a1936bf656b97b {\n static #_ = this.uppercaseHeta = \"\\u0370\";\n static #_1 = this.lowercaseHeta = \"\\u0371\";\n static #_2 = this.uppercaseArchaicSampi = \"\\u0372\";\n static #_3 = this.lowercaseArchaicSampi = \"\\u0373\";\n static #_4 = this.numeralSign = \"\\u0374\";\n static #_5 = this.lowerNumeralSign = \"\\u0375\";\n static #_6 = this.uppercasePamphylianDigamma = \"\\u0376\";\n static #_7 = this.lowercasePamphylianDigamma = \"\\u0377\";\n static #_8 = this.ypogegrammeni = \"\\u037A\";\n static #_9 = this.smallReversedLunateSigmaSymbol = \"\\u037B\";\n static #_10 = this.smallDottedLunateSigmaSymbol = \"\\u037C\";\n static #_11 = this.smallReversedDottedLunateSigmaSymbol = \"\\u037D\";\n static #_12 = this.questionMark = \"\\u037E\";\n static #_13 = this.uppercaseYot = \"\\u037F\";\n static #_14 = this.acuteaccent = \"\\u0384\";\n static #_15 = this.diaeresiswithacuteaccent = \"\\u0385\";\n static #_16 = this.uppercaseAwithacuteaccent = \"\\u0386\";\n static #_17 = this.anoTeleia = \"\\u0387\";\n static #_18 = this.uppercaseEpsilonwithacuteaccent = \"\\u0388\";\n static #_19 = this.uppercaseEtawithacuteaccent = \"\\u0389\";\n static #_20 = this.uppercaseIotawithacuteaccent = \"\\u038A\";\n static #_21 = this.uppercaseOmicronwithacuteaccent = \"\\u038C\";\n static #_22 = this.uppercaseUpsilonwithacuteaccent = \"\\u038E\";\n static #_23 = this.uppercaseOmegawithacuteaccent = \"\\u038F\";\n static #_24 = this.lowercaseIotawithdiaeresisandacuteaccent = \"\\u0390\";\n static #_25 = this.uppercaseAlpha = \"\\u0391\";\n static #_26 = this.uppercaseBeta = \"\\u0392\";\n static #_27 = this.uppercaseGamma = \"\\u0393\";\n static #_28 = this.uppercaseDelta = \"\\u0394\";\n static #_29 = this.uppercaseEpsilon = \"\\u0395\";\n static #_30 = this.uppercaseZeta = \"\\u0396\";\n static #_31 = this.uppercaseEta = \"\\u0397\";\n static #_32 = this.uppercaseTheta = \"\\u0398\";\n static #_33 = this.uppercaseIota = \"\\u0399\";\n static #_34 = this.uppercaseKappa = \"\\u039A\";\n static #_35 = this.uppercaseLambda = \"\\u039B\";\n static #_36 = this.uppercaseMu = \"\\u039C\";\n static #_37 = this.uppercaseNu = \"\\u039D\";\n static #_38 = this.uppercaseXi = \"\\u039E\";\n static #_39 = this.uppercaseOmicron = \"\\u039F\";\n static #_40 = this.uppercasePi = \"\\u03A0\";\n static #_41 = this.uppercaseRho = \"\\u03A1\";\n static #_42 = this.uppercaseSigma = \"\\u03A3\";\n static #_43 = this.uppercaseTau = \"\\u03A4\";\n static #_44 = this.uppercaseUpsilon = \"\\u03A5\";\n static #_45 = this.uppercasePhi = \"\\u03A6\";\n static #_46 = this.uppercaseChi = \"\\u03A7\";\n static #_47 = this.uppercasePsi = \"\\u03A8\";\n static #_48 = this.uppercaseOmega = \"\\u03A9\";\n static #_49 = this.uppercaseIotawithdiaeresis = \"\\u03AA\";\n static #_50 = this.uppercaseUpsilonwithdiaeresis = \"\\u03AB\";\n static #_51 = this.lowercaseAlphawithacuteaccent = \"\\u03AC\";\n static #_52 = this.lowercaseEpsilonwithacuteaccent = \"\\u03AD\";\n static #_53 = this.lowercaseEtawithacuteaccent = \"\\u03AE\";\n static #_54 = this.lowercaseIotawithacuteaccent = \"\\u03AF\";\n static #_55 = this.lowercaseUpsilonwithdiaeresisandacuteaccent = \"\\u03B0\";\n static #_56 = this.lowercaseAlpha = \"\\u03B1\";\n static #_57 = this.lowercaseBeta = \"\\u03B2\";\n static #_58 = this.lowercaseGamma = \"\\u03B3\";\n static #_59 = this.lowercaseDelta = \"\\u03B4\";\n static #_60 = this.lowercaseEpsilon = \"\\u03B5\";\n static #_61 = this.lowercaseZeta = \"\\u03B6\";\n static #_62 = this.lowercaseEta = \"\\u03B7\";\n static #_63 = this.lowercaseTheta = \"\\u03B8\";\n static #_64 = this.lowercaseIota = \"\\u03B9\";\n static #_65 = this.lowercaseKappa = \"\\u03BA\";\n static #_66 = this.lowercaseLambda = \"\\u03BB\";\n static #_67 = this.lowercaseMu = \"\\u03BC\";\n static #_68 = this.lowercaseNu = \"\\u03BD\";\n static #_69 = this.lowercaseXi = \"\\u03BE\";\n static #_70 = this.lowercaseOmicron = \"\\u03BF\";\n static #_71 = this.lowercasePi = \"\\u03C0\";\n static #_72 = this.lowercaseRho = \"\\u03C1\";\n static #_73 = this.lowercaseFinalSigma = \"\\u03C2\";\n static #_74 = this.lowercaseSigma = \"\\u03C3\";\n static #_75 = this.lowercaseTau = \"\\u03C4\";\n static #_76 = this.lowercaseUpsilon = \"\\u03C5\";\n static #_77 = this.lowercasePhi = \"\\u03C6\";\n static #_78 = this.lowercaseChi = \"\\u03C7\";\n static #_79 = this.lowercasePsi = \"\\u03C8\";\n static #_80 = this.lowercaseOmega = \"\\u03C9\";\n static #_81 = this.lowercaseIotawithdiaeresis = \"\\u03CA\";\n static #_82 = this.lowercaseUpsilonwithdiaeresis = \"\\u03CB\";\n static #_83 = this.lowercaseOmicronwithacuteaccent = \"\\u03CC\";\n static #_84 = this.lowercaseUpsilonwithacuteaccent = \"\\u03CD\";\n static #_85 = this.lowercaseOmegawithacuteaccent = \"\\u03CE\";\n static #_86 = this.uppercaseKaiSymbol = \"\\u03CF\";\n static #_87 = this.betaSymbol = \"\\u03D0\";\n static #_88 = this.thetaSymbol = \"\\u03D1\";\n static #_89 = this.upsilonwithhookSymbol = \"\\u03D2\";\n static #_90 = this.upsilonwithacuteandhookSymbol = \"\\u03D3\";\n static #_91 = this.upsilonwithdiaeresisandhookSymbol = \"\\u03D4\";\n static #_92 = this.phiSymbol = \"\\u03D5\";\n static #_93 = this.piSymbol = \"\\u03D6\";\n static #_94 = this.kaiSymbol = \"\\u03D7\";\n static #_95 = this.letterQoppa = \"\\u03D8\";\n static #_96 = this.lowercaseQoppa = \"\\u03D9\";\n static #_97 = this.letterStigma = \"\\u03DA\";\n static #_98 = this.lowercaseStigma = \"\\u03DB\";\n static #_99 = this.letterDigamma = \"\\u03DC\";\n static #_100 = this.lowercaseDigamma = \"\\u03DD\";\n static #_101 = this.letterKoppa = \"\\u03DE\";\n static #_102 = this.lowercaseKoppa = \"\\u03DF\";\n static #_103 = this.letterSampi = \"\\u03E0\";\n static #_104 = this.lowercaseSampi = \"\\u03E1\";\n static #_105 = this.copticuppercaseShei = \"\\u03E2\";\n static #_106 = this.copticlowercaseShei = \"\\u03E3\";\n static #_107 = this.copticuppercaseFei = \"\\u03E4\";\n static #_108 = this.copticlowercaseFei = \"\\u03E5\";\n static #_109 = this.copticuppercaseKhei = \"\\u03E6\";\n static #_110 = this.copticlowercaseKhei = \"\\u03E7\";\n static #_111 = this.copticuppercaseHori = \"\\u03E8\";\n static #_112 = this.copticlowercaseHori = \"\\u03E9\";\n static #_113 = this.copticuppercaseGangia = \"\\u03EA\";\n static #_114 = this.copticlowercaseGangia = \"\\u03EB\";\n static #_115 = this.copticuppercaseShima = \"\\u03EC\";\n static #_116 = this.copticlowercaseShima = \"\\u03ED\";\n static #_117 = this.copticuppercaseDei = \"\\u03EE\";\n static #_118 = this.copticlowercaseDei = \"\\u03EF\";\n static #_119 = this.kappaSymbol = \"\\u03F0\";\n static #_120 = this.rhoSymbol = \"\\u03F1\";\n static #_121 = this.lunateSigmaSymbol = \"\\u03F2\";\n static #_122 = this.letterYot = \"\\u03F3\";\n static #_123 = this.uppercaseThetaSymbol = \"\\u03F4\";\n static #_124 = this.lunateEpsilonSymbol = \"\\u03F5\";\n static #_125 = this.reversedLunateEpsilonSymbol = \"\\u03F6\";\n static #_126 = this.uppercaseSho = \"\\u03F7\";\n static #_127 = this.lowercaseSho = \"\\u03F8\";\n static #_128 = this.uppercaseLunateSigmaSymbol = \"\\u03F9\";\n static #_129 = this.uppercaseSan = \"\\u03FA\";\n static #_130 = this.lowercaseSan = \"\\u03FB\";\n static #_131 = this.rhowithstrokeSymbol = \"\\u03FC\";\n static #_132 = this.uppercaseReversedLunateSigmaSymbol = \"\\u03FD\";\n static #_133 = this.uppercaseDottedLunateSigmaSymbol = \"\\u03FE\";\n static #_134 = this.uppercaseReversedDottedLunateSigmaSymbol = \"\\u03FF\";\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nconst $9a8cebc34540b0c1$export$158a78f343a14874 = (n = 100, scale = 10)=>{\n const points = [];\n for(let index = 0; index < n; index++){\n const x = Math.random() * scale;\n const y = Math.random() * scale;\n const z = Math.random() * scale;\n points.push(new (0, $ilwiq.Vector3)(x, y, z));\n }\n return points;\n};\n\n\n\n\n//# sourceMappingURL=index.f9a4f1dc.js.map\n","export { Frame } from \"./frame\";\nexport { ScatterPlot } from \"./scatterplot\";\nexport { VectorPlot } from \"./vectorplot\";\nexport { Label } from \"./label\";\nexport { Greek } from \"./greek\";\nexport { getRandomPoints } from \"./data\";\n","import { Color, PerspectiveCamera, Scene, WebGLRenderer } from \"three\";\nimport { OrbitControls } from \"three/examples/jsm/controls/OrbitControls\";\nimport { Axes } from \"./axes\";\nimport { Plot } from \"./plot\";\nimport { FallbackLabel, Label } from \"./label\";\n\nexport class Frame extends Scene {\n protected scene: Scene;\n protected renderer: WebGLRenderer;\n protected camera: PerspectiveCamera;\n protected axes: Axes;\n protected controls: OrbitControls;\n protected observer: ResizeObserver = new ResizeObserver(() => this.update());\n\n // TODO: at the moment only one size bc grid can only be squared\n // look into this for solution https://discourse.threejs.org/t/rectangular-gridhelper-possibility/37812\n constructor(protected canvas: HTMLCanvasElement, protected size = 10) {\n super();\n this.scene = new Scene();\n this.scene.background = new Color(0xffffff);\n\n const { clientWidth, clientHeight } = canvas;\n\n this.renderer = new WebGLRenderer({ canvas });\n this.renderer.setSize(clientWidth, clientHeight);\n\n this.setCamera(clientWidth, clientHeight);\n this.setControls();\n this.setAxes();\n\n this.updateOnChanges();\n this.update();\n }\n\n private setCamera(width: number, height: number) {\n this.camera = new PerspectiveCamera(45, width / height, 0.1, 1000);\n this.camera.position.set(this.size * 2, this.size * 2, this.size * 2);\n this.scene.add(this.camera);\n }\n\n private setControls() {\n this.controls = new OrbitControls(this.camera, this.canvas);\n this.controls.target.set(0, 0, 0);\n }\n\n private setAxes() {\n this.axes = new Axes(this.size, this.size, this.size);\n\n this.scene.add(this.axes.x);\n this.scene.add(this.axes.y);\n this.scene.add(this.axes.z);\n\n this.scene.add(this.axes.gridXY);\n this.scene.add(this.axes.gridXZ);\n this.scene.add(this.axes.gridYZ);\n }\n\n updateOnChanges() {\n this.controls.addEventListener(\"change\", () => this.update());\n this.observer.observe(this.canvas);\n }\n\n protected update() {\n this.renderer.render(this.scene, this.camera);\n }\n\n public capture() {\n const base64 = this.canvas.toDataURL(\"img/png\");\n }\n\n public addPlot(plot: Plot) {\n this.scene.add(...plot.getFrameable());\n this.update();\n }\n\n private async addFallbackLabel(text: FallbackLabel) {\n this.scene.add(...text.getFrameable());\n this.update();\n }\n\n public async addLabel(text: Label) {\n this.scene.add(...text.getFrameable());\n\n text.text.addEventListener(\"synccomplete\", () => {\n this.update();\n });\n\n }\n}\n","import { ArrowHelper, GridHelper, Vector3 } from \"three\";\n\nexport const UnitVector = {\n i: new Vector3(1, 0, 0),\n j: new Vector3(0, 1, 0),\n k: new Vector3(0, 0, 1),\n} as const;\n\nexport const AxesPlane = {\n xy: { normal: UnitVector.k, unit: { x: UnitVector.i, y: UnitVector.j } },\n xz: { normal: UnitVector.j, unit: { x: UnitVector.i, z: UnitVector.k } },\n yz: { normal: UnitVector.i, unit: { y: UnitVector.j, z: UnitVector.k } },\n} as const;\n\nclass Axis extends ArrowHelper {\n constructor(direction: Vector3, length: number) {\n super(direction, new Vector3(0, 0, 0), length);\n }\n}\n\nexport class Axes {\n public x: Axis;\n public y: Axis;\n public z: Axis;\n public gridXZ: GridHelper;\n public gridXY: GridHelper;\n public gridYZ: GridHelper;\n\n constructor(\n private lengthX: number,\n private lengthY: number,\n private lengthZ: number\n ) {\n this.x = new Axis(new Vector3(1, 0, 0), this.lengthX * 1.1);\n this.y = new Axis(new Vector3(0, 1, 0), this.lengthY * 1.1);\n this.z = new Axis(new Vector3(0, 0, 1), this.lengthZ * 1.1);\n\n this.setGrids();\n }\n\n private setGrids() {\n this.gridXZ = new GridHelper(Math.max(this.lengthX, this.lengthZ));\n this.gridXZ.position.setX(this.lengthX / 2);\n this.gridXZ.position.setZ(this.lengthZ / 2);\n\n this.gridXY = new GridHelper(Math.max(this.lengthX, this.lengthY));\n this.gridXY.position.setX(this.lengthX / 2);\n this.gridXY.position.setY(this.lengthY / 2);\n this.gridXY.rotateOnAxis(new Vector3(1, 0, 0), Math.PI / 2);\n\n this.gridYZ = new GridHelper(Math.max(this.lengthY, this.lengthZ));\n this.gridYZ.position.setY(this.lengthY / 2);\n this.gridYZ.position.setZ(this.lengthZ / 2);\n this.gridYZ.rotateOnAxis(new Vector3(0, 0, 1), Math.PI / 2);\n }\n}\n","import { Mesh, MeshBasicMaterial, SphereGeometry, Vector3 } from \"three\";\nimport { Plot } from \"./plot\";\n\nexport class ScatterPlot extends Plot {\n points: Mesh[];\n\n constructor(points: Vector3[], pointRadius = 0.2) {\n super();\n\n this.points = points.map((v) => {\n const geometry = new SphereGeometry(pointRadius);\n const material = new MeshBasicMaterial({ color: 0x00ff00 });\n const obj = new Mesh(geometry, material);\n obj.position.set(v.x, v.y, v.z);\n return obj;\n });\n }\n\n getFrameable() {\n return this.points;\n }\n}\n","import { Object3D } from \"three\";\n\nexport interface FramedObject {\n getFrameable(): Object3D[];\n}\n\nexport abstract class Plot implements FramedObject {\n abstract getFrameable(): Object3D[];\n}\n","import {\n ArrowHelper,\n BufferGeometry,\n EllipseCurve,\n Line,\n LineBasicMaterial,\n LineDashedMaterial,\n Object3D,\n Object3DEventMap,\n Quaternion,\n Vector3,\n} from \"three\";\nimport { Plot } from \"./plot\";\nimport { AxesPlane, UnitVector } from \"./axes\";\n\nexport class VectorPlot extends Plot {\n private drawables: (ArrowHelper | Line)[];\n\n constructor(private origin: Vector3, private target: Vector3) {\n super();\n\n this.drawables = [];\n\n this.drawables.push(this.createVector(origin, target));\n this.drawables.push(...this.createProjection(\"xy\"));\n this.drawables.push(...this.createProjection(\"yz\"));\n this.drawables.push(...this.createProjection(\"xz\"));\n this.drawables.push(this.createAngleToProjection(\"xz\"));\n this.drawables.push(this.createAngleToProjection(\"xy\"));\n this.drawables.push(this.createAngleToProjection(\"yz\"));\n this.drawables.push(this.createAngleToTarget(\"y\"));\n }\n\n private createVector(origin: Vector3, target: Vector3) {\n const length = Math.abs(origin.distanceTo(target));\n\n return new ArrowHelper(\n target.clone().normalize(),\n origin,\n length,\n 0x000000,\n length * 0.2,\n length * 0.1\n );\n }\n\n private createAngleToProjection

(\n planeIdx: P\n ) {\n const plane = AxesPlane[planeIdx];\n const planeNormal = plane.normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const radius = projectedVector.distanceTo(this.origin) * 0.5;\n\n let initialRotation = 0;\n let angleToProjection = projectedVector.angleTo(UnitVector.i);\n\n if (planeIdx === \"xz\") {\n initialRotation = -Math.PI / 2;\n angleToProjection = projectedVector.angleTo(UnitVector.k);\n }\n\n if (planeIdx === \"yz\") {\n initialRotation = Math.PI / 2;\n angleToProjection = projectedVector.angleTo(UnitVector.j);\n }\n\n const curve = new EllipseCurve(\n this.origin.x,\n this.origin.y,\n radius,\n radius,\n 0,\n angleToProjection,\n false,\n initialRotation\n );\n\n const material = new LineBasicMaterial({ color: 0x000000 });\n const geometry = new BufferGeometry().setFromPoints(curve.getPoints(50));\n\n const rotation = new Quaternion().setFromUnitVectors(\n UnitVector.k,\n plane.normal\n );\n\n geometry.applyQuaternion(rotation);\n\n return new Line(geometry, material);\n }\n\n private createAngleToTarget(axis: \"x\" | \"y\" | \"z\") {\n const radius = this.target.clone().distanceTo(this.origin);\n\n const projectedVector = this.target.clone().projectOnPlane(UnitVector.j);\n\n const curve = new EllipseCurve(\n this.origin.x,\n this.origin.y,\n radius,\n radius,\n 0,\n this.target.angleTo(projectedVector),\n false,\n 0\n );\n\n const material = new LineBasicMaterial({ color: 0x000000 });\n const geometry = new BufferGeometry().setFromPoints(curve.getPoints(50));\n geometry.applyQuaternion(\n new Quaternion().setFromAxisAngle(\n UnitVector.j,\n -UnitVector.i.angleTo(projectedVector)\n )\n );\n\n return new Line(geometry, material);\n }\n\n private createProjection

(plane: P) {\n const lineMaterial = new LineDashedMaterial({\n color: 0x000000,\n linewidth: 1,\n scale: 1,\n dashSize: 0.25,\n gapSize: 0.1,\n });\n\n const planeNormal = AxesPlane[plane].normal;\n\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n\n const projectionGeometry = new BufferGeometry().setFromPoints([\n projectedVector,\n this.origin,\n ]);\n\n const connectionGeometry = new BufferGeometry().setFromPoints([\n projectedVector,\n this.target,\n ]);\n\n return [\n new Line(projectionGeometry, lineMaterial).computeLineDistances(),\n new Line(connectionGeometry, lineMaterial).computeLineDistances(),\n ];\n }\n\n public getFrameable(): Object3D[] {\n return this.drawables;\n }\n}\n","import {\n Mesh,\n MeshBasicMaterial,\n Object3D,\n Object3DEventMap,\n Vector3,\n} from \"three\";\nimport { FramedObject } from \"./plot\";\nimport { Text } from \"troika-three-text\";\nimport { Font } from \"three/examples/jsm/loaders/FontLoader\";\nimport { TextGeometry } from \"three/examples/jsm/geometries/TextGeometry\";\n\nimport fontJson from \"./fonts/helvetiker_regular.typeface.json\";\n\nexport class Label implements FramedObject {\n text: Text;\n\n constructor(position: Vector3, text: string, size = 0.2, color = 0x000000) {\n this.text = new Text();\n this.text.text = text;\n this.text.position.x = position.x;\n this.text.position.y = position.y;\n this.text.position.z = position.z;\n this.text.anchorX = \"center\";\n this.text.anchorY = \"middle\";\n this.text.fontSize = size;\n this.text.color = color;\n }\n\n getFrameable(): Object3D[] {\n this.text.sync();\n return [this.text];\n }\n}\n\nexport class FallbackLabel implements FramedObject {\n drawable: Mesh;\n\n constructor(\n private position: Vector3,\n private text: string,\n private size = 1,\n private color = 0x000000\n ) {\n const geometry = new TextGeometry(this.text, {\n font: new Font(fontJson),\n size: this.size,\n height: 0.01,\n curveSegments: 25,\n bevelEnabled: false,\n });\n\n const material = new MeshBasicMaterial({ color: this.color });\n\n this.drawable = new Mesh(geometry, material);\n this.drawable.position.set(...this.position.toArray());\n }\n\n getFrameable(): Mesh[] {\n return [this.drawable];\n }\n}\n","{\"glyphs\":{\"ο\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 \"},\"S\":{\"x_min\":0,\"x_max\":788,\"ha\":890,\"o\":\"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 \"},\"¦\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"/\":{\"x_min\":183.25,\"x_max\":608.328125,\"ha\":792,\"o\":\"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 \"},\"Τ\":{\"x_min\":-0.4375,\"x_max\":777.453125,\"ha\":839,\"o\":\"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 \"},\"y\":{\"x_min\":0,\"x_max\":684.78125,\"ha\":771,\"o\":\"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 \"},\"Π\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 \"},\"ΐ\":{\"x_min\":-111,\"x_max\":339,\"ha\":361,\"o\":\"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 \"},\"g\":{\"x_min\":0,\"x_max\":686,\"ha\":838,\"o\":\"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 \"},\"²\":{\"x_min\":0,\"x_max\":442,\"ha\":539,\"o\":\"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 \"},\"–\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\"Κ\":{\"x_min\":0,\"x_max\":819.5625,\"ha\":893,\"o\":\"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\"ƒ\":{\"x_min\":-46.265625,\"x_max\":392,\"ha\":513,\"o\":\"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 \"},\"e\":{\"x_min\":0,\"x_max\":714,\"ha\":813,\"o\":\"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 \"},\"ό\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 \"},\"J\":{\"x_min\":0,\"x_max\":588,\"ha\":699,\"o\":\"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 \"},\"»\":{\"x_min\":-1,\"x_max\":503,\"ha\":601,\"o\":\"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 \"},\"©\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 \"},\"ώ\":{\"x_min\":0,\"x_max\":922,\"ha\":1030,\"o\":\"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 \"},\"^\":{\"x_min\":193.0625,\"x_max\":598.609375,\"ha\":792,\"o\":\"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 \"},\"«\":{\"x_min\":0,\"x_max\":507.203125,\"ha\":604,\"o\":\"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 \"},\"D\":{\"x_min\":0,\"x_max\":828,\"ha\":935,\"o\":\"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 \"},\"∙\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"ÿ\":{\"x_min\":0,\"x_max\":47,\"ha\":125,\"o\":\"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 \"},\"w\":{\"x_min\":0,\"x_max\":1009.71875,\"ha\":1100,\"o\":\"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 \"},\"$\":{\"x_min\":0,\"x_max\":700,\"ha\":793,\"o\":\"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 \"},\"\\\\\":{\"x_min\":-0.015625,\"x_max\":425.0625,\"ha\":522,\"o\":\"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 \"},\"µ\":{\"x_min\":0,\"x_max\":697.21875,\"ha\":747,\"o\":\"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 \"},\"Ι\":{\"x_min\":42,\"x_max\":181,\"ha\":297,\"o\":\"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 \"},\"Ύ\":{\"x_min\":0,\"x_max\":1144.5,\"ha\":1214,\"o\":\"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"’\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"Ν\":{\"x_min\":0,\"x_max\":801,\"ha\":915,\"o\":\"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 \"},\"-\":{\"x_min\":8.71875,\"x_max\":350.390625,\"ha\":478,\"o\":\"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 \"},\"Q\":{\"x_min\":0,\"x_max\":968,\"ha\":1072,\"o\":\"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 \"},\"ς\":{\"x_min\":1,\"x_max\":676.28125,\"ha\":740,\"o\":\"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 \"},\"M\":{\"x_min\":0,\"x_max\":954,\"ha\":1067,\"o\":\"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 \"},\"Ψ\":{\"x_min\":0,\"x_max\":1006,\"ha\":1094,\"o\":\"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 \"},\"C\":{\"x_min\":0,\"x_max\":886,\"ha\":944,\"o\":\"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 \"},\"!\":{\"x_min\":0,\"x_max\":138,\"ha\":236,\"o\":\"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 \"},\"{\":{\"x_min\":0,\"x_max\":480.5625,\"ha\":578,\"o\":\"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 \"},\"X\":{\"x_min\":-0.015625,\"x_max\":854.15625,\"ha\":940,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 \"},\"#\":{\"x_min\":0,\"x_max\":963.890625,\"ha\":1061,\"o\":\"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 \"},\"ι\":{\"x_min\":42,\"x_max\":284,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 \"},\"Ά\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":982,\"o\":\"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\")\":{\"x_min\":0,\"x_max\":318,\"ha\":415,\"o\":\"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 \"},\"ε\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 \"},\"Δ\":{\"x_min\":0,\"x_max\":952.78125,\"ha\":1028,\"o\":\"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 \"},\"}\":{\"x_min\":0,\"x_max\":481,\"ha\":578,\"o\":\"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 \"},\"‰\":{\"x_min\":-3,\"x_max\":1672,\"ha\":1821,\"o\":\"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 \"},\"a\":{\"x_min\":0,\"x_max\":698.609375,\"ha\":794,\"o\":\"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 \"},\"—\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":1039,\"o\":\"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 \"},\"=\":{\"x_min\":8.71875,\"x_max\":780.953125,\"ha\":792,\"o\":\"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 \"},\"N\":{\"x_min\":0,\"x_max\":801,\"ha\":914,\"o\":\"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 \"},\"ρ\":{\"x_min\":0,\"x_max\":712,\"ha\":797,\"o\":\"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 \"},\"2\":{\"x_min\":59,\"x_max\":731,\"ha\":792,\"o\":\"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 \"},\"¯\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":938,\"o\":\"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 \"},\"Z\":{\"x_min\":0,\"x_max\":779,\"ha\":849,\"o\":\"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 \"},\"u\":{\"x_min\":0,\"x_max\":617,\"ha\":729,\"o\":\"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 \"},\"k\":{\"x_min\":0,\"x_max\":612.484375,\"ha\":697,\"o\":\"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 \"},\"Η\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"Α\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":985,\"o\":\"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\"s\":{\"x_min\":0,\"x_max\":604,\"ha\":697,\"o\":\"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 \"},\"B\":{\"x_min\":0,\"x_max\":778,\"ha\":876,\"o\":\"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 \"},\"…\":{\"x_min\":0,\"x_max\":614,\"ha\":708,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 \"},\"?\":{\"x_min\":0,\"x_max\":607,\"ha\":704,\"o\":\"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 \"},\"H\":{\"x_min\":0,\"x_max\":803,\"ha\":915,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"ν\":{\"x_min\":0,\"x_max\":675,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 \"},\"c\":{\"x_min\":1,\"x_max\":701.390625,\"ha\":775,\"o\":\"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 \"},\"¶\":{\"x_min\":0,\"x_max\":566.671875,\"ha\":678,\"o\":\"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 \"},\"β\":{\"x_min\":0,\"x_max\":660,\"ha\":745,\"o\":\"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 \"},\"Μ\":{\"x_min\":0,\"x_max\":954,\"ha\":1068,\"o\":\"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 \"},\"Ό\":{\"x_min\":0.109375,\"x_max\":1120,\"ha\":1217,\"o\":\"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"Ή\":{\"x_min\":0,\"x_max\":1158,\"ha\":1275,\"o\":\"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"•\":{\"x_min\":0,\"x_max\":663.890625,\"ha\":775,\"o\":\"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 \"},\"¥\":{\"x_min\":0.1875,\"x_max\":819.546875,\"ha\":886,\"o\":\"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 \"},\"(\":{\"x_min\":0,\"x_max\":318.0625,\"ha\":415,\"o\":\"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 \"},\"U\":{\"x_min\":0,\"x_max\":796,\"ha\":904,\"o\":\"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 \"},\"γ\":{\"x_min\":0.5,\"x_max\":744.953125,\"ha\":822,\"o\":\"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 \"},\"α\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 \"},\"F\":{\"x_min\":0,\"x_max\":683.328125,\"ha\":717,\"o\":\"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 \"},\"­\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\":\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"Χ\":{\"x_min\":0,\"x_max\":854.171875,\"ha\":935,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 \"},\"*\":{\"x_min\":116,\"x_max\":674,\"ha\":792,\"o\":\"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 \"},\"†\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 \"},\"°\":{\"x_min\":0,\"x_max\":347,\"ha\":444,\"o\":\"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 \"},\"V\":{\"x_min\":0,\"x_max\":862.71875,\"ha\":940,\"o\":\"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 \"},\"Ξ\":{\"x_min\":0,\"x_max\":734.71875,\"ha\":763,\"o\":\"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 \"},\" \":{\"x_min\":0,\"x_max\":0,\"ha\":853},\"Ϋ\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 \"},\"0\":{\"x_min\":73,\"x_max\":715,\"ha\":792,\"o\":\"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 \"},\"”\":{\"x_min\":0,\"x_max\":347,\"ha\":454,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 \"},\"@\":{\"x_min\":0,\"x_max\":1260,\"ha\":1357,\"o\":\"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 \"},\"Ί\":{\"x_min\":0,\"x_max\":499,\"ha\":613,\"o\":\"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 \"},\"i\":{\"x_min\":14,\"x_max\":136,\"ha\":275,\"o\":\"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 \"},\"Β\":{\"x_min\":0,\"x_max\":778,\"ha\":877,\"o\":\"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 \"},\"υ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 \"},\"]\":{\"x_min\":0,\"x_max\":275,\"ha\":372,\"o\":\"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 \"},\"m\":{\"x_min\":0,\"x_max\":1019,\"ha\":1128,\"o\":\"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 \"},\"χ\":{\"x_min\":8.328125,\"x_max\":780.5625,\"ha\":815,\"o\":\"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 \"},\"8\":{\"x_min\":55,\"x_max\":736,\"ha\":792,\"o\":\"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 \"},\"ί\":{\"x_min\":42,\"x_max\":326.71875,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 \"},\"Ζ\":{\"x_min\":0,\"x_max\":779.171875,\"ha\":850,\"o\":\"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 \"},\"R\":{\"x_min\":0,\"x_max\":781.953125,\"ha\":907,\"o\":\"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 \"},\"o\":{\"x_min\":0,\"x_max\":713,\"ha\":821,\"o\":\"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 \"},\"5\":{\"x_min\":54.171875,\"x_max\":738,\"ha\":792,\"o\":\"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 \"},\"7\":{\"x_min\":58.71875,\"x_max\":730.953125,\"ha\":792,\"o\":\"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 \"},\"K\":{\"x_min\":0,\"x_max\":819.46875,\"ha\":906,\"o\":\"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\",\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"d\":{\"x_min\":0,\"x_max\":683,\"ha\":796,\"o\":\"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 \"},\"¨\":{\"x_min\":-109,\"x_max\":247,\"ha\":232,\"o\":\"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 \"},\"E\":{\"x_min\":0,\"x_max\":736.109375,\"ha\":789,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"Y\":{\"x_min\":0,\"x_max\":820,\"ha\":886,\"o\":\"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 \"},\"\\\"\":{\"x_min\":0,\"x_max\":299,\"ha\":396,\"o\":\"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"‹\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"„\":{\"x_min\":0,\"x_max\":364,\"ha\":467,\"o\":\"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 \"},\"δ\":{\"x_min\":1,\"x_max\":710,\"ha\":810,\"o\":\"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 \"},\"έ\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 \"},\"ω\":{\"x_min\":0,\"x_max\":922,\"ha\":1031,\"o\":\"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 \"},\"´\":{\"x_min\":0,\"x_max\":96,\"ha\":251,\"o\":\"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"±\":{\"x_min\":11,\"x_max\":781,\"ha\":792,\"o\":\"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 \"},\"|\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"ϋ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 \"},\"§\":{\"x_min\":0,\"x_max\":593,\"ha\":690,\"o\":\"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 \"},\"b\":{\"x_min\":0,\"x_max\":685,\"ha\":783,\"o\":\"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 \"},\"q\":{\"x_min\":0,\"x_max\":683,\"ha\":876,\"o\":\"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 \"},\"Ω\":{\"x_min\":-0.171875,\"x_max\":969.5625,\"ha\":1068,\"o\":\"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 \"},\"ύ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 \"},\"z\":{\"x_min\":-0.015625,\"x_max\":613.890625,\"ha\":697,\"o\":\"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 \"},\"™\":{\"x_min\":0,\"x_max\":894,\"ha\":1000,\"o\":\"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 \"},\"ή\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 \"},\"Θ\":{\"x_min\":0,\"x_max\":960,\"ha\":1056,\"o\":\"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 \"},\"®\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 \"},\"~\":{\"x_min\":0,\"x_max\":833,\"ha\":931,\"o\":\"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 \"},\"Ε\":{\"x_min\":0,\"x_max\":736.21875,\"ha\":778,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"³\":{\"x_min\":0,\"x_max\":450,\"ha\":547,\"o\":\"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 \"},\"[\":{\"x_min\":0,\"x_max\":273.609375,\"ha\":371,\"o\":\"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 \"},\"L\":{\"x_min\":0,\"x_max\":645.828125,\"ha\":696,\"o\":\"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 \"},\"σ\":{\"x_min\":0,\"x_max\":803.390625,\"ha\":894,\"o\":\"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 \"},\"ζ\":{\"x_min\":0,\"x_max\":573,\"ha\":642,\"o\":\"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 \"},\"θ\":{\"x_min\":0,\"x_max\":674,\"ha\":778,\"o\":\"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 \"},\"Ο\":{\"x_min\":0,\"x_max\":958,\"ha\":1054,\"o\":\"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 \"},\"Γ\":{\"x_min\":0,\"x_max\":705.28125,\"ha\":749,\"o\":\"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 \"},\" \":{\"x_min\":0,\"x_max\":0,\"ha\":375},\"%\":{\"x_min\":-3,\"x_max\":1089,\"ha\":1186,\"o\":\"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 \"},\"P\":{\"x_min\":0,\"x_max\":726,\"ha\":806,\"o\":\"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 \"},\"Έ\":{\"x_min\":0,\"x_max\":1078.21875,\"ha\":1118,\"o\":\"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"Ώ\":{\"x_min\":0.125,\"x_max\":1136.546875,\"ha\":1235,\"o\":\"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 \"},\"_\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 \"},\"Ϊ\":{\"x_min\":-110,\"x_max\":246,\"ha\":275,\"o\":\"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 \"},\"+\":{\"x_min\":23,\"x_max\":768,\"ha\":792,\"o\":\"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 \"},\"½\":{\"x_min\":0,\"x_max\":1050,\"ha\":1149,\"o\":\"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 \"},\"Ρ\":{\"x_min\":0,\"x_max\":720,\"ha\":783,\"o\":\"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 \"},\"'\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"ª\":{\"x_min\":0,\"x_max\":350,\"ha\":397,\"o\":\"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 \"},\"΅\":{\"x_min\":0,\"x_max\":450,\"ha\":553,\"o\":\"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 \"},\"T\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 \"},\"Φ\":{\"x_min\":0,\"x_max\":915,\"ha\":997,\"o\":\"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 \"},\"⁋\":{\"x_min\":0,\"x_max\":0,\"ha\":694},\"j\":{\"x_min\":-77.78125,\"x_max\":167,\"ha\":349,\"o\":\"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 \"},\"Σ\":{\"x_min\":0,\"x_max\":756.953125,\"ha\":819,\"o\":\"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 \"},\"1\":{\"x_min\":215.671875,\"x_max\":574,\"ha\":792,\"o\":\"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 \"},\"›\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"<\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"£\":{\"x_min\":0,\"x_max\":704.484375,\"ha\":801,\"o\":\"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 \"},\"t\":{\"x_min\":0,\"x_max\":367,\"ha\":458,\"o\":\"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 \"},\"¬\":{\"x_min\":0,\"x_max\":706,\"ha\":803,\"o\":\"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 \"},\"λ\":{\"x_min\":0,\"x_max\":750,\"ha\":803,\"o\":\"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 \"},\"W\":{\"x_min\":0,\"x_max\":1263.890625,\"ha\":1351,\"o\":\"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 \"},\">\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"v\":{\"x_min\":0,\"x_max\":675.15625,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 \"},\"τ\":{\"x_min\":0.28125,\"x_max\":644.5,\"ha\":703,\"o\":\"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 \"},\"ξ\":{\"x_min\":0,\"x_max\":624.9375,\"ha\":699,\"o\":\"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 \"},\"&\":{\"x_min\":-3,\"x_max\":894.25,\"ha\":992,\"o\":\"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 \"},\"Λ\":{\"x_min\":0,\"x_max\":862.5,\"ha\":942,\"o\":\"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 \"},\"I\":{\"x_min\":41,\"x_max\":180,\"ha\":293,\"o\":\"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 \"},\"G\":{\"x_min\":0,\"x_max\":921,\"ha\":1011,\"o\":\"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 \"},\"ΰ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 \"},\"`\":{\"x_min\":0,\"x_max\":138.890625,\"ha\":236,\"o\":\"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 \"},\"·\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"Υ\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 \"},\"r\":{\"x_min\":0,\"x_max\":355.5625,\"ha\":432,\"o\":\"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 \"},\"x\":{\"x_min\":0,\"x_max\":675,\"ha\":764,\"o\":\"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 \"},\"μ\":{\"x_min\":0,\"x_max\":696.609375,\"ha\":747,\"o\":\"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 \"},\"h\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 \"},\".\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"φ\":{\"x_min\":-2,\"x_max\":878,\"ha\":974,\"o\":\"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 \"},\";\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"f\":{\"x_min\":0,\"x_max\":378,\"ha\":472,\"o\":\"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 \"},\"“\":{\"x_min\":1,\"x_max\":348.21875,\"ha\":454,\"o\":\"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 \"},\"A\":{\"x_min\":0.03125,\"x_max\":906.953125,\"ha\":1008,\"o\":\"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 \"},\"6\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 \"},\"‘\":{\"x_min\":1,\"x_max\":139.890625,\"ha\":236,\"o\":\"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 \"},\"ϊ\":{\"x_min\":-70,\"x_max\":283,\"ha\":361,\"o\":\"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 \"},\"π\":{\"x_min\":-0.21875,\"x_max\":773.21875,\"ha\":857,\"o\":\"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 \"},\"ά\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 \"},\"O\":{\"x_min\":0,\"x_max\":958,\"ha\":1057,\"o\":\"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 \"},\"n\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 \"},\"3\":{\"x_min\":54,\"x_max\":737,\"ha\":792,\"o\":\"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 \"},\"9\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 \"},\"l\":{\"x_min\":41,\"x_max\":166,\"ha\":279,\"o\":\"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 \"},\"¤\":{\"x_min\":40.09375,\"x_max\":728.796875,\"ha\":825,\"o\":\"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 \"},\"κ\":{\"x_min\":0,\"x_max\":632.328125,\"ha\":679,\"o\":\"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 \"},\"4\":{\"x_min\":48,\"x_max\":742.453125,\"ha\":792,\"o\":\"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 \"},\"p\":{\"x_min\":0,\"x_max\":685,\"ha\":786,\"o\":\"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 \"},\"‡\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 \"},\"ψ\":{\"x_min\":0,\"x_max\":808,\"ha\":907,\"o\":\"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 \"},\"η\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 \"}},\"cssFontWeight\":\"normal\",\"ascender\":1189,\"underlinePosition\":-100,\"cssFontStyle\":\"normal\",\"boundingBox\":{\"yMin\":-334,\"xMin\":-111,\"yMax\":1189,\"xMax\":1672},\"resolution\":1000,\"original_font_information\":{\"postscript_name\":\"Helvetiker-Regular\",\"version_string\":\"Version 1.00 2004 initial release\",\"vendor_url\":\"http://www.magenta.gr/\",\"full_font_name\":\"Helvetiker\",\"font_family_name\":\"Helvetiker\",\"copyright\":\"Copyright (c) Μagenta ltd, 2004\",\"description\":\"\",\"trademark\":\"\",\"designer\":\"\",\"designer_url\":\"\",\"unique_font_identifier\":\"Μagenta ltd:Helvetiker:22-10-104\",\"license_url\":\"http://www.ellak.gr/fonts/MgOpen/license.html\",\"license_description\":\"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\\r\\n\\r\\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\\\"Fonts\\\") and associated documentation files (the \\\"Font Software\\\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \\r\\n\\r\\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\\r\\n\\r\\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \\\"MgOpen\\\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\\r\\n\\r\\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \\\"MgOpen\\\" name.\\r\\n\\r\\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \\r\\n\\r\\nTHE FONT SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.\",\"manufacturer_name\":\"Μagenta ltd\",\"font_sub_family_name\":\"Regular\"},\"descender\":-334,\"familyName\":\"Helvetiker\",\"lineHeight\":1522,\"underlineThickness\":50}","export class Greek {\n public static uppercaseHeta = \"\\u{0370}\";\n public static lowercaseHeta = \"\\u{0371}\";\n public static uppercaseArchaicSampi = \"\\u{0372}\";\n public static lowercaseArchaicSampi = \"\\u{0373}\";\n public static numeralSign = \"\\u{0374}\";\n public static lowerNumeralSign = \"\\u{0375}\";\n public static uppercasePamphylianDigamma = \"\\u{0376}\";\n public static lowercasePamphylianDigamma = \"\\u{0377}\";\n public static ypogegrammeni = \"\\u{037A}\";\n public static smallReversedLunateSigmaSymbol = \"\\u{037B}\";\n public static smallDottedLunateSigmaSymbol = \"\\u{037C}\";\n public static smallReversedDottedLunateSigmaSymbol = \"\\u{037D}\";\n public static questionMark = \"\\u{037E}\";\n public static uppercaseYot = \"\\u{037F}\";\n public static acuteaccent = \"\\u{0384}\";\n public static diaeresiswithacuteaccent = \"\\u{0385}\";\n public static uppercaseAwithacuteaccent = \"\\u{0386}\";\n public static anoTeleia = \"\\u{0387}\";\n public static uppercaseEpsilonwithacuteaccent = \"\\u{0388}\";\n public static uppercaseEtawithacuteaccent = \"\\u{0389}\";\n public static uppercaseIotawithacuteaccent = \"\\u{038A}\";\n public static uppercaseOmicronwithacuteaccent = \"\\u{038C}\";\n public static uppercaseUpsilonwithacuteaccent = \"\\u{038E}\";\n public static uppercaseOmegawithacuteaccent = \"\\u{038F}\";\n public static lowercaseIotawithdiaeresisandacuteaccent = \"\\u{0390}\";\n public static uppercaseAlpha = \"\\u{0391}\";\n public static uppercaseBeta = \"\\u{0392}\";\n public static uppercaseGamma = \"\\u{0393}\";\n public static uppercaseDelta = \"\\u{0394}\";\n public static uppercaseEpsilon = \"\\u{0395}\";\n public static uppercaseZeta = \"\\u{0396}\";\n public static uppercaseEta = \"\\u{0397}\";\n public static uppercaseTheta = \"\\u{0398}\";\n public static uppercaseIota = \"\\u{0399}\";\n public static uppercaseKappa = \"\\u{039A}\";\n public static uppercaseLambda = \"\\u{039B}\";\n public static uppercaseMu = \"\\u{039C}\";\n public static uppercaseNu = \"\\u{039D}\";\n public static uppercaseXi = \"\\u{039E}\";\n public static uppercaseOmicron = \"\\u{039F}\";\n public static uppercasePi = \"\\u{03A0}\";\n public static uppercaseRho = \"\\u{03A1}\";\n public static uppercaseSigma = \"\\u{03A3}\";\n public static uppercaseTau = \"\\u{03A4}\";\n public static uppercaseUpsilon = \"\\u{03A5}\";\n public static uppercasePhi = \"\\u{03A6}\";\n public static uppercaseChi = \"\\u{03A7}\";\n public static uppercasePsi = \"\\u{03A8}\";\n public static uppercaseOmega = \"\\u{03A9}\";\n public static uppercaseIotawithdiaeresis = \"\\u{03AA}\";\n public static uppercaseUpsilonwithdiaeresis = \"\\u{03AB}\";\n public static lowercaseAlphawithacuteaccent = \"\\u{03AC}\";\n public static lowercaseEpsilonwithacuteaccent = \"\\u{03AD}\";\n public static lowercaseEtawithacuteaccent = \"\\u{03AE}\";\n public static lowercaseIotawithacuteaccent = \"\\u{03AF}\";\n public static lowercaseUpsilonwithdiaeresisandacuteaccent = \"\\u{03B0}\";\n public static lowercaseAlpha = \"\\u{03B1}\";\n public static lowercaseBeta = \"\\u{03B2}\";\n public static lowercaseGamma = \"\\u{03B3}\";\n public static lowercaseDelta = \"\\u{03B4}\";\n public static lowercaseEpsilon = \"\\u{03B5}\";\n public static lowercaseZeta = \"\\u{03B6}\";\n public static lowercaseEta = \"\\u{03B7}\";\n public static lowercaseTheta = \"\\u{03B8}\";\n public static lowercaseIota = \"\\u{03B9}\";\n public static lowercaseKappa = \"\\u{03BA}\";\n public static lowercaseLambda = \"\\u{03BB}\";\n public static lowercaseMu = \"\\u{03BC}\";\n public static lowercaseNu = \"\\u{03BD}\";\n public static lowercaseXi = \"\\u{03BE}\";\n public static lowercaseOmicron = \"\\u{03BF}\";\n public static lowercasePi = \"\\u{03C0}\";\n public static lowercaseRho = \"\\u{03C1}\";\n public static lowercaseFinalSigma = \"\\u{03C2}\";\n public static lowercaseSigma = \"\\u{03C3}\";\n public static lowercaseTau = \"\\u{03C4}\";\n public static lowercaseUpsilon = \"\\u{03C5}\";\n public static lowercasePhi = \"\\u{03C6}\";\n public static lowercaseChi = \"\\u{03C7}\";\n public static lowercasePsi = \"\\u{03C8}\";\n public static lowercaseOmega = \"\\u{03C9}\";\n public static lowercaseIotawithdiaeresis = \"\\u{03CA}\";\n public static lowercaseUpsilonwithdiaeresis = \"\\u{03CB}\";\n public static lowercaseOmicronwithacuteaccent = \"\\u{03CC}\";\n public static lowercaseUpsilonwithacuteaccent = \"\\u{03CD}\";\n public static lowercaseOmegawithacuteaccent = \"\\u{03CE}\";\n public static uppercaseKaiSymbol = \"\\u{03CF}\";\n public static betaSymbol = \"\\u{03D0}\";\n public static thetaSymbol = \"\\u{03D1}\";\n public static upsilonwithhookSymbol = \"\\u{03D2}\";\n public static upsilonwithacuteandhookSymbol = \"\\u{03D3}\";\n public static upsilonwithdiaeresisandhookSymbol = \"\\u{03D4}\";\n public static phiSymbol = \"\\u{03D5}\";\n public static piSymbol = \"\\u{03D6}\";\n public static kaiSymbol = \"\\u{03D7}\";\n public static letterQoppa = \"\\u{03D8}\";\n public static lowercaseQoppa = \"\\u{03D9}\";\n public static letterStigma = \"\\u{03DA}\";\n public static lowercaseStigma = \"\\u{03DB}\";\n public static letterDigamma = \"\\u{03DC}\";\n public static lowercaseDigamma = \"\\u{03DD}\";\n public static letterKoppa = \"\\u{03DE}\";\n public static lowercaseKoppa = \"\\u{03DF}\";\n public static letterSampi = \"\\u{03E0}\";\n public static lowercaseSampi = \"\\u{03E1}\";\n public static copticuppercaseShei = \"\\u{03E2}\";\n public static copticlowercaseShei = \"\\u{03E3}\";\n public static copticuppercaseFei = \"\\u{03E4}\";\n public static copticlowercaseFei = \"\\u{03E5}\";\n public static copticuppercaseKhei = \"\\u{03E6}\";\n public static copticlowercaseKhei = \"\\u{03E7}\";\n public static copticuppercaseHori = \"\\u{03E8}\";\n public static copticlowercaseHori = \"\\u{03E9}\";\n public static copticuppercaseGangia = \"\\u{03EA}\";\n public static copticlowercaseGangia = \"\\u{03EB}\";\n public static copticuppercaseShima = \"\\u{03EC}\";\n public static copticlowercaseShima = \"\\u{03ED}\";\n public static copticuppercaseDei = \"\\u{03EE}\";\n public static copticlowercaseDei = \"\\u{03EF}\";\n public static kappaSymbol = \"\\u{03F0}\";\n public static rhoSymbol = \"\\u{03F1}\";\n public static lunateSigmaSymbol = \"\\u{03F2}\";\n public static letterYot = \"\\u{03F3}\";\n public static uppercaseThetaSymbol = \"\\u{03F4}\";\n public static lunateEpsilonSymbol = \"\\u{03F5}\";\n public static reversedLunateEpsilonSymbol = \"\\u{03F6}\";\n public static uppercaseSho = \"\\u{03F7}\";\n public static lowercaseSho = \"\\u{03F8}\";\n public static uppercaseLunateSigmaSymbol = \"\\u{03F9}\";\n public static uppercaseSan = \"\\u{03FA}\";\n public static lowercaseSan = \"\\u{03FB}\";\n public static rhowithstrokeSymbol = \"\\u{03FC}\";\n public static uppercaseReversedLunateSigmaSymbol = \"\\u{03FD}\";\n public static uppercaseDottedLunateSigmaSymbol = \"\\u{03FE}\";\n public static uppercaseReversedDottedLunateSigmaSymbol = \"\\u{03FF}\";\n}\n","import { Vector3 } from \"three\";\n\nexport const getRandomPoints = (n = 100, scale = 10): Vector3[] => {\n const points: Vector3[] = [];\n for (let index = 0; index < n; index++) {\n const x = Math.random() * scale;\n const y = Math.random() * scale;\n const z = Math.random() * scale;\n\n points.push(new Vector3(x, y, z));\n }\n\n return points;\n};\n"],"names":["$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$ilwiq","$06989a4a8159123e$export$60bbd10bdffb2e81","i","Vector3","j","k","JSON","parse","$c6f6e730d515f156$export$a1a1936bf656b97b","_","uppercaseHeta","_1","lowercaseHeta","_2","uppercaseArchaicSampi","_3","lowercaseArchaicSampi","_4","numeralSign","_5","lowerNumeralSign","_6","uppercasePamphylianDigamma","_7","lowercasePamphylianDigamma","_8","ypogegrammeni","_9","smallReversedLunateSigmaSymbol","_10","smallDottedLunateSigmaSymbol","_11","smallReversedDottedLunateSigmaSymbol","_12","questionMark","_13","uppercaseYot","_14","acuteaccent","_15","diaeresiswithacuteaccent","_16","uppercaseAwithacuteaccent","_17","anoTeleia","_18","uppercaseEpsilonwithacuteaccent","_19","uppercaseEtawithacuteaccent","_20","uppercaseIotawithacuteaccent","_21","uppercaseOmicronwithacuteaccent","_22","uppercaseUpsilonwithacuteaccent","_23","uppercaseOmegawithacuteaccent","_24","lowercaseIotawithdiaeresisandacuteaccent","_25","uppercaseAlpha","_26","uppercaseBeta","_27","uppercaseGamma","_28","uppercaseDelta","_29","uppercaseEpsilon","_30","uppercaseZeta","_31","uppercaseEta","_32","uppercaseTheta","_33","uppercaseIota","_34","uppercaseKappa","_35","uppercaseLambda","_36","uppercaseMu","_37","uppercaseNu","_38","uppercaseXi","_39","uppercaseOmicron","_40","uppercasePi","_41","uppercaseRho","_42","uppercaseSigma","_43","uppercaseTau","_44","uppercaseUpsilon","_45","uppercasePhi","_46","uppercaseChi","_47","uppercasePsi","_48","uppercaseOmega","_49","uppercaseIotawithdiaeresis","_50","uppercaseUpsilonwithdiaeresis","_51","lowercaseAlphawithacuteaccent","_52","lowercaseEpsilonwithacuteaccent","_53","lowercaseEtawithacuteaccent","_54","lowercaseIotawithacuteaccent","_55","lowercaseUpsilonwithdiaeresisandacuteaccent","_56","lowercaseAlpha","_57","lowercaseBeta","_58","lowercaseGamma","_59","lowercaseDelta","_60","lowercaseEpsilon","_61","lowercaseZeta","_62","lowercaseEta","_63","lowercaseTheta","_64","lowercaseIota","_65","lowercaseKappa","_66","lowercaseLambda","_67","lowercaseMu","_68","lowercaseNu","_69","lowercaseXi","_70","lowercaseOmicron","_71","lowercasePi","_72","lowercaseRho","_73","lowercaseFinalSigma","_74","lowercaseSigma","_75","lowercaseTau","_76","lowercaseUpsilon","_77","lowercasePhi","_78","lowercaseChi","_79","lowercasePsi","_80","lowercaseOmega","_81","lowercaseIotawithdiaeresis","_82","lowercaseUpsilonwithdiaeresis","_83","lowercaseOmicronwithacuteaccent","_84","lowercaseUpsilonwithacuteaccent","_85","lowercaseOmegawithacuteaccent","_86","uppercaseKaiSymbol","_87","betaSymbol","_88","thetaSymbol","_89","upsilonwithhookSymbol","_90","upsilonwithacuteandhookSymbol","_91","upsilonwithdiaeresisandhookSymbol","_92","phiSymbol","_93","piSymbol","_94","kaiSymbol","_95","letterQoppa","_96","lowercaseQoppa","_97","letterStigma","_98","lowercaseStigma","_99","letterDigamma","_100","lowercaseDigamma","_101","letterKoppa","_102","lowercaseKoppa","_103","letterSampi","_104","lowercaseSampi","_105","copticuppercaseShei","_106","copticlowercaseShei","_107","copticuppercaseFei","_108","copticlowercaseFei","_109","copticuppercaseKhei","_110","copticlowercaseKhei","_111","copticuppercaseHori","_112","copticlowercaseHori","_113","copticuppercaseGangia","_114","copticlowercaseGangia","_115","copticuppercaseShima","_116","copticlowercaseShima","_117","copticuppercaseDei","_118","copticlowercaseDei","_119","kappaSymbol","_120","rhoSymbol","_121","lunateSigmaSymbol","_122","letterYot","_123","uppercaseThetaSymbol","_124","lunateEpsilonSymbol","_125","reversedLunateEpsilonSymbol","_126","uppercaseSho","_127","lowercaseSho","_128","uppercaseLunateSigmaSymbol","_129","uppercaseSan","_130","lowercaseSan","_131","rhowithstrokeSymbol","_132","uppercaseReversedLunateSigmaSymbol","_133","uppercaseDottedLunateSigmaSymbol","_134","uppercaseReversedDottedLunateSigmaSymbol"],"version":3,"file":"index.f9a4f1dc.js.map"} \ No newline at end of file +{"mappings":"A,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,S,E,S,I,E,E,SGEO,MAAM,EAAa,CACxB,EAAG,IAAI,EAAA,OAAM,CAAE,EAAG,EAAG,GACrB,EAAG,IAAI,EAAA,OAAM,CAAE,EAAG,EAAG,GACrB,EAAG,IAAI,EAAA,OAAM,CAAE,EAAG,EAAG,EACvB,CAGgB,CAAA,EAAW,CAAC,CAAa,EAAW,CAAC,CAAK,EAAW,CAAC,CACtD,EAAW,CAAC,CAAa,EAAW,CAAC,CAAK,EAAW,CAAC,CACtD,EAAW,CAAC,CAAa,EAAW,CAAC,CAAK,EAAW,CAAC,C,I,G,E,S,E,S,E,U,E,S,E,S,E,SMXrD,KAAK,KAAK,CAAC,kn7DCArB,OAAM,EACG,OAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,8BAAA,CAAiC,GAAjC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,4BAAA,CAA+B,GAA/B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,oCAAA,CAAuC,GAAvC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,wBAAA,CAA2B,GAA3B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,yBAAA,CAA4B,GAA5B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,2BAAA,CAA8B,GAA9B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,4BAAA,CAA+B,GAA/B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,wCAAA,CAA2C,GAA3C,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,eAAA,CAAkB,GAAlB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,CAAA,CAAA,IAAA,CAAA,2BAAA,CAA8B,GAA9B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,4BAAA,CAA+B,GAA/B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,2CAAA,CAA8C,GAA9C,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAkB,GAAlB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,+BAAA,CAAkC,GAAlC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,UAAA,CAAa,GAAb,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,6BAAA,CAAgC,GAAhC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,iCAAA,CAAoC,GAApC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,QAAA,CAAW,GAAX,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAkB,GAAlB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAgB,GAAhB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAmB,GAAnB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,cAAA,CAAiB,GAAjB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,qBAAA,CAAwB,GAAxB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,oBAAA,CAAuB,GAAvB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,oBAAA,CAAuB,GAAvB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kBAAA,CAAqB,GAArB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,WAAA,CAAc,GAAd,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,iBAAA,CAAoB,GAApB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,SAAA,CAAY,GAAZ,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,oBAAA,CAAuB,GAAvB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,2BAAA,CAA8B,GAA9B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,0BAAA,CAA6B,GAA7B,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,YAAA,CAAe,GAAf,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,mBAAA,CAAsB,GAAtB,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,kCAAA,CAAqC,GAArC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gCAAA,CAAmC,GAAnC,AACA,QAAA,CAAA,EAAA,CAAA,IAAA,CAAA,wCAAA,CAA2C,GAA3C,AAChB,C,I,E,E","sources":["","src/index.ts","src/frame.ts","src/axes.ts","src/plots/scatterplot.ts","src/plot.ts","src/plots/vectorplot.ts","src/plots/vectorplot.config.ts","src/label.ts","src/fonts/helvetiker_regular.typeface.json","src/greek.ts","src/data.ts"],"sourcesContent":["\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire9513\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire9513\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\nvar $5Rd1x = parcelRequire(\"5Rd1x\");\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nconst $06989a4a8159123e$export$60bbd10bdffb2e81 = {\n i: new (0, $ilwiq.Vector3)(1, 0, 0),\n j: new (0, $ilwiq.Vector3)(0, 1, 0),\n k: new (0, $ilwiq.Vector3)(0, 0, 1)\n};\nconst $06989a4a8159123e$export$f882155fad14bf27 = {\n xy: {\n normal: $06989a4a8159123e$export$60bbd10bdffb2e81.k,\n unit: {\n x: $06989a4a8159123e$export$60bbd10bdffb2e81.i,\n y: $06989a4a8159123e$export$60bbd10bdffb2e81.j\n }\n },\n xz: {\n normal: $06989a4a8159123e$export$60bbd10bdffb2e81.j,\n unit: {\n x: $06989a4a8159123e$export$60bbd10bdffb2e81.i,\n z: $06989a4a8159123e$export$60bbd10bdffb2e81.k\n }\n },\n yz: {\n normal: $06989a4a8159123e$export$60bbd10bdffb2e81.i,\n unit: {\n y: $06989a4a8159123e$export$60bbd10bdffb2e81.j,\n z: $06989a4a8159123e$export$60bbd10bdffb2e81.k\n }\n }\n};\nclass $06989a4a8159123e$var$Axis extends (0, $ilwiq.ArrowHelper) {\n constructor(direction, length){\n super(direction, new (0, $ilwiq.Vector3)(0, 0, 0), length);\n }\n}\nclass $06989a4a8159123e$export$387a78ab20784494 {\n constructor(lengthX, lengthY, lengthZ){\n this.lengthX = lengthX;\n this.lengthY = lengthY;\n this.lengthZ = lengthZ;\n this.x = new $06989a4a8159123e$var$Axis(new (0, $ilwiq.Vector3)(1, 0, 0), this.lengthX * 1.1);\n this.y = new $06989a4a8159123e$var$Axis(new (0, $ilwiq.Vector3)(0, 1, 0), this.lengthY * 1.1);\n this.z = new $06989a4a8159123e$var$Axis(new (0, $ilwiq.Vector3)(0, 0, 1), this.lengthZ * 1.1);\n this.setGrids();\n }\n setGrids() {\n this.gridXZ = new (0, $ilwiq.GridHelper)(Math.max(this.lengthX, this.lengthZ));\n this.gridXZ.position.setX(this.lengthX / 2);\n this.gridXZ.position.setZ(this.lengthZ / 2);\n this.gridXY = new (0, $ilwiq.GridHelper)(Math.max(this.lengthX, this.lengthY));\n this.gridXY.position.setX(this.lengthX / 2);\n this.gridXY.position.setY(this.lengthY / 2);\n this.gridXY.rotateOnAxis(new (0, $ilwiq.Vector3)(1, 0, 0), Math.PI / 2);\n this.gridYZ = new (0, $ilwiq.GridHelper)(Math.max(this.lengthY, this.lengthZ));\n this.gridYZ.position.setY(this.lengthY / 2);\n this.gridYZ.position.setZ(this.lengthZ / 2);\n this.gridYZ.rotateOnAxis(new (0, $ilwiq.Vector3)(0, 0, 1), Math.PI / 2);\n }\n}\n\n\nclass $f5cd7ec90b5fdafd$export$b89a827e9254211a extends (0, $ilwiq.Scene) {\n // TODO: at the moment only one size bc grid can only be squared\n // look into this for solution https://discourse.threejs.org/t/rectangular-gridhelper-possibility/37812\n constructor(canvas, size = 10){\n super();\n this.canvas = canvas;\n this.size = size;\n this.observer = new ResizeObserver(()=>this.update());\n this.scene = new (0, $ilwiq.Scene)();\n this.scene.background = new (0, $ilwiq.Color)(0xffffff);\n const { clientWidth: clientWidth, clientHeight: clientHeight } = canvas;\n this.renderer = new (0, $ilwiq.WebGLRenderer)({\n canvas: canvas\n });\n this.renderer.setSize(clientWidth, clientHeight);\n this.setCamera(clientWidth, clientHeight);\n this.setControls();\n this.setAxes();\n this.updateOnChanges();\n this.update();\n }\n setCamera(width, height) {\n this.camera = new (0, $ilwiq.PerspectiveCamera)(45, width / height, 0.1, 1000);\n this.camera.position.set(this.size * 2, this.size * 2, this.size * 2);\n this.scene.add(this.camera);\n }\n setControls() {\n this.controls = new (0, $5Rd1x.OrbitControls)(this.camera, this.canvas);\n this.controls.target.set(0, 0, 0);\n }\n setAxes() {\n this.axes = new (0, $06989a4a8159123e$export$387a78ab20784494)(this.size, this.size, this.size);\n this.scene.add(this.axes.x);\n this.scene.add(this.axes.y);\n this.scene.add(this.axes.z);\n this.scene.add(this.axes.gridXY);\n this.scene.add(this.axes.gridXZ);\n this.scene.add(this.axes.gridYZ);\n }\n updateOnChanges() {\n this.controls.addEventListener(\"change\", ()=>this.update());\n this.observer.observe(this.canvas);\n }\n update() {\n this.renderer.render(this.scene, this.camera);\n }\n capture() {\n const base64 = this.canvas.toDataURL(\"img/png\");\n }\n addPlot(plot) {\n this.scene.add(...plot.getFrameable());\n this.update();\n }\n async addFallbackLabel(text) {\n this.scene.add(...text.getFrameable());\n this.update();\n }\n async addLabel(text) {\n this.scene.add(...text.getFrameable());\n text.text.addEventListener(\"synccomplete\", ()=>{\n this.update();\n });\n }\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nclass $fc905a1390663dee$export$c78ca4d5ae878870 {\n}\n\n\nclass $21cbcb5ddd734726$export$eec270bd176da5f5 extends (0, $fc905a1390663dee$export$c78ca4d5ae878870) {\n constructor(points, pointRadius = 0.2){\n super();\n this.points = points.map((v)=>{\n const geometry = new (0, $ilwiq.SphereGeometry)(pointRadius);\n const material = new (0, $ilwiq.MeshBasicMaterial)({\n color: 0x00ff00\n });\n const obj = new (0, $ilwiq.Mesh)(geometry, material);\n obj.position.set(v.x, v.y, v.z);\n return obj;\n });\n }\n getFrameable() {\n return this.points;\n }\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\n\nclass $de8a88f7be6904e3$export$4d0e403091b9214b {\n constructor(config){\n const { angle: angle, color: color, xy: xy, xz: xz, yz: yz } = config;\n this.setColorOrDefault(color);\n if (angle) this.setAngle(angle);\n if (xy) this.xy = new $de8a88f7be6904e3$export$5b78d04890b6d2a8(xy);\n if (xz) this.xz = new $de8a88f7be6904e3$export$5b78d04890b6d2a8(xz);\n if (yz) this.xz = new $de8a88f7be6904e3$export$5b78d04890b6d2a8(yz);\n }\n setColorOrDefault(colorHex) {\n colorHex = colorHex || 0x000000;\n this.color = colorHex;\n }\n setAngle(angle) {\n this.angle = angle === true ? {\n color: 0x000000\n } : angle;\n }\n}\nclass $de8a88f7be6904e3$export$5b78d04890b6d2a8 {\n constructor(plane){\n plane = plane === true ? {\n projection: true,\n component: true,\n projectionAngle: true\n } : plane;\n const { component: component, projection: projection, projectionAngle: projectionAngle } = plane;\n if (projection) this.setProjection(projection);\n if (component) this.setComponent(component);\n if (projectionAngle) this.setProjectionAngle(projectionAngle);\n }\n setProjection(projection) {\n this.projection = projection === true ? $de8a88f7be6904e3$var$defaultDashedLine : projection;\n }\n setComponent(component) {\n this.component = component === true ? $de8a88f7be6904e3$var$defaultDashedLine : component;\n }\n setProjectionAngle(projectionAngle) {\n this.projectionAngle = projectionAngle === true ? $de8a88f7be6904e3$var$defaultDashedLine : projectionAngle;\n }\n}\nconst $de8a88f7be6904e3$var$defaultDashedLine = {\n linetype: \"dashed\",\n linestyle: {\n color: 0x000000,\n linewidth: 1,\n scale: 1,\n dashSize: 0.25,\n gapSize: 0.1\n }\n};\n\n\nclass $7e14f190bf05e5b8$export$cb49ab3f965133d4 extends (0, $fc905a1390663dee$export$c78ca4d5ae878870) {\n constructor(origin, target, config){\n super();\n this.origin = origin;\n this.target = target;\n this.config = new (0, $de8a88f7be6904e3$export$4d0e403091b9214b)(config);\n this.drawables = [];\n this.drawables.push(this.createVector(origin, target));\n for(const p in 0, $06989a4a8159123e$export$f882155fad14bf27){\n const plane = p;\n const conf = this.config[plane];\n if (conf?.projection) this.drawables.push(this.createProjection(plane));\n if (conf?.component) this.drawables.push(this.createComponent(plane));\n if (conf?.projectionAngle) this.drawables.push(this.createAngleToProjection(plane));\n }\n if (this.config.angle) this.drawables.push(this.createAngleToTarget(\"y\"));\n }\n createVector(origin, target) {\n const length = Math.abs(origin.distanceTo(target));\n return new (0, $ilwiq.ArrowHelper)(target.clone().normalize(), origin, length, this.config.color, length * 0.2, length * 0.1);\n }\n createAngleToProjection(planeIdx) {\n const plane = (0, $06989a4a8159123e$export$f882155fad14bf27)[planeIdx];\n const planeNormal = plane.normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const radius = projectedVector.distanceTo(this.origin) * 0.5;\n let initialRotation = 0;\n let angleToProjection = projectedVector.angleTo((0, $06989a4a8159123e$export$60bbd10bdffb2e81).i);\n if (planeIdx === \"xz\") {\n initialRotation = -Math.PI / 2;\n angleToProjection = projectedVector.angleTo((0, $06989a4a8159123e$export$60bbd10bdffb2e81).k);\n }\n if (planeIdx === \"yz\") {\n initialRotation = Math.PI / 2;\n angleToProjection = projectedVector.angleTo((0, $06989a4a8159123e$export$60bbd10bdffb2e81).j);\n }\n const curve = new (0, $ilwiq.EllipseCurve)(this.origin.x, this.origin.y, radius, radius, 0, angleToProjection, false, initialRotation);\n const material = new (0, $ilwiq.LineBasicMaterial)({\n color: 0x000000\n });\n const geometry = new (0, $ilwiq.BufferGeometry)().setFromPoints(curve.getPoints(50));\n const rotation = new (0, $ilwiq.Quaternion)().setFromUnitVectors((0, $06989a4a8159123e$export$60bbd10bdffb2e81).k, plane.normal);\n geometry.applyQuaternion(rotation);\n return new (0, $ilwiq.Line)(geometry, material);\n }\n createAngleToTarget(axis) {\n const radius = this.target.clone().distanceTo(this.origin);\n const projectedVector = this.target.clone().projectOnPlane((0, $06989a4a8159123e$export$60bbd10bdffb2e81).j);\n const curve = new (0, $ilwiq.EllipseCurve)(this.origin.x, this.origin.y, radius, radius, 0, this.target.angleTo(projectedVector), false, 0);\n const material = new (0, $ilwiq.LineBasicMaterial)(this.config.angle);\n const geometry = new (0, $ilwiq.BufferGeometry)().setFromPoints(curve.getPoints(50));\n geometry.applyQuaternion(new (0, $ilwiq.Quaternion)().setFromAxisAngle((0, $06989a4a8159123e$export$60bbd10bdffb2e81).j, -(0, $06989a4a8159123e$export$60bbd10bdffb2e81).i.angleTo(projectedVector)));\n return new (0, $ilwiq.Line)(geometry, material);\n }\n createProjection(plane) {\n const { linetype: linetype, linestyle: linestyle } = this.config[plane].projection;\n const lineMaterialType = linetype === \"dashed\" ? (0, $ilwiq.LineDashedMaterial) : (0, $ilwiq.LineBasicMaterial);\n const lineMaterial = new lineMaterialType(linestyle);\n const planeNormal = (0, $06989a4a8159123e$export$f882155fad14bf27)[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const projectionGeometry = new (0, $ilwiq.BufferGeometry)().setFromPoints([\n projectedVector,\n this.origin\n ]);\n return new (0, $ilwiq.Line)(projectionGeometry, lineMaterial).computeLineDistances();\n }\n createComponent(plane) {\n const { linetype: linetype, linestyle: linestyle } = this.config[plane].component;\n const lineMaterialType = linetype === \"dashed\" ? (0, $ilwiq.LineDashedMaterial) : (0, $ilwiq.LineBasicMaterial);\n const lineMaterial = new lineMaterialType(linestyle);\n const planeNormal = (0, $06989a4a8159123e$export$f882155fad14bf27)[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const connectionGeometry = new (0, $ilwiq.BufferGeometry)().setFromPoints([\n projectedVector,\n this.target\n ]);\n return new (0, $ilwiq.Line)(connectionGeometry, lineMaterial).computeLineDistances();\n }\n getFrameable() {\n return this.drawables;\n }\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\n\nvar $gbdyO = parcelRequire(\"gbdyO\");\n\nvar $eT66s = parcelRequire(\"eT66s\");\n\nvar $8NFZ6 = parcelRequire(\"8NFZ6\");\nvar $5ba80d09f4079c63$exports = {};\n$5ba80d09f4079c63$exports = JSON.parse('{\"glyphs\":{\"0\":{\"x_min\":73,\"x_max\":715,\"ha\":792,\"o\":\"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 \"},\"1\":{\"x_min\":215.671875,\"x_max\":574,\"ha\":792,\"o\":\"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 \"},\"2\":{\"x_min\":59,\"x_max\":731,\"ha\":792,\"o\":\"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 \"},\"3\":{\"x_min\":54,\"x_max\":737,\"ha\":792,\"o\":\"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 \"},\"4\":{\"x_min\":48,\"x_max\":742.453125,\"ha\":792,\"o\":\"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 \"},\"5\":{\"x_min\":54.171875,\"x_max\":738,\"ha\":792,\"o\":\"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 \"},\"6\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 \"},\"7\":{\"x_min\":58.71875,\"x_max\":730.953125,\"ha\":792,\"o\":\"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 \"},\"8\":{\"x_min\":55,\"x_max\":736,\"ha\":792,\"o\":\"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 \"},\"9\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 \"},\"\\u03BF\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 \"},\"S\":{\"x_min\":0,\"x_max\":788,\"ha\":890,\"o\":\"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 \"},\"\\xa6\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"/\":{\"x_min\":183.25,\"x_max\":608.328125,\"ha\":792,\"o\":\"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 \"},\"\\u03A4\":{\"x_min\":-0.4375,\"x_max\":777.453125,\"ha\":839,\"o\":\"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 \"},\"y\":{\"x_min\":0,\"x_max\":684.78125,\"ha\":771,\"o\":\"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 \"},\"\\u03A0\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 \"},\"\\u0390\":{\"x_min\":-111,\"x_max\":339,\"ha\":361,\"o\":\"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 \"},\"g\":{\"x_min\":0,\"x_max\":686,\"ha\":838,\"o\":\"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 \"},\"\\xb2\":{\"x_min\":0,\"x_max\":442,\"ha\":539,\"o\":\"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 \"},\"\\u2013\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\"\\u039A\":{\"x_min\":0,\"x_max\":819.5625,\"ha\":893,\"o\":\"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\"\\u0192\":{\"x_min\":-46.265625,\"x_max\":392,\"ha\":513,\"o\":\"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 \"},\"e\":{\"x_min\":0,\"x_max\":714,\"ha\":813,\"o\":\"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 \"},\"\\u03CC\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 \"},\"J\":{\"x_min\":0,\"x_max\":588,\"ha\":699,\"o\":\"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 \"},\"\\xbb\":{\"x_min\":-1,\"x_max\":503,\"ha\":601,\"o\":\"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 \"},\"\\xa9\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 \"},\"\\u03CE\":{\"x_min\":0,\"x_max\":922,\"ha\":1030,\"o\":\"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 \"},\"^\":{\"x_min\":193.0625,\"x_max\":598.609375,\"ha\":792,\"o\":\"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 \"},\"\\xab\":{\"x_min\":0,\"x_max\":507.203125,\"ha\":604,\"o\":\"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 \"},\"D\":{\"x_min\":0,\"x_max\":828,\"ha\":935,\"o\":\"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 \"},\"\\u2219\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"\\xff\":{\"x_min\":0,\"x_max\":47,\"ha\":125,\"o\":\"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 \"},\"w\":{\"x_min\":0,\"x_max\":1009.71875,\"ha\":1100,\"o\":\"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 \"},\"$\":{\"x_min\":0,\"x_max\":700,\"ha\":793,\"o\":\"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 \"},\"\\\\\\\\\":{\"x_min\":-0.015625,\"x_max\":425.0625,\"ha\":522,\"o\":\"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 \"},\"\\xb5\":{\"x_min\":0,\"x_max\":697.21875,\"ha\":747,\"o\":\"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 \"},\"\\u0399\":{\"x_min\":42,\"x_max\":181,\"ha\":297,\"o\":\"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 \"},\"\\u038E\":{\"x_min\":0,\"x_max\":1144.5,\"ha\":1214,\"o\":\"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u2019\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"\\u039D\":{\"x_min\":0,\"x_max\":801,\"ha\":915,\"o\":\"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 \"},\"-\":{\"x_min\":8.71875,\"x_max\":350.390625,\"ha\":478,\"o\":\"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 \"},\"Q\":{\"x_min\":0,\"x_max\":968,\"ha\":1072,\"o\":\"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 \"},\"\\u03C2\":{\"x_min\":1,\"x_max\":676.28125,\"ha\":740,\"o\":\"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 \"},\"M\":{\"x_min\":0,\"x_max\":954,\"ha\":1067,\"o\":\"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 \"},\"\\u03A8\":{\"x_min\":0,\"x_max\":1006,\"ha\":1094,\"o\":\"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 \"},\"C\":{\"x_min\":0,\"x_max\":886,\"ha\":944,\"o\":\"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 \"},\"!\":{\"x_min\":0,\"x_max\":138,\"ha\":236,\"o\":\"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 \"},\"{\":{\"x_min\":0,\"x_max\":480.5625,\"ha\":578,\"o\":\"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 \"},\"X\":{\"x_min\":-0.015625,\"x_max\":854.15625,\"ha\":940,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 \"},\"#\":{\"x_min\":0,\"x_max\":963.890625,\"ha\":1061,\"o\":\"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 \"},\"\\u03B9\":{\"x_min\":42,\"x_max\":284,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 \"},\"\\u0386\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":982,\"o\":\"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\")\":{\"x_min\":0,\"x_max\":318,\"ha\":415,\"o\":\"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 \"},\"\\u03B5\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 \"},\"\\u0394\":{\"x_min\":0,\"x_max\":952.78125,\"ha\":1028,\"o\":\"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 \"},\"}\":{\"x_min\":0,\"x_max\":481,\"ha\":578,\"o\":\"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 \"},\"\\u2030\":{\"x_min\":-3,\"x_max\":1672,\"ha\":1821,\"o\":\"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 \"},\"a\":{\"x_min\":0,\"x_max\":698.609375,\"ha\":794,\"o\":\"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 \"},\"\\u2014\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":1039,\"o\":\"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 \"},\"=\":{\"x_min\":8.71875,\"x_max\":780.953125,\"ha\":792,\"o\":\"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 \"},\"N\":{\"x_min\":0,\"x_max\":801,\"ha\":914,\"o\":\"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 \"},\"\\u03C1\":{\"x_min\":0,\"x_max\":712,\"ha\":797,\"o\":\"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 \"},\"\\xaf\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":938,\"o\":\"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 \"},\"Z\":{\"x_min\":0,\"x_max\":779,\"ha\":849,\"o\":\"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 \"},\"u\":{\"x_min\":0,\"x_max\":617,\"ha\":729,\"o\":\"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 \"},\"k\":{\"x_min\":0,\"x_max\":612.484375,\"ha\":697,\"o\":\"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 \"},\"\\u0397\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"\\u0391\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":985,\"o\":\"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\"s\":{\"x_min\":0,\"x_max\":604,\"ha\":697,\"o\":\"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 \"},\"B\":{\"x_min\":0,\"x_max\":778,\"ha\":876,\"o\":\"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 \"},\"\\u2026\":{\"x_min\":0,\"x_max\":614,\"ha\":708,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 \"},\"?\":{\"x_min\":0,\"x_max\":607,\"ha\":704,\"o\":\"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 \"},\"H\":{\"x_min\":0,\"x_max\":803,\"ha\":915,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"\\u03BD\":{\"x_min\":0,\"x_max\":675,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 \"},\"c\":{\"x_min\":1,\"x_max\":701.390625,\"ha\":775,\"o\":\"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 \"},\"\\xb6\":{\"x_min\":0,\"x_max\":566.671875,\"ha\":678,\"o\":\"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 \"},\"\\u03B2\":{\"x_min\":0,\"x_max\":660,\"ha\":745,\"o\":\"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 \"},\"\\u039C\":{\"x_min\":0,\"x_max\":954,\"ha\":1068,\"o\":\"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 \"},\"\\u038C\":{\"x_min\":0.109375,\"x_max\":1120,\"ha\":1217,\"o\":\"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u0389\":{\"x_min\":0,\"x_max\":1158,\"ha\":1275,\"o\":\"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u2022\":{\"x_min\":0,\"x_max\":663.890625,\"ha\":775,\"o\":\"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 \"},\"\\xa5\":{\"x_min\":0.1875,\"x_max\":819.546875,\"ha\":886,\"o\":\"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 \"},\"(\":{\"x_min\":0,\"x_max\":318.0625,\"ha\":415,\"o\":\"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 \"},\"U\":{\"x_min\":0,\"x_max\":796,\"ha\":904,\"o\":\"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 \"},\"\\u03B3\":{\"x_min\":0.5,\"x_max\":744.953125,\"ha\":822,\"o\":\"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 \"},\"\\u03B1\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 \"},\"F\":{\"x_min\":0,\"x_max\":683.328125,\"ha\":717,\"o\":\"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 \"},\"\\xad\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\":\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"\\u03A7\":{\"x_min\":0,\"x_max\":854.171875,\"ha\":935,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 \"},\"*\":{\"x_min\":116,\"x_max\":674,\"ha\":792,\"o\":\"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 \"},\"\\u2020\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 \"},\"\\xb0\":{\"x_min\":0,\"x_max\":347,\"ha\":444,\"o\":\"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 \"},\"V\":{\"x_min\":0,\"x_max\":862.71875,\"ha\":940,\"o\":\"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 \"},\"\\u039E\":{\"x_min\":0,\"x_max\":734.71875,\"ha\":763,\"o\":\"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 \"},\"\\xa0\":{\"x_min\":0,\"x_max\":0,\"ha\":853},\"\\u03AB\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 \"},\"\\u201D\":{\"x_min\":0,\"x_max\":347,\"ha\":454,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 \"},\"@\":{\"x_min\":0,\"x_max\":1260,\"ha\":1357,\"o\":\"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 \"},\"\\u038A\":{\"x_min\":0,\"x_max\":499,\"ha\":613,\"o\":\"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 \"},\"i\":{\"x_min\":14,\"x_max\":136,\"ha\":275,\"o\":\"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 \"},\"\\u0392\":{\"x_min\":0,\"x_max\":778,\"ha\":877,\"o\":\"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 \"},\"\\u03C5\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 \"},\"]\":{\"x_min\":0,\"x_max\":275,\"ha\":372,\"o\":\"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 \"},\"m\":{\"x_min\":0,\"x_max\":1019,\"ha\":1128,\"o\":\"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 \"},\"\\u03C7\":{\"x_min\":8.328125,\"x_max\":780.5625,\"ha\":815,\"o\":\"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 \"},\"\\u03AF\":{\"x_min\":42,\"x_max\":326.71875,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 \"},\"\\u0396\":{\"x_min\":0,\"x_max\":779.171875,\"ha\":850,\"o\":\"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 \"},\"R\":{\"x_min\":0,\"x_max\":781.953125,\"ha\":907,\"o\":\"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 \"},\"o\":{\"x_min\":0,\"x_max\":713,\"ha\":821,\"o\":\"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 \"},\"K\":{\"x_min\":0,\"x_max\":819.46875,\"ha\":906,\"o\":\"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\",\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"d\":{\"x_min\":0,\"x_max\":683,\"ha\":796,\"o\":\"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 \"},\"\\xa8\":{\"x_min\":-109,\"x_max\":247,\"ha\":232,\"o\":\"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 \"},\"E\":{\"x_min\":0,\"x_max\":736.109375,\"ha\":789,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"Y\":{\"x_min\":0,\"x_max\":820,\"ha\":886,\"o\":\"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 \"},\"\\\\\"\":{\"x_min\":0,\"x_max\":299,\"ha\":396,\"o\":\"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"\\u2039\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"\\u201E\":{\"x_min\":0,\"x_max\":364,\"ha\":467,\"o\":\"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 \"},\"\\u03B4\":{\"x_min\":1,\"x_max\":710,\"ha\":810,\"o\":\"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 \"},\"\\u03AD\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 \"},\"\\u03C9\":{\"x_min\":0,\"x_max\":922,\"ha\":1031,\"o\":\"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 \"},\"\\xb4\":{\"x_min\":0,\"x_max\":96,\"ha\":251,\"o\":\"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"\\xb1\":{\"x_min\":11,\"x_max\":781,\"ha\":792,\"o\":\"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 \"},\"|\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"\\u03CB\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 \"},\"\\xa7\":{\"x_min\":0,\"x_max\":593,\"ha\":690,\"o\":\"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 \"},\"b\":{\"x_min\":0,\"x_max\":685,\"ha\":783,\"o\":\"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 \"},\"q\":{\"x_min\":0,\"x_max\":683,\"ha\":876,\"o\":\"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 \"},\"\\u03A9\":{\"x_min\":-0.171875,\"x_max\":969.5625,\"ha\":1068,\"o\":\"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 \"},\"\\u03CD\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 \"},\"z\":{\"x_min\":-0.015625,\"x_max\":613.890625,\"ha\":697,\"o\":\"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 \"},\"\\u2122\":{\"x_min\":0,\"x_max\":894,\"ha\":1000,\"o\":\"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 \"},\"\\u03AE\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 \"},\"\\u0398\":{\"x_min\":0,\"x_max\":960,\"ha\":1056,\"o\":\"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 \"},\"\\xae\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 \"},\"~\":{\"x_min\":0,\"x_max\":833,\"ha\":931,\"o\":\"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 \"},\"\\u0395\":{\"x_min\":0,\"x_max\":736.21875,\"ha\":778,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"\\xb3\":{\"x_min\":0,\"x_max\":450,\"ha\":547,\"o\":\"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 \"},\"[\":{\"x_min\":0,\"x_max\":273.609375,\"ha\":371,\"o\":\"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 \"},\"L\":{\"x_min\":0,\"x_max\":645.828125,\"ha\":696,\"o\":\"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 \"},\"\\u03C3\":{\"x_min\":0,\"x_max\":803.390625,\"ha\":894,\"o\":\"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 \"},\"\\u03B6\":{\"x_min\":0,\"x_max\":573,\"ha\":642,\"o\":\"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 \"},\"\\u03B8\":{\"x_min\":0,\"x_max\":674,\"ha\":778,\"o\":\"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 \"},\"\\u039F\":{\"x_min\":0,\"x_max\":958,\"ha\":1054,\"o\":\"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 \"},\"\\u0393\":{\"x_min\":0,\"x_max\":705.28125,\"ha\":749,\"o\":\"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 \"},\" \":{\"x_min\":0,\"x_max\":0,\"ha\":375},\"%\":{\"x_min\":-3,\"x_max\":1089,\"ha\":1186,\"o\":\"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 \"},\"P\":{\"x_min\":0,\"x_max\":726,\"ha\":806,\"o\":\"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 \"},\"\\u0388\":{\"x_min\":0,\"x_max\":1078.21875,\"ha\":1118,\"o\":\"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"\\u038F\":{\"x_min\":0.125,\"x_max\":1136.546875,\"ha\":1235,\"o\":\"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 \"},\"_\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 \"},\"\\u03AA\":{\"x_min\":-110,\"x_max\":246,\"ha\":275,\"o\":\"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 \"},\"+\":{\"x_min\":23,\"x_max\":768,\"ha\":792,\"o\":\"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 \"},\"\\xbd\":{\"x_min\":0,\"x_max\":1050,\"ha\":1149,\"o\":\"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 \"},\"\\u03A1\":{\"x_min\":0,\"x_max\":720,\"ha\":783,\"o\":\"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 \"},\"\\'\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"\\xaa\":{\"x_min\":0,\"x_max\":350,\"ha\":397,\"o\":\"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 \"},\"\\u0385\":{\"x_min\":0,\"x_max\":450,\"ha\":553,\"o\":\"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 \"},\"T\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 \"},\"\\u03A6\":{\"x_min\":0,\"x_max\":915,\"ha\":997,\"o\":\"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 \"},\"\\u204B\":{\"x_min\":0,\"x_max\":0,\"ha\":694},\"j\":{\"x_min\":-77.78125,\"x_max\":167,\"ha\":349,\"o\":\"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 \"},\"\\u03A3\":{\"x_min\":0,\"x_max\":756.953125,\"ha\":819,\"o\":\"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 \"},\"\\u203A\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"<\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"\\xa3\":{\"x_min\":0,\"x_max\":704.484375,\"ha\":801,\"o\":\"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 \"},\"t\":{\"x_min\":0,\"x_max\":367,\"ha\":458,\"o\":\"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 \"},\"\\xac\":{\"x_min\":0,\"x_max\":706,\"ha\":803,\"o\":\"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 \"},\"\\u03BB\":{\"x_min\":0,\"x_max\":750,\"ha\":803,\"o\":\"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 \"},\"W\":{\"x_min\":0,\"x_max\":1263.890625,\"ha\":1351,\"o\":\"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 \"},\">\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"v\":{\"x_min\":0,\"x_max\":675.15625,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 \"},\"\\u03C4\":{\"x_min\":0.28125,\"x_max\":644.5,\"ha\":703,\"o\":\"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 \"},\"\\u03BE\":{\"x_min\":0,\"x_max\":624.9375,\"ha\":699,\"o\":\"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 \"},\"&\":{\"x_min\":-3,\"x_max\":894.25,\"ha\":992,\"o\":\"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 \"},\"\\u039B\":{\"x_min\":0,\"x_max\":862.5,\"ha\":942,\"o\":\"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 \"},\"I\":{\"x_min\":41,\"x_max\":180,\"ha\":293,\"o\":\"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 \"},\"G\":{\"x_min\":0,\"x_max\":921,\"ha\":1011,\"o\":\"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 \"},\"\\u03B0\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 \"},\"`\":{\"x_min\":0,\"x_max\":138.890625,\"ha\":236,\"o\":\"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 \"},\"\\xb7\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"\\u03A5\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 \"},\"r\":{\"x_min\":0,\"x_max\":355.5625,\"ha\":432,\"o\":\"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 \"},\"x\":{\"x_min\":0,\"x_max\":675,\"ha\":764,\"o\":\"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 \"},\"\\u03BC\":{\"x_min\":0,\"x_max\":696.609375,\"ha\":747,\"o\":\"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 \"},\"h\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 \"},\".\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"\\u03C6\":{\"x_min\":-2,\"x_max\":878,\"ha\":974,\"o\":\"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 \"},\";\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"f\":{\"x_min\":0,\"x_max\":378,\"ha\":472,\"o\":\"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 \"},\"\\u201C\":{\"x_min\":1,\"x_max\":348.21875,\"ha\":454,\"o\":\"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 \"},\"A\":{\"x_min\":0.03125,\"x_max\":906.953125,\"ha\":1008,\"o\":\"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 \"},\"\\u2018\":{\"x_min\":1,\"x_max\":139.890625,\"ha\":236,\"o\":\"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 \"},\"\\u03CA\":{\"x_min\":-70,\"x_max\":283,\"ha\":361,\"o\":\"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 \"},\"\\u03C0\":{\"x_min\":-0.21875,\"x_max\":773.21875,\"ha\":857,\"o\":\"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 \"},\"\\u03AC\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 \"},\"O\":{\"x_min\":0,\"x_max\":958,\"ha\":1057,\"o\":\"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 \"},\"n\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 \"},\"l\":{\"x_min\":41,\"x_max\":166,\"ha\":279,\"o\":\"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 \"},\"\\xa4\":{\"x_min\":40.09375,\"x_max\":728.796875,\"ha\":825,\"o\":\"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 \"},\"\\u03BA\":{\"x_min\":0,\"x_max\":632.328125,\"ha\":679,\"o\":\"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 \"},\"p\":{\"x_min\":0,\"x_max\":685,\"ha\":786,\"o\":\"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 \"},\"\\u2021\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 \"},\"\\u03C8\":{\"x_min\":0,\"x_max\":808,\"ha\":907,\"o\":\"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 \"},\"\\u03B7\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 \"}},\"cssFontWeight\":\"normal\",\"ascender\":1189,\"underlinePosition\":-100,\"cssFontStyle\":\"normal\",\"boundingBox\":{\"yMin\":-334,\"xMin\":-111,\"yMax\":1189,\"xMax\":1672},\"resolution\":1000,\"original_font_information\":{\"postscript_name\":\"Helvetiker-Regular\",\"version_string\":\"Version 1.00 2004 initial release\",\"vendor_url\":\"http://www.magenta.gr/\",\"full_font_name\":\"Helvetiker\",\"font_family_name\":\"Helvetiker\",\"copyright\":\"Copyright (c) \\u039Cagenta ltd, 2004\",\"description\":\"\",\"trademark\":\"\",\"designer\":\"\",\"designer_url\":\"\",\"unique_font_identifier\":\"\\u039Cagenta ltd:Helvetiker:22-10-104\",\"license_url\":\"http://www.ellak.gr/fonts/MgOpen/license.html\",\"license_description\":\"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\\\\r\\\\n\\\\r\\\\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\\\\\"Fonts\\\\\") and associated documentation files (the \\\\\"Font Software\\\\\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \\\\r\\\\n\\\\r\\\\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\\\\r\\\\n\\\\r\\\\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \\\\\"MgOpen\\\\\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\\\\r\\\\n\\\\r\\\\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \\\\\"MgOpen\\\\\" name.\\\\r\\\\n\\\\r\\\\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \\\\r\\\\n\\\\r\\\\nTHE FONT SOFTWARE IS PROVIDED \\\\\"AS IS\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.\",\"manufacturer_name\":\"\\u039Cagenta ltd\",\"font_sub_family_name\":\"Regular\"},\"descender\":-334,\"familyName\":\"Helvetiker\",\"lineHeight\":1522,\"underlineThickness\":50}');\n\n\nclass $9405c84d589e06ee$export$b04be29aa201d4f5 {\n constructor(position, text, size = 0.2, color = 0x000000){\n this.text = new (0, $gbdyO.Text)();\n this.text.text = text;\n this.text.position.x = position.x;\n this.text.position.y = position.y;\n this.text.position.z = position.z;\n this.text.anchorX = \"center\";\n this.text.anchorY = \"middle\";\n this.text.fontSize = size;\n this.text.color = color;\n }\n getFrameable() {\n this.text.sync();\n return [\n this.text\n ];\n }\n}\nclass $9405c84d589e06ee$export$4380db2bf9335825 {\n constructor(position, text, size = 1, color = 0x000000){\n this.position = position;\n this.text = text;\n this.size = size;\n this.color = color;\n const geometry = new (0, $8NFZ6.TextGeometry)(this.text, {\n font: new (0, $eT66s.Font)((0, (/*@__PURE__*/$parcel$interopDefault($5ba80d09f4079c63$exports)))),\n size: this.size,\n height: 0.01,\n curveSegments: 25,\n bevelEnabled: false\n });\n const material = new (0, $ilwiq.MeshBasicMaterial)({\n color: this.color\n });\n this.drawable = new (0, $ilwiq.Mesh)(geometry, material);\n this.drawable.position.set(...this.position.toArray());\n }\n getFrameable() {\n return [\n this.drawable\n ];\n }\n}\n\n\nclass $c6f6e730d515f156$export$a1a1936bf656b97b {\n static #_ = this.uppercaseHeta = \"\\u0370\";\n static #_1 = this.lowercaseHeta = \"\\u0371\";\n static #_2 = this.uppercaseArchaicSampi = \"\\u0372\";\n static #_3 = this.lowercaseArchaicSampi = \"\\u0373\";\n static #_4 = this.numeralSign = \"\\u0374\";\n static #_5 = this.lowerNumeralSign = \"\\u0375\";\n static #_6 = this.uppercasePamphylianDigamma = \"\\u0376\";\n static #_7 = this.lowercasePamphylianDigamma = \"\\u0377\";\n static #_8 = this.ypogegrammeni = \"\\u037A\";\n static #_9 = this.smallReversedLunateSigmaSymbol = \"\\u037B\";\n static #_10 = this.smallDottedLunateSigmaSymbol = \"\\u037C\";\n static #_11 = this.smallReversedDottedLunateSigmaSymbol = \"\\u037D\";\n static #_12 = this.questionMark = \"\\u037E\";\n static #_13 = this.uppercaseYot = \"\\u037F\";\n static #_14 = this.acuteaccent = \"\\u0384\";\n static #_15 = this.diaeresiswithacuteaccent = \"\\u0385\";\n static #_16 = this.uppercaseAwithacuteaccent = \"\\u0386\";\n static #_17 = this.anoTeleia = \"\\u0387\";\n static #_18 = this.uppercaseEpsilonwithacuteaccent = \"\\u0388\";\n static #_19 = this.uppercaseEtawithacuteaccent = \"\\u0389\";\n static #_20 = this.uppercaseIotawithacuteaccent = \"\\u038A\";\n static #_21 = this.uppercaseOmicronwithacuteaccent = \"\\u038C\";\n static #_22 = this.uppercaseUpsilonwithacuteaccent = \"\\u038E\";\n static #_23 = this.uppercaseOmegawithacuteaccent = \"\\u038F\";\n static #_24 = this.lowercaseIotawithdiaeresisandacuteaccent = \"\\u0390\";\n static #_25 = this.uppercaseAlpha = \"\\u0391\";\n static #_26 = this.uppercaseBeta = \"\\u0392\";\n static #_27 = this.uppercaseGamma = \"\\u0393\";\n static #_28 = this.uppercaseDelta = \"\\u0394\";\n static #_29 = this.uppercaseEpsilon = \"\\u0395\";\n static #_30 = this.uppercaseZeta = \"\\u0396\";\n static #_31 = this.uppercaseEta = \"\\u0397\";\n static #_32 = this.uppercaseTheta = \"\\u0398\";\n static #_33 = this.uppercaseIota = \"\\u0399\";\n static #_34 = this.uppercaseKappa = \"\\u039A\";\n static #_35 = this.uppercaseLambda = \"\\u039B\";\n static #_36 = this.uppercaseMu = \"\\u039C\";\n static #_37 = this.uppercaseNu = \"\\u039D\";\n static #_38 = this.uppercaseXi = \"\\u039E\";\n static #_39 = this.uppercaseOmicron = \"\\u039F\";\n static #_40 = this.uppercasePi = \"\\u03A0\";\n static #_41 = this.uppercaseRho = \"\\u03A1\";\n static #_42 = this.uppercaseSigma = \"\\u03A3\";\n static #_43 = this.uppercaseTau = \"\\u03A4\";\n static #_44 = this.uppercaseUpsilon = \"\\u03A5\";\n static #_45 = this.uppercasePhi = \"\\u03A6\";\n static #_46 = this.uppercaseChi = \"\\u03A7\";\n static #_47 = this.uppercasePsi = \"\\u03A8\";\n static #_48 = this.uppercaseOmega = \"\\u03A9\";\n static #_49 = this.uppercaseIotawithdiaeresis = \"\\u03AA\";\n static #_50 = this.uppercaseUpsilonwithdiaeresis = \"\\u03AB\";\n static #_51 = this.lowercaseAlphawithacuteaccent = \"\\u03AC\";\n static #_52 = this.lowercaseEpsilonwithacuteaccent = \"\\u03AD\";\n static #_53 = this.lowercaseEtawithacuteaccent = \"\\u03AE\";\n static #_54 = this.lowercaseIotawithacuteaccent = \"\\u03AF\";\n static #_55 = this.lowercaseUpsilonwithdiaeresisandacuteaccent = \"\\u03B0\";\n static #_56 = this.lowercaseAlpha = \"\\u03B1\";\n static #_57 = this.lowercaseBeta = \"\\u03B2\";\n static #_58 = this.lowercaseGamma = \"\\u03B3\";\n static #_59 = this.lowercaseDelta = \"\\u03B4\";\n static #_60 = this.lowercaseEpsilon = \"\\u03B5\";\n static #_61 = this.lowercaseZeta = \"\\u03B6\";\n static #_62 = this.lowercaseEta = \"\\u03B7\";\n static #_63 = this.lowercaseTheta = \"\\u03B8\";\n static #_64 = this.lowercaseIota = \"\\u03B9\";\n static #_65 = this.lowercaseKappa = \"\\u03BA\";\n static #_66 = this.lowercaseLambda = \"\\u03BB\";\n static #_67 = this.lowercaseMu = \"\\u03BC\";\n static #_68 = this.lowercaseNu = \"\\u03BD\";\n static #_69 = this.lowercaseXi = \"\\u03BE\";\n static #_70 = this.lowercaseOmicron = \"\\u03BF\";\n static #_71 = this.lowercasePi = \"\\u03C0\";\n static #_72 = this.lowercaseRho = \"\\u03C1\";\n static #_73 = this.lowercaseFinalSigma = \"\\u03C2\";\n static #_74 = this.lowercaseSigma = \"\\u03C3\";\n static #_75 = this.lowercaseTau = \"\\u03C4\";\n static #_76 = this.lowercaseUpsilon = \"\\u03C5\";\n static #_77 = this.lowercasePhi = \"\\u03C6\";\n static #_78 = this.lowercaseChi = \"\\u03C7\";\n static #_79 = this.lowercasePsi = \"\\u03C8\";\n static #_80 = this.lowercaseOmega = \"\\u03C9\";\n static #_81 = this.lowercaseIotawithdiaeresis = \"\\u03CA\";\n static #_82 = this.lowercaseUpsilonwithdiaeresis = \"\\u03CB\";\n static #_83 = this.lowercaseOmicronwithacuteaccent = \"\\u03CC\";\n static #_84 = this.lowercaseUpsilonwithacuteaccent = \"\\u03CD\";\n static #_85 = this.lowercaseOmegawithacuteaccent = \"\\u03CE\";\n static #_86 = this.uppercaseKaiSymbol = \"\\u03CF\";\n static #_87 = this.betaSymbol = \"\\u03D0\";\n static #_88 = this.thetaSymbol = \"\\u03D1\";\n static #_89 = this.upsilonwithhookSymbol = \"\\u03D2\";\n static #_90 = this.upsilonwithacuteandhookSymbol = \"\\u03D3\";\n static #_91 = this.upsilonwithdiaeresisandhookSymbol = \"\\u03D4\";\n static #_92 = this.phiSymbol = \"\\u03D5\";\n static #_93 = this.piSymbol = \"\\u03D6\";\n static #_94 = this.kaiSymbol = \"\\u03D7\";\n static #_95 = this.letterQoppa = \"\\u03D8\";\n static #_96 = this.lowercaseQoppa = \"\\u03D9\";\n static #_97 = this.letterStigma = \"\\u03DA\";\n static #_98 = this.lowercaseStigma = \"\\u03DB\";\n static #_99 = this.letterDigamma = \"\\u03DC\";\n static #_100 = this.lowercaseDigamma = \"\\u03DD\";\n static #_101 = this.letterKoppa = \"\\u03DE\";\n static #_102 = this.lowercaseKoppa = \"\\u03DF\";\n static #_103 = this.letterSampi = \"\\u03E0\";\n static #_104 = this.lowercaseSampi = \"\\u03E1\";\n static #_105 = this.copticuppercaseShei = \"\\u03E2\";\n static #_106 = this.copticlowercaseShei = \"\\u03E3\";\n static #_107 = this.copticuppercaseFei = \"\\u03E4\";\n static #_108 = this.copticlowercaseFei = \"\\u03E5\";\n static #_109 = this.copticuppercaseKhei = \"\\u03E6\";\n static #_110 = this.copticlowercaseKhei = \"\\u03E7\";\n static #_111 = this.copticuppercaseHori = \"\\u03E8\";\n static #_112 = this.copticlowercaseHori = \"\\u03E9\";\n static #_113 = this.copticuppercaseGangia = \"\\u03EA\";\n static #_114 = this.copticlowercaseGangia = \"\\u03EB\";\n static #_115 = this.copticuppercaseShima = \"\\u03EC\";\n static #_116 = this.copticlowercaseShima = \"\\u03ED\";\n static #_117 = this.copticuppercaseDei = \"\\u03EE\";\n static #_118 = this.copticlowercaseDei = \"\\u03EF\";\n static #_119 = this.kappaSymbol = \"\\u03F0\";\n static #_120 = this.rhoSymbol = \"\\u03F1\";\n static #_121 = this.lunateSigmaSymbol = \"\\u03F2\";\n static #_122 = this.letterYot = \"\\u03F3\";\n static #_123 = this.uppercaseThetaSymbol = \"\\u03F4\";\n static #_124 = this.lunateEpsilonSymbol = \"\\u03F5\";\n static #_125 = this.reversedLunateEpsilonSymbol = \"\\u03F6\";\n static #_126 = this.uppercaseSho = \"\\u03F7\";\n static #_127 = this.lowercaseSho = \"\\u03F8\";\n static #_128 = this.uppercaseLunateSigmaSymbol = \"\\u03F9\";\n static #_129 = this.uppercaseSan = \"\\u03FA\";\n static #_130 = this.lowercaseSan = \"\\u03FB\";\n static #_131 = this.rhowithstrokeSymbol = \"\\u03FC\";\n static #_132 = this.uppercaseReversedLunateSigmaSymbol = \"\\u03FD\";\n static #_133 = this.uppercaseDottedLunateSigmaSymbol = \"\\u03FE\";\n static #_134 = this.uppercaseReversedDottedLunateSigmaSymbol = \"\\u03FF\";\n}\n\n\n\nvar $ilwiq = parcelRequire(\"ilwiq\");\nconst $9a8cebc34540b0c1$export$158a78f343a14874 = (n = 100, scale = 10)=>{\n const points = [];\n for(let index = 0; index < n; index++){\n const x = Math.random() * scale;\n const y = Math.random() * scale;\n const z = Math.random() * scale;\n points.push(new (0, $ilwiq.Vector3)(x, y, z));\n }\n return points;\n};\n\n\n\n\n//# sourceMappingURL=index.f9a4f1dc.js.map\n","export { Frame } from \"./frame\";\nexport { ScatterPlot } from \"./plots/scatterplot\";\nexport { VectorPlot } from \"./plots/vectorplot\";\nexport { Label } from \"./label\";\nexport { Greek } from \"./greek\";\nexport { getRandomPoints } from \"./data\";\n","import { Color, PerspectiveCamera, Scene, WebGLRenderer } from \"three\";\nimport { OrbitControls } from \"three/examples/jsm/controls/OrbitControls\";\nimport { Axes } from \"./axes\";\nimport { Plot } from \"./plot\";\nimport { FallbackLabel, Label } from \"./label\";\n\nexport class Frame extends Scene {\n protected scene: Scene;\n protected renderer: WebGLRenderer;\n protected camera: PerspectiveCamera;\n protected axes: Axes;\n protected controls: OrbitControls;\n protected observer: ResizeObserver = new ResizeObserver(() => this.update());\n\n // TODO: at the moment only one size bc grid can only be squared\n // look into this for solution https://discourse.threejs.org/t/rectangular-gridhelper-possibility/37812\n constructor(protected canvas: HTMLCanvasElement, protected size = 10) {\n super();\n this.scene = new Scene();\n this.scene.background = new Color(0xffffff);\n\n const { clientWidth, clientHeight } = canvas;\n\n this.renderer = new WebGLRenderer({ canvas });\n this.renderer.setSize(clientWidth, clientHeight);\n\n this.setCamera(clientWidth, clientHeight);\n this.setControls();\n this.setAxes();\n\n this.updateOnChanges();\n this.update();\n }\n\n private setCamera(width: number, height: number) {\n this.camera = new PerspectiveCamera(45, width / height, 0.1, 1000);\n this.camera.position.set(this.size * 2, this.size * 2, this.size * 2);\n this.scene.add(this.camera);\n }\n\n private setControls() {\n this.controls = new OrbitControls(this.camera, this.canvas);\n this.controls.target.set(0, 0, 0);\n }\n\n private setAxes() {\n this.axes = new Axes(this.size, this.size, this.size);\n\n this.scene.add(this.axes.x);\n this.scene.add(this.axes.y);\n this.scene.add(this.axes.z);\n\n this.scene.add(this.axes.gridXY);\n this.scene.add(this.axes.gridXZ);\n this.scene.add(this.axes.gridYZ);\n }\n\n updateOnChanges() {\n this.controls.addEventListener(\"change\", () => this.update());\n this.observer.observe(this.canvas);\n }\n\n protected update() {\n this.renderer.render(this.scene, this.camera);\n }\n\n public capture() {\n const base64 = this.canvas.toDataURL(\"img/png\");\n }\n\n public addPlot(plot: Plot) {\n this.scene.add(...plot.getFrameable());\n this.update();\n }\n\n private async addFallbackLabel(text: FallbackLabel) {\n this.scene.add(...text.getFrameable());\n this.update();\n }\n\n public async addLabel(text: Label) {\n this.scene.add(...text.getFrameable());\n\n text.text.addEventListener(\"synccomplete\", () => {\n this.update();\n });\n\n }\n}\n","import { ArrowHelper, GridHelper, Vector3 } from \"three\";\n\nexport const UnitVector = {\n i: new Vector3(1, 0, 0),\n j: new Vector3(0, 1, 0),\n k: new Vector3(0, 0, 1),\n} as const;\n\nexport const PlaneAxes = {\n xy: { normal: UnitVector.k, unit: { x: UnitVector.i, y: UnitVector.j } },\n xz: { normal: UnitVector.j, unit: { x: UnitVector.i, z: UnitVector.k } },\n yz: { normal: UnitVector.i, unit: { y: UnitVector.j, z: UnitVector.k } },\n} as const;\n\nclass Axis extends ArrowHelper {\n constructor(direction: Vector3, length: number) {\n super(direction, new Vector3(0, 0, 0), length);\n }\n}\n\nexport class Axes {\n public x: Axis;\n public y: Axis;\n public z: Axis;\n public gridXZ: GridHelper;\n public gridXY: GridHelper;\n public gridYZ: GridHelper;\n\n constructor(\n private lengthX: number,\n private lengthY: number,\n private lengthZ: number\n ) {\n this.x = new Axis(new Vector3(1, 0, 0), this.lengthX * 1.1);\n this.y = new Axis(new Vector3(0, 1, 0), this.lengthY * 1.1);\n this.z = new Axis(new Vector3(0, 0, 1), this.lengthZ * 1.1);\n\n this.setGrids();\n }\n\n private setGrids() {\n this.gridXZ = new GridHelper(Math.max(this.lengthX, this.lengthZ));\n this.gridXZ.position.setX(this.lengthX / 2);\n this.gridXZ.position.setZ(this.lengthZ / 2);\n\n this.gridXY = new GridHelper(Math.max(this.lengthX, this.lengthY));\n this.gridXY.position.setX(this.lengthX / 2);\n this.gridXY.position.setY(this.lengthY / 2);\n this.gridXY.rotateOnAxis(new Vector3(1, 0, 0), Math.PI / 2);\n\n this.gridYZ = new GridHelper(Math.max(this.lengthY, this.lengthZ));\n this.gridYZ.position.setY(this.lengthY / 2);\n this.gridYZ.position.setZ(this.lengthZ / 2);\n this.gridYZ.rotateOnAxis(new Vector3(0, 0, 1), Math.PI / 2);\n }\n}\n","import { Mesh, MeshBasicMaterial, SphereGeometry, Vector3 } from \"three\";\nimport { Plot } from \"../plot\";\n\nexport class ScatterPlot extends Plot {\n points: Mesh[];\n\n constructor(points: Vector3[], pointRadius = 0.2) {\n super();\n\n this.points = points.map((v) => {\n const geometry = new SphereGeometry(pointRadius);\n const material = new MeshBasicMaterial({ color: 0x00ff00 });\n const obj = new Mesh(geometry, material);\n obj.position.set(v.x, v.y, v.z);\n return obj;\n });\n }\n\n getFrameable() {\n return this.points;\n }\n}\n","import { Object3D } from \"three\";\n\nexport interface FramedObject {\n getFrameable(): Object3D[];\n}\n\nexport abstract class Plot implements FramedObject {\n abstract getFrameable(): Object3D[];\n}\n","import {\n ArrowHelper,\n BufferGeometry,\n EllipseCurve,\n Line,\n LineBasicMaterial,\n LineDashedMaterial,\n Object3D,\n Object3DEventMap,\n Quaternion,\n Vector3,\n} from \"three\";\nimport { Plot } from \"../plot\";\nimport { PlaneAxes, UnitVector } from \"../axes\";\nimport { VectorPlotConfiguration, VectorPlotConfigurationParams } from \"./vectorplot.config\";\n\nexport class VectorPlot extends Plot {\n private drawables: (ArrowHelper | Line)[];\n private config: VectorPlotConfigurationParams;\n\n constructor(private origin: Vector3, private target: Vector3, config?: VectorPlotConfiguration) {\n super();\n\n this.config = new VectorPlotConfigurationParams(config);\n\n this.drawables = [];\n\n this.drawables.push(this.createVector(origin, target));\n\n for (const p in PlaneAxes) {\n const plane = p as keyof typeof PlaneAxes;\n const conf = this.config[plane];\n if (conf?.projection) this.drawables.push(this.createProjection(plane));\n if (conf?.component) this.drawables.push(this.createComponent(plane));\n if (conf?.projectionAngle) this.drawables.push(this.createAngleToProjection(plane));\n }\n if (this.config.angle) this.drawables.push(this.createAngleToTarget(\"y\"));\n }\n\n private createVector(origin: Vector3, target: Vector3) {\n const length = Math.abs(origin.distanceTo(target));\n\n return new ArrowHelper(target.clone().normalize(), origin, length, this.config.color, length * 0.2, length * 0.1);\n }\n\n private createAngleToProjection

(planeIdx: P) {\n const plane = PlaneAxes[planeIdx];\n const planeNormal = plane.normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const radius = projectedVector.distanceTo(this.origin) * 0.5;\n\n let initialRotation = 0;\n let angleToProjection = projectedVector.angleTo(UnitVector.i);\n\n if (planeIdx === \"xz\") {\n initialRotation = -Math.PI / 2;\n angleToProjection = projectedVector.angleTo(UnitVector.k);\n }\n\n if (planeIdx === \"yz\") {\n initialRotation = Math.PI / 2;\n angleToProjection = projectedVector.angleTo(UnitVector.j);\n }\n\n const curve = new EllipseCurve(\n this.origin.x,\n this.origin.y,\n radius,\n radius,\n 0,\n angleToProjection,\n false,\n initialRotation\n );\n\n const material = new LineBasicMaterial({ color: 0x000000 });\n const geometry = new BufferGeometry().setFromPoints(curve.getPoints(50));\n\n const rotation = new Quaternion().setFromUnitVectors(UnitVector.k, plane.normal);\n\n geometry.applyQuaternion(rotation);\n\n return new Line(geometry, material);\n }\n\n private createAngleToTarget(axis: \"x\" | \"y\" | \"z\") {\n const radius = this.target.clone().distanceTo(this.origin);\n\n const projectedVector = this.target.clone().projectOnPlane(UnitVector.j);\n\n const curve = new EllipseCurve(\n this.origin.x,\n this.origin.y,\n radius,\n radius,\n 0,\n this.target.angleTo(projectedVector),\n false,\n 0\n );\n \n const material = new LineBasicMaterial(this.config.angle);\n const geometry = new BufferGeometry().setFromPoints(curve.getPoints(50));\n geometry.applyQuaternion(new Quaternion().setFromAxisAngle(UnitVector.j, -UnitVector.i.angleTo(projectedVector)));\n\n return new Line(geometry, material);\n }\n\n private createProjection

(plane: P): Line {\n const { linetype, linestyle } = this.config[plane].projection;\n\n const lineMaterialType = linetype === \"dashed\" ? LineDashedMaterial : LineBasicMaterial;\n const lineMaterial = new lineMaterialType(linestyle);\n\n const planeNormal = PlaneAxes[plane].normal;\n\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n\n const projectionGeometry = new BufferGeometry().setFromPoints([projectedVector, this.origin]);\n\n return new Line(projectionGeometry, lineMaterial).computeLineDistances();\n }\n\n private createComponent

(plane: P): Line {\n const { linetype, linestyle } = this.config[plane].component;\n const lineMaterialType = linetype === \"dashed\" ? LineDashedMaterial : LineBasicMaterial;\n const lineMaterial = new lineMaterialType(linestyle);\n \n const planeNormal = PlaneAxes[plane].normal;\n const projectedVector = this.target.clone().projectOnPlane(planeNormal);\n const connectionGeometry = new BufferGeometry().setFromPoints([projectedVector, this.target]);\n\n return new Line(connectionGeometry, lineMaterial).computeLineDistances();\n }\n\n public getFrameable(): Object3D[] {\n return this.drawables;\n }\n}\n","import { LineBasicMaterialParameters, LineDashedMaterialParameters } from \"three\";\nimport { PlaneAxes } from \"../axes\";\n\ntype LineStyle =\n | {\n linetype: \"dashed\";\n linestyle: LineDashedMaterialParameters;\n }\n | {\n linetype: \"solid\";\n linestyle: LineBasicMaterialParameters;\n };\n\ntype VectorPlotPlaneConfig = {\n projection?: LineStyle | boolean;\n component?: LineStyle | boolean;\n projectionAngle?: LineStyle | boolean;\n};\n\nexport interface VectorPlotConfiguration\n extends Partial> {\n color?: number;\n angle?: LineBasicMaterialParameters | boolean;\n}\n\nexport class VectorPlotConfigurationParams implements VectorPlotConfiguration {\n color: number;\n angle?: LineBasicMaterialParameters;\n xy?: VectorPlotPlaneConfigParams;\n xz?: VectorPlotPlaneConfigParams;\n yz?: VectorPlotPlaneConfigParams;\n\n constructor(config: VectorPlotConfiguration) {\n const { angle, color, xy, xz, yz } = config;\n\n this.setColorOrDefault(color);\n if (angle) this.setAngle(angle);\n if (xy) this.xy = new VectorPlotPlaneConfigParams(xy);\n if (xz) this.xz = new VectorPlotPlaneConfigParams(xz);\n if (yz) this.xz = new VectorPlotPlaneConfigParams(yz);\n }\n\n private setColorOrDefault(colorHex?: number) {\n colorHex = colorHex || 0x000000;\n\n this.color = colorHex;\n }\n\n private setAngle(angle: LineBasicMaterialParameters | true) {\n this.angle = angle === true ? { color: 0x000000 } : angle;\n }\n}\n\nexport class VectorPlotPlaneConfigParams implements VectorPlotPlaneConfig {\n projection?: LineStyle;\n component?: LineStyle;\n projectionAngle?: LineStyle;\n\n constructor(plane: VectorPlotPlaneConfig | true) {\n plane = plane === true ? { projection: true, component: true, projectionAngle: true } : plane;\n\n const { component, projection, projectionAngle } = plane;\n\n if (projection) this.setProjection(projection);\n if (component) this.setComponent(component);\n if (projectionAngle) this.setProjectionAngle(projectionAngle);\n }\n\n private setProjection(projection: LineStyle | true) {\n this.projection = projection === true ? defaultDashedLine : projection;\n }\n\n private setComponent(component: LineStyle | true) {\n this.component = component === true ? defaultDashedLine : component;\n }\n\n private setProjectionAngle(projectionAngle: LineStyle | true) {\n this.projectionAngle = projectionAngle === true ? defaultDashedLine : projectionAngle;\n }\n}\n\nconst defaultDashedLine: LineStyle = {\n linetype: \"dashed\",\n linestyle: {\n color: 0x000000,\n linewidth: 1,\n scale: 1,\n dashSize: 0.25,\n gapSize: 0.1,\n },\n};\n","import {\n Mesh,\n MeshBasicMaterial,\n Object3D,\n Object3DEventMap,\n Vector3,\n} from \"three\";\nimport { FramedObject } from \"./plot\";\nimport { Text } from \"troika-three-text\";\nimport { Font } from \"three/examples/jsm/loaders/FontLoader\";\nimport { TextGeometry } from \"three/examples/jsm/geometries/TextGeometry\";\n\nimport fontJson from \"./fonts/helvetiker_regular.typeface.json\";\n\nexport class Label implements FramedObject {\n text: Text;\n\n constructor(position: Vector3, text: string, size = 0.2, color = 0x000000) {\n this.text = new Text();\n this.text.text = text;\n this.text.position.x = position.x;\n this.text.position.y = position.y;\n this.text.position.z = position.z;\n this.text.anchorX = \"center\";\n this.text.anchorY = \"middle\";\n this.text.fontSize = size;\n this.text.color = color;\n }\n\n getFrameable(): Object3D[] {\n this.text.sync();\n return [this.text];\n }\n}\n\nexport class FallbackLabel implements FramedObject {\n drawable: Mesh;\n\n constructor(\n private position: Vector3,\n private text: string,\n private size = 1,\n private color = 0x000000\n ) {\n const geometry = new TextGeometry(this.text, {\n font: new Font(fontJson),\n size: this.size,\n height: 0.01,\n curveSegments: 25,\n bevelEnabled: false,\n });\n\n const material = new MeshBasicMaterial({ color: this.color });\n\n this.drawable = new Mesh(geometry, material);\n this.drawable.position.set(...this.position.toArray());\n }\n\n getFrameable(): Mesh[] {\n return [this.drawable];\n }\n}\n","{\"glyphs\":{\"ο\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 \"},\"S\":{\"x_min\":0,\"x_max\":788,\"ha\":890,\"o\":\"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 \"},\"¦\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"/\":{\"x_min\":183.25,\"x_max\":608.328125,\"ha\":792,\"o\":\"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 \"},\"Τ\":{\"x_min\":-0.4375,\"x_max\":777.453125,\"ha\":839,\"o\":\"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 \"},\"y\":{\"x_min\":0,\"x_max\":684.78125,\"ha\":771,\"o\":\"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 \"},\"Π\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 \"},\"ΐ\":{\"x_min\":-111,\"x_max\":339,\"ha\":361,\"o\":\"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 \"},\"g\":{\"x_min\":0,\"x_max\":686,\"ha\":838,\"o\":\"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 \"},\"²\":{\"x_min\":0,\"x_max\":442,\"ha\":539,\"o\":\"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 \"},\"–\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\"Κ\":{\"x_min\":0,\"x_max\":819.5625,\"ha\":893,\"o\":\"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\"ƒ\":{\"x_min\":-46.265625,\"x_max\":392,\"ha\":513,\"o\":\"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 \"},\"e\":{\"x_min\":0,\"x_max\":714,\"ha\":813,\"o\":\"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 \"},\"ό\":{\"x_min\":0,\"x_max\":712,\"ha\":815,\"o\":\"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 \"},\"J\":{\"x_min\":0,\"x_max\":588,\"ha\":699,\"o\":\"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 \"},\"»\":{\"x_min\":-1,\"x_max\":503,\"ha\":601,\"o\":\"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 \"},\"©\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 \"},\"ώ\":{\"x_min\":0,\"x_max\":922,\"ha\":1030,\"o\":\"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 \"},\"^\":{\"x_min\":193.0625,\"x_max\":598.609375,\"ha\":792,\"o\":\"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 \"},\"«\":{\"x_min\":0,\"x_max\":507.203125,\"ha\":604,\"o\":\"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 \"},\"D\":{\"x_min\":0,\"x_max\":828,\"ha\":935,\"o\":\"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 \"},\"∙\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"ÿ\":{\"x_min\":0,\"x_max\":47,\"ha\":125,\"o\":\"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 \"},\"w\":{\"x_min\":0,\"x_max\":1009.71875,\"ha\":1100,\"o\":\"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 \"},\"$\":{\"x_min\":0,\"x_max\":700,\"ha\":793,\"o\":\"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 \"},\"\\\\\":{\"x_min\":-0.015625,\"x_max\":425.0625,\"ha\":522,\"o\":\"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 \"},\"µ\":{\"x_min\":0,\"x_max\":697.21875,\"ha\":747,\"o\":\"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 \"},\"Ι\":{\"x_min\":42,\"x_max\":181,\"ha\":297,\"o\":\"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 \"},\"Ύ\":{\"x_min\":0,\"x_max\":1144.5,\"ha\":1214,\"o\":\"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"’\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"Ν\":{\"x_min\":0,\"x_max\":801,\"ha\":915,\"o\":\"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 \"},\"-\":{\"x_min\":8.71875,\"x_max\":350.390625,\"ha\":478,\"o\":\"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 \"},\"Q\":{\"x_min\":0,\"x_max\":968,\"ha\":1072,\"o\":\"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 \"},\"ς\":{\"x_min\":1,\"x_max\":676.28125,\"ha\":740,\"o\":\"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 \"},\"M\":{\"x_min\":0,\"x_max\":954,\"ha\":1067,\"o\":\"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 \"},\"Ψ\":{\"x_min\":0,\"x_max\":1006,\"ha\":1094,\"o\":\"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 \"},\"C\":{\"x_min\":0,\"x_max\":886,\"ha\":944,\"o\":\"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 \"},\"!\":{\"x_min\":0,\"x_max\":138,\"ha\":236,\"o\":\"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 \"},\"{\":{\"x_min\":0,\"x_max\":480.5625,\"ha\":578,\"o\":\"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 \"},\"X\":{\"x_min\":-0.015625,\"x_max\":854.15625,\"ha\":940,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 \"},\"#\":{\"x_min\":0,\"x_max\":963.890625,\"ha\":1061,\"o\":\"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 \"},\"ι\":{\"x_min\":42,\"x_max\":284,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 \"},\"Ά\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":982,\"o\":\"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\")\":{\"x_min\":0,\"x_max\":318,\"ha\":415,\"o\":\"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 \"},\"ε\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 \"},\"Δ\":{\"x_min\":0,\"x_max\":952.78125,\"ha\":1028,\"o\":\"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 \"},\"}\":{\"x_min\":0,\"x_max\":481,\"ha\":578,\"o\":\"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 \"},\"‰\":{\"x_min\":-3,\"x_max\":1672,\"ha\":1821,\"o\":\"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 \"},\"a\":{\"x_min\":0,\"x_max\":698.609375,\"ha\":794,\"o\":\"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 \"},\"—\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":1039,\"o\":\"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 \"},\"=\":{\"x_min\":8.71875,\"x_max\":780.953125,\"ha\":792,\"o\":\"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 \"},\"N\":{\"x_min\":0,\"x_max\":801,\"ha\":914,\"o\":\"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 \"},\"ρ\":{\"x_min\":0,\"x_max\":712,\"ha\":797,\"o\":\"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 \"},\"2\":{\"x_min\":59,\"x_max\":731,\"ha\":792,\"o\":\"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 \"},\"¯\":{\"x_min\":0,\"x_max\":941.671875,\"ha\":938,\"o\":\"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 \"},\"Z\":{\"x_min\":0,\"x_max\":779,\"ha\":849,\"o\":\"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 \"},\"u\":{\"x_min\":0,\"x_max\":617,\"ha\":729,\"o\":\"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 \"},\"k\":{\"x_min\":0,\"x_max\":612.484375,\"ha\":697,\"o\":\"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 \"},\"Η\":{\"x_min\":0,\"x_max\":803,\"ha\":917,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"Α\":{\"x_min\":0,\"x_max\":906.953125,\"ha\":985,\"o\":\"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 \"},\"s\":{\"x_min\":0,\"x_max\":604,\"ha\":697,\"o\":\"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 \"},\"B\":{\"x_min\":0,\"x_max\":778,\"ha\":876,\"o\":\"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 \"},\"…\":{\"x_min\":0,\"x_max\":614,\"ha\":708,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 \"},\"?\":{\"x_min\":0,\"x_max\":607,\"ha\":704,\"o\":\"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 \"},\"H\":{\"x_min\":0,\"x_max\":803,\"ha\":915,\"o\":\"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 \"},\"ν\":{\"x_min\":0,\"x_max\":675,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 \"},\"c\":{\"x_min\":1,\"x_max\":701.390625,\"ha\":775,\"o\":\"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 \"},\"¶\":{\"x_min\":0,\"x_max\":566.671875,\"ha\":678,\"o\":\"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 \"},\"β\":{\"x_min\":0,\"x_max\":660,\"ha\":745,\"o\":\"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 \"},\"Μ\":{\"x_min\":0,\"x_max\":954,\"ha\":1068,\"o\":\"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 \"},\"Ό\":{\"x_min\":0.109375,\"x_max\":1120,\"ha\":1217,\"o\":\"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"Ή\":{\"x_min\":0,\"x_max\":1158,\"ha\":1275,\"o\":\"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"•\":{\"x_min\":0,\"x_max\":663.890625,\"ha\":775,\"o\":\"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 \"},\"¥\":{\"x_min\":0.1875,\"x_max\":819.546875,\"ha\":886,\"o\":\"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 \"},\"(\":{\"x_min\":0,\"x_max\":318.0625,\"ha\":415,\"o\":\"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 \"},\"U\":{\"x_min\":0,\"x_max\":796,\"ha\":904,\"o\":\"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 \"},\"γ\":{\"x_min\":0.5,\"x_max\":744.953125,\"ha\":822,\"o\":\"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 \"},\"α\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 \"},\"F\":{\"x_min\":0,\"x_max\":683.328125,\"ha\":717,\"o\":\"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 \"},\"­\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 \"},\":\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"Χ\":{\"x_min\":0,\"x_max\":854.171875,\"ha\":935,\"o\":\"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 \"},\"*\":{\"x_min\":116,\"x_max\":674,\"ha\":792,\"o\":\"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 \"},\"†\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 \"},\"°\":{\"x_min\":0,\"x_max\":347,\"ha\":444,\"o\":\"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 \"},\"V\":{\"x_min\":0,\"x_max\":862.71875,\"ha\":940,\"o\":\"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 \"},\"Ξ\":{\"x_min\":0,\"x_max\":734.71875,\"ha\":763,\"o\":\"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 \"},\" \":{\"x_min\":0,\"x_max\":0,\"ha\":853},\"Ϋ\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 \"},\"0\":{\"x_min\":73,\"x_max\":715,\"ha\":792,\"o\":\"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 \"},\"”\":{\"x_min\":0,\"x_max\":347,\"ha\":454,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 \"},\"@\":{\"x_min\":0,\"x_max\":1260,\"ha\":1357,\"o\":\"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 \"},\"Ί\":{\"x_min\":0,\"x_max\":499,\"ha\":613,\"o\":\"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 \"},\"i\":{\"x_min\":14,\"x_max\":136,\"ha\":275,\"o\":\"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 \"},\"Β\":{\"x_min\":0,\"x_max\":778,\"ha\":877,\"o\":\"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 \"},\"υ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 \"},\"]\":{\"x_min\":0,\"x_max\":275,\"ha\":372,\"o\":\"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 \"},\"m\":{\"x_min\":0,\"x_max\":1019,\"ha\":1128,\"o\":\"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 \"},\"χ\":{\"x_min\":8.328125,\"x_max\":780.5625,\"ha\":815,\"o\":\"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 \"},\"8\":{\"x_min\":55,\"x_max\":736,\"ha\":792,\"o\":\"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 \"},\"ί\":{\"x_min\":42,\"x_max\":326.71875,\"ha\":361,\"o\":\"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 \"},\"Ζ\":{\"x_min\":0,\"x_max\":779.171875,\"ha\":850,\"o\":\"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 \"},\"R\":{\"x_min\":0,\"x_max\":781.953125,\"ha\":907,\"o\":\"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 \"},\"o\":{\"x_min\":0,\"x_max\":713,\"ha\":821,\"o\":\"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 \"},\"5\":{\"x_min\":54.171875,\"x_max\":738,\"ha\":792,\"o\":\"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 \"},\"7\":{\"x_min\":58.71875,\"x_max\":730.953125,\"ha\":792,\"o\":\"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 \"},\"K\":{\"x_min\":0,\"x_max\":819.46875,\"ha\":906,\"o\":\"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 \"},\",\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"d\":{\"x_min\":0,\"x_max\":683,\"ha\":796,\"o\":\"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 \"},\"¨\":{\"x_min\":-109,\"x_max\":247,\"ha\":232,\"o\":\"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 \"},\"E\":{\"x_min\":0,\"x_max\":736.109375,\"ha\":789,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"Y\":{\"x_min\":0,\"x_max\":820,\"ha\":886,\"o\":\"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 \"},\"\\\"\":{\"x_min\":0,\"x_max\":299,\"ha\":396,\"o\":\"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"‹\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"„\":{\"x_min\":0,\"x_max\":364,\"ha\":467,\"o\":\"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 \"},\"δ\":{\"x_min\":1,\"x_max\":710,\"ha\":810,\"o\":\"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 \"},\"έ\":{\"x_min\":0,\"x_max\":634.71875,\"ha\":714,\"o\":\"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 \"},\"ω\":{\"x_min\":0,\"x_max\":922,\"ha\":1031,\"o\":\"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 \"},\"´\":{\"x_min\":0,\"x_max\":96,\"ha\":251,\"o\":\"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 \"},\"±\":{\"x_min\":11,\"x_max\":781,\"ha\":792,\"o\":\"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 \"},\"|\":{\"x_min\":343,\"x_max\":449,\"ha\":792,\"o\":\"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 \"},\"ϋ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 \"},\"§\":{\"x_min\":0,\"x_max\":593,\"ha\":690,\"o\":\"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 \"},\"b\":{\"x_min\":0,\"x_max\":685,\"ha\":783,\"o\":\"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 \"},\"q\":{\"x_min\":0,\"x_max\":683,\"ha\":876,\"o\":\"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 \"},\"Ω\":{\"x_min\":-0.171875,\"x_max\":969.5625,\"ha\":1068,\"o\":\"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 \"},\"ύ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 \"},\"z\":{\"x_min\":-0.015625,\"x_max\":613.890625,\"ha\":697,\"o\":\"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 \"},\"™\":{\"x_min\":0,\"x_max\":894,\"ha\":1000,\"o\":\"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 \"},\"ή\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 \"},\"Θ\":{\"x_min\":0,\"x_max\":960,\"ha\":1056,\"o\":\"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 \"},\"®\":{\"x_min\":-3,\"x_max\":1008,\"ha\":1106,\"o\":\"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 \"},\"~\":{\"x_min\":0,\"x_max\":833,\"ha\":931,\"o\":\"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 \"},\"Ε\":{\"x_min\":0,\"x_max\":736.21875,\"ha\":778,\"o\":\"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 \"},\"³\":{\"x_min\":0,\"x_max\":450,\"ha\":547,\"o\":\"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 \"},\"[\":{\"x_min\":0,\"x_max\":273.609375,\"ha\":371,\"o\":\"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 \"},\"L\":{\"x_min\":0,\"x_max\":645.828125,\"ha\":696,\"o\":\"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 \"},\"σ\":{\"x_min\":0,\"x_max\":803.390625,\"ha\":894,\"o\":\"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 \"},\"ζ\":{\"x_min\":0,\"x_max\":573,\"ha\":642,\"o\":\"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 \"},\"θ\":{\"x_min\":0,\"x_max\":674,\"ha\":778,\"o\":\"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 \"},\"Ο\":{\"x_min\":0,\"x_max\":958,\"ha\":1054,\"o\":\"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 \"},\"Γ\":{\"x_min\":0,\"x_max\":705.28125,\"ha\":749,\"o\":\"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 \"},\" \":{\"x_min\":0,\"x_max\":0,\"ha\":375},\"%\":{\"x_min\":-3,\"x_max\":1089,\"ha\":1186,\"o\":\"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 \"},\"P\":{\"x_min\":0,\"x_max\":726,\"ha\":806,\"o\":\"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 \"},\"Έ\":{\"x_min\":0,\"x_max\":1078.21875,\"ha\":1118,\"o\":\"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 \"},\"Ώ\":{\"x_min\":0.125,\"x_max\":1136.546875,\"ha\":1235,\"o\":\"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 \"},\"_\":{\"x_min\":0,\"x_max\":705.5625,\"ha\":803,\"o\":\"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 \"},\"Ϊ\":{\"x_min\":-110,\"x_max\":246,\"ha\":275,\"o\":\"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 \"},\"+\":{\"x_min\":23,\"x_max\":768,\"ha\":792,\"o\":\"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 \"},\"½\":{\"x_min\":0,\"x_max\":1050,\"ha\":1149,\"o\":\"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 \"},\"Ρ\":{\"x_min\":0,\"x_max\":720,\"ha\":783,\"o\":\"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 \"},\"'\":{\"x_min\":0,\"x_max\":139,\"ha\":236,\"o\":\"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 \"},\"ª\":{\"x_min\":0,\"x_max\":350,\"ha\":397,\"o\":\"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 \"},\"΅\":{\"x_min\":0,\"x_max\":450,\"ha\":553,\"o\":\"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 \"},\"T\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 \"},\"Φ\":{\"x_min\":0,\"x_max\":915,\"ha\":997,\"o\":\"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 \"},\"⁋\":{\"x_min\":0,\"x_max\":0,\"ha\":694},\"j\":{\"x_min\":-77.78125,\"x_max\":167,\"ha\":349,\"o\":\"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 \"},\"Σ\":{\"x_min\":0,\"x_max\":756.953125,\"ha\":819,\"o\":\"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 \"},\"1\":{\"x_min\":215.671875,\"x_max\":574,\"ha\":792,\"o\":\"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 \"},\"›\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"<\":{\"x_min\":17.984375,\"x_max\":773.609375,\"ha\":792,\"o\":\"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 \"},\"£\":{\"x_min\":0,\"x_max\":704.484375,\"ha\":801,\"o\":\"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 \"},\"t\":{\"x_min\":0,\"x_max\":367,\"ha\":458,\"o\":\"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 \"},\"¬\":{\"x_min\":0,\"x_max\":706,\"ha\":803,\"o\":\"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 \"},\"λ\":{\"x_min\":0,\"x_max\":750,\"ha\":803,\"o\":\"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 \"},\"W\":{\"x_min\":0,\"x_max\":1263.890625,\"ha\":1351,\"o\":\"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 \"},\">\":{\"x_min\":18.0625,\"x_max\":774,\"ha\":792,\"o\":\"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 \"},\"v\":{\"x_min\":0,\"x_max\":675.15625,\"ha\":761,\"o\":\"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 \"},\"τ\":{\"x_min\":0.28125,\"x_max\":644.5,\"ha\":703,\"o\":\"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 \"},\"ξ\":{\"x_min\":0,\"x_max\":624.9375,\"ha\":699,\"o\":\"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 \"},\"&\":{\"x_min\":-3,\"x_max\":894.25,\"ha\":992,\"o\":\"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 \"},\"Λ\":{\"x_min\":0,\"x_max\":862.5,\"ha\":942,\"o\":\"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 \"},\"I\":{\"x_min\":41,\"x_max\":180,\"ha\":293,\"o\":\"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 \"},\"G\":{\"x_min\":0,\"x_max\":921,\"ha\":1011,\"o\":\"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 \"},\"ΰ\":{\"x_min\":0,\"x_max\":617,\"ha\":725,\"o\":\"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 \"},\"`\":{\"x_min\":0,\"x_max\":138.890625,\"ha\":236,\"o\":\"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 \"},\"·\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 \"},\"Υ\":{\"x_min\":0.328125,\"x_max\":819.515625,\"ha\":889,\"o\":\"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 \"},\"r\":{\"x_min\":0,\"x_max\":355.5625,\"ha\":432,\"o\":\"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 \"},\"x\":{\"x_min\":0,\"x_max\":675,\"ha\":764,\"o\":\"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 \"},\"μ\":{\"x_min\":0,\"x_max\":696.609375,\"ha\":747,\"o\":\"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 \"},\"h\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 \"},\".\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 \"},\"φ\":{\"x_min\":-2,\"x_max\":878,\"ha\":974,\"o\":\"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 \"},\";\":{\"x_min\":0,\"x_max\":142,\"ha\":239,\"o\":\"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 \"},\"f\":{\"x_min\":0,\"x_max\":378,\"ha\":472,\"o\":\"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 \"},\"“\":{\"x_min\":1,\"x_max\":348.21875,\"ha\":454,\"o\":\"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 \"},\"A\":{\"x_min\":0.03125,\"x_max\":906.953125,\"ha\":1008,\"o\":\"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 \"},\"6\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 \"},\"‘\":{\"x_min\":1,\"x_max\":139.890625,\"ha\":236,\"o\":\"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 \"},\"ϊ\":{\"x_min\":-70,\"x_max\":283,\"ha\":361,\"o\":\"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 \"},\"π\":{\"x_min\":-0.21875,\"x_max\":773.21875,\"ha\":857,\"o\":\"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 \"},\"ά\":{\"x_min\":0,\"x_max\":765.5625,\"ha\":809,\"o\":\"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 \"},\"O\":{\"x_min\":0,\"x_max\":958,\"ha\":1057,\"o\":\"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 \"},\"n\":{\"x_min\":0,\"x_max\":615,\"ha\":724,\"o\":\"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 \"},\"3\":{\"x_min\":54,\"x_max\":737,\"ha\":792,\"o\":\"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 \"},\"9\":{\"x_min\":53,\"x_max\":739,\"ha\":792,\"o\":\"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 \"},\"l\":{\"x_min\":41,\"x_max\":166,\"ha\":279,\"o\":\"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 \"},\"¤\":{\"x_min\":40.09375,\"x_max\":728.796875,\"ha\":825,\"o\":\"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 \"},\"κ\":{\"x_min\":0,\"x_max\":632.328125,\"ha\":679,\"o\":\"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 \"},\"4\":{\"x_min\":48,\"x_max\":742.453125,\"ha\":792,\"o\":\"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 \"},\"p\":{\"x_min\":0,\"x_max\":685,\"ha\":786,\"o\":\"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 \"},\"‡\":{\"x_min\":0,\"x_max\":777,\"ha\":835,\"o\":\"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 \"},\"ψ\":{\"x_min\":0,\"x_max\":808,\"ha\":907,\"o\":\"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 \"},\"η\":{\"x_min\":0.78125,\"x_max\":697,\"ha\":810,\"o\":\"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 \"}},\"cssFontWeight\":\"normal\",\"ascender\":1189,\"underlinePosition\":-100,\"cssFontStyle\":\"normal\",\"boundingBox\":{\"yMin\":-334,\"xMin\":-111,\"yMax\":1189,\"xMax\":1672},\"resolution\":1000,\"original_font_information\":{\"postscript_name\":\"Helvetiker-Regular\",\"version_string\":\"Version 1.00 2004 initial release\",\"vendor_url\":\"http://www.magenta.gr/\",\"full_font_name\":\"Helvetiker\",\"font_family_name\":\"Helvetiker\",\"copyright\":\"Copyright (c) Μagenta ltd, 2004\",\"description\":\"\",\"trademark\":\"\",\"designer\":\"\",\"designer_url\":\"\",\"unique_font_identifier\":\"Μagenta ltd:Helvetiker:22-10-104\",\"license_url\":\"http://www.ellak.gr/fonts/MgOpen/license.html\",\"license_description\":\"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\\r\\n\\r\\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\\\"Fonts\\\") and associated documentation files (the \\\"Font Software\\\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \\r\\n\\r\\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\\r\\n\\r\\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \\\"MgOpen\\\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\\r\\n\\r\\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \\\"MgOpen\\\" name.\\r\\n\\r\\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \\r\\n\\r\\nTHE FONT SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.\",\"manufacturer_name\":\"Μagenta ltd\",\"font_sub_family_name\":\"Regular\"},\"descender\":-334,\"familyName\":\"Helvetiker\",\"lineHeight\":1522,\"underlineThickness\":50}","export class Greek {\n public static uppercaseHeta = \"\\u{0370}\";\n public static lowercaseHeta = \"\\u{0371}\";\n public static uppercaseArchaicSampi = \"\\u{0372}\";\n public static lowercaseArchaicSampi = \"\\u{0373}\";\n public static numeralSign = \"\\u{0374}\";\n public static lowerNumeralSign = \"\\u{0375}\";\n public static uppercasePamphylianDigamma = \"\\u{0376}\";\n public static lowercasePamphylianDigamma = \"\\u{0377}\";\n public static ypogegrammeni = \"\\u{037A}\";\n public static smallReversedLunateSigmaSymbol = \"\\u{037B}\";\n public static smallDottedLunateSigmaSymbol = \"\\u{037C}\";\n public static smallReversedDottedLunateSigmaSymbol = \"\\u{037D}\";\n public static questionMark = \"\\u{037E}\";\n public static uppercaseYot = \"\\u{037F}\";\n public static acuteaccent = \"\\u{0384}\";\n public static diaeresiswithacuteaccent = \"\\u{0385}\";\n public static uppercaseAwithacuteaccent = \"\\u{0386}\";\n public static anoTeleia = \"\\u{0387}\";\n public static uppercaseEpsilonwithacuteaccent = \"\\u{0388}\";\n public static uppercaseEtawithacuteaccent = \"\\u{0389}\";\n public static uppercaseIotawithacuteaccent = \"\\u{038A}\";\n public static uppercaseOmicronwithacuteaccent = \"\\u{038C}\";\n public static uppercaseUpsilonwithacuteaccent = \"\\u{038E}\";\n public static uppercaseOmegawithacuteaccent = \"\\u{038F}\";\n public static lowercaseIotawithdiaeresisandacuteaccent = \"\\u{0390}\";\n public static uppercaseAlpha = \"\\u{0391}\";\n public static uppercaseBeta = \"\\u{0392}\";\n public static uppercaseGamma = \"\\u{0393}\";\n public static uppercaseDelta = \"\\u{0394}\";\n public static uppercaseEpsilon = \"\\u{0395}\";\n public static uppercaseZeta = \"\\u{0396}\";\n public static uppercaseEta = \"\\u{0397}\";\n public static uppercaseTheta = \"\\u{0398}\";\n public static uppercaseIota = \"\\u{0399}\";\n public static uppercaseKappa = \"\\u{039A}\";\n public static uppercaseLambda = \"\\u{039B}\";\n public static uppercaseMu = \"\\u{039C}\";\n public static uppercaseNu = \"\\u{039D}\";\n public static uppercaseXi = \"\\u{039E}\";\n public static uppercaseOmicron = \"\\u{039F}\";\n public static uppercasePi = \"\\u{03A0}\";\n public static uppercaseRho = \"\\u{03A1}\";\n public static uppercaseSigma = \"\\u{03A3}\";\n public static uppercaseTau = \"\\u{03A4}\";\n public static uppercaseUpsilon = \"\\u{03A5}\";\n public static uppercasePhi = \"\\u{03A6}\";\n public static uppercaseChi = \"\\u{03A7}\";\n public static uppercasePsi = \"\\u{03A8}\";\n public static uppercaseOmega = \"\\u{03A9}\";\n public static uppercaseIotawithdiaeresis = \"\\u{03AA}\";\n public static uppercaseUpsilonwithdiaeresis = \"\\u{03AB}\";\n public static lowercaseAlphawithacuteaccent = \"\\u{03AC}\";\n public static lowercaseEpsilonwithacuteaccent = \"\\u{03AD}\";\n public static lowercaseEtawithacuteaccent = \"\\u{03AE}\";\n public static lowercaseIotawithacuteaccent = \"\\u{03AF}\";\n public static lowercaseUpsilonwithdiaeresisandacuteaccent = \"\\u{03B0}\";\n public static lowercaseAlpha = \"\\u{03B1}\";\n public static lowercaseBeta = \"\\u{03B2}\";\n public static lowercaseGamma = \"\\u{03B3}\";\n public static lowercaseDelta = \"\\u{03B4}\";\n public static lowercaseEpsilon = \"\\u{03B5}\";\n public static lowercaseZeta = \"\\u{03B6}\";\n public static lowercaseEta = \"\\u{03B7}\";\n public static lowercaseTheta = \"\\u{03B8}\";\n public static lowercaseIota = \"\\u{03B9}\";\n public static lowercaseKappa = \"\\u{03BA}\";\n public static lowercaseLambda = \"\\u{03BB}\";\n public static lowercaseMu = \"\\u{03BC}\";\n public static lowercaseNu = \"\\u{03BD}\";\n public static lowercaseXi = \"\\u{03BE}\";\n public static lowercaseOmicron = \"\\u{03BF}\";\n public static lowercasePi = \"\\u{03C0}\";\n public static lowercaseRho = \"\\u{03C1}\";\n public static lowercaseFinalSigma = \"\\u{03C2}\";\n public static lowercaseSigma = \"\\u{03C3}\";\n public static lowercaseTau = \"\\u{03C4}\";\n public static lowercaseUpsilon = \"\\u{03C5}\";\n public static lowercasePhi = \"\\u{03C6}\";\n public static lowercaseChi = \"\\u{03C7}\";\n public static lowercasePsi = \"\\u{03C8}\";\n public static lowercaseOmega = \"\\u{03C9}\";\n public static lowercaseIotawithdiaeresis = \"\\u{03CA}\";\n public static lowercaseUpsilonwithdiaeresis = \"\\u{03CB}\";\n public static lowercaseOmicronwithacuteaccent = \"\\u{03CC}\";\n public static lowercaseUpsilonwithacuteaccent = \"\\u{03CD}\";\n public static lowercaseOmegawithacuteaccent = \"\\u{03CE}\";\n public static uppercaseKaiSymbol = \"\\u{03CF}\";\n public static betaSymbol = \"\\u{03D0}\";\n public static thetaSymbol = \"\\u{03D1}\";\n public static upsilonwithhookSymbol = \"\\u{03D2}\";\n public static upsilonwithacuteandhookSymbol = \"\\u{03D3}\";\n public static upsilonwithdiaeresisandhookSymbol = \"\\u{03D4}\";\n public static phiSymbol = \"\\u{03D5}\";\n public static piSymbol = \"\\u{03D6}\";\n public static kaiSymbol = \"\\u{03D7}\";\n public static letterQoppa = \"\\u{03D8}\";\n public static lowercaseQoppa = \"\\u{03D9}\";\n public static letterStigma = \"\\u{03DA}\";\n public static lowercaseStigma = \"\\u{03DB}\";\n public static letterDigamma = \"\\u{03DC}\";\n public static lowercaseDigamma = \"\\u{03DD}\";\n public static letterKoppa = \"\\u{03DE}\";\n public static lowercaseKoppa = \"\\u{03DF}\";\n public static letterSampi = \"\\u{03E0}\";\n public static lowercaseSampi = \"\\u{03E1}\";\n public static copticuppercaseShei = \"\\u{03E2}\";\n public static copticlowercaseShei = \"\\u{03E3}\";\n public static copticuppercaseFei = \"\\u{03E4}\";\n public static copticlowercaseFei = \"\\u{03E5}\";\n public static copticuppercaseKhei = \"\\u{03E6}\";\n public static copticlowercaseKhei = \"\\u{03E7}\";\n public static copticuppercaseHori = \"\\u{03E8}\";\n public static copticlowercaseHori = \"\\u{03E9}\";\n public static copticuppercaseGangia = \"\\u{03EA}\";\n public static copticlowercaseGangia = \"\\u{03EB}\";\n public static copticuppercaseShima = \"\\u{03EC}\";\n public static copticlowercaseShima = \"\\u{03ED}\";\n public static copticuppercaseDei = \"\\u{03EE}\";\n public static copticlowercaseDei = \"\\u{03EF}\";\n public static kappaSymbol = \"\\u{03F0}\";\n public static rhoSymbol = \"\\u{03F1}\";\n public static lunateSigmaSymbol = \"\\u{03F2}\";\n public static letterYot = \"\\u{03F3}\";\n public static uppercaseThetaSymbol = \"\\u{03F4}\";\n public static lunateEpsilonSymbol = \"\\u{03F5}\";\n public static reversedLunateEpsilonSymbol = \"\\u{03F6}\";\n public static uppercaseSho = \"\\u{03F7}\";\n public static lowercaseSho = \"\\u{03F8}\";\n public static uppercaseLunateSigmaSymbol = \"\\u{03F9}\";\n public static uppercaseSan = \"\\u{03FA}\";\n public static lowercaseSan = \"\\u{03FB}\";\n public static rhowithstrokeSymbol = \"\\u{03FC}\";\n public static uppercaseReversedLunateSigmaSymbol = \"\\u{03FD}\";\n public static uppercaseDottedLunateSigmaSymbol = \"\\u{03FE}\";\n public static uppercaseReversedDottedLunateSigmaSymbol = \"\\u{03FF}\";\n}\n","import { Vector3 } from \"three\";\n\nexport const getRandomPoints = (n = 100, scale = 10): Vector3[] => {\n const points: Vector3[] = [];\n for (let index = 0; index < n; index++) {\n const x = Math.random() * scale;\n const y = Math.random() * scale;\n const z = Math.random() * scale;\n\n points.push(new Vector3(x, y, z));\n }\n\n return points;\n};\n"],"names":["$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$ilwiq","$06989a4a8159123e$export$60bbd10bdffb2e81","i","Vector3","j","k","JSON","parse","$c6f6e730d515f156$export$a1a1936bf656b97b","_","uppercaseHeta","_1","lowercaseHeta","_2","uppercaseArchaicSampi","_3","lowercaseArchaicSampi","_4","numeralSign","_5","lowerNumeralSign","_6","uppercasePamphylianDigamma","_7","lowercasePamphylianDigamma","_8","ypogegrammeni","_9","smallReversedLunateSigmaSymbol","_10","smallDottedLunateSigmaSymbol","_11","smallReversedDottedLunateSigmaSymbol","_12","questionMark","_13","uppercaseYot","_14","acuteaccent","_15","diaeresiswithacuteaccent","_16","uppercaseAwithacuteaccent","_17","anoTeleia","_18","uppercaseEpsilonwithacuteaccent","_19","uppercaseEtawithacuteaccent","_20","uppercaseIotawithacuteaccent","_21","uppercaseOmicronwithacuteaccent","_22","uppercaseUpsilonwithacuteaccent","_23","uppercaseOmegawithacuteaccent","_24","lowercaseIotawithdiaeresisandacuteaccent","_25","uppercaseAlpha","_26","uppercaseBeta","_27","uppercaseGamma","_28","uppercaseDelta","_29","uppercaseEpsilon","_30","uppercaseZeta","_31","uppercaseEta","_32","uppercaseTheta","_33","uppercaseIota","_34","uppercaseKappa","_35","uppercaseLambda","_36","uppercaseMu","_37","uppercaseNu","_38","uppercaseXi","_39","uppercaseOmicron","_40","uppercasePi","_41","uppercaseRho","_42","uppercaseSigma","_43","uppercaseTau","_44","uppercaseUpsilon","_45","uppercasePhi","_46","uppercaseChi","_47","uppercasePsi","_48","uppercaseOmega","_49","uppercaseIotawithdiaeresis","_50","uppercaseUpsilonwithdiaeresis","_51","lowercaseAlphawithacuteaccent","_52","lowercaseEpsilonwithacuteaccent","_53","lowercaseEtawithacuteaccent","_54","lowercaseIotawithacuteaccent","_55","lowercaseUpsilonwithdiaeresisandacuteaccent","_56","lowercaseAlpha","_57","lowercaseBeta","_58","lowercaseGamma","_59","lowercaseDelta","_60","lowercaseEpsilon","_61","lowercaseZeta","_62","lowercaseEta","_63","lowercaseTheta","_64","lowercaseIota","_65","lowercaseKappa","_66","lowercaseLambda","_67","lowercaseMu","_68","lowercaseNu","_69","lowercaseXi","_70","lowercaseOmicron","_71","lowercasePi","_72","lowercaseRho","_73","lowercaseFinalSigma","_74","lowercaseSigma","_75","lowercaseTau","_76","lowercaseUpsilon","_77","lowercasePhi","_78","lowercaseChi","_79","lowercasePsi","_80","lowercaseOmega","_81","lowercaseIotawithdiaeresis","_82","lowercaseUpsilonwithdiaeresis","_83","lowercaseOmicronwithacuteaccent","_84","lowercaseUpsilonwithacuteaccent","_85","lowercaseOmegawithacuteaccent","_86","uppercaseKaiSymbol","_87","betaSymbol","_88","thetaSymbol","_89","upsilonwithhookSymbol","_90","upsilonwithacuteandhookSymbol","_91","upsilonwithdiaeresisandhookSymbol","_92","phiSymbol","_93","piSymbol","_94","kaiSymbol","_95","letterQoppa","_96","lowercaseQoppa","_97","letterStigma","_98","lowercaseStigma","_99","letterDigamma","_100","lowercaseDigamma","_101","letterKoppa","_102","lowercaseKoppa","_103","letterSampi","_104","lowercaseSampi","_105","copticuppercaseShei","_106","copticlowercaseShei","_107","copticuppercaseFei","_108","copticlowercaseFei","_109","copticuppercaseKhei","_110","copticlowercaseKhei","_111","copticuppercaseHori","_112","copticlowercaseHori","_113","copticuppercaseGangia","_114","copticlowercaseGangia","_115","copticuppercaseShima","_116","copticlowercaseShima","_117","copticuppercaseDei","_118","copticlowercaseDei","_119","kappaSymbol","_120","rhoSymbol","_121","lunateSigmaSymbol","_122","letterYot","_123","uppercaseThetaSymbol","_124","lunateEpsilonSymbol","_125","reversedLunateEpsilonSymbol","_126","uppercaseSho","_127","lowercaseSho","_128","uppercaseLunateSigmaSymbol","_129","uppercaseSan","_130","lowercaseSan","_131","rhowithstrokeSymbol","_132","uppercaseReversedLunateSigmaSymbol","_133","uppercaseDottedLunateSigmaSymbol","_134","uppercaseReversedDottedLunateSigmaSymbol"],"version":3,"file":"index.f9a4f1dc.js.map"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 716fbe4..64c937f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,26 +1 @@ - - - - - - - Threeplot playground and showcase page - - - - - - -

-
- -
-
- -
-
- -
-
- - +Threeplot playground and showcase page
\ No newline at end of file