-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy paththree_addons.mjs
6 lines (6 loc) · 53.3 KB
/
three_addons.mjs
1
2
3
4
5
6
/**
* @license
* Copyright 2010-2023 Three.js Authors
* SPDX-License-Identifier: MIT
*/
import{ExtrudeGeometry as t,ShapePath as e,Ray as i,Plane as s,MathUtils as o,Vector3 as r,Controls as n,MOUSE as a,TOUCH as h,Quaternion as l,Spherical as c,Vector2 as u,OrthographicCamera as d,BufferGeometry as p,Float32BufferAttribute as m,Mesh as f,ShaderMaterial as g,UniformsUtils as _,WebGLRenderTarget as v,HalfFloatType as b,NoBlending as y,Clock as x,Color as S,AdditiveBlending as M,MeshBasicMaterial as w,Vector4 as T,Box3 as P,Matrix4 as C,Frustum as E,Matrix3 as D,DoubleSide as z,Box2 as R,SRGBColorSpace as j,Camera as L}from"./three.mjs";class A extends t{constructor(t,e={}){const i=e.font;if(void 0===i)super();else{const s=i.generateShapes(t,e.size);void 0===e.depth&&void 0!==e.height&&console.warn("THREE.TextGeometry: .height is now depreciated. Please use .depth instead"),e.depth=void 0!==e.depth?e.depth:void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),super(s,e)}this.type="TextGeometry"}}class k{constructor(t){this.isFont=!0,this.type="Font",this.data=t}generateShapes(t,e=100){const i=[],s=function(t,e,i){const s=Array.from(t),o=e/i.resolution,r=(i.boundingBox.yMax-i.boundingBox.yMin+i.underlineThickness)*o,n=[];let a=0,h=0;for(let t=0;t<s.length;t++){const e=s[t];if("\n"===e)a=0,h-=r;else{const t=O(e,o,a,h,i);a+=t.offsetX,n.push(t.path)}}return n}(t,e,this.data);for(let t=0,e=s.length;t<e;t++)i.push(...s[t].toShapes());return i}}function O(t,i,s,o,r){const n=r.glyphs[t]||r.glyphs["?"];if(!n)return void console.error('THREE.Font: character "'+t+'" does not exists in font family '+r.familyName+".");const a=new e;let h,l,c,u,d,p,m,f;if(n.o){const t=n._cachedOutline||(n._cachedOutline=n.o.split(" "));for(let e=0,r=t.length;e<r;){switch(t[e++]){case"m":h=t[e++]*i+s,l=t[e++]*i+o,a.moveTo(h,l);break;case"l":h=t[e++]*i+s,l=t[e++]*i+o,a.lineTo(h,l);break;case"q":c=t[e++]*i+s,u=t[e++]*i+o,d=t[e++]*i+s,p=t[e++]*i+o,a.quadraticCurveTo(d,p,c,u);break;case"b":c=t[e++]*i+s,u=t[e++]*i+o,d=t[e++]*i+s,p=t[e++]*i+o,m=t[e++]*i+s,f=t[e++]*i+o,a.bezierCurveTo(d,p,m,f,c,u)}}}return{offsetX:n.ha*i,path:a}}const U={type:"change"},B={type:"start"},F={type:"end"},I=new i,W=new s,N=Math.cos(70*o.DEG2RAD),Y=new r,K=2*Math.PI,V=-1,Z=0,H=1,X=2,Q=3,q=4,G=5,J=6,$=1e-6;class tt extends n{constructor(t,e=null){super(t,e),this.state=V,this.enabled=!0,this.target=new r,this.cursor=new r,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:a.ROTATE,MIDDLE:a.DOLLY,RIGHT:a.PAN},this.touches={ONE:h.ROTATE,TWO:h.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new r,this._lastQuaternion=new l,this._lastTargetPosition=new r,this._quat=(new l).setFromUnitVectors(t.up,new r(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new c,this._sphericalDelta=new c,this._scale=1,this._panOffset=new r,this._rotateStart=new u,this._rotateEnd=new u,this._rotateDelta=new u,this._panStart=new u,this._panEnd=new u,this._panDelta=new u,this._dollyStart=new u,this._dollyEnd=new u,this._dollyDelta=new u,this._dollyDirection=new r,this._mouse=new u,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=it.bind(this),this._onPointerDown=et.bind(this),this._onPointerUp=st.bind(this),this._onContextMenu=ct.bind(this),this._onMouseWheel=nt.bind(this),this._onKeyDown=at.bind(this),this._onTouchStart=ht.bind(this),this._onTouchMove=lt.bind(this),this._onMouseDown=ot.bind(this),this._onMouseMove=rt.bind(this),this._interceptControlDown=ut.bind(this),this._interceptControlUp=dt.bind(this),null!==this.domElement&&this.connect(),this.update()}connect(){this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1});this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents();this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){null!==this._domElementKeyEvents&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(U),this.update(),this.state=V}resetOrthoPanZoom(){this._panOffset.set(0,0,0),this.object.zoom=1,this.object.updateProjectionMatrix()}update(t=null){const e=this.object.position;Y.copy(e).sub(this.target),Y.applyQuaternion(this._quat),this._spherical.setFromVector3(Y),this.autoRotate&&this.state===V&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,s=this.maxAzimuthAngle;isFinite(i)&&isFinite(s)&&(i<-Math.PI?i+=K:i>Math.PI&&(i-=K),s<-Math.PI?s+=K:s>Math.PI&&(s-=K),this._spherical.theta=i<=s?Math.max(i,Math.min(s,this._spherical.theta)):this._spherical.theta>(i+s)/2?Math.max(i,this._spherical.theta):Math.min(s,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),!0===this.enableDamping?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let o=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const t=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),o=t!=this._spherical.radius}if(Y.setFromSpherical(this._spherical),Y.applyQuaternion(this._quatInverse),e.copy(this.target).add(Y),this.object.lookAt(this.target),!0===this.enableDamping?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let t=null;if(this.object.isPerspectiveCamera){const e=Y.length();t=this._clampDistance(e*this._scale);const i=e-t;this.object.position.addScaledVector(this._dollyDirection,i),this.object.updateMatrixWorld(),o=!!i}else if(this.object.isOrthographicCamera){const e=new r(this._mouse.x,this._mouse.y,0);e.unproject(this.object);const i=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),o=i!==this.object.zoom;const s=new r(this._mouse.x,this._mouse.y,0);s.unproject(this.object),this.object.position.sub(s).add(e),this.object.updateMatrixWorld(),t=Y.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;null!==t&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(t).add(this.object.position):(I.origin.copy(this.object.position),I.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(I.direction))<N?this.object.lookAt(this.target):(W.setFromNormalAndCoplanarPoint(this.object.up,this.target),I.intersectPlane(W,this.target))))}else if(this.object.isOrthographicCamera){const t=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),t!==this.object.zoom&&(this.object.updateProjectionMatrix(),o=!0)}return this._scale=1,this._performCursorZoom=!1,!!(o||this._lastPosition.distanceToSquared(this.object.position)>$||8*(1-this._lastQuaternion.dot(this.object.quaternion))>$||this._lastTargetPosition.distanceToSquared(this.target)>$)&&(this.dispatchEvent(U),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0)}_getAutoRotationAngle(t){return null!==t?K/60*this.autoRotateSpeed*t:K/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(.01*t);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){Y.setFromMatrixColumn(e,0),Y.multiplyScalar(-t),this._panOffset.add(Y)}_panUp(t,e){!0===this.screenSpacePanning?Y.setFromMatrixColumn(e,1):(Y.setFromMatrixColumn(e,0),Y.crossVectors(this.object.up,Y)),Y.multiplyScalar(t),this._panOffset.add(Y)}_pan(t,e){const i=this.domElement;if(this.object.isPerspectiveCamera){const s=this.object.position;Y.copy(s).sub(this.target);let o=Y.length();o*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*o/i.clientHeight,this.object.matrix),this._panUp(2*e*o/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const i=this.domElement.getBoundingClientRect(),s=t-i.left,o=e-i.top,r=i.width,n=i.height;this._mouse.x=s/r*2-1,this._mouse.y=-o/n*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(K*this._rotateDelta.x/e.clientHeight),this._rotateUp(K*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this._rotateUp(K*this.rotateSpeed/this.domElement.clientHeight):this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this._rotateUp(-K*this.rotateSpeed/this.domElement.clientHeight):this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this._rotateLeft(K*this.rotateSpeed/this.domElement.clientHeight):this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this._rotateLeft(-K*this.rotateSpeed/this.domElement.clientHeight):this._pan(-this.keyPanSpeed,0),e=!0}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(1===this._pointers.length)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),i=.5*(t.pageX+e.x),s=.5*(t.pageY+e.y);this._rotateStart.set(i,s)}}_handleTouchStartPan(t){if(1===this._pointers.length)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),i=.5*(t.pageX+e.x),s=.5*(t.pageY+e.y);this._panStart.set(i,s)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),i=t.pageX-e.x,s=t.pageY-e.y,o=Math.sqrt(i*i+s*s);this._dollyStart.set(0,o)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(1==this._pointers.length)this._rotateEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),i=.5*(t.pageX+e.x),s=.5*(t.pageY+e.y);this._rotateEnd.set(i,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(K*this._rotateDelta.x/e.clientHeight),this._rotateUp(K*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(1===this._pointers.length)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),i=.5*(t.pageX+e.x),s=.5*(t.pageY+e.y);this._panEnd.set(i,s)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const e=this._getSecondPointerPosition(t),i=t.pageX-e.x,s=t.pageY-e.y,o=Math.sqrt(i*i+s*s);this._dollyEnd.set(0,o),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const r=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._updateZoomParameters(r,n)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return void this._pointers.splice(e,1)}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];void 0===e&&(e=new u,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,i={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100}return t.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}}function et(t){!1!==this.enabled&&(0===this._pointers.length&&(this.domElement.setPointerCapture(t.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),this._isTrackingPointer(t)||(this._addPointer(t),"touch"===t.pointerType?this._onTouchStart(t):this._onMouseDown(t)))}function it(t){!1!==this.enabled&&("touch"===t.pointerType?this._onTouchMove(t):this._onMouseMove(t))}function st(t){switch(this._removePointer(t),this._pointers.length){case 0:this.domElement.releasePointerCapture(t.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(F),this.state=V;break;case 1:const e=this._pointers[0],i=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:i.x,pageY:i.y})}}function ot(t){let e;switch(t.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case a.DOLLY:if(!1===this.enableZoom)return;this._handleMouseDownDolly(t),this.state=H;break;case a.ROTATE:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===this.enablePan)return;this._handleMouseDownPan(t),this.state=X}else{if(!1===this.enableRotate)return;this._handleMouseDownRotate(t),this.state=Z}break;case a.PAN:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===this.enableRotate)return;this._handleMouseDownRotate(t),this.state=Z}else{if(!1===this.enablePan)return;this._handleMouseDownPan(t),this.state=X}break;default:this.state=V}this.state!==V&&this.dispatchEvent(B)}function rt(t){switch(this.state){case Z:if(!1===this.enableRotate)return;this._handleMouseMoveRotate(t);break;case H:if(!1===this.enableZoom)return;this._handleMouseMoveDolly(t);break;case X:if(!1===this.enablePan)return;this._handleMouseMovePan(t)}}function nt(t){!1!==this.enabled&&!1!==this.enableZoom&&this.state===V&&(t.preventDefault(),this.dispatchEvent(B),this._handleMouseWheel(this._customWheelEvent(t)),this.dispatchEvent(F))}function at(t){!1!==this.enabled&&!1!==this.enablePan&&this._handleKeyDown(t)}function ht(t){switch(this._trackPointer(t),this._pointers.length){case 1:switch(this.touches.ONE){case h.ROTATE:if(!1===this.enableRotate)return;this._handleTouchStartRotate(t),this.state=Q;break;case h.PAN:if(!1===this.enablePan)return;this._handleTouchStartPan(t),this.state=q;break;default:this.state=V}break;case 2:switch(this.touches.TWO){case h.DOLLY_PAN:if(!1===this.enableZoom&&!1===this.enablePan)return;this._handleTouchStartDollyPan(t),this.state=G;break;case h.DOLLY_ROTATE:if(!1===this.enableZoom&&!1===this.enableRotate)return;this._handleTouchStartDollyRotate(t),this.state=J;break;default:this.state=V}break;default:this.state=V}this.state!==V&&this.dispatchEvent(B)}function lt(t){switch(this._trackPointer(t),this.state){case Q:if(!1===this.enableRotate)return;this._handleTouchMoveRotate(t),this.update();break;case q:if(!1===this.enablePan)return;this._handleTouchMovePan(t),this.update();break;case G:if(!1===this.enableZoom&&!1===this.enablePan)return;this._handleTouchMoveDollyPan(t),this.update();break;case J:if(!1===this.enableZoom&&!1===this.enableRotate)return;this._handleTouchMoveDollyRotate(t),this.update();break;default:this.state=V}}function ct(t){!1!==this.enabled&&t.preventDefault()}function ut(t){if("Control"===t.key){this._controlActive=!0;this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0})}}function dt(t){if("Control"===t.key){this._controlActive=!1;this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0})}}const pt={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class mt{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const ft=new d(-1,1,1,-1,0,1);const gt=new class extends p{constructor(){super(),this.setAttribute("position",new m([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new m([0,2,0,0,2,0],2))}};class _t{constructor(t){this._mesh=new f(gt,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,ft)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class vt extends mt{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof g?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=_.clone(t.uniforms),this.material=new g({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new _t(this.material)}render(t,e,i){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class bt extends mt{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,i){const s=t.getContext(),o=t.state;let r,n;o.buffers.color.setMask(!1),o.buffers.depth.setMask(!1),o.buffers.color.setLocked(!0),o.buffers.depth.setLocked(!0),this.inverse?(r=0,n=1):(r=1,n=0),o.buffers.stencil.setTest(!0),o.buffers.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),o.buffers.stencil.setFunc(s.ALWAYS,r,4294967295),o.buffers.stencil.setClear(n),o.buffers.stencil.setLocked(!0),t.setRenderTarget(i),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),o.buffers.color.setLocked(!1),o.buffers.depth.setLocked(!1),o.buffers.color.setMask(!0),o.buffers.depth.setMask(!0),o.buffers.stencil.setLocked(!1),o.buffers.stencil.setFunc(s.EQUAL,1,4294967295),o.buffers.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),o.buffers.stencil.setLocked(!0)}}class yt extends mt{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class xt{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const i=t.getSize(new u);this._width=i.width,this._height=i.height,(e=new v(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:b})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new vt(pt),this.copyPass.material.blending=y,this.clock=new x}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e<this.passes.length;e++)if(this.passes[e].enabled)return!1;return!0}render(t){void 0===t&&(t=this.clock.getDelta());const e=this.renderer.getRenderTarget();let i=!1;for(let e=0,s=this.passes.length;e<s;e++){const s=this.passes[e];if(!1!==s.enabled){if(s.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(e),s.render(this.renderer,this.writeBuffer,this.readBuffer,t,i),s.needsSwap){if(i){const e=this.renderer.getContext(),i=this.renderer.state.buffers.stencil;i.setFunc(e.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,t),i.setFunc(e.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==bt&&(s instanceof bt?i=!0:s instanceof yt&&(i=!1))}}this.renderer.setRenderTarget(e)}reset(t){if(void 0===t){const e=this.renderer.getSize(new u);this._pixelRatio=this.renderer.getPixelRatio(),this._width=e.width,this._height=e.height,(t=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(t,e){this._width=t,this._height=e;const i=this._width*this._pixelRatio,s=this._height*this._pixelRatio;this.renderTarget1.setSize(i,s),this.renderTarget2.setSize(i,s);for(let t=0;t<this.passes.length;t++)this.passes[t].setSize(i,s)}setPixelRatio(t){this._pixelRatio=t,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class St extends mt{constructor(t,e,i=null,s=null,o=null){super(),this.scene=t,this.camera=e,this.overrideMaterial=i,this.clearColor=s,this.clearAlpha=o,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new S}render(t,e,i){const s=t.autoClear;let o,r;t.autoClear=!1,null!==this.overrideMaterial&&(r=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),null!==this.clearColor&&(t.getClearColor(this._oldClearColor),t.setClearColor(this.clearColor,t.getClearAlpha())),null!==this.clearAlpha&&(o=t.getClearAlpha(),t.setClearAlpha(this.clearAlpha)),1==this.clearDepth&&t.clearDepth(),t.setRenderTarget(this.renderToScreen?null:i),!0===this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),t.render(this.scene,this.camera),null!==this.clearColor&&t.setClearColor(this._oldClearColor),null!==this.clearAlpha&&t.setClearAlpha(o),null!==this.overrideMaterial&&(this.scene.overrideMaterial=r),t.autoClear=s}}class Mt{constructor(t=Math){this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.grad4=[[0,1,1,1],[0,1,1,-1],[0,1,-1,1],[0,1,-1,-1],[0,-1,1,1],[0,-1,1,-1],[0,-1,-1,1],[0,-1,-1,-1],[1,0,1,1],[1,0,1,-1],[1,0,-1,1],[1,0,-1,-1],[-1,0,1,1],[-1,0,1,-1],[-1,0,-1,1],[-1,0,-1,-1],[1,1,0,1],[1,1,0,-1],[1,-1,0,1],[1,-1,0,-1],[-1,1,0,1],[-1,1,0,-1],[-1,-1,0,1],[-1,-1,0,-1],[1,1,1,0],[1,1,-1,0],[1,-1,1,0],[1,-1,-1,0],[-1,1,1,0],[-1,1,-1,0],[-1,-1,1,0],[-1,-1,-1,0]],this.p=[];for(let e=0;e<256;e++)this.p[e]=Math.floor(256*t.random());this.perm=[];for(let t=0;t<512;t++)this.perm[t]=this.p[255&t];this.simplex=[[0,1,2,3],[0,1,3,2],[0,0,0,0],[0,2,3,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,3,0],[0,2,1,3],[0,0,0,0],[0,3,1,2],[0,3,2,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,3,2,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,0,3],[0,0,0,0],[1,3,0,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,3,0,1],[2,3,1,0],[1,0,2,3],[1,0,3,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,3,1],[0,0,0,0],[2,1,3,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,1,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,0,1,2],[3,0,2,1],[0,0,0,0],[3,1,2,0],[2,1,0,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,1,0,2],[0,0,0,0],[3,2,0,1],[3,2,1,0]]}dot(t,e,i){return t[0]*e+t[1]*i}dot3(t,e,i,s){return t[0]*e+t[1]*i+t[2]*s}dot4(t,e,i,s,o){return t[0]*e+t[1]*i+t[2]*s+t[3]*o}noise(t,e){let i,s,o;const r=(t+e)*(.5*(Math.sqrt(3)-1)),n=Math.floor(t+r),a=Math.floor(e+r),h=(3-Math.sqrt(3))/6,l=(n+a)*h,c=t-(n-l),u=e-(a-l);let d,p;c>u?(d=1,p=0):(d=0,p=1);const m=c-d+h,f=u-p+h,g=c-1+2*h,_=u-1+2*h,v=255&n,b=255&a,y=this.perm[v+this.perm[b]]%12,x=this.perm[v+d+this.perm[b+p]]%12,S=this.perm[v+1+this.perm[b+1]]%12;let M=.5-c*c-u*u;M<0?i=0:(M*=M,i=M*M*this.dot(this.grad3[y],c,u));let w=.5-m*m-f*f;w<0?s=0:(w*=w,s=w*w*this.dot(this.grad3[x],m,f));let T=.5-g*g-_*_;return T<0?o=0:(T*=T,o=T*T*this.dot(this.grad3[S],g,_)),70*(i+s+o)}noise3d(t,e,i){let s,o,r,n;const a=(t+e+i)*(1/3),h=Math.floor(t+a),l=Math.floor(e+a),c=Math.floor(i+a),u=1/6,d=(h+l+c)*u,p=t-(h-d),m=e-(l-d),f=i-(c-d);let g,_,v,b,y,x;p>=m?m>=f?(g=1,_=0,v=0,b=1,y=1,x=0):p>=f?(g=1,_=0,v=0,b=1,y=0,x=1):(g=0,_=0,v=1,b=1,y=0,x=1):m<f?(g=0,_=0,v=1,b=0,y=1,x=1):p<f?(g=0,_=1,v=0,b=0,y=1,x=1):(g=0,_=1,v=0,b=1,y=1,x=0);const S=p-g+u,M=m-_+u,w=f-v+u,T=p-b+2*u,P=m-y+2*u,C=f-x+2*u,E=p-1+.5,D=m-1+.5,z=f-1+.5,R=255&h,j=255&l,L=255&c,A=this.perm[R+this.perm[j+this.perm[L]]]%12,k=this.perm[R+g+this.perm[j+_+this.perm[L+v]]]%12,O=this.perm[R+b+this.perm[j+y+this.perm[L+x]]]%12,U=this.perm[R+1+this.perm[j+1+this.perm[L+1]]]%12;let B=.6-p*p-m*m-f*f;B<0?s=0:(B*=B,s=B*B*this.dot3(this.grad3[A],p,m,f));let F=.6-S*S-M*M-w*w;F<0?o=0:(F*=F,o=F*F*this.dot3(this.grad3[k],S,M,w));let I=.6-T*T-P*P-C*C;I<0?r=0:(I*=I,r=I*I*this.dot3(this.grad3[O],T,P,C));let W=.6-E*E-D*D-z*z;return W<0?n=0:(W*=W,n=W*W*this.dot3(this.grad3[U],E,D,z)),32*(s+o+r+n)}noise4d(t,e,i,s){const o=this.grad4,r=this.simplex,n=this.perm,a=(Math.sqrt(5)-1)/4,h=(5-Math.sqrt(5))/20;let l,c,u,d,p;const m=(t+e+i+s)*a,f=Math.floor(t+m),g=Math.floor(e+m),_=Math.floor(i+m),v=Math.floor(s+m),b=(f+g+_+v)*h,y=t-(f-b),x=e-(g-b),S=i-(_-b),M=s-(v-b),w=(y>x?32:0)+(y>S?16:0)+(x>S?8:0)+(y>M?4:0)+(x>M?2:0)+(S>M?1:0),T=r[w][0]>=3?1:0,P=r[w][1]>=3?1:0,C=r[w][2]>=3?1:0,E=r[w][3]>=3?1:0,D=r[w][0]>=2?1:0,z=r[w][1]>=2?1:0,R=r[w][2]>=2?1:0,j=r[w][3]>=2?1:0,L=r[w][0]>=1?1:0,A=r[w][1]>=1?1:0,k=r[w][2]>=1?1:0,O=r[w][3]>=1?1:0,U=y-T+h,B=x-P+h,F=S-C+h,I=M-E+h,W=y-D+2*h,N=x-z+2*h,Y=S-R+2*h,K=M-j+2*h,V=y-L+3*h,Z=x-A+3*h,H=S-k+3*h,X=M-O+3*h,Q=y-1+4*h,q=x-1+4*h,G=S-1+4*h,J=M-1+4*h,$=255&f,tt=255&g,et=255&_,it=255&v,st=n[$+n[tt+n[et+n[it]]]]%32,ot=n[$+T+n[tt+P+n[et+C+n[it+E]]]]%32,rt=n[$+D+n[tt+z+n[et+R+n[it+j]]]]%32,nt=n[$+L+n[tt+A+n[et+k+n[it+O]]]]%32,at=n[$+1+n[tt+1+n[et+1+n[it+1]]]]%32;let ht=.6-y*y-x*x-S*S-M*M;ht<0?l=0:(ht*=ht,l=ht*ht*this.dot4(o[st],y,x,S,M));let lt=.6-U*U-B*B-F*F-I*I;lt<0?c=0:(lt*=lt,c=lt*lt*this.dot4(o[ot],U,B,F,I));let ct=.6-W*W-N*N-Y*Y-K*K;ct<0?u=0:(ct*=ct,u=ct*ct*this.dot4(o[rt],W,N,Y,K));let ut=.6-V*V-Z*Z-H*H-X*X;ut<0?d=0:(ut*=ut,d=ut*ut*this.dot4(o[nt],V,Z,H,X));let dt=.6-Q*Q-q*q-G*G-J*J;return dt<0?p=0:(dt*=dt,p=dt*dt*this.dot4(o[at],Q,q,G,J)),27*(l+c+u+d+p)}}const wt={name:"LuminosityHighPassShader",shaderID:"luminosityHighPass",uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new S(0)},defaultOpacity:{value:0}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec3 defaultColor;\n\t\tuniform float defaultOpacity;\n\t\tuniform float luminosityThreshold;\n\t\tuniform float smoothWidth;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\n\t\t\tfloat v = luminance( texel.xyz );\n\n\t\t\tvec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );\n\n\t\t\tfloat alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );\n\n\t\t\tgl_FragColor = mix( outputColor, texel, alpha );\n\n\t\t}"};class Tt extends mt{constructor(t,e,i,s){super(),this.strength=void 0!==e?e:1,this.radius=i,this.threshold=s,this.resolution=void 0!==t?new u(t.x,t.y):new u(256,256),this.clearColor=new S(0,0,0),this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let o=Math.round(this.resolution.x/2),n=Math.round(this.resolution.y/2);this.renderTargetBright=new v(o,n,{type:b}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let t=0;t<this.nMips;t++){const e=new v(o,n,{type:b});e.texture.name="UnrealBloomPass.h"+t,e.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(e);const i=new v(o,n,{type:b});i.texture.name="UnrealBloomPass.v"+t,i.texture.generateMipmaps=!1,this.renderTargetsVertical.push(i),o=Math.round(o/2),n=Math.round(n/2)}const a=wt;this.highPassUniforms=_.clone(a.uniforms),this.highPassUniforms.luminosityThreshold.value=s,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new g({uniforms:this.highPassUniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader}),this.separableBlurMaterials=[];const h=[3,5,7,9,11];o=Math.round(this.resolution.x/2),n=Math.round(this.resolution.y/2);for(let t=0;t<this.nMips;t++)this.separableBlurMaterials.push(this.getSeperableBlurMaterial(h[t])),this.separableBlurMaterials[t].uniforms.invSize.value=new u(1/o,1/n),o=Math.round(o/2),n=Math.round(n/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=e,this.compositeMaterial.uniforms.bloomRadius.value=.1;this.compositeMaterial.uniforms.bloomFactors.value=[1,.8,.6,.4,.2],this.bloomTintColors=[new r(1,1,1),new r(1,1,1),new r(1,1,1),new r(1,1,1),new r(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors;const l=pt;this.copyUniforms=_.clone(l.uniforms),this.blendMaterial=new g({uniforms:this.copyUniforms,vertexShader:l.vertexShader,fragmentShader:l.fragmentShader,blending:M,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new S,this.oldClearAlpha=1,this.basic=new w,this.fsQuad=new _t(null)}dispose(){for(let t=0;t<this.renderTargetsHorizontal.length;t++)this.renderTargetsHorizontal[t].dispose();for(let t=0;t<this.renderTargetsVertical.length;t++)this.renderTargetsVertical[t].dispose();this.renderTargetBright.dispose();for(let t=0;t<this.separableBlurMaterials.length;t++)this.separableBlurMaterials[t].dispose();this.compositeMaterial.dispose(),this.blendMaterial.dispose(),this.basic.dispose(),this.fsQuad.dispose()}setSize(t,e){let i=Math.round(t/2),s=Math.round(e/2);this.renderTargetBright.setSize(i,s);for(let t=0;t<this.nMips;t++)this.renderTargetsHorizontal[t].setSize(i,s),this.renderTargetsVertical[t].setSize(i,s),this.separableBlurMaterials[t].uniforms.invSize.value=new u(1/i,1/s),i=Math.round(i/2),s=Math.round(s/2)}render(t,e,i,s,o){t.getClearColor(this._oldClearColor),this.oldClearAlpha=t.getClearAlpha();const r=t.autoClear;t.autoClear=!1,t.setClearColor(this.clearColor,0),o&&t.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=i.texture,t.setRenderTarget(null),t.clear(),this.fsQuad.render(t)),this.highPassUniforms.tDiffuse.value=i.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,t.setRenderTarget(this.renderTargetBright),t.clear(),this.fsQuad.render(t);let n=this.renderTargetBright;for(let e=0;e<this.nMips;e++)this.fsQuad.material=this.separableBlurMaterials[e],this.separableBlurMaterials[e].uniforms.colorTexture.value=n.texture,this.separableBlurMaterials[e].uniforms.direction.value=Tt.BlurDirectionX,t.setRenderTarget(this.renderTargetsHorizontal[e]),t.clear(),this.fsQuad.render(t),this.separableBlurMaterials[e].uniforms.colorTexture.value=this.renderTargetsHorizontal[e].texture,this.separableBlurMaterials[e].uniforms.direction.value=Tt.BlurDirectionY,t.setRenderTarget(this.renderTargetsVertical[e]),t.clear(),this.fsQuad.render(t),n=this.renderTargetsVertical[e];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,t.setRenderTarget(this.renderTargetsHorizontal[0]),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.blendMaterial,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,o&&t.state.buffers.stencil.setTest(!0),this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(i),this.fsQuad.render(t)),t.setClearColor(this._oldClearColor,this.oldClearAlpha),t.autoClear=r}getSeperableBlurMaterial(t){const e=[];for(let i=0;i<t;i++)e.push(.39894*Math.exp(-.5*i*i/(t*t))/t);return new g({defines:{KERNEL_RADIUS:t},uniforms:{colorTexture:{value:null},invSize:{value:new u(.5,.5)},direction:{value:new u(.5,.5)},gaussianCoefficients:{value:e}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include <common>\n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 invSize;\n\t\t\t\tuniform vec2 direction;\n\t\t\t\tuniform float gaussianCoefficients[KERNEL_RADIUS];\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tfloat weightSum = gaussianCoefficients[0];\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv ).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianCoefficients[i];\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset ).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset ).rgb;\n\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\n\t\t\t\t\t\tweightSum += 2.0 * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}"})}getCompositeMaterial(t){return new g({defines:{NUM_MIPS:t},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}"})}}Tt.BlurDirectionX=new u(1,0),Tt.BlurDirectionY=new u(0,1);class Pt{constructor(){this.id=0,this.object=null,this.z=0,this.renderOrder=0}}class Ct{constructor(){this.id=0,this.v1=new Et,this.v2=new Et,this.v3=new Et,this.normalModel=new r,this.vertexNormalsModel=[new r,new r,new r],this.vertexNormalsLength=0,this.color=new S,this.material=null,this.uvs=[new u,new u,new u],this.z=0,this.renderOrder=0}}class Et{constructor(){this.position=new r,this.positionWorld=new r,this.positionScreen=new T,this.visible=!0}copy(t){this.positionWorld.copy(t.positionWorld),this.positionScreen.copy(t.positionScreen)}}class Dt{constructor(){this.id=0,this.v1=new Et,this.v2=new Et,this.vertexColors=[new S,new S],this.material=null,this.z=0,this.renderOrder=0}}class zt{constructor(){this.id=0,this.object=null,this.x=0,this.y=0,this.z=0,this.rotation=0,this.scale=new u,this.material=null,this.renderOrder=0}}class Rt{constructor(){let t,e,i,s,o,n,a,h,l,c,u,d=0,p=0,m=0,f=0,g=0;const _={objects:[],lights:[],elements:[]},v=new r,b=new T,y=new P(new r(-1,-1,-1),new r(1,1,1)),x=new P,S=new Array(3),M=new C,w=new C,R=new C,j=new E,L=[],A=[],k=[],O=[],U=[];const B=new function(){const t=[],e=[],r=[];let l=null;const c=new D;function d(t){const e=t.position,i=t.positionWorld,s=t.positionScreen;i.copy(e).applyMatrix4(u),s.copy(i).applyMatrix4(w);const o=1/s.w;s.x*=o,s.y*=o,s.z*=o,t.visible=s.x>=-1&&s.x<=1&&s.y>=-1&&s.y<=1&&s.z>=-1&&s.z<=1}function g(t,e,i){return!0===t.visible||!0===e.visible||!0===i.visible||(S[0]=t.positionScreen,S[1]=e.positionScreen,S[2]=i.positionScreen,y.intersectsBox(x.setFromPoints(S)))}function M(t,e,i){return(i.positionScreen.x-t.positionScreen.x)*(e.positionScreen.y-t.positionScreen.y)-(i.positionScreen.y-t.positionScreen.y)*(e.positionScreen.x-t.positionScreen.x)<0}return{setObject:function(i){l=i,c.getNormalMatrix(l.matrixWorld),t.length=0,e.length=0,r.length=0},projectVertex:d,checkTriangleVisibility:g,checkBackfaceCulling:M,pushVertex:function(t,e,o){i=function(){if(s===p){const t=new Et;return A.push(t),p++,s++,t}return A[s++]}(),i.position.set(t,e,o),d(i)},pushNormal:function(e,i,s){t.push(e,i,s)},pushColor:function(t,i,s){e.push(t,i,s)},pushUv:function(t,e){r.push(t,e)},pushLine:function(t,i){const s=A[t],o=A[i];s.positionScreen.copy(s.position).applyMatrix4(R),o.positionScreen.copy(o.position).applyMatrix4(R),!0===function(t,e){let i=0,s=1;const o=t.z+t.w,r=e.z+e.w,n=-t.z+t.w,a=-e.z+e.w;return o>=0&&r>=0&&n>=0&&a>=0||!(o<0&&r<0||n<0&&a<0)&&(o<0?i=Math.max(i,o/(o-r)):r<0&&(s=Math.min(s,o/(o-r))),n<0?i=Math.max(i,n/(n-a)):a<0&&(s=Math.min(s,n/(n-a))),!(s<i)&&(t.lerp(e,i),e.lerp(t,1-s),!0))}(s.positionScreen,o.positionScreen)&&(s.positionScreen.multiplyScalar(1/s.positionScreen.w),o.positionScreen.multiplyScalar(1/o.positionScreen.w),a=function(){if(h===f){const t=new Dt;return O.push(t),f++,h++,t}return O[h++]}(),a.id=l.id,a.v1.copy(s),a.v2.copy(o),a.z=Math.max(s.positionScreen.z,o.positionScreen.z),a.renderOrder=l.renderOrder,a.material=l.material,l.material.vertexColors&&(a.vertexColors[0].fromArray(e,3*t),a.vertexColors[1].fromArray(e,3*i)),_.elements.push(a))},pushTriangle:function(i,s,a,h){const u=A[i],d=A[s],p=A[a];if(!1!==g(u,d,p)&&(h.side===z||!0===M(u,d,p))){o=function(){if(n===m){const t=new Ct;return k.push(t),m++,n++,t}return k[n++]}(),o.id=l.id,o.v1.copy(u),o.v2.copy(d),o.v3.copy(p),o.z=(u.positionScreen.z+d.positionScreen.z+p.positionScreen.z)/3,o.renderOrder=l.renderOrder,v.subVectors(p.position,d.position),b.subVectors(u.position,d.position),v.cross(b),o.normalModel.copy(v),o.normalModel.applyMatrix3(c).normalize();for(let e=0;e<3;e++){const i=o.vertexNormalsModel[e];i.fromArray(t,3*arguments[e]),i.applyMatrix3(c).normalize();o.uvs[e].fromArray(r,2*arguments[e])}o.vertexNormalsLength=3,o.material=h,h.vertexColors&&o.color.fromArray(e,3*i),_.elements.push(o)}}}};function F(t){if(!1===t.visible)return;if(t.isLight)_.lights.push(t);else if(t.isMesh||t.isLine||t.isPoints){if(!1===t.material.visible)return;if(!0===t.frustumCulled&&!1===j.intersectsObject(t))return;I(t)}else if(t.isSprite){if(!1===t.material.visible)return;if(!0===t.frustumCulled&&!1===j.intersectsSprite(t))return;I(t)}const e=t.children;for(let t=0,i=e.length;t<i;t++)F(e[t])}function I(i){t=function(){if(e===d){const t=new Pt;return L.push(t),d++,e++,t}return L[e++]}(),t.id=i.id,t.object=i,v.setFromMatrixPosition(i.matrixWorld),v.applyMatrix4(w),t.z=v.z,t.renderOrder=i.renderOrder,_.objects.push(t)}function W(t,e,i){const s=1/t.w;t.z*=s,t.z>=-1&&t.z<=1&&(l=function(){if(c===g){const t=new zt;return U.push(t),g++,c++,t}return U[c++]}(),l.id=e.id,l.x=t.x*s,l.y=t.y*s,l.z=t.z,l.renderOrder=e.renderOrder,l.object=e,l.rotation=e.rotation,l.scale.x=e.scale.x*Math.abs(l.x-(t.x+i.projectionMatrix.elements[0])/(t.w+i.projectionMatrix.elements[12])),l.scale.y=e.scale.y*Math.abs(l.y-(t.y+i.projectionMatrix.elements[5])/(t.w+i.projectionMatrix.elements[13])),l.material=e.material,_.elements.push(l))}function N(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id!==e.id?t.id-e.id:0}this.projectScene=function(t,i,o,r){n=0,h=0,c=0,_.elements.length=0,!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),null===i.parent&&!0===i.matrixWorldAutoUpdate&&i.updateMatrixWorld(),M.copy(i.matrixWorldInverse),w.multiplyMatrices(i.projectionMatrix,M),j.setFromProjectionMatrix(w),e=0,_.objects.length=0,_.lights.length=0,F(t),!0===o&&_.objects.sort(N);const a=_.objects;for(let t=0,e=a.length;t<e;t++){const e=a[t].object,o=e.geometry;if(B.setObject(e),u=e.matrixWorld,s=0,e.isMesh){let t=e.material;const i=Array.isArray(t),s=o.attributes,r=o.groups;if(void 0===s.position)continue;const n=s.position.array;for(let t=0,i=n.length;t<i;t+=3){let i=n[t],s=n[t+1],r=n[t+2];const a=o.morphAttributes.position;if(void 0!==a){const h=o.morphTargetsRelative,l=e.morphTargetInfluences;for(let e=0,o=a.length;e<o;e++){const o=l[e];if(0===o)continue;const c=a[e];h?(i+=c.getX(t/3)*o,s+=c.getY(t/3)*o,r+=c.getZ(t/3)*o):(i+=(c.getX(t/3)-n[t])*o,s+=(c.getY(t/3)-n[t+1])*o,r+=(c.getZ(t/3)-n[t+2])*o)}}B.pushVertex(i,s,r)}if(void 0!==s.normal){const t=s.normal.array;for(let e=0,i=t.length;e<i;e+=3)B.pushNormal(t[e],t[e+1],t[e+2])}if(void 0!==s.color){const t=s.color.array;for(let e=0,i=t.length;e<i;e+=3)B.pushColor(t[e],t[e+1],t[e+2])}if(void 0!==s.uv){const t=s.uv.array;for(let e=0,i=t.length;e<i;e+=2)B.pushUv(t[e],t[e+1])}if(null!==o.index){const s=o.index.array;if(r.length>0)for(let o=0;o<r.length;o++){const n=r[o];if(t=!0===i?e.material[n.materialIndex]:e.material,void 0!==t)for(let e=n.start,i=n.start+n.count;e<i;e+=3)B.pushTriangle(s[e],s[e+1],s[e+2],t)}else for(let e=0,i=s.length;e<i;e+=3)B.pushTriangle(s[e],s[e+1],s[e+2],t)}else if(r.length>0)for(let s=0;s<r.length;s++){const o=r[s];if(t=!0===i?e.material[o.materialIndex]:e.material,void 0!==t)for(let e=o.start,i=o.start+o.count;e<i;e+=3)B.pushTriangle(e,e+1,e+2,t)}else for(let e=0,i=n.length/3;e<i;e+=3)B.pushTriangle(e,e+1,e+2,t)}else if(e.isLine){R.multiplyMatrices(w,u);const t=o.attributes;if(void 0!==t.position){const i=t.position.array;for(let t=0,e=i.length;t<e;t+=3)B.pushVertex(i[t],i[t+1],i[t+2]);if(void 0!==t.color){const e=t.color.array;for(let t=0,i=e.length;t<i;t+=3)B.pushColor(e[t],e[t+1],e[t+2])}if(null!==o.index){const t=o.index.array;for(let e=0,i=t.length;e<i;e+=2)B.pushLine(t[e],t[e+1])}else{const t=e.isLineSegments?2:1;for(let e=0,s=i.length/3-1;e<s;e+=t)B.pushLine(e,e+1)}}}else if(e.isPoints){R.multiplyMatrices(w,u);const t=o.attributes;if(void 0!==t.position){const s=t.position.array;for(let t=0,o=s.length;t<o;t+=3)b.set(s[t],s[t+1],s[t+2],1),b.applyMatrix4(R),W(b,e,i)}}else e.isSprite&&(e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld),b.set(u.elements[12],u.elements[13],u.elements[14],1),b.applyMatrix4(w),W(b,e,i))}return!0===r&&_.elements.sort(N),_}}}class jt{constructor(){let t,e,i,s,o,n,a,h,l,c,u,d,p,m=0,f=null,g=1;const _=this,v=new R,b=new R,y=new S,x=new S,M=new S,w=new S,T=new S,P=new S,E=new r,z=new r,A=new r,k=new D,O=new C,U=new C,B=[],F=new Rt,I=document.createElementNS("http://www.w3.org/2000/svg","svg");function W(){for(m=0;I.childNodes.length>0;)I.removeChild(I.childNodes[0])}function N(t){return null!==f?t.toFixed(f):t}function Y(t,e,i){let s=e.scale.x*n,o=e.scale.y*a;i.isPointsMaterial&&(s*=i.size,o*=i.size);const r="M"+N(t.x-.5*s)+","+N(t.y-.5*o)+"h"+N(s)+"v"+N(o)+"h"+N(-s)+"z";let h="";(i.isSpriteMaterial||i.isPointsMaterial)&&(h="fill:"+i.color.getStyle(_.outputColorSpace)+";fill-opacity:"+i.opacity),H(h,r)}function K(t,e,i){const s="M"+N(t.positionScreen.x)+","+N(t.positionScreen.y)+"L"+N(e.positionScreen.x)+","+N(e.positionScreen.y);if(i.isLineBasicMaterial){let t="fill:none;stroke:"+i.color.getStyle(_.outputColorSpace)+";stroke-opacity:"+i.opacity+";stroke-width:"+i.linewidth+";stroke-linecap:"+i.linecap;i.isLineDashedMaterial&&(t=t+";stroke-dasharray:"+i.dashSize+","+i.gapSize),H(t,s)}}function V(t,e,s,o,r){_.info.render.vertices+=3,_.info.render.faces++;const n="M"+N(t.positionScreen.x)+","+N(t.positionScreen.y)+"L"+N(e.positionScreen.x)+","+N(e.positionScreen.y)+"L"+N(s.positionScreen.x)+","+N(s.positionScreen.y)+"z";let a="";r.isMeshBasicMaterial?(y.copy(r.color),r.vertexColors&&y.multiply(o.color)):r.isMeshLambertMaterial||r.isMeshPhongMaterial||r.isMeshStandardMaterial?(x.copy(r.color),r.vertexColors&&x.multiply(o.color),y.copy(M),z.copy(t.positionWorld).add(e.positionWorld).add(s.positionWorld).divideScalar(3),function(t,e,i,s){for(let o=0,r=t.length;o<r;o++){const r=t[o],n=r.color;if(r.isDirectionalLight){const t=E.setFromMatrixPosition(r.matrixWorld).normalize();let e=i.dot(t);if(e<=0)continue;e*=r.intensity,s.r+=n.r*e,s.g+=n.g*e,s.b+=n.b*e}else if(r.isPointLight){const t=E.setFromMatrixPosition(r.matrixWorld);let o=i.dot(E.subVectors(t,e).normalize());if(o<=0)continue;if(o*=0==r.distance?1:1-Math.min(e.distanceTo(t)/r.distance,1),0==o)continue;o*=r.intensity,s.r+=n.r*o,s.g+=n.g*o,s.b+=n.b*o}}}(i,z,o.normalModel,y),y.multiply(x).add(r.emissive)):r.isMeshNormalMaterial&&(A.copy(o.normalModel).applyMatrix3(k).normalize(),y.setRGB(A.x,A.y,A.z).multiplyScalar(.5).addScalar(.5)),a=r.wireframe?"fill:none;stroke:"+y.getStyle(_.outputColorSpace)+";stroke-opacity:"+r.opacity+";stroke-width:"+r.wireframeLinewidth+";stroke-linecap:"+r.wireframeLinecap+";stroke-linejoin:"+r.wireframeLinejoin:"fill:"+y.getStyle(_.outputColorSpace)+";fill-opacity:"+r.opacity,H(a,n)}function Z(t,e,i){let s=e.x-t.x,o=e.y-t.y;const r=s*s+o*o;if(0===r)return;const n=i/Math.sqrt(r);s*=n,o*=n,e.x+=s,e.y+=o,t.x-=s,t.y-=o}function H(t,e){p===t?d+=e:(X(),p=t,d=e)}function X(){d&&(u=function(t){if(null==B[t])return B[t]=document.createElementNS("http://www.w3.org/2000/svg","path"),0==g&&B[t].setAttribute("shape-rendering","crispEdges"),B[t];return B[t]}(m++),u.setAttribute("d",d),u.setAttribute("style",p),I.appendChild(u)),d="",p=""}this.domElement=I,this.autoClear=!0,this.sortObjects=!0,this.sortElements=!0,this.overdraw=.5,this.outputColorSpace=j,this.info={render:{vertices:0,faces:0}},this.setQuality=function(t){switch(t){case"high":g=1;break;case"low":g=0}},this.setClearColor=function(t){P.set(t)},this.setPixelRatio=function(){},this.setSize=function(t,e){s=t,o=e,n=s/2,a=o/2,I.setAttribute("viewBox",-n+" "+-a+" "+s+" "+o),I.setAttribute("width",s),I.setAttribute("height",o),v.min.set(-n,-a),v.max.set(n,a)},this.getSize=function(){return{width:s,height:o}},this.setPrecision=function(t){f=t},this.clear=function(){W(),I.style.backgroundColor=P.getStyle(_.outputColorSpace)},this.render=function(s,o){if(o instanceof L==!1)return void console.error("THREE.SVGRenderer.render: camera is not an instance of Camera.");const r=s.background;r&&r.isColor?(W(),I.style.backgroundColor=r.getStyle(_.outputColorSpace)):!0===this.autoClear&&this.clear(),_.info.render.vertices=0,_.info.render.faces=0,O.copy(o.matrixWorldInverse),U.multiplyMatrices(o.projectionMatrix,O),t=F.projectScene(s,o,this.sortObjects,this.sortElements),e=t.elements,i=t.lights,k.getNormalMatrix(o.matrixWorldInverse),function(t){M.setRGB(0,0,0),w.setRGB(0,0,0),T.setRGB(0,0,0);for(let e=0,i=t.length;e<i;e++){const i=t[e],s=i.color;i.isAmbientLight?(M.r+=s.r,M.g+=s.g,M.b+=s.b):i.isDirectionalLight?(w.r+=s.r,w.g+=s.g,w.b+=s.b):i.isPointLight&&(T.r+=s.r,T.g+=s.g,T.b+=s.b)}}(i),d="",p="";for(let t=0,i=e.length;t<i;t++){const i=e[t],s=i.material;if(void 0!==s&&0!==s.opacity)if(b.makeEmpty(),i instanceof zt)h=i,h.x*=n,h.y*=-a,Y(h,i,s);else if(i instanceof Dt)h=i.v1,l=i.v2,h.positionScreen.x*=n,h.positionScreen.y*=-a,l.positionScreen.x*=n,l.positionScreen.y*=-a,b.setFromPoints([h.positionScreen,l.positionScreen]),!0===v.intersectsBox(b)&&K(h,l,s);else if(i instanceof Ct){if(h=i.v1,l=i.v2,c=i.v3,h.positionScreen.z<-1||h.positionScreen.z>1)continue;if(l.positionScreen.z<-1||l.positionScreen.z>1)continue;if(c.positionScreen.z<-1||c.positionScreen.z>1)continue;h.positionScreen.x*=n,h.positionScreen.y*=-a,l.positionScreen.x*=n,l.positionScreen.y*=-a,c.positionScreen.x*=n,c.positionScreen.y*=-a,this.overdraw>0&&(Z(h.positionScreen,l.positionScreen,this.overdraw),Z(l.positionScreen,c.positionScreen,this.overdraw),Z(c.positionScreen,h.positionScreen,this.overdraw)),b.setFromPoints([h.positionScreen,l.positionScreen,c.positionScreen]),!0===v.intersectsBox(b)&&V(h,l,c,i,s)}}X(),s.traverseVisible((function(t){if(t.isSVGObject){if(E.setFromMatrixPosition(t.matrixWorld),E.applyMatrix4(U),E.z<-1||E.z>1)return;const e=E.x*n,i=-E.y*a,s=t.node;s.setAttribute("transform","translate("+e+","+i+")"),I.appendChild(s)}}))}}}export{pt as CopyShader,xt as EffectComposer,k as Font,wt as LuminosityHighPassShader,bt as MaskPass,tt as OrbitControls,mt as Pass,St as RenderPass,jt as SVGRenderer,vt as ShaderPass,Mt as SimplexNoise,A as TextGeometry,Tt as UnrealBloomPass};