diff --git a/asset-manifest.json b/asset-manifest.json index a55a854..56daeb0 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { - "main.css": "/meme-mine/static/css/main.06c97be0.chunk.css", - "main.js": "/meme-mine/static/js/main.326eb99d.chunk.js", - "main.js.map": "/meme-mine/static/js/main.326eb99d.chunk.js.map", - "static/js/1.493cc1d8.chunk.js": "/meme-mine/static/js/1.493cc1d8.chunk.js", - "static/js/1.493cc1d8.chunk.js.map": "/meme-mine/static/js/1.493cc1d8.chunk.js.map", - "runtime~main.js": "/meme-mine/static/js/runtime~main.2437c755.js", - "runtime~main.js.map": "/meme-mine/static/js/runtime~main.2437c755.js.map", - "static/media/bidi.mjs": "/meme-mine/static/media/bidi.fd3f95b8.mjs", - "static/media/index.mjs": "/meme-mine/static/media/index.a045c5b8.mjs", - "static/css/main.06c97be0.chunk.css.map": "/meme-mine/static/css/main.06c97be0.chunk.css.map", - "index.html": "/meme-mine/index.html", - "precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js": "/meme-mine/precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js", - "service-worker.js": "/meme-mine/service-worker.js" + "main.css": "/static/css/main.06c97be0.chunk.css", + "main.js": "/static/js/main.326eb99d.chunk.js", + "main.js.map": "/static/js/main.326eb99d.chunk.js.map", + "static/js/1.2b48838c.chunk.js": "/static/js/1.2b48838c.chunk.js", + "static/js/1.2b48838c.chunk.js.map": "/static/js/1.2b48838c.chunk.js.map", + "runtime~main.js": "/static/js/runtime~main.229c360f.js", + "runtime~main.js.map": "/static/js/runtime~main.229c360f.js.map", + "static/media/bidi.mjs": "/static/media/bidi.fd3f95b8.mjs", + "static/media/index.mjs": "/static/media/index.a045c5b8.mjs", + "static/css/main.06c97be0.chunk.css.map": "/static/css/main.06c97be0.chunk.css.map", + "index.html": "/index.html", + "precache-manifest.0aacf32ac4ae586db8fc00e8a3a3c83f.js": "/precache-manifest.0aacf32ac4ae586db8fc00e8a3a3c83f.js", + "service-worker.js": "/service-worker.js" } \ No newline at end of file diff --git a/index.html b/index.html index d3acaf8..10fdc27 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -React App
\ No newline at end of file +React App
\ No newline at end of file diff --git a/precache-manifest.0aacf32ac4ae586db8fc00e8a3a3c83f.js b/precache-manifest.0aacf32ac4ae586db8fc00e8a3a3c83f.js new file mode 100644 index 0000000..f15b488 --- /dev/null +++ b/precache-manifest.0aacf32ac4ae586db8fc00e8a3a3c83f.js @@ -0,0 +1,30 @@ +self.__precacheManifest = [ + { + "revision": "326eb99d65316c28562c", + "url": "/static/css/main.06c97be0.chunk.css" + }, + { + "revision": "326eb99d65316c28562c", + "url": "/static/js/main.326eb99d.chunk.js" + }, + { + "revision": "2b48838c2e390f1f7bef", + "url": "/static/js/1.2b48838c.chunk.js" + }, + { + "revision": "229c360febb4351a89df", + "url": "/static/js/runtime~main.229c360f.js" + }, + { + "revision": "fd3f95b87091ad7191dff4a8a8785184", + "url": "/static/media/bidi.fd3f95b8.mjs" + }, + { + "revision": "a045c5b818b9a5dbd1c0da85a9209292", + "url": "/static/media/index.a045c5b8.mjs" + }, + { + "revision": "5faf02fdf9fa722dccbc38551e5cba7e", + "url": "/index.html" + } +]; \ No newline at end of file diff --git a/precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js b/precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js deleted file mode 100644 index 41ea0e9..0000000 --- a/precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js +++ /dev/null @@ -1,30 +0,0 @@ -self.__precacheManifest = [ - { - "revision": "326eb99d65316c28562c", - "url": "/meme-mine/static/css/main.06c97be0.chunk.css" - }, - { - "revision": "326eb99d65316c28562c", - "url": "/meme-mine/static/js/main.326eb99d.chunk.js" - }, - { - "revision": "493cc1d8a6360e83ee91", - "url": "/meme-mine/static/js/1.493cc1d8.chunk.js" - }, - { - "revision": "2437c75546022d3a3b2f", - "url": "/meme-mine/static/js/runtime~main.2437c755.js" - }, - { - "revision": "fd3f95b87091ad7191dff4a8a8785184", - "url": "/meme-mine/static/media/bidi.fd3f95b8.mjs" - }, - { - "revision": "a045c5b818b9a5dbd1c0da85a9209292", - "url": "/meme-mine/static/media/index.a045c5b8.mjs" - }, - { - "revision": "b01ea43adff3e42f01c101f091627dc9", - "url": "/meme-mine/index.html" - } -]; \ No newline at end of file diff --git a/service-worker.js b/service-worker.js index e54231d..90fb996 100644 --- a/service-worker.js +++ b/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); importScripts( - "/meme-mine/precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js" + "/precache-manifest.0aacf32ac4ae586db8fc00e8a3a3c83f.js" ); workbox.clientsClaim(); @@ -28,7 +28,7 @@ self.__precacheManifest = [].concat(self.__precacheManifest || []); workbox.precaching.suppressWarnings(); workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); -workbox.routing.registerNavigationRoute("/meme-mine/index.html", { +workbox.routing.registerNavigationRoute("/index.html", { blacklist: [/^\/_/,/\/[^/]+\.[^/]+$/], }); diff --git a/static/js/1.493cc1d8.chunk.js b/static/js/1.2b48838c.chunk.js similarity index 72% rename from static/js/1.493cc1d8.chunk.js rename to static/js/1.2b48838c.chunk.js index bca2ac3..d6ce296 100644 --- a/static/js/1.493cc1d8.chunk.js +++ b/static/js/1.2b48838c.chunk.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";n.r(t),n.d(t,"ACESFilmicToneMapping",function(){return ye}),n.d(t,"AddEquation",function(){return H}),n.d(t,"AddOperation",function(){return he}),n.d(t,"AdditiveAnimationBlendMode",function(){return ln}),n.d(t,"AdditiveBlending",function(){return F}),n.d(t,"AlphaFormat",function(){return Ze}),n.d(t,"AlwaysDepth",function(){return ie}),n.d(t,"AlwaysStencilFunc",function(){return Dn}),n.d(t,"AmbientLight",function(){return Cd}),n.d(t,"AmbientLightProbe",function(){return zd}),n.d(t,"AnimationClip",function(){return qf}),n.d(t,"AnimationLoader",function(){return ad}),n.d(t,"AnimationMixer",function(){return xh}),n.d(t,"AnimationObjectGroup",function(){return bh}),n.d(t,"AnimationUtils",function(){return jf}),n.d(t,"ArcCurve",function(){return gc}),n.d(t,"ArrayCamera",function(){return Ul}),n.d(t,"ArrowHelper",function(){return up}),n.d(t,"Audio",function(){return th}),n.d(t,"AudioAnalyser",function(){return sh}),n.d(t,"AudioContext",function(){return Ud}),n.d(t,"AudioListener",function(){return eh}),n.d(t,"AudioLoader",function(){return Hd}),n.d(t,"AxesHelper",function(){return cp}),n.d(t,"AxisHelper",function(){return Np}),n.d(t,"BackSide",function(){return O}),n.d(t,"BasicDepthPacking",function(){return pn}),n.d(t,"BasicShadowMap",function(){return C}),n.d(t,"BinaryTextureLoader",function(){return Vp}),n.d(t,"Bone",function(){return Cu}),n.d(t,"BooleanKeyframeTrack",function(){return Vf}),n.d(t,"BoundingBoxHelper",function(){return Up}),n.d(t,"Box2",function(){return Oh}),n.d(t,"Box3",function(){return Sr}),n.d(t,"Box3Helper",function(){return op}),n.d(t,"BoxBufferGeometry",function(){return Oa}),n.d(t,"BoxGeometry",function(){return Oa}),n.d(t,"BoxHelper",function(){return ap}),n.d(t,"BufferAttribute",function(){return Qi}),n.d(t,"BufferGeometry",function(){return fa}),n.d(t,"BufferGeometryLoader",function(){return Ld}),n.d(t,"ByteType",function(){return He}),n.d(t,"Cache",function(){return $f}),n.d(t,"Camera",function(){return ja}),n.d(t,"CameraHelper",function(){return ep}),n.d(t,"CanvasRenderer",function(){return Jp}),n.d(t,"CanvasTexture",function(){return ic}),n.d(t,"CatmullRomCurve3",function(){return Mc}),n.d(t,"CineonToneMapping",function(){return ge}),n.d(t,"CircleBufferGeometry",function(){return ac}),n.d(t,"CircleGeometry",function(){return ac}),n.d(t,"ClampToEdgeWrapping",function(){return Te}),n.d(t,"Clock",function(){return Yd}),n.d(t,"Color",function(){return zi}),n.d(t,"ColorKeyframeTrack",function(){return Wf}),n.d(t,"CompressedTexture",function(){return rc}),n.d(t,"CompressedTextureLoader",function(){return od}),n.d(t,"ConeBufferGeometry",function(){return sc}),n.d(t,"ConeGeometry",function(){return sc}),n.d(t,"CubeCamera",function(){return Ga}),n.d(t,"CubeReflectionMapping",function(){return xe}),n.d(t,"CubeRefractionMapping",function(){return we}),n.d(t,"CubeTexture",function(){return za}),n.d(t,"CubeTextureLoader",function(){return ld}),n.d(t,"CubeUVReflectionMapping",function(){return Ee}),n.d(t,"CubeUVRefractionMapping",function(){return Ce}),n.d(t,"CubicBezierCurve",function(){return _c}),n.d(t,"CubicBezierCurve3",function(){return Tc}),n.d(t,"CubicInterpolant",function(){return Uf}),n.d(t,"CullFaceBack",function(){return M}),n.d(t,"CullFaceFront",function(){return S}),n.d(t,"CullFaceFrontBack",function(){return E}),n.d(t,"CullFaceNone",function(){return w}),n.d(t,"Curve",function(){return vc}),n.d(t,"CurvePath",function(){return Pc}),n.d(t,"CustomBlending",function(){return U}),n.d(t,"CustomToneMapping",function(){return be}),n.d(t,"CylinderBufferGeometry",function(){return oc}),n.d(t,"CylinderGeometry",function(){return oc}),n.d(t,"Cylindrical",function(){return kh}),n.d(t,"DataTexture",function(){return _u}),n.d(t,"DataTexture2DArray",function(){return Ho}),n.d(t,"DataTexture3D",function(){return Qo}),n.d(t,"DataTextureLoader",function(){return ud}),n.d(t,"DataUtils",function(){return pp}),n.d(t,"DecrementStencilOp",function(){return wn}),n.d(t,"DecrementWrapStencilOp",function(){return Sn}),n.d(t,"DefaultLoadingManager",function(){return td}),n.d(t,"DepthFormat",function(){return rt}),n.d(t,"DepthStencilFormat",function(){return it}),n.d(t,"DepthTexture",function(){return Vl}),n.d(t,"DirectionalLight",function(){return Ed}),n.d(t,"DirectionalLightHelper",function(){return qh}),n.d(t,"DiscreteInterpolant",function(){return Gf}),n.d(t,"DodecahedronBufferGeometry",function(){return uc}),n.d(t,"DodecahedronGeometry",function(){return uc}),n.d(t,"DoubleSide",function(){return R}),n.d(t,"DstAlphaFactor",function(){return Z}),n.d(t,"DstColorFactor",function(){return ee}),n.d(t,"DynamicBufferAttribute",function(){return kp}),n.d(t,"DynamicCopyUsage",function(){return Hn}),n.d(t,"DynamicDrawUsage",function(){return Pn}),n.d(t,"DynamicReadUsage",function(){return jn}),n.d(t,"EdgesGeometry",function(){return pc}),n.d(t,"EdgesHelper",function(){return Hp}),n.d(t,"EllipseCurve",function(){return mc}),n.d(t,"EqualDepth",function(){return se}),n.d(t,"EqualStencilFunc",function(){return Tn}),n.d(t,"EquirectangularReflectionMapping",function(){return Me}),n.d(t,"EquirectangularRefractionMapping",function(){return Se}),n.d(t,"Euler",function(){return li}),n.d(t,"EventDispatcher",function(){return Wn}),n.d(t,"ExtrudeBufferGeometry",function(){return hf}),n.d(t,"ExtrudeGeometry",function(){return hf}),n.d(t,"FaceColors",function(){return yp}),n.d(t,"FileLoader",function(){return id}),n.d(t,"FlatShading",function(){return D}),n.d(t,"Float16BufferAttribute",function(){return ta}),n.d(t,"Float32Attribute",function(){return Fp}),n.d(t,"Float32BufferAttribute",function(){return na}),n.d(t,"Float64Attribute",function(){return jp}),n.d(t,"Float64BufferAttribute",function(){return ra}),n.d(t,"FloatType",function(){return Je}),n.d(t,"Fog",function(){return Kl}),n.d(t,"FogExp2",function(){return Xl}),n.d(t,"Font",function(){return $p}),n.d(t,"FontLoader",function(){return Zp}),n.d(t,"FramebufferTexture",function(){return nc}),n.d(t,"FrontSide",function(){return B}),n.d(t,"Frustum",function(){return qa}),n.d(t,"GLBufferAttribute",function(){return Sh}),n.d(t,"GLSL1",function(){return zn}),n.d(t,"GLSL3",function(){return Vn}),n.d(t,"GreaterDepth",function(){return ue}),n.d(t,"GreaterEqualDepth",function(){return le}),n.d(t,"GreaterEqualStencilFunc",function(){return Rn}),n.d(t,"GreaterStencilFunc",function(){return Bn}),n.d(t,"GridHelper",function(){return Jh}),n.d(t,"Group",function(){return Hl}),n.d(t,"HalfFloatType",function(){return Qe}),n.d(t,"HemisphereLight",function(){return dd}),n.d(t,"HemisphereLightHelper",function(){return Wh}),n.d(t,"HemisphereLightProbe",function(){return Gd}),n.d(t,"IcosahedronBufferGeometry",function(){return vf}),n.d(t,"IcosahedronGeometry",function(){return vf}),n.d(t,"ImageBitmapLoader",function(){return Nd}),n.d(t,"ImageLoader",function(){return sd}),n.d(t,"ImageUtils",function(){return dr}),n.d(t,"ImmediateRenderObject",function(){return ev}),n.d(t,"IncrementStencilOp",function(){return xn}),n.d(t,"IncrementWrapStencilOp",function(){return Mn}),n.d(t,"InstancedBufferAttribute",function(){return Ou}),n.d(t,"InstancedBufferGeometry",function(){return Rd}),n.d(t,"InstancedInterleavedBuffer",function(){return Mh}),n.d(t,"InstancedMesh",function(){return Iu}),n.d(t,"Int16Attribute",function(){return Dp}),n.d(t,"Int16BufferAttribute",function(){return qi}),n.d(t,"Int32Attribute",function(){return Pp}),n.d(t,"Int32BufferAttribute",function(){return $i}),n.d(t,"Int8Attribute",function(){return Bp}),n.d(t,"Int8BufferAttribute",function(){return Yi}),n.d(t,"IntType",function(){return Ve}),n.d(t,"InterleavedBuffer",function(){return Zl}),n.d(t,"InterleavedBufferAttribute",function(){return eu}),n.d(t,"Interpolant",function(){return Nf}),n.d(t,"InterpolateDiscrete",function(){return en}),n.d(t,"InterpolateLinear",function(){return tn}),n.d(t,"InterpolateSmooth",function(){return nn}),n.d(t,"InvertStencilOp",function(){return En}),n.d(t,"JSONLoader",function(){return Qp}),n.d(t,"KeepStencilOp",function(){return bn}),n.d(t,"KeyframeTrack",function(){return zf}),n.d(t,"LOD",function(){return bu}),n.d(t,"LatheBufferGeometry",function(){return mf}),n.d(t,"LatheGeometry",function(){return mf}),n.d(t,"Layers",function(){return ui}),n.d(t,"LensFlare",function(){return Xp}),n.d(t,"LessDepth",function(){return ae}),n.d(t,"LessEqualDepth",function(){return oe}),n.d(t,"LessEqualStencilFunc",function(){return kn}),n.d(t,"LessStencilFunc",function(){return _n}),n.d(t,"Light",function(){return fd}),n.d(t,"LightProbe",function(){return kd}),n.d(t,"Line",function(){return zu}),n.d(t,"Line3",function(){return Lh}),n.d(t,"LineBasicMaterial",function(){return Fu}),n.d(t,"LineCurve",function(){return kc}),n.d(t,"LineCurve3",function(){return Bc}),n.d(t,"LineDashedMaterial",function(){return If}),n.d(t,"LineLoop",function(){return Qu}),n.d(t,"LinePieces",function(){return mp}),n.d(t,"LineSegments",function(){return Ju}),n.d(t,"LineStrip",function(){return vp}),n.d(t,"LinearEncoding",function(){return dn}),n.d(t,"LinearFilter",function(){return Pe}),n.d(t,"LinearInterpolant",function(){return Hf}),n.d(t,"LinearMipMapLinearFilter",function(){return Ne}),n.d(t,"LinearMipMapNearestFilter",function(){return Fe}),n.d(t,"LinearMipmapLinearFilter",function(){return je}),n.d(t,"LinearMipmapNearestFilter",function(){return Ie}),n.d(t,"LinearToneMapping",function(){return ve}),n.d(t,"Loader",function(){return nd}),n.d(t,"LoaderUtils",function(){return Od}),n.d(t,"LoadingManager",function(){return ed}),n.d(t,"LoopOnce",function(){return qt}),n.d(t,"LoopPingPong",function(){return $t}),n.d(t,"LoopRepeat",function(){return Zt}),n.d(t,"LuminanceAlphaFormat",function(){return nt}),n.d(t,"LuminanceFormat",function(){return tt}),n.d(t,"MOUSE",function(){return A}),n.d(t,"Material",function(){return Ii}),n.d(t,"MaterialLoader",function(){return Bd}),n.d(t,"Math",function(){return ir}),n.d(t,"MathUtils",function(){return ir}),n.d(t,"Matrix3",function(){return or}),n.d(t,"Matrix4",function(){return Zr}),n.d(t,"MaxEquation",function(){return W}),n.d(t,"Mesh",function(){return ka}),n.d(t,"MeshBasicMaterial",function(){return Vi}),n.d(t,"MeshDepthMaterial",function(){return Rl}),n.d(t,"MeshDistanceMaterial",function(){return Dl}),n.d(t,"MeshFaceMaterial",function(){return Ap}),n.d(t,"MeshLambertMaterial",function(){return Lf}),n.d(t,"MeshMatcapMaterial",function(){return Pf}),n.d(t,"MeshNormalMaterial",function(){return Df}),n.d(t,"MeshPhongMaterial",function(){return Of}),n.d(t,"MeshPhysicalMaterial",function(){return Bf}),n.d(t,"MeshStandardMaterial",function(){return kf}),n.d(t,"MeshToonMaterial",function(){return Rf}),n.d(t,"MinEquation",function(){return V}),n.d(t,"MirroredRepeatWrapping",function(){return ke}),n.d(t,"MixOperation",function(){return de}),n.d(t,"MultiMaterial",function(){return xp}),n.d(t,"MultiplyBlending",function(){return N}),n.d(t,"MultiplyOperation",function(){return fe}),n.d(t,"NearestFilter",function(){return Be}),n.d(t,"NearestMipMapLinearFilter",function(){return Le}),n.d(t,"NearestMipMapNearestFilter",function(){return Re}),n.d(t,"NearestMipmapLinearFilter",function(){return De}),n.d(t,"NearestMipmapNearestFilter",function(){return Oe}),n.d(t,"NeverDepth",function(){return re}),n.d(t,"NeverStencilFunc",function(){return Cn}),n.d(t,"NoBlending",function(){return P}),n.d(t,"NoColors",function(){return gp}),n.d(t,"NoToneMapping",function(){return pe}),n.d(t,"NormalAnimationBlendMode",function(){return sn}),n.d(t,"NormalBlending",function(){return I}),n.d(t,"NotEqualDepth",function(){return ce}),n.d(t,"NotEqualStencilFunc",function(){return On}),n.d(t,"NumberKeyframeTrack",function(){return Jf}),n.d(t,"Object3D",function(){return Mi}),n.d(t,"ObjectLoader",function(){return Pd}),n.d(t,"ObjectSpaceNormalMap",function(){return gn}),n.d(t,"OctahedronBufferGeometry",function(){return gf}),n.d(t,"OctahedronGeometry",function(){return gf}),n.d(t,"OneFactor",function(){return Q}),n.d(t,"OneMinusDstAlphaFactor",function(){return $}),n.d(t,"OneMinusDstColorFactor",function(){return te}),n.d(t,"OneMinusSrcAlphaFactor",function(){return q}),n.d(t,"OneMinusSrcColorFactor",function(){return X}),n.d(t,"OrthographicCamera",function(){return co}),n.d(t,"PCFShadowMap",function(){return _}),n.d(t,"PCFSoftShadowMap",function(){return T}),n.d(t,"PMREMGenerator",function(){return Bo}),n.d(t,"ParametricGeometry",function(){return Kp}),n.d(t,"Particle",function(){return Mp}),n.d(t,"ParticleBasicMaterial",function(){return Cp}),n.d(t,"ParticleSystem",function(){return Sp}),n.d(t,"ParticleSystemMaterial",function(){return _p}),n.d(t,"Path",function(){return Ic}),n.d(t,"PerspectiveCamera",function(){return Na}),n.d(t,"Plane",function(){return Ya}),n.d(t,"PlaneBufferGeometry",function(){return eo}),n.d(t,"PlaneGeometry",function(){return eo}),n.d(t,"PlaneHelper",function(){return sp}),n.d(t,"PointCloud",function(){return wp}),n.d(t,"PointCloudMaterial",function(){return Ep}),n.d(t,"PointLight",function(){return Md}),n.d(t,"PointLightHelper",function(){return Hh}),n.d(t,"Points",function(){return $u}),n.d(t,"PointsMaterial",function(){return Yu}),n.d(t,"PolarGridHelper",function(){return Qh}),n.d(t,"PolyhedronBufferGeometry",function(){return lc}),n.d(t,"PolyhedronGeometry",function(){return lc}),n.d(t,"PositionalAudio",function(){return oh}),n.d(t,"PropertyBinding",function(){return yh}),n.d(t,"PropertyMixer",function(){return lh}),n.d(t,"QuadraticBezierCurve",function(){return Oc}),n.d(t,"QuadraticBezierCurve3",function(){return Rc}),n.d(t,"Quaternion",function(){return Ar}),n.d(t,"QuaternionKeyframeTrack",function(){return Yf}),n.d(t,"QuaternionLinearInterpolant",function(){return Qf}),n.d(t,"REVISION",function(){return b}),n.d(t,"RGBADepthPacking",function(){return vn}),n.d(t,"RGBAFormat",function(){return et}),n.d(t,"RGBAIntegerFormat",function(){return ct}),n.d(t,"RGBA_ASTC_10x10_Format",function(){return Dt}),n.d(t,"RGBA_ASTC_10x5_Format",function(){return Bt}),n.d(t,"RGBA_ASTC_10x6_Format",function(){return Ot}),n.d(t,"RGBA_ASTC_10x8_Format",function(){return Rt}),n.d(t,"RGBA_ASTC_12x10_Format",function(){return Lt}),n.d(t,"RGBA_ASTC_12x12_Format",function(){return Pt}),n.d(t,"RGBA_ASTC_4x4_Format",function(){return wt}),n.d(t,"RGBA_ASTC_5x4_Format",function(){return Mt}),n.d(t,"RGBA_ASTC_5x5_Format",function(){return St}),n.d(t,"RGBA_ASTC_6x5_Format",function(){return Et}),n.d(t,"RGBA_ASTC_6x6_Format",function(){return Ct}),n.d(t,"RGBA_ASTC_8x5_Format",function(){return _t}),n.d(t,"RGBA_ASTC_8x6_Format",function(){return Tt}),n.d(t,"RGBA_ASTC_8x8_Format",function(){return kt}),n.d(t,"RGBA_BPTC_Format",function(){return It}),n.d(t,"RGBA_ETC2_EAC_Format",function(){return xt}),n.d(t,"RGBA_PVRTC_2BPPV1_Format",function(){return yt}),n.d(t,"RGBA_PVRTC_4BPPV1_Format",function(){return gt}),n.d(t,"RGBA_S3TC_DXT1_Format",function(){return dt}),n.d(t,"RGBA_S3TC_DXT3_Format",function(){return ht}),n.d(t,"RGBA_S3TC_DXT5_Format",function(){return pt}),n.d(t,"RGBFormat",function(){return $e}),n.d(t,"RGBIntegerFormat",function(){return ut}),n.d(t,"RGB_ETC1_Format",function(){return bt}),n.d(t,"RGB_ETC2_Format",function(){return At}),n.d(t,"RGB_PVRTC_2BPPV1_Format",function(){return mt}),n.d(t,"RGB_PVRTC_4BPPV1_Format",function(){return vt}),n.d(t,"RGB_S3TC_DXT1_Format",function(){return ft}),n.d(t,"RGFormat",function(){return st}),n.d(t,"RGIntegerFormat",function(){return lt}),n.d(t,"RawShaderMaterial",function(){return fo}),n.d(t,"Ray",function(){return qr}),n.d(t,"Raycaster",function(){return Eh}),n.d(t,"RectAreaLight",function(){return _d}),n.d(t,"RedFormat",function(){return at}),n.d(t,"RedIntegerFormat",function(){return ot}),n.d(t,"ReinhardToneMapping",function(){return me}),n.d(t,"RepeatWrapping",function(){return _e}),n.d(t,"ReplaceStencilOp",function(){return An}),n.d(t,"ReverseSubtractEquation",function(){return z}),n.d(t,"RingBufferGeometry",function(){return yf}),n.d(t,"RingGeometry",function(){return yf}),n.d(t,"SRGB8_ALPHA8_ASTC_10x10_Format",function(){return Yt}),n.d(t,"SRGB8_ALPHA8_ASTC_10x5_Format",function(){return Wt}),n.d(t,"SRGB8_ALPHA8_ASTC_10x6_Format",function(){return Jt}),n.d(t,"SRGB8_ALPHA8_ASTC_10x8_Format",function(){return Qt}),n.d(t,"SRGB8_ALPHA8_ASTC_12x10_Format",function(){return Xt}),n.d(t,"SRGB8_ALPHA8_ASTC_12x12_Format",function(){return Kt}),n.d(t,"SRGB8_ALPHA8_ASTC_4x4_Format",function(){return Ft}),n.d(t,"SRGB8_ALPHA8_ASTC_5x4_Format",function(){return jt}),n.d(t,"SRGB8_ALPHA8_ASTC_5x5_Format",function(){return Nt}),n.d(t,"SRGB8_ALPHA8_ASTC_6x5_Format",function(){return Ut}),n.d(t,"SRGB8_ALPHA8_ASTC_6x6_Format",function(){return Ht}),n.d(t,"SRGB8_ALPHA8_ASTC_8x5_Format",function(){return Gt}),n.d(t,"SRGB8_ALPHA8_ASTC_8x6_Format",function(){return zt}),n.d(t,"SRGB8_ALPHA8_ASTC_8x8_Format",function(){return Vt}),n.d(t,"Scene",function(){return ql}),n.d(t,"SceneUtils",function(){return Yp}),n.d(t,"ShaderChunk",function(){return to}),n.d(t,"ShaderLib",function(){return ro}),n.d(t,"ShaderMaterial",function(){return Fa}),n.d(t,"ShadowMaterial",function(){return Tf}),n.d(t,"Shape",function(){return Fc}),n.d(t,"ShapeBufferGeometry",function(){return bf}),n.d(t,"ShapeGeometry",function(){return bf}),n.d(t,"ShapePath",function(){return fp}),n.d(t,"ShapeUtils",function(){return cf}),n.d(t,"ShortType",function(){return Ge}),n.d(t,"Skeleton",function(){return Bu}),n.d(t,"SkeletonHelper",function(){return Uh}),n.d(t,"SkinnedMesh",function(){return Eu}),n.d(t,"SmoothShading",function(){return L}),n.d(t,"Sphere",function(){return zr}),n.d(t,"SphereBufferGeometry",function(){return Af}),n.d(t,"SphereGeometry",function(){return Af}),n.d(t,"Spherical",function(){return Th}),n.d(t,"SphericalHarmonics3",function(){return Td}),n.d(t,"SplineCurve",function(){return Dc}),n.d(t,"SpotLight",function(){return yd}),n.d(t,"SpotLightHelper",function(){return Ih}),n.d(t,"Sprite",function(){return vu}),n.d(t,"SpriteMaterial",function(){return nu}),n.d(t,"SrcAlphaFactor",function(){return K}),n.d(t,"SrcAlphaSaturateFactor",function(){return ne}),n.d(t,"SrcColorFactor",function(){return Y}),n.d(t,"StaticCopyUsage",function(){return Un}),n.d(t,"StaticDrawUsage",function(){return Ln}),n.d(t,"StaticReadUsage",function(){return Fn}),n.d(t,"StereoCamera",function(){return Qd}),n.d(t,"StreamCopyUsage",function(){return Gn}),n.d(t,"StreamDrawUsage",function(){return In}),n.d(t,"StreamReadUsage",function(){return Nn}),n.d(t,"StringKeyframeTrack",function(){return Xf}),n.d(t,"SubtractEquation",function(){return G}),n.d(t,"SubtractiveBlending",function(){return j}),n.d(t,"TOUCH",function(){return x}),n.d(t,"TangentSpaceNormalMap",function(){return mn}),n.d(t,"TetrahedronBufferGeometry",function(){return xf}),n.d(t,"TetrahedronGeometry",function(){return xf}),n.d(t,"TextGeometry",function(){return qp}),n.d(t,"Texture",function(){return pr}),n.d(t,"TextureLoader",function(){return cd}),n.d(t,"TorusBufferGeometry",function(){return wf}),n.d(t,"TorusGeometry",function(){return wf}),n.d(t,"TorusKnotBufferGeometry",function(){return Mf}),n.d(t,"TorusKnotGeometry",function(){return Mf}),n.d(t,"Triangle",function(){return Li}),n.d(t,"TriangleFanDrawMode",function(){return fn}),n.d(t,"TriangleStripDrawMode",function(){return cn}),n.d(t,"TrianglesDrawMode",function(){return un}),n.d(t,"TubeBufferGeometry",function(){return Sf}),n.d(t,"TubeGeometry",function(){return Sf}),n.d(t,"UVMapping",function(){return Ae}),n.d(t,"Uint16Attribute",function(){return Lp}),n.d(t,"Uint16BufferAttribute",function(){return Zi}),n.d(t,"Uint32Attribute",function(){return Ip}),n.d(t,"Uint32BufferAttribute",function(){return ea}),n.d(t,"Uint8Attribute",function(){return Op}),n.d(t,"Uint8BufferAttribute",function(){return Xi}),n.d(t,"Uint8ClampedAttribute",function(){return Rp}),n.d(t,"Uint8ClampedBufferAttribute",function(){return Ki}),n.d(t,"Uniform",function(){return wh}),n.d(t,"UniformsLib",function(){return no}),n.d(t,"UniformsUtils",function(){return La}),n.d(t,"UnsignedByteType",function(){return Ue}),n.d(t,"UnsignedInt248Type",function(){return qe}),n.d(t,"UnsignedIntType",function(){return We}),n.d(t,"UnsignedShort4444Type",function(){return Ye}),n.d(t,"UnsignedShort5551Type",function(){return Xe}),n.d(t,"UnsignedShort565Type",function(){return Ke}),n.d(t,"UnsignedShortType",function(){return ze}),n.d(t,"VSMShadowMap",function(){return k}),n.d(t,"Vector2",function(){return ar}),n.d(t,"Vector3",function(){return xr}),n.d(t,"Vector4",function(){return mr}),n.d(t,"VectorKeyframeTrack",function(){return Kf}),n.d(t,"Vertex",function(){return Tp}),n.d(t,"VertexColors",function(){return bp}),n.d(t,"VideoTexture",function(){return tc}),n.d(t,"WebGL1Renderer",function(){return Yl}),n.d(t,"WebGLCubeRenderTarget",function(){return Va}),n.d(t,"WebGLMultipleRenderTargets",function(){return yr}),n.d(t,"WebGLMultisampleRenderTarget",function(){return br}),n.d(t,"WebGLRenderTarget",function(){return gr}),n.d(t,"WebGLRenderTargetCube",function(){return Wp}),n.d(t,"WebGLRenderer",function(){return Ql}),n.d(t,"WebGLUtils",function(){return Nl}),n.d(t,"WireframeGeometry",function(){return Ef}),n.d(t,"WireframeHelper",function(){return Gp}),n.d(t,"WrapAroundEnding",function(){return on}),n.d(t,"XHRLoader",function(){return zp}),n.d(t,"ZeroCurvatureEnding",function(){return rn}),n.d(t,"ZeroFactor",function(){return J}),n.d(t,"ZeroSlopeEnding",function(){return an}),n.d(t,"ZeroStencilOp",function(){return yn}),n.d(t,"sRGBEncoding",function(){return hn});var r,i=n(19),a=n(12),o=n(9),s=n(8),l=n(11),u=n(5),c=n(1),f=n(6),d=n(7),h=n(15),p=n.n(h),v=n(2),m=n(3);function g(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>8&255]+Jn[e>>16&255]+Jn[e>>24&255]+"-"+Jn[255&t]+Jn[t>>8&255]+"-"+Jn[t>>16&15|64]+Jn[t>>24&255]+"-"+Jn[63&n|128]+Jn[n>>8&255]+"-"+Jn[n>>16&255]+Jn[n>>24&255]+Jn[255&r]+Jn[r>>8&255]+Jn[r>>16&255]+Jn[r>>24&255]).toUpperCase()}function Zn(e,t,n){return Math.max(t,Math.min(n,e))}function $n(e,t){return(e%t+t)%t}function er(e,t,n){return(1-n)*e+n*t}function tr(e){return 0===(e&e-1)&&0!==e}function nr(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function rr(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var ir=Object.freeze({__proto__:null,DEG2RAD:Xn,RAD2DEG:Kn,generateUUID:qn,clamp:Zn,euclideanModulo:$n,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:er,damp:function(e,t,n,r){return er(e,t,1-Math.exp(-n*r))},pingpong:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t-Math.abs($n(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){return void 0!==e&&(Yn=e%2147483647),((Yn=16807*Yn%2147483647)-1)/2147483646},degToRad:function(e){return e*Xn},radToDeg:function(e){return e*Kn},isPowerOfTwo:tr,ceilPowerOfTwo:nr,floorPowerOfTwo:rr,setQuaternionFromProperEuler:function(e,t,n,r,i){var a=Math.cos,o=Math.sin,s=a(n/2),l=o(n/2),u=a((t+r)/2),c=o((t+r)/2),f=a((t-r)/2),d=o((t-r)/2),h=a((r-t)/2),p=o((r-t)/2);switch(i){case"XYX":e.set(s*c,l*f,l*d,s*u);break;case"YZY":e.set(l*d,s*c,l*f,s*u);break;case"ZXZ":e.set(l*f,l*d,s*c,s*u);break;case"XZX":e.set(s*c,l*p,l*h,s*u);break;case"YXY":e.set(l*h,s*c,l*p,s*u);break;case"ZYZ":e.set(l*p,l*h,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}}),ar=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(v.a)(this,e),this.x=t,this.y=n}return Object(m.a)(e,[{key:"set",value:function(e,t){return this.x=e,this.y=t,this}},{key:"setScalar",value:function(e){return this.x=e,this.y=e,this}},{key:"setX",value:function(e){return this.x=e,this}},{key:"setY",value:function(e){return this.y=e,this}},{key:"setComponent",value:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}},{key:"getComponent",value:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this}},{key:"add",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}},{key:"addScalar",value:function(e){return this.x+=e,this.y+=e,this}},{key:"addVectors",value:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}},{key:"addScaledVector",value:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}},{key:"sub",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}},{key:"subScalar",value:function(e){return this.x-=e,this.y-=e,this}},{key:"subVectors",value:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}},{key:"multiply",value:function(e){return this.x*=e.x,this.y*=e.y,this}},{key:"multiplyScalar",value:function(e){return this.x*=e,this.y*=e,this}},{key:"divide",value:function(e){return this.x/=e.x,this.y/=e.y,this}},{key:"divideScalar",value:function(e){return this.multiplyScalar(1/e)}},{key:"applyMatrix3",value:function(e){var 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}},{key:"min",value:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}},{key:"max",value:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}},{key:"clamp",value:function(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}},{key:"clampScalar",value:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}},{key:"clampLength",value:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},{key:"roundToZero",value:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this}},{key:"dot",value:function(e){return this.x*e.x+this.y*e.y}},{key:"cross",value:function(e){return this.x*e.y-this.y*e.x}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"angle",value:function(){var e=Math.atan2(-this.y,-this.x)+Math.PI;return e}},{key:"distanceTo",value:function(e){return Math.sqrt(this.distanceToSquared(e))}},{key:"distanceToSquared",value:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n}},{key:"manhattanDistanceTo",value:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}},{key:"setLength",value:function(e){return this.normalize().multiplyScalar(e)}},{key:"lerp",value:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}},{key:"lerpVectors",value:function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}},{key:"equals",value:function(e){return e.x===this.x&&e.y===this.y}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e}},{key:"fromBufferAttribute",value:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}},{key:"rotateAround",value:function(e,t){var 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}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this}},{key:Symbol.iterator,value:p.a.mark(function e(){return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.x;case 2:return e.next=4,this.y;case 4:case"end":return e.stop()}},e,this)})},{key:"width",get:function(){return this.x},set:function(e){this.x=e}},{key:"height",get:function(){return this.y},set:function(e){this.y=e}}]),e}();ar.prototype.isVector2=!0;var or=function(){function e(){Object(v.a)(this,e),this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}return Object(m.a)(e,[{key:"set",value:function(e,t,n,r,i,a,o,s,l){var u=this.elements;return u[0]=e,u[1]=r,u[2]=o,u[3]=t,u[4]=i,u[5]=s,u[6]=n,u[7]=a,u[8]=l,this}},{key:"identity",value:function(){return this.set(1,0,0,0,1,0,0,0,1),this}},{key:"copy",value:function(e){var 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}},{key:"extractBasis",value:function(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}},{key:"setFromMatrix4",value:function(e){var 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}},{key:"multiply",value:function(e){return this.multiplyMatrices(this,e)}},{key:"premultiply",value:function(e){return this.multiplyMatrices(e,this)}},{key:"multiplyMatrices",value:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],l=n[1],u=n[4],c=n[7],f=n[2],d=n[5],h=n[8],p=r[0],v=r[3],m=r[6],g=r[1],y=r[4],b=r[7],A=r[2],x=r[5],w=r[8];return i[0]=a*p+o*g+s*A,i[3]=a*v+o*y+s*x,i[6]=a*m+o*b+s*w,i[1]=l*p+u*g+c*A,i[4]=l*v+u*y+c*x,i[7]=l*m+u*b+c*w,i[2]=f*p+d*g+h*A,i[5]=f*v+d*y+h*x,i[8]=f*m+d*b+h*w,this}},{key:"multiplyScalar",value:function(e){var 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}},{key:"determinant",value:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*a*u-t*o*l-n*i*u+n*o*s+r*i*l-r*a*s}},{key:"invert",value:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=u*a-o*l,f=o*s-u*i,d=l*i-a*s,h=t*c+n*f+r*d;if(0===h)return this.set(0,0,0,0,0,0,0,0,0);var p=1/h;return e[0]=c*p,e[1]=(r*l-u*n)*p,e[2]=(o*n-r*a)*p,e[3]=f*p,e[4]=(u*t-r*s)*p,e[5]=(r*i-o*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(a*t-n*i)*p,this}},{key:"transpose",value:function(){var e,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}},{key:"getNormalMatrix",value:function(e){return this.setFromMatrix4(e).invert().transpose()}},{key:"transposeIntoArray",value:function(e){var 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}},{key:"setUvTransform",value:function(e,t,n,r,i,a,o){var s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*a+l*o)+a+e,-r*l,r*s,-r*(-l*a+s*o)+o+t,0,0,1),this}},{key:"scale",value:function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}},{key:"rotate",value:function(e){var t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],a=r[3],o=r[6],s=r[1],l=r[4],u=r[7];return r[0]=t*i+n*s,r[3]=t*a+n*l,r[6]=t*o+n*u,r[1]=-n*i+t*s,r[4]=-n*a+t*l,r[7]=-n*o+t*u,this}},{key:"translate",value:function(e,t){var n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}},{key:"equals",value:function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<9;n++)this.elements[n]=e[n+t];return this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,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}},{key:"clone",value:function(){return(new this.constructor).fromArray(this.elements)}}]),e}();function sr(e){if(0===e.length)return-1/0;for(var t=e[0],n=1,r=e.length;nt&&(t=e[n]);return t}or.prototype.isMatrix3=!0;var lr,ur={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function cr(e,t){return new ur[e](t)}function fr(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}var dr=function(){function e(){Object(v.a)(this,e)}return Object(m.a)(e,null,[{key:"getDataURL",value:function(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;var t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===lr&&(lr=fr("canvas")),lr.width=e.width,lr.height=e.height;var n=lr.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=lr}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")}}]),e}(),hr=0,pr=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.DEFAULT_IMAGE,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.DEFAULT_MAPPING,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Te,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Te,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Pe,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:je,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:et,f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Ue,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,p=arguments.length>9&&void 0!==arguments[9]?arguments[9]:dn;return Object(v.a)(this,t),e=Object(u.a)(this,Object(c.a)(t).call(this)),Object.defineProperty(Object(d.a)(Object(d.a)(e)),"id",{value:hr++}),e.uuid=qn(),e.name="",e.image=n,e.mipmaps=[],e.mapping=r,e.wrapS=i,e.wrapT=a,e.magFilter=o,e.minFilter=s,e.anisotropy=h,e.format=l,e.internalFormat=null,e.type=f,e.offset=new ar(0,0),e.repeat=new ar(1,1),e.center=new ar(0,0),e.rotation=0,e.matrixAutoUpdate=!0,e.matrix=new or,e.generateMipmaps=!0,e.premultiplyAlpha=!1,e.flipY=!0,e.unpackAlignment=4,e.encoding=p,e.userData={},e.version=0,e.onUpdate=null,e.isRenderTargetTexture=!1,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"updateMatrix",value:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this}},{key:"toJSON",value:function(e){var t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=qn()),!t&&void 0===e.images[r.uuid]){var i;if(Array.isArray(r)){i=[];for(var a=0,o=r.length;a1)switch(this.wrapS){case _e:e.x=e.x-Math.floor(e.x);break;case Te:e.x=e.x<0?0:1;break;case ke: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 _e:e.y=e.y-Math.floor(e.y);break;case Te:e.y=e.y<0?0:1;break;case ke: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}},{key:"needsUpdate",set:function(e){!0===e&&this.version++}}]),t}(Wn);function vr(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?dr.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}pr.DEFAULT_IMAGE=void 0,pr.DEFAULT_MAPPING=Ae,pr.prototype.isTexture=!0;var mr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;Object(v.a)(this,e),this.x=t,this.y=n,this.z=r,this.w=i}return Object(m.a)(e,[{key:"set",value:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}},{key:"setScalar",value:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}},{key:"setX",value:function(e){return this.x=e,this}},{key:"setY",value:function(e){return this.y=e,this}},{key:"setZ",value:function(e){return this.z=e,this}},{key:"setW",value:function(e){return this.w=e,this}},{key:"setComponent",value:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}},{key:"getComponent",value:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y,this.z,this.w)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}},{key:"add",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}},{key:"addScalar",value:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}},{key:"addVectors",value:function(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}},{key:"addScaledVector",value:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}},{key:"sub",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}},{key:"subScalar",value:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}},{key:"subVectors",value:function(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}},{key:"multiply",value:function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}},{key:"multiplyScalar",value:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}},{key:"applyMatrix4",value:function(e){var 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}},{key:"divideScalar",value:function(e){return this.multiplyScalar(1/e)}},{key:"setAxisAngleFromQuaternion",value:function(e){this.w=2*Math.acos(e.w);var 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}},{key:"setAxisAngleFromRotationMatrix",value:function(e){var t,n,r,i,a=e.elements,o=a[0],s=a[4],l=a[8],u=a[1],c=a[5],f=a[9],d=a[2],h=a[6],p=a[10];if(Math.abs(s-u)<.01&&Math.abs(l-d)<.01&&Math.abs(f-h)<.01){if(Math.abs(s+u)<.1&&Math.abs(l+d)<.1&&Math.abs(f+h)<.1&&Math.abs(o+c+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var v=(o+1)/2,m=(c+1)/2,g=(p+1)/2,y=(s+u)/4,b=(l+d)/4,A=(f+h)/4;return v>m&&v>g?v<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(v)),i=b/n):m>g?m<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(m)),i=A/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=A/i),this.set(n,r,i,t),this}var x=Math.sqrt((h-f)*(h-f)+(l-d)*(l-d)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(h-f)/x,this.y=(l-d)/x,this.z=(u-s)/x,this.w=Math.acos((o+c+p-1)/2),this}},{key:"min",value:function(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}},{key:"max",value:function(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}},{key:"clamp",value:function(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}},{key:"clampScalar",value:function(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}},{key:"clampLength",value:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}},{key:"floor",value:function(){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}},{key:"ceil",value:function(){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}},{key:"round",value:function(){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}},{key:"roundToZero",value:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}},{key:"dot",value:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"setLength",value:function(e){return this.normalize().multiplyScalar(e)}},{key:"lerp",value:function(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}},{key:"lerpVectors",value:function(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}},{key:"equals",value:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}},{key:"fromBufferAttribute",value:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}},{key:Symbol.iterator,value:p.a.mark(function e(){return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.x;case 2:return e.next=4,this.y;case 4:return e.next=6,this.z;case 6:return e.next=8,this.w;case 8:case"end":return e.stop()}},e,this)})},{key:"width",get:function(){return this.z},set:function(e){this.z=e}},{key:"height",get:function(){return this.w},set:function(e){this.w=e}}]),e}();mr.prototype.isVector4=!0;var gr=function(e){function t(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this))).width=e,r.height=n,r.depth=1,r.scissor=new mr(0,0,e,n),r.scissorTest=!1,r.viewport=new mr(0,0,e,n),r.texture=new pr(void 0,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),r.texture.isRenderTargetTexture=!0,r.texture.image={width:e,height:n,depth:1},r.texture.generateMipmaps=void 0!==i.generateMipmaps&&i.generateMipmaps,r.texture.internalFormat=void 0!==i.internalFormat?i.internalFormat:null,r.texture.minFilter=void 0!==i.minFilter?i.minFilter:Pe,r.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,r.stencilBuffer=void 0!==i.stencilBuffer&&i.stencilBuffer,r.depthTexture=void 0!==i.depthTexture?i.depthTexture:null,r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"setTexture",value:function(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}},{key:"setSize",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]: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)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=Object(l.a)({},this.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}}]),t}(Wn);gr.prototype.isWebGLRenderTarget=!0;var yr=function(e){function t(e,n,r){var i;Object(v.a)(this,t);var a=(i=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).texture;i.texture=[];for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:1;if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(var r=0,i=this.texture.length;r2&&void 0!==arguments[2]?arguments[2]:{};return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n,i))).samples=4,r.ignoreDepthForMultisampleCopy=void 0===i.ignoreDepth||i.ignoreDepth,r.useRenderToTexture=void 0!==i.useRenderToTexture&&i.useRenderToTexture,r.useRenderbuffer=!1===r.useRenderToTexture,r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.samples=e.samples,this.useRenderToTexture=e.useRenderToTexture,this.useRenderbuffer=e.useRenderbuffer,this}}]),t}(gr);br.prototype.isWebGLMultisampleRenderTarget=!0;var Ar=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;Object(v.a)(this,e),this._x=t,this._y=n,this._z=r,this._w=i}return Object(m.a)(e,[{key:"set",value:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}},{key:"clone",value:function(){return new this.constructor(this._x,this._y,this._z,this._w)}},{key:"copy",value:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}},{key:"setFromEuler",value:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,l=o(n/2),u=o(r/2),c=o(i/2),f=s(n/2),d=s(r/2),h=s(i/2);switch(a){case"XYZ":this._x=f*u*c+l*d*h,this._y=l*d*c-f*u*h,this._z=l*u*h+f*d*c,this._w=l*u*c-f*d*h;break;case"YXZ":this._x=f*u*c+l*d*h,this._y=l*d*c-f*u*h,this._z=l*u*h-f*d*c,this._w=l*u*c+f*d*h;break;case"ZXY":this._x=f*u*c-l*d*h,this._y=l*d*c+f*u*h,this._z=l*u*h+f*d*c,this._w=l*u*c-f*d*h;break;case"ZYX":this._x=f*u*c-l*d*h,this._y=l*d*c+f*u*h,this._z=l*u*h-f*d*c,this._w=l*u*c+f*d*h;break;case"YZX":this._x=f*u*c+l*d*h,this._y=l*d*c+f*u*h,this._z=l*u*h-f*d*c,this._w=l*u*c-f*d*h;break;case"XZY":this._x=f*u*c-l*d*h,this._y=l*d*c-f*u*h,this._z=l*u*h+f*d*c,this._w=l*u*c+f*d*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}},{key:"setFromAxisAngle",value:function(e,t){var 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}},{key:"setFromRotationMatrix",value:function(e){var t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],l=t[2],u=t[6],c=t[10],f=n+o+c;if(f>0){var d=.5/Math.sqrt(f+1);this._w=.25/d,this._x=(u-s)*d,this._y=(i-l)*d,this._z=(a-r)*d}else if(n>o&&n>c){var h=2*Math.sqrt(1+n-o-c);this._w=(u-s)/h,this._x=.25*h,this._y=(r+a)/h,this._z=(i+l)/h}else if(o>c){var p=2*Math.sqrt(1+o-n-c);this._w=(i-l)/p,this._x=(r+a)/p,this._y=.25*p,this._z=(s+u)/p}else{var v=2*Math.sqrt(1+c-n-o);this._w=(a-r)/v,this._x=(i+l)/v,this._y=(s+u)/v,this._z=.25*v}return this._onChangeCallback(),this}},{key:"setFromUnitVectors",value:function(e,t){var n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(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()}},{key:"angleTo",value:function(e){return 2*Math.acos(Math.abs(Zn(this.dot(e),-1,1)))}},{key:"rotateTowards",value:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this}},{key:"identity",value:function(){return this.set(0,0,0,1)}},{key:"invert",value:function(){return this.conjugate()}},{key:"conjugate",value:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}},{key:"dot",value:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}},{key:"lengthSq",value:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}},{key:"length",value:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}},{key:"normalize",value:function(){var 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}},{key:"multiply",value:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}},{key:"premultiply",value:function(e){return this.multiplyQuaternions(e,this)}},{key:"multiplyQuaternions",value:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,l=t._z,u=t._w;return this._x=n*u+a*o+r*l-i*s,this._y=r*u+a*s+i*o-n*l,this._z=i*u+a*l+n*s-r*o,this._w=a*u-n*o-r*s-i*l,this._onChangeCallback(),this}},{key:"slerp",value:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;var s=1-o*o;if(s<=Number.EPSILON){var l=1-t;return this._w=l*a+t*this._w,this._x=l*n+t*this._x,this._y=l*r+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var u=Math.sqrt(s),c=Math.atan2(u,o),f=Math.sin((1-t)*c)/u,d=Math.sin(t*c)/u;return this._w=a*f+this._w*d,this._x=n*f+this._x*d,this._y=r*f+this._y*d,this._z=i*f+this._z*d,this._onChangeCallback(),this}},{key:"slerpQuaternions",value:function(e,t,n){this.copy(e).slerp(t,n)}},{key:"random",value:function(){var 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))}},{key:"equals",value:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}},{key:"fromBufferAttribute",value:function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}},{key:"_onChange",value:function(e){return this._onChangeCallback=e,this}},{key:"_onChangeCallback",value:function(){}},{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"w",get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}],[{key:"slerp",value:function(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}},{key:"slerpFlat",value:function(e,t,n,r,i,a,o){var s=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3],f=i[a+0],d=i[a+1],h=i[a+2],p=i[a+3];if(0===o)return e[t+0]=s,e[t+1]=l,e[t+2]=u,void(e[t+3]=c);if(1===o)return e[t+0]=f,e[t+1]=d,e[t+2]=h,void(e[t+3]=p);if(c!==p||s!==f||l!==d||u!==h){var v=1-o,m=s*f+l*d+u*h+c*p,g=m>=0?1:-1,y=1-m*m;if(y>Number.EPSILON){var b=Math.sqrt(y),A=Math.atan2(b,m*g);v=Math.sin(v*A)/b,o=Math.sin(o*A)/b}var x=o*g;if(s=s*v+f*x,l=l*v+d*x,u=u*v+h*x,c=c*v+p*x,v===1-o){var w=1/Math.sqrt(s*s+l*l+u*u+c*c);s*=w,l*=w,u*=w,c*=w}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=c}},{key:"multiplyQuaternionsFlat",value:function(e,t,n,r,i,a){var o=n[r],s=n[r+1],l=n[r+2],u=n[r+3],c=i[a],f=i[a+1],d=i[a+2],h=i[a+3];return e[t]=o*h+u*c+s*d-l*f,e[t+1]=s*h+u*f+l*c-o*d,e[t+2]=l*h+u*d+o*f-s*c,e[t+3]=u*h-o*c-s*f-l*d,e}}]),e}();Ar.prototype.isQuaternion=!0;var xr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Object(v.a)(this,e),this.x=t,this.y=n,this.z=r}return Object(m.a)(e,[{key:"set",value:function(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}},{key:"setScalar",value:function(e){return this.x=e,this.y=e,this.z=e,this}},{key:"setX",value:function(e){return this.x=e,this}},{key:"setY",value:function(e){return this.y=e,this}},{key:"setZ",value:function(e){return this.z=e,this}},{key:"setComponent",value:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}},{key:"getComponent",value:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y,this.z)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}},{key:"add",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}},{key:"addScalar",value:function(e){return this.x+=e,this.y+=e,this.z+=e,this}},{key:"addVectors",value:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}},{key:"addScaledVector",value:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}},{key:"sub",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}},{key:"subScalar",value:function(e){return this.x-=e,this.y-=e,this.z-=e,this}},{key:"subVectors",value:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}},{key:"multiply",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}},{key:"multiplyScalar",value:function(e){return this.x*=e,this.y*=e,this.z*=e,this}},{key:"multiplyVectors",value:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}},{key:"applyEuler",value:function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Mr.setFromEuler(e))}},{key:"applyAxisAngle",value:function(e,t){return this.applyQuaternion(Mr.setFromAxisAngle(e,t))}},{key:"applyMatrix3",value:function(e){var 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}},{key:"applyNormalMatrix",value:function(e){return this.applyMatrix3(e).normalize()}},{key:"applyMatrix4",value:function(e){var 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}},{key:"applyQuaternion",value:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*r-o*n,u=s*n+o*t-i*r,c=s*r+i*n-a*t,f=-i*t-a*n-o*r;return this.x=l*s+f*-i+u*-o-c*-a,this.y=u*s+f*-a+c*-i-l*-o,this.z=c*s+f*-o+l*-a-u*-i,this}},{key:"project",value:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}},{key:"unproject",value:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}},{key:"transformDirection",value:function(e){var 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()}},{key:"divide",value:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}},{key:"divideScalar",value:function(e){return this.multiplyScalar(1/e)}},{key:"min",value:function(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}},{key:"max",value:function(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}},{key:"clamp",value:function(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}},{key:"clampScalar",value:function(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}},{key:"clampLength",value:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}},{key:"roundToZero",value:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}},{key:"dot",value:function(e){return this.x*e.x+this.y*e.y+this.z*e.z}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y+this.z*this.z}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"setLength",value:function(e){return this.normalize().multiplyScalar(e)}},{key:"lerp",value:function(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}},{key:"lerpVectors",value:function(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}},{key:"cross",value:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}},{key:"crossVectors",value:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}},{key:"projectOnVector",value:function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}},{key:"projectOnPlane",value:function(e){return wr.copy(this).projectOnVector(e),this.sub(wr)}},{key:"reflect",value:function(e){return this.sub(wr.copy(e).multiplyScalar(2*this.dot(e)))}},{key:"angleTo",value:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(Zn(n,-1,1))}},{key:"distanceTo",value:function(e){return Math.sqrt(this.distanceToSquared(e))}},{key:"distanceToSquared",value:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}},{key:"manhattanDistanceTo",value:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}},{key:"setFromSpherical",value:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}},{key:"setFromSphericalCoords",value:function(e,t,n){var 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}},{key:"setFromCylindrical",value:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}},{key:"setFromCylindricalCoords",value:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}},{key:"setFromMatrixPosition",value:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}},{key:"setFromMatrixScale",value:function(e){var 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}},{key:"setFromMatrixColumn",value:function(e,t){return this.fromArray(e.elements,4*t)}},{key:"setFromMatrix3Column",value:function(e,t){return this.fromArray(e.elements,3*t)}},{key:"equals",value:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}},{key:"fromBufferAttribute",value:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}},{key:"randomDirection",value:function(){var e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-Math.pow(e,2));return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}},{key:Symbol.iterator,value:p.a.mark(function e(){return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.x;case 2:return e.next=4,this.y;case 4:return e.next=6,this.z;case 6:case"end":return e.stop()}},e,this)})}]),e}();xr.prototype.isVector3=!0;var wr=new xr,Mr=new Ar,Sr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr(1/0,1/0,1/0),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr(-1/0,-1/0,-1/0);Object(v.a)(this,e),this.min=t,this.max=n}return Object(m.a)(e,[{key:"set",value:function(e,t){return this.min.copy(e),this.max.copy(t),this}},{key:"setFromArray",value:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,l=e.length;si&&(i=u),c>a&&(a=c),f>o&&(o=f)}return this.min.set(t,n,r),this.max.set(i,a,o),this}},{key:"setFromBufferAttribute",value:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,l=e.count;si&&(i=u),c>a&&(a=c),f>o&&(o=f)}return this.min.set(t,n,r),this.max.set(i,a,o),this}},{key:"setFromPoints",value:function(e){this.makeEmpty();for(var t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}},{key:"containsBox",value:function(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}},{key:"getParameter",value:function(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))}},{key:"intersectsBox",value:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}},{key:"intersectsSphere",value:function(e){return this.clampPoint(e.center,Cr),Cr.distanceToSquared(e.center)<=e.radius*e.radius}},{key:"intersectsPlane",value:function(e){var 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}},{key:"intersectsTriangle",value:function(e){if(this.isEmpty())return!1;this.getCenter(Lr),Pr.subVectors(this.max,Lr),Tr.subVectors(e.a,Lr),kr.subVectors(e.b,Lr),Br.subVectors(e.c,Lr),Or.subVectors(kr,Tr),Rr.subVectors(Br,kr),Dr.subVectors(Tr,Br);var t=[0,-Or.z,Or.y,0,-Rr.z,Rr.y,0,-Dr.z,Dr.y,Or.z,0,-Or.x,Rr.z,0,-Rr.x,Dr.z,0,-Dr.x,-Or.y,Or.x,0,-Rr.y,Rr.x,0,-Dr.y,Dr.x,0];return!!jr(t,Tr,kr,Br,Pr)&&(!!jr(t=[1,0,0,0,1,0,0,0,1],Tr,kr,Br,Pr)&&(Ir.crossVectors(Or,Rr),jr(t=[Ir.x,Ir.y,Ir.z],Tr,kr,Br,Pr)))}},{key:"clampPoint",value:function(e,t){return t.copy(e).clamp(this.min,this.max)}},{key:"distanceToPoint",value:function(e){return Cr.copy(e).clamp(this.min,this.max).sub(e).length()}},{key:"getBoundingSphere",value:function(e){return this.getCenter(e.center),e.radius=.5*this.getSize(Cr).length(),e}},{key:"intersect",value:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}},{key:"union",value:function(e){return this.min.min(e.min),this.max.max(e.max),this}},{key:"applyMatrix4",value:function(e){return this.isEmpty()?this:(Er[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Er[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Er[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Er[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Er[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Er[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Er[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Er[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Er),this)}},{key:"translate",value:function(e){return this.min.add(e),this.max.add(e),this}},{key:"equals",value:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}]),e}();Sr.prototype.isBox3=!0;var Er=[new xr,new xr,new xr,new xr,new xr,new xr,new xr,new xr],Cr=new xr,_r=new Sr,Tr=new xr,kr=new xr,Br=new xr,Or=new xr,Rr=new xr,Dr=new xr,Lr=new xr,Pr=new xr,Ir=new xr,Fr=new xr;function jr(e,t,n,r,i){for(var a=0,o=e.length-3;a<=o;a+=3){Fr.fromArray(e,a);var s=i.x*Math.abs(Fr.x)+i.y*Math.abs(Fr.y)+i.z*Math.abs(Fr.z),l=t.dot(Fr),u=n.dot(Fr),c=r.dot(Fr);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}var Nr=new Sr,Ur=new xr,Hr=new xr,Gr=new xr,zr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;Object(v.a)(this,e),this.center=t,this.radius=n}return Object(m.a)(e,[{key:"set",value:function(e,t){return this.center.copy(e),this.radius=t,this}},{key:"setFromPoints",value:function(e,t){var n=this.center;void 0!==t?n.copy(t):Nr.setFromPoints(e).getCenter(n);for(var r=0,i=0,a=e.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}},{key:"getBoundingBox",value:function(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}},{key:"applyMatrix4",value:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}},{key:"translate",value:function(e){return this.center.add(e),this}},{key:"expandByPoint",value:function(e){Gr.subVectors(e,this.center);var t=Gr.lengthSq();if(t>this.radius*this.radius){var n=Math.sqrt(t),r=.5*(n-this.radius);this.center.add(Gr.multiplyScalar(r/n)),this.radius+=r}return this}},{key:"union",value:function(e){return!0===this.center.equals(e.center)?Hr.set(0,0,1).multiplyScalar(e.radius):Hr.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Ur.copy(e.center).add(Hr)),this.expandByPoint(Ur.copy(e.center).sub(Hr)),this}},{key:"equals",value:function(e){return e.center.equals(this.center)&&e.radius===this.radius}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),Vr=new xr,Wr=new xr,Jr=new xr,Qr=new xr,Yr=new xr,Xr=new xr,Kr=new xr,qr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr(0,0,-1);Object(v.a)(this,e),this.origin=t,this.direction=n}return Object(m.a)(e,[{key:"set",value:function(e,t){return this.origin.copy(e),this.direction.copy(t),this}},{key:"copy",value:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}},{key:"at",value:function(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}},{key:"lookAt",value:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this}},{key:"recast",value:function(e){return this.origin.copy(this.at(e,Vr)),this}},{key:"closestPointToPoint",value:function(e,t){t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}},{key:"distanceToPoint",value:function(e){return Math.sqrt(this.distanceSqToPoint(e))}},{key:"distanceSqToPoint",value:function(e){var t=Vr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Vr.copy(this.direction).multiplyScalar(t).add(this.origin),Vr.distanceToSquared(e))}},{key:"distanceSqToSegment",value:function(e,t,n,r){Wr.copy(e).add(t).multiplyScalar(.5),Jr.copy(t).sub(e).normalize(),Qr.copy(this.origin).sub(Wr);var i,a,o,s,l=.5*e.distanceTo(t),u=-this.direction.dot(Jr),c=Qr.dot(this.direction),f=-Qr.dot(Jr),d=Qr.lengthSq(),h=Math.abs(1-u*u);if(h>0)if(a=u*c-f,s=l*h,(i=u*f-c)>=0)if(a>=-s)if(a<=s){var p=1/h;o=(i*=p)*(i+u*(a*=p)+2*c)+a*(u*i+a+2*f)+d}else a=l,o=-(i=Math.max(0,-(u*a+c)))*i+a*(a+2*f)+d;else a=-l,o=-(i=Math.max(0,-(u*a+c)))*i+a*(a+2*f)+d;else a<=-s?o=-(i=Math.max(0,-(-u*l+c)))*i+(a=i>0?-l:Math.min(Math.max(-l,-f),l))*(a+2*f)+d:a<=s?(i=0,o=(a=Math.min(Math.max(-l,-f),l))*(a+2*f)+d):o=-(i=Math.max(0,-(u*l+c)))*i+(a=i>0?l:Math.min(Math.max(-l,-f),l))*(a+2*f)+d;else a=u>0?-l:l,o=-(i=Math.max(0,-(u*a+c)))*i+a*(a+2*f)+d;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(Jr).multiplyScalar(a).add(Wr),o}},{key:"intersectSphere",value:function(e,t){Vr.subVectors(e.center,this.origin);var n=Vr.dot(this.direction),r=Vr.dot(Vr)-n*n,i=e.radius*e.radius;if(r>i)return null;var a=Math.sqrt(i-r),o=n-a,s=n+a;return o<0&&s<0?null:o<0?this.at(s,t):this.at(o,t)}},{key:"intersectsSphere",value:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}},{key:"distanceToPlane",value:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}},{key:"intersectPlane",value:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}},{key:"intersectsPlane",value:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}},{key:"intersectBox",value:function(e,t){var n,r,i,a,o,s,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,f=this.origin;return l>=0?(n=(e.min.x-f.x)*l,r=(e.max.x-f.x)*l):(n=(e.max.x-f.x)*l,r=(e.min.x-f.x)*l),u>=0?(i=(e.min.y-f.y)*u,a=(e.max.y-f.y)*u):(i=(e.max.y-f.y)*u,a=(e.min.y-f.y)*u),n>a||i>r?null:((i>n||n!==n)&&(n=i),(a=0?(o=(e.min.z-f.z)*c,s=(e.max.z-f.z)*c):(o=(e.max.z-f.z)*c,s=(e.min.z-f.z)*c),n>s||o>r?null:((o>n||n!==n)&&(n=o),(s=0?n:r,t)))}},{key:"intersectsBox",value:function(e){return null!==this.intersectBox(e,Vr)}},{key:"intersectTriangle",value:function(e,t,n,r,i){Yr.subVectors(t,e),Xr.subVectors(n,e),Kr.crossVectors(Yr,Xr);var a,o=this.direction.dot(Kr);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Qr.subVectors(this.origin,e);var s=a*this.direction.dot(Xr.crossVectors(Qr,Xr));if(s<0)return null;var l=a*this.direction.dot(Yr.cross(Qr));if(l<0)return null;if(s+l>o)return null;var u=-a*Qr.dot(Kr);return u<0?null:this.at(u/o,i)}},{key:"applyMatrix4",value:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}},{key:"equals",value:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),Zr=function(){function e(){Object(v.a)(this,e),this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}return Object(m.a)(e,[{key:"set",value:function(e,t,n,r,i,a,o,s,l,u,c,f,d,h,p,v){var m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=i,m[5]=a,m[9]=o,m[13]=s,m[2]=l,m[6]=u,m[10]=c,m[14]=f,m[3]=d,m[7]=h,m[11]=p,m[15]=v,this}},{key:"identity",value:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}},{key:"clone",value:function(){return(new e).fromArray(this.elements)}},{key:"copy",value:function(e){var 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}},{key:"copyPosition",value:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}},{key:"setFromMatrix3",value:function(e){var 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}},{key:"extractBasis",value:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}},{key:"makeBasis",value:function(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}},{key:"extractRotation",value:function(e){var t=this.elements,n=e.elements,r=1/$r.setFromMatrixColumn(e,0).length(),i=1/$r.setFromMatrixColumn(e,1).length(),a=1/$r.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}},{key:"makeRotationFromEuler",value:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){var f=a*u,d=a*c,h=o*u,p=o*c;t[0]=s*u,t[4]=-s*c,t[8]=l,t[1]=d+h*l,t[5]=f-p*l,t[9]=-o*s,t[2]=p-f*l,t[6]=h+d*l,t[10]=a*s}else if("YXZ"===e.order){var v=s*u,m=s*c,g=l*u,y=l*c;t[0]=v+y*o,t[4]=g*o-m,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-o,t[2]=m*o-g,t[6]=y+v*o,t[10]=a*s}else if("ZXY"===e.order){var b=s*u,A=s*c,x=l*u,w=l*c;t[0]=b-w*o,t[4]=-a*c,t[8]=x+A*o,t[1]=A+x*o,t[5]=a*u,t[9]=w-b*o,t[2]=-a*l,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){var M=a*u,S=a*c,E=o*u,C=o*c;t[0]=s*u,t[4]=E*l-S,t[8]=M*l+C,t[1]=s*c,t[5]=C*l+M,t[9]=S*l-E,t[2]=-l,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){var _=a*s,T=a*l,k=o*s,B=o*l;t[0]=s*u,t[4]=B-_*c,t[8]=k*c+T,t[1]=c,t[5]=a*u,t[9]=-o*u,t[2]=-l*u,t[6]=T*c+k,t[10]=_-B*c}else if("XZY"===e.order){var O=a*s,R=a*l,D=o*s,L=o*l;t[0]=s*u,t[4]=-c,t[8]=l*u,t[1]=O*c+L,t[5]=a*u,t[9]=R*c-D,t[2]=D*c-R,t[6]=o*u,t[10]=L*c+O}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}},{key:"makeRotationFromQuaternion",value:function(e){return this.compose(ti,e,ni)}},{key:"lookAt",value:function(e,t,n){var r=this.elements;return ai.subVectors(e,t),0===ai.lengthSq()&&(ai.z=1),ai.normalize(),ri.crossVectors(n,ai),0===ri.lengthSq()&&(1===Math.abs(n.z)?ai.x+=1e-4:ai.z+=1e-4,ai.normalize(),ri.crossVectors(n,ai)),ri.normalize(),ii.crossVectors(ai,ri),r[0]=ri.x,r[4]=ii.x,r[8]=ai.x,r[1]=ri.y,r[5]=ii.y,r[9]=ai.y,r[2]=ri.z,r[6]=ii.z,r[10]=ai.z,this}},{key:"multiply",value:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}},{key:"premultiply",value:function(e){return this.multiplyMatrices(e,this)}},{key:"multiplyMatrices",value:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],l=n[12],u=n[1],c=n[5],f=n[9],d=n[13],h=n[2],p=n[6],v=n[10],m=n[14],g=n[3],y=n[7],b=n[11],A=n[15],x=r[0],w=r[4],M=r[8],S=r[12],E=r[1],C=r[5],_=r[9],T=r[13],k=r[2],B=r[6],O=r[10],R=r[14],D=r[3],L=r[7],P=r[11],I=r[15];return i[0]=a*x+o*E+s*k+l*D,i[4]=a*w+o*C+s*B+l*L,i[8]=a*M+o*_+s*O+l*P,i[12]=a*S+o*T+s*R+l*I,i[1]=u*x+c*E+f*k+d*D,i[5]=u*w+c*C+f*B+d*L,i[9]=u*M+c*_+f*O+d*P,i[13]=u*S+c*T+f*R+d*I,i[2]=h*x+p*E+v*k+m*D,i[6]=h*w+p*C+v*B+m*L,i[10]=h*M+p*_+v*O+m*P,i[14]=h*S+p*T+v*R+m*I,i[3]=g*x+y*E+b*k+A*D,i[7]=g*w+y*C+b*B+A*L,i[11]=g*M+y*_+b*O+A*P,i[15]=g*S+y*T+b*R+A*I,this}},{key:"multiplyScalar",value:function(e){var 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}},{key:"determinant",value:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],l=e[13],u=e[2],c=e[6],f=e[10],d=e[14];return e[3]*(+i*s*c-r*l*c-i*o*f+n*l*f+r*o*d-n*s*d)+e[7]*(+t*s*d-t*l*f+i*a*f-r*a*d+r*l*u-i*s*u)+e[11]*(+t*l*c-t*o*d-i*a*c+n*a*d+i*o*u-n*l*u)+e[15]*(-r*o*u-t*s*c+t*o*f+r*a*c-n*a*f+n*s*u)}},{key:"transpose",value:function(){var e,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}},{key:"setPosition",value:function(e,t,n){var 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}},{key:"invert",value:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],h=e[12],p=e[13],v=e[14],m=e[15],g=c*v*l-p*f*l+p*s*d-o*v*d-c*s*m+o*f*m,y=h*f*l-u*v*l-h*s*d+a*v*d+u*s*m-a*f*m,b=u*p*l-h*c*l+h*o*d-a*p*d-u*o*m+a*c*m,A=h*c*s-u*p*s-h*o*f+a*p*f+u*o*v-a*c*v,x=t*g+n*y+r*b+i*A;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var w=1/x;return e[0]=g*w,e[1]=(p*f*i-c*v*i-p*r*d+n*v*d+c*r*m-n*f*m)*w,e[2]=(o*v*i-p*s*i+p*r*l-n*v*l-o*r*m+n*s*m)*w,e[3]=(c*s*i-o*f*i-c*r*l+n*f*l+o*r*d-n*s*d)*w,e[4]=y*w,e[5]=(u*v*i-h*f*i+h*r*d-t*v*d-u*r*m+t*f*m)*w,e[6]=(h*s*i-a*v*i-h*r*l+t*v*l+a*r*m-t*s*m)*w,e[7]=(a*f*i-u*s*i+u*r*l-t*f*l-a*r*d+t*s*d)*w,e[8]=b*w,e[9]=(h*c*i-u*p*i-h*n*d+t*p*d+u*n*m-t*c*m)*w,e[10]=(a*p*i-h*o*i+h*n*l-t*p*l-a*n*m+t*o*m)*w,e[11]=(u*o*i-a*c*i-u*n*l+t*c*l+a*n*d-t*o*d)*w,e[12]=A*w,e[13]=(u*p*r-h*c*r+h*n*f-t*p*f-u*n*v+t*c*v)*w,e[14]=(h*o*r-a*p*r-h*n*s+t*p*s+a*n*v-t*o*v)*w,e[15]=(a*c*r-u*o*r+u*n*s-t*c*s-a*n*f+t*o*f)*w,this}},{key:"scale",value:function(e){var 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}},{key:"getMaxScaleOnAxis",value:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}},{key:"makeTranslation",value:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}},{key:"makeRotationX",value:function(e){var 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}},{key:"makeRotationY",value:function(e){var 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}},{key:"makeRotationZ",value:function(e){var 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}},{key:"makeRotationAxis",value:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,l=i*a,u=i*o;return this.set(l*a+n,l*o-r*s,l*s+r*o,0,l*o+r*s,u*o+n,u*s-r*a,0,l*s-r*o,u*s+r*a,i*s*s+n,0,0,0,0,1),this}},{key:"makeScale",value:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}},{key:"makeShear",value:function(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}},{key:"compose",value:function(e,t,n){var r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,l=i+i,u=a+a,c=o+o,f=i*l,d=i*u,h=i*c,p=a*u,v=a*c,m=o*c,g=s*l,y=s*u,b=s*c,A=n.x,x=n.y,w=n.z;return r[0]=(1-(p+m))*A,r[1]=(d+b)*A,r[2]=(h-y)*A,r[3]=0,r[4]=(d-b)*x,r[5]=(1-(f+m))*x,r[6]=(v+g)*x,r[7]=0,r[8]=(h+y)*w,r[9]=(v-g)*w,r[10]=(1-(f+p))*w,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}},{key:"decompose",value:function(e,t,n){var r=this.elements,i=$r.set(r[0],r[1],r[2]).length(),a=$r.set(r[4],r[5],r[6]).length(),o=$r.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],ei.copy(this);var s=1/i,l=1/a,u=1/o;return ei.elements[0]*=s,ei.elements[1]*=s,ei.elements[2]*=s,ei.elements[4]*=l,ei.elements[5]*=l,ei.elements[6]*=l,ei.elements[8]*=u,ei.elements[9]*=u,ei.elements[10]*=u,t.setFromRotationMatrix(ei),n.x=i,n.y=a,n.z=o,this}},{key:"makePerspective",value:function(e,t,n,r,i,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*i/(t-e),l=2*i/(n-r),u=(t+e)/(t-e),c=(n+r)/(n-r),f=-(a+i)/(a-i),d=-2*a*i/(a-i);return o[0]=s,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=l,o[9]=c,o[13]=0,o[2]=0,o[6]=0,o[10]=f,o[14]=d,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}},{key:"makeOrthographic",value:function(e,t,n,r,i,a){var o=this.elements,s=1/(t-e),l=1/(n-r),u=1/(a-i),c=(t+e)*s,f=(n+r)*l,d=(a+i)*u;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-c,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-f,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-d,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}},{key:"equals",value:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<16;n++)this.elements[n]=e[n+t];return this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,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}}]),e}();Zr.prototype.isMatrix4=!0;var $r=new xr,ei=new Zr,ti=new xr(0,0,0),ni=new xr(1,1,1),ri=new xr,ii=new xr,ai=new xr,oi=new Zr,si=new Ar,li=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.DefaultOrder;Object(v.a)(this,e),this._x=t,this._y=n,this._z=r,this._order=i}return Object(m.a)(e,[{key:"set",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._order;return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}},{key:"clone",value:function(){return new this.constructor(this._x,this._y,this._z,this._order)}},{key:"copy",value:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}},{key:"setFromRotationMatrix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],l=r[5],u=r[9],c=r[2],f=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(Zn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(f,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Zn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(Zn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-Zn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(f,d),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(Zn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-Zn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,l),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-u,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}},{key:"setFromQuaternion",value:function(e,t,n){return oi.makeRotationFromQuaternion(e),this.setFromRotationMatrix(oi,t,n)}},{key:"setFromVector3",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order;return this.set(e.x,e.y,e.z,t)}},{key:"reorder",value:function(e){return si.setFromEuler(this),this.setFromQuaternion(si,e)}},{key:"equals",value:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}},{key:"fromArray",value:function(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}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}},{key:"toVector3",value:function(e){return e?e.set(this._x,this._y,this._z):new xr(this._x,this._y,this._z)}},{key:"_onChange",value:function(e){return this._onChangeCallback=e,this}},{key:"_onChangeCallback",value:function(){}},{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}}]),e}();li.prototype.isEuler=!0,li.DefaultOrder="XYZ",li.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var ui=function(){function e(){Object(v.a)(this,e),this.mask=1}return Object(m.a)(e,[{key:"set",value:function(e){this.mask=(1<>>0}},{key:"enable",value:function(e){this.mask|=1<1){for(var t=0;t1){for(var t=0;t0){r.children=[];for(var h=0;h0){r.animations=[];for(var p=0;p0&&(n.geometries=m),g.length>0&&(n.materials=g),y.length>0&&(n.textures=y),b.length>0&&(n.images=b),A.length>0&&(n.shapes=A),x.length>0&&(n.skeletons=x),w.length>0&&(n.animations=w)}return n.object=r,n;function M(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}}},{key:"clone",value:function(e){return(new this.constructor).copy(this,e)}},{key:"copy",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];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.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.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:new xr,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new xr;Object(v.a)(this,e),this.a=t,this.b=n,this.c=r}return Object(m.a)(e,[{key:"set",value:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}},{key:"setFromPointsAndIndices",value:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}},{key:"setFromAttributeAndIndices",value:function(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}},{key:"getArea",value:function(){return Si.subVectors(this.c,this.b),Ei.subVectors(this.a,this.b),.5*Si.cross(Ei).length()}},{key:"getMidpoint",value:function(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}},{key:"getNormal",value:function(t){return e.getNormal(this.a,this.b,this.c,t)}},{key:"getPlane",value:function(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}},{key:"getBarycoord",value:function(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}},{key:"getUV",value:function(t,n,r,i,a){return e.getUV(t,this.a,this.b,this.c,n,r,i,a)}},{key:"containsPoint",value:function(t){return e.containsPoint(t,this.a,this.b,this.c)}},{key:"isFrontFacing",value:function(t){return e.isFrontFacing(this.a,this.b,this.c,t)}},{key:"intersectsBox",value:function(e){return e.intersectsTriangle(this)}},{key:"closestPointToPoint",value:function(e,t){var n,r,i=this.a,a=this.b,o=this.c;Ti.subVectors(a,i),ki.subVectors(o,i),Oi.subVectors(e,i);var s=Ti.dot(Oi),l=ki.dot(Oi);if(s<=0&&l<=0)return t.copy(i);Ri.subVectors(e,a);var u=Ti.dot(Ri),c=ki.dot(Ri);if(u>=0&&c<=u)return t.copy(a);var f=s*c-u*l;if(f<=0&&s>=0&&u<=0)return n=s/(s-u),t.copy(i).addScaledVector(Ti,n);Di.subVectors(e,o);var d=Ti.dot(Di),h=ki.dot(Di);if(h>=0&&d<=h)return t.copy(o);var p=d*l-s*h;if(p<=0&&l>=0&&h<=0)return r=l/(l-h),t.copy(i).addScaledVector(ki,r);var v=u*h-d*c;if(v<=0&&c-u>=0&&d-h>=0)return Bi.subVectors(o,a),r=(c-u)/(c-u+(d-h)),t.copy(a).addScaledVector(Bi,r);var m=1/(v+p+f);return n=p*m,r=f*m,t.copy(i).addScaledVector(Ti,n).addScaledVector(ki,r)}},{key:"equals",value:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}],[{key:"getNormal",value:function(e,t,n,r){r.subVectors(n,t),Si.subVectors(e,t),r.cross(Si);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}},{key:"getBarycoord",value:function(e,t,n,r,i){Si.subVectors(r,t),Ei.subVectors(n,t),Ci.subVectors(e,t);var a=Si.dot(Si),o=Si.dot(Ei),s=Si.dot(Ci),l=Ei.dot(Ei),u=Ei.dot(Ci),c=a*l-o*o;if(0===c)return i.set(-2,-1,-1);var f=1/c,d=(l*s-o*u)*f,h=(a*u-o*s)*f;return i.set(1-d-h,h,d)}},{key:"containsPoint",value:function(e,t,n,r){return this.getBarycoord(e,t,n,r,_i),_i.x>=0&&_i.y>=0&&_i.x+_i.y<=1}},{key:"getUV",value:function(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,_i),s.set(0,0),s.addScaledVector(i,_i.x),s.addScaledVector(a,_i.y),s.addScaledVector(o,_i.z),s}},{key:"isFrontFacing",value:function(e,t,n,r){return Si.subVectors(n,t),Ei.subVectors(e,t),Si.cross(Ei).dot(r)<0}}]),e}(),Pi=0,Ii=function(e){function t(){var e;return Object(v.a)(this,t),e=Object(u.a)(this,Object(c.a)(t).call(this)),Object.defineProperty(Object(d.a)(Object(d.a)(e)),"id",{value:Pi++}),e.uuid=qn(),e.name="",e.type="Material",e.fog=!0,e.blending=I,e.side=B,e.vertexColors=!1,e.opacity=1,e.format=et,e.transparent=!1,e.blendSrc=K,e.blendDst=q,e.blendEquation=H,e.blendSrcAlpha=null,e.blendDstAlpha=null,e.blendEquationAlpha=null,e.depthFunc=oe,e.depthTest=!0,e.depthWrite=!0,e.stencilWriteMask=255,e.stencilFunc=Dn,e.stencilRef=0,e.stencilFuncMask=255,e.stencilFail=bn,e.stencilZFail=bn,e.stencilZPass=bn,e.stencilWrite=!1,e.clippingPlanes=null,e.clipIntersection=!1,e.clipShadows=!1,e.shadowSide=null,e.colorWrite=!0,e.precision=null,e.polygonOffset=!1,e.polygonOffsetFactor=0,e.polygonOffsetUnits=0,e.dithering=!1,e.alphaToCoverage=!1,e.premultipliedAlpha=!1,e.visible=!0,e.toneMapped=!0,e.userData={},e.version=0,e._alphaTest=0,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"onBuild",value:function(){}},{key:"onBeforeRender",value:function(){}},{key:"onBeforeCompile",value:function(){}},{key:"customProgramCacheKey",value:function(){return this.onBeforeCompile.toString()}},{key:"setValues",value:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===D;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}}},{key:"toJSON",value:function(e){var t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var 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()),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&&(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),this.blending!==I&&(n.blending=this.blending),this.side!==B&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.format!==et&&(n.format=this.format),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var i=r(e.textures),a=r(e.images);i.length>0&&(n.textures=i),a.length>0&&(n.images=a)}return n}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.format=e.format,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.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;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].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.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}},{key:"alphaTest",get:function(){return this._alphaTest},set:function(e){this._alphaTest>0!==e>0&&this.version++,this._alphaTest=e}},{key:"needsUpdate",set:function(e){!0===e&&this.version++}}]),t}(Wn);Ii.prototype.isMaterial=!0;var Fi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ji={h:0,s:0,l:0},Ni={h:0,s:0,l:0};function Ui(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Hi(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Gi(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}var zi=function(){function e(t,n,r){return Object(v.a)(this,e),void 0===n&&void 0===r?this.set(t):this.setRGB(t,n,r)}return Object(m.a)(e,[{key:"set",value:function(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this}},{key:"setScalar",value:function(e){return this.r=e,this.g=e,this.b=e,this}},{key:"setHex",value:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}},{key:"setRGB",value:function(e,t,n){return this.r=e,this.g=t,this.b=n,this}},{key:"setHSL",value:function(e,t,n){if(e=$n(e,1),t=Zn(t,0,1),n=Zn(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Ui(i,r,e+1/3),this.g=Ui(i,r,e),this.b=Ui(i,r,e-1/3)}return this}},{key:"setStyle",value:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){var r,i=n[1],a=n[2];switch(i){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[4]),this;if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[4]),this;break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){var o=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,l=parseInt(r[3],10)/100;return t(r[4]),this.setHSL(o,s,l)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){var u=n[1],c=u.length;if(3===c)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===c)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}},{key:"setColorName",value:function(e){var t=Fi[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}},{key:"clone",value:function(){return new this.constructor(this.r,this.g,this.b)}},{key:"copy",value:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}},{key:"copySRGBToLinear",value:function(e){return this.r=Hi(e.r),this.g=Hi(e.g),this.b=Hi(e.b),this}},{key:"copyLinearToSRGB",value:function(e){return this.r=Gi(e.r),this.g=Gi(e.g),this.b=Gi(e.b),this}},{key:"convertSRGBToLinear",value:function(){return this.copySRGBToLinear(this),this}},{key:"convertLinearToSRGB",value:function(){return this.copyLinearToSRGB(this),this}},{key:"getHex",value:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}},{key:"getHexString",value:function(){return("000000"+this.getHex().toString(16)).slice(-6)}},{key:"getHSL",value:function(e){var t,n,r=this.r,i=this.g,a=this.b,o=Math.max(r,i,a),s=Math.min(r,i,a),l=(s+o)/2;if(s===o)t=0,n=0;else{var u=o-s;switch(n=l<=.5?u/(o+s):u/(2-o-s),o){case r:t=(i-a)/u+(i1&&void 0!==arguments[1]?arguments[1]:0;return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}},{key:"fromBufferAttribute",value:function(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}},{key:"toJSON",value:function(){return this.getHex()}}]),e}();zi.NAMES=Fi,zi.prototype.isColor=!0,zi.prototype.r=1,zi.prototype.g=1,zi.prototype.b=1;var Vi=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="MeshBasicMaterial",n.color=new zi(16777215),n.map=null,n.lightMap=null,n.lightMapIntensity=1,n.aoMap=null,n.aoMapIntensity=1,n.specularMap=null,n.alphaMap=null,n.envMap=null,n.combine=fe,n.reflectivity=1,n.refractionRatio=.98,n.wireframe=!1,n.wireframeLinewidth=1,n.wireframeLinecap="round",n.wireframeLinejoin="round",n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,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}}]),t}(Ii);Vi.prototype.isMeshBasicMaterial=!0;var Wi=new xr,Ji=new ar,Qi=function(){function e(t,n,r){if(Object(v.a)(this,e),Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=n,this.count=void 0!==t?t.length/n:0,this.normalized=!0===r,this.usage=Ln,this.updateRange={offset:0,count:-1},this.version=0}return Object(m.a)(e,[{key:"onUploadCallback",value:function(){}},{key:"setUsage",value:function(e){return this.usage=e,this}},{key:"copy",value:function(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}},{key:"copyAt",value:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}},{key:"getX",value:function(e){return this.array[e*this.itemSize]}},{key:"setX",value:function(e,t){return this.array[e*this.itemSize]=t,this}},{key:"getY",value:function(e){return this.array[e*this.itemSize+1]}},{key:"setY",value:function(e,t){return this.array[e*this.itemSize+1]=t,this}},{key:"getZ",value:function(e){return this.array[e*this.itemSize+2]}},{key:"setZ",value:function(e,t){return this.array[e*this.itemSize+2]=t,this}},{key:"getW",value:function(e){return this.array[e*this.itemSize+3]}},{key:"setW",value:function(e,t){return this.array[e*this.itemSize+3]=t,this}},{key:"setXY",value:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}},{key:"setXYZ",value:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}},{key:"setXYZW",value:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}},{key:"onUpload",value:function(e){return this.onUploadCallback=e,this}},{key:"clone",value:function(){return new this.constructor(this.array,this.itemSize).copy(this)}},{key:"toJSON",value:function(){var e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==Ln&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}},{key:"needsUpdate",set:function(e){!0===e&&this.version++}}]),e}();Qi.prototype.isBufferAttribute=!0;var Yi=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Int8Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),Xi=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Uint8Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),Ki=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Uint8ClampedArray(e),n,r))}return Object(f.a)(t,e),t}(Qi),qi=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Int16Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),Zi=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Uint16Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),$i=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Int32Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),ea=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Uint32Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),ta=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Uint16Array(e),n,r))}return Object(f.a)(t,e),t}(Qi);ta.prototype.isFloat16BufferAttribute=!0;var na=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Float32Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),ra=function(e){function t(e,n,r){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new Float64Array(e),n,r))}return Object(f.a)(t,e),t}(Qi),ia=0,aa=new Zr,oa=new Mi,sa=new xr,la=new Sr,ua=new Sr,ca=new xr,fa=function(e){function t(){var e;return Object(v.a)(this,t),e=Object(u.a)(this,Object(c.a)(t).call(this)),Object.defineProperty(Object(d.a)(Object(d.a)(e)),"id",{value:ia++}),e.uuid=qn(),e.name="",e.type="BufferGeometry",e.index=null,e.attributes={},e.morphAttributes={},e.morphTargetsRelative=!1,e.groups=[],e.boundingBox=null,e.boundingSphere=null,e.drawRange={start:0,count:1/0},e.userData={},e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getIndex",value:function(){return this.index}},{key:"setIndex",value:function(e){return Array.isArray(e)?this.index=new(sr(e)>65535?ea:Zi)(e,1):this.index=e,this}},{key:"getAttribute",value:function(e){return this.attributes[e]}},{key:"setAttribute",value:function(e,t){return this.attributes[e]=t,this}},{key:"deleteAttribute",value:function(e){return delete this.attributes[e],this}},{key:"hasAttribute",value:function(e){return void 0!==this.attributes[e]}},{key:"addGroup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.groups.push({start:e,count:t,materialIndex:n})}},{key:"clearGroups",value:function(){this.groups=[]}},{key:"setDrawRange",value:function(e,t){this.drawRange.start=e,this.drawRange.count=t}},{key:"applyMatrix4",value:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){var r=(new or).getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}var i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}},{key:"applyQuaternion",value:function(e){return aa.makeRotationFromQuaternion(e),this.applyMatrix4(aa),this}},{key:"rotateX",value:function(e){return aa.makeRotationX(e),this.applyMatrix4(aa),this}},{key:"rotateY",value:function(e){return aa.makeRotationY(e),this.applyMatrix4(aa),this}},{key:"rotateZ",value:function(e){return aa.makeRotationZ(e),this.applyMatrix4(aa),this}},{key:"translate",value:function(e,t,n){return aa.makeTranslation(e,t,n),this.applyMatrix4(aa),this}},{key:"scale",value:function(e,t,n){return aa.makeScale(e,t,n),this.applyMatrix4(aa),this}},{key:"lookAt",value:function(e){return oa.lookAt(e),oa.updateMatrix(),this.applyMatrix4(oa.matrix),this}},{key:"center",value:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(sa).negate(),this.translate(sa.x,sa.y,sa.z),this}},{key:"setFromPoints",value:function(e){for(var t=[],n=0,r=e.length;n0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var i=this.attributes;for(var a in i){var o=i[a];e.data.attributes[a]=o.toJSON(e.data)}var s={},l=!1;for(var u in this.morphAttributes){for(var c=this.morphAttributes[u],f=[],d=0,h=c.length;d0&&(s[u]=f,l=!0)}l&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);var v=this.groups;v.length>0&&(e.data.groups=JSON.parse(JSON.stringify(v)));var m=this.boundingSphere;return null!==m&&(e.data.boundingSphere={center:m.center.toArray(),radius:m.radius}),e}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var t={};this.name=e.name;var n=e.index;null!==n&&this.setIndex(n.clone(t));var r=e.attributes;for(var i in r){var a=r[i];this.setAttribute(i,a.clone(t))}var o=e.morphAttributes;for(var s in o){for(var l=[],u=o[s],c=0,f=u.length;c0&&void 0!==arguments[0]?arguments[0]:new fa,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Vi;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="Mesh",e.geometry=n,e.material=r,e.updateMorphTargets(),e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}},{key:"updateMorphTargets",value:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=r.length;i0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}},{key:"raycast",value:function(e,t){var n,r=this.geometry,i=this.material,a=this.matrixWorld;if(void 0!==i&&(null===r.boundingSphere&&r.computeBoundingSphere(),pa.copy(r.boundingSphere),pa.applyMatrix4(a),!1!==e.ray.intersectsSphere(pa)&&(da.copy(a).invert(),ha.copy(e.ray).applyMatrix4(da),null===r.boundingBox||!1!==ha.intersectsBox(r.boundingBox))))if(r.isBufferGeometry){var o=r.index,s=r.attributes.position,l=r.morphAttributes.position,u=r.morphTargetsRelative,c=r.attributes.uv,f=r.attributes.uv2,d=r.groups,h=r.drawRange;if(null!==o)if(Array.isArray(i))for(var p=0,v=d.length;pn.far?null:{distance:l,point:Ta.clone(),object:e}}(e,t,n,r,va,ma,ga,_a);if(g){s&&(Sa.fromBufferAttribute(s,u),Ea.fromBufferAttribute(s,c),Ca.fromBufferAttribute(s,f),g.uv=Li.getUV(_a,va,ma,ga,Sa,Ea,Ca,new ar)),l&&(Sa.fromBufferAttribute(l,u),Ea.fromBufferAttribute(l,c),Ca.fromBufferAttribute(l,f),g.uv2=Li.getUV(_a,va,ma,ga,Sa,Ea,Ca,new ar));var y={a:u,b:c,c:f,normal:new xr,materialIndex:0};Li.getNormal(va,ma,ga,y.normal),g.face=y}return g}ka.prototype.isMesh=!0;var Oa=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="BoxGeometry",e.parameters={width:n,height:r,depth:i,widthSegments:a,heightSegments:o,depthSegments:s};var l=Object(d.a)(Object(d.a)(e));a=Math.floor(a),o=Math.floor(o),s=Math.floor(s);var f=[],h=[],p=[],m=[],g=0,y=0;function b(e,t,n,r,i,a,o,s,u,c,d){for(var v=a/u,b=o/c,A=a/2,x=o/2,w=s/2,M=u+1,S=c+1,E=0,C=0,_=new xr,T=0;T0?1:-1,p.push(_.x,_.y,_.z),m.push(B/u),m.push(1-T/c),E+=1}for(var R=0;R0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader;var a={};for(var o in this.extensions)!0===this.extensions[o]&&(a[o]=!0);return Object.keys(a).length>0&&(n.extensions=a),n}}]),t}(Ii);Fa.prototype.isShaderMaterial=!0;var ja=function(e){function t(){var e;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="Camera",e.matrixWorldInverse=new Zr,e.projectionMatrix=new Zr,e.projectionMatrixInverse=new Zr,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e,n){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}},{key:"getWorldDirection",value:function(e){this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}},{key:"updateMatrixWorld",value:function(e){Object(s.a)(Object(c.a)(t.prototype),"updateMatrixWorld",this).call(this,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"updateWorldMatrix",value:function(e,n){Object(s.a)(Object(c.a)(t.prototype),"updateWorldMatrix",this).call(this,e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),t}(Mi);ja.prototype.isCamera=!0;var Na=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2e3;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="PerspectiveCamera",e.fov=n,e.zoom=1,e.near=i,e.far=a,e.focus=10,e.aspect=r,e.view=null,e.filmGauge=35,e.filmOffset=0,e.updateProjectionMatrix(),e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e,n){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}},{key:"setFocalLength",value:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*Kn*Math.atan(t),this.updateProjectionMatrix()}},{key:"getFocalLength",value:function(){var e=Math.tan(.5*Xn*this.fov);return.5*this.getFilmHeight()/e}},{key:"getEffectiveFOV",value:function(){return 2*Kn*Math.atan(Math.tan(.5*Xn*this.fov)/this.zoom)}},{key:"getFilmWidth",value:function(){return this.filmGauge*Math.min(this.aspect,1)}},{key:"getFilmHeight",value:function(){return this.filmGauge/Math.max(this.aspect,1)}},{key:"setViewOffset",value:function(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()}},{key:"clearViewOffset",value:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}},{key:"updateProjectionMatrix",value:function(){var e=this.near,t=e*Math.tan(.5*Xn*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/o,t-=a.offsetY*n/s,r*=a.width/o,n*=a.height/s}var l=this.filmOffset;0!==l&&(i+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}},{key:"toJSON",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this,e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,null!==this.view&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}]),t}(ja);Na.prototype.isPerspectiveCamera=!0;var Ua=90,Ha=1,Ga=function(e){function t(e,n,r){var i;if(Object(v.a)(this,t),(i=Object(u.a)(this,Object(c.a)(t).call(this))).type="CubeCamera",!0!==r.isWebGLCubeRenderTarget)return console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter."),Object(u.a)(i);i.renderTarget=r;var a=new Na(Ua,Ha,e,n);a.layers=i.layers,a.up.set(0,-1,0),a.lookAt(new xr(1,0,0)),i.add(a);var o=new Na(Ua,Ha,e,n);o.layers=i.layers,o.up.set(0,-1,0),o.lookAt(new xr(-1,0,0)),i.add(o);var s=new Na(Ua,Ha,e,n);s.layers=i.layers,s.up.set(0,0,1),s.lookAt(new xr(0,1,0)),i.add(s);var l=new Na(Ua,Ha,e,n);l.layers=i.layers,l.up.set(0,0,-1),l.lookAt(new xr(0,-1,0)),i.add(l);var f=new Na(Ua,Ha,e,n);f.layers=i.layers,f.up.set(0,-1,0),f.lookAt(new xr(0,0,1)),i.add(f);var d=new Na(Ua,Ha,e,n);return d.layers=i.layers,d.up.set(0,-1,0),d.lookAt(new xr(0,0,-1)),i.add(d),i}return Object(f.a)(t,e),Object(m.a)(t,[{key:"update",value:function(e,t){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,r=Object(o.a)(this.children,6),i=r[0],a=r[1],s=r[2],l=r[3],u=r[4],c=r[5],f=e.xr.enabled,d=e.getRenderTarget();e.xr.enabled=!1;var h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,i),e.setRenderTarget(n,1),e.render(t,a),e.setRenderTarget(n,2),e.render(t,s),e.setRenderTarget(n,3),e.render(t,l),e.setRenderTarget(n,4),e.render(t,u),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,c),e.setRenderTarget(d),e.xr.enabled=f}}]),t}(Mi),za=function(e){function t(e,n,r,i,a,o,s,l,f,d){var h;return Object(v.a)(this,t),e=void 0!==e?e:[],n=void 0!==n?n:xe,(h=Object(u.a)(this,Object(c.a)(t).call(this,e,n,r,i,a,o,s,l,f,d))).flipY=!1,h}return Object(f.a)(t,e),Object(m.a)(t,[{key:"images",get:function(){return this.image},set:function(e){this.image=e}}]),t}(pr);za.prototype.isCubeTexture=!0;var Va=function(e){function t(e,n,r){var i;return Object(v.a)(this,t),Number.isInteger(n)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),n=r),i=Object(u.a)(this,Object(c.a)(t).call(this,e,e,n)),n=n||{},i.texture=new za(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),i.texture.isRenderTargetTexture=!0,i.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,i.texture.minFilter=void 0!==n.minFilter?n.minFilter:Pe,i.texture._needsFlipEnvMap=!1,i}return Object(f.a)(t,e),Object(m.a)(t,[{key:"fromEquirectangularTexture",value:function(e,t){this.texture.type=t.type,this.texture.format=et,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;var n={tEquirect:{value:null}},r="\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",i="\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",a=new Oa(5,5,5),o=new Fa({name:"CubemapFromEquirect",uniforms:Ra(n),vertexShader:r,fragmentShader:i,side:O,blending:P});o.uniforms.tEquirect.value=t;var s=new ka(a,o),l=t.minFilter;return t.minFilter===je&&(t.minFilter=Pe),new Ga(1,10,this).update(e,s),t.minFilter=l,s.geometry.dispose(),s.material.dispose(),this}},{key:"clear",value:function(e,t,n,r){for(var i=e.getRenderTarget(),a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,r);e.setRenderTarget(i)}}]),t}(gr);Va.prototype.isWebGLCubeRenderTarget=!0;var Wa=new xr,Ja=new xr,Qa=new or,Ya=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr(1,0,0),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(v.a)(this,e),this.normal=t,this.constant=n}return Object(m.a)(e,[{key:"set",value:function(e,t){return this.normal.copy(e),this.constant=t,this}},{key:"setComponents",value:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}},{key:"setFromNormalAndCoplanarPoint",value:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}},{key:"setFromCoplanarPoints",value:function(e,t,n){var r=Wa.subVectors(n,t).cross(Ja.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}},{key:"copy",value:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this}},{key:"normalize",value:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}},{key:"negate",value:function(){return this.constant*=-1,this.normal.negate(),this}},{key:"distanceToPoint",value:function(e){return this.normal.dot(e)+this.constant}},{key:"distanceToSphere",value:function(e){return this.distanceToPoint(e.center)-e.radius}},{key:"projectPoint",value:function(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}},{key:"intersectLine",value:function(e,t){var n=e.delta(Wa),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}},{key:"intersectsLine",value:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}},{key:"intersectsBox",value:function(e){return e.intersectsPlane(this)}},{key:"intersectsSphere",value:function(e){return e.intersectsPlane(this)}},{key:"coplanarPoint",value:function(e){return e.copy(this.normal).multiplyScalar(-this.constant)}},{key:"applyMatrix4",value:function(e,t){var n=t||Qa.getNormalMatrix(e),r=this.coplanarPoint(Wa).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}},{key:"translate",value:function(e){return this.constant-=e.dot(this.normal),this}},{key:"equals",value:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}();Ya.prototype.isPlane=!0;var Xa=new zr,Ka=new xr,qa=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ya,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ya,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ya,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Ya,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Ya,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new Ya;Object(v.a)(this,e),this.planes=[t,n,r,i,a,o]}return Object(m.a)(e,[{key:"set",value:function(e,t,n,r,i,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}},{key:"copy",value:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this}},{key:"setFromProjectionMatrix",value:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],u=n[6],c=n[7],f=n[8],d=n[9],h=n[10],p=n[11],v=n[12],m=n[13],g=n[14],y=n[15];return t[0].setComponents(o-r,c-s,p-f,y-v).normalize(),t[1].setComponents(o+r,c+s,p+f,y+v).normalize(),t[2].setComponents(o+i,c+l,p+d,y+m).normalize(),t[3].setComponents(o-i,c-l,p-d,y-m).normalize(),t[4].setComponents(o-a,c-u,p-h,y-g).normalize(),t[5].setComponents(o+a,c+u,p+h,y+g).normalize(),this}},{key:"intersectsObject",value:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Xa.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Xa)}},{key:"intersectsSprite",value:function(e){return Xa.center.set(0,0,0),Xa.radius=.7071067811865476,Xa.applyMatrix4(e.matrixWorld),this.intersectsSphere(Xa)}},{key:"intersectsSphere",value:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)0?e.max.x:e.min.x,Ka.y=r.normal.y>0?e.max.y:e.min.y,Ka.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ka)<0)return!1}return!0}},{key:"containsPoint",value:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}();function Za(){var 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 $a(e,t){var 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);var n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){var a=r.get(t);(!a||a.version0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="PlaneGeometry",e.parameters={width:n,height:r,widthSegments:i,heightSegments:a};for(var o=n/2,s=r/2,l=Math.floor(i),f=Math.floor(a),d=l+1,h=f+1,p=n/l,m=r/f,g=[],y=[],b=[],A=[],x=0;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}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_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}\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",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\treturn texture2D( envMap, uv ).rgb;\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",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\tenvColor = envMapTexelToLinear( envColor );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( 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#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\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#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",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",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",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\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in 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 ( PHYSICALLY_CORRECT_LIGHTS )\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#else\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#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, const in GeometricContext geometry, 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 GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\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 GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\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",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= specularColorMapTexelToLinear( texture2D( specularColorMap, vUv ) ).rgb;\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( ( ior - 1.0 ) / ( 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, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= sheenColorMapTexelToLinear( texture2D( sheenColorMap, vUv ) ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",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_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\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}\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\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.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 GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\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}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\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, 2 ) * 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",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 vec2 morphTargetsTextureSize;\n\t\tvec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {\n\t\t\tfloat texelIndex = float( vertexIndex * stride + offset );\n\t\t\tfloat y = floor( texelIndex / morphTargetsTextureSize.x );\n\t\t\tfloat x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tvec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );\n\t\t\treturn texture( morphTargetsTexture, morphUV ).xyz;\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",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\t#ifndef USE_MORPHNORMALS\n\t\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];\n\t\t\t#else\n\t\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];\n\t\t\t#endif\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",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",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",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",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",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",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",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",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_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\treturn 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; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",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\tvec3 getVolumeTransmissionRay( vec3 n, vec3 v, float thickness, float ior, 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( float roughness, float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( vec2 fragCoord, float roughness, float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( vec3 n, vec3 v, float roughness, vec3 diffuseColor, vec3 specularColor, float specularF90,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, 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 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\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",background_vert:"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}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",cube_vert:"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}",cube_frag:"#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#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}",depth_frag:"#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 \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\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}",distanceRGBA_vert:"#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}",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 \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\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}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#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 \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}",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 \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\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#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#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}",meshbasic_frag:"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 \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\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, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\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}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\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 \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\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\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 \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#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\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}",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\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}",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 \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\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\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 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}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\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( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\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}",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 \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}",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 \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 + 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}",meshphysical_vert:"#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 \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}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define 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 SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\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 \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\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 + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#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 \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}",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\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\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}",points_vert:"uniform float size;\nuniform float scale;\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_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}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\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\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#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}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"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}",sprite_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\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\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},no={common:{diffuse:{value:new zi(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new or},uv2Transform:{value:new or},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new ar(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new zi(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:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{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 zi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new or}},sprite:{diffuse:{value:new zi(16777215)},opacity:{value:1},center:{value:new ar(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new or}}},ro={basic:{uniforms:Da([no.common,no.specularmap,no.envmap,no.aomap,no.lightmap,no.fog]),vertexShader:to.meshbasic_vert,fragmentShader:to.meshbasic_frag},lambert:{uniforms:Da([no.common,no.specularmap,no.envmap,no.aomap,no.lightmap,no.emissivemap,no.fog,no.lights,{emissive:{value:new zi(0)}}]),vertexShader:to.meshlambert_vert,fragmentShader:to.meshlambert_frag},phong:{uniforms:Da([no.common,no.specularmap,no.envmap,no.aomap,no.lightmap,no.emissivemap,no.bumpmap,no.normalmap,no.displacementmap,no.fog,no.lights,{emissive:{value:new zi(0)},specular:{value:new zi(1118481)},shininess:{value:30}}]),vertexShader:to.meshphong_vert,fragmentShader:to.meshphong_frag},standard:{uniforms:Da([no.common,no.envmap,no.aomap,no.lightmap,no.emissivemap,no.bumpmap,no.normalmap,no.displacementmap,no.roughnessmap,no.metalnessmap,no.fog,no.lights,{emissive:{value:new zi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:to.meshphysical_vert,fragmentShader:to.meshphysical_frag},toon:{uniforms:Da([no.common,no.aomap,no.lightmap,no.emissivemap,no.bumpmap,no.normalmap,no.displacementmap,no.gradientmap,no.fog,no.lights,{emissive:{value:new zi(0)}}]),vertexShader:to.meshtoon_vert,fragmentShader:to.meshtoon_frag},matcap:{uniforms:Da([no.common,no.bumpmap,no.normalmap,no.displacementmap,no.fog,{matcap:{value:null}}]),vertexShader:to.meshmatcap_vert,fragmentShader:to.meshmatcap_frag},points:{uniforms:Da([no.points,no.fog]),vertexShader:to.points_vert,fragmentShader:to.points_frag},dashed:{uniforms:Da([no.common,no.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:to.linedashed_vert,fragmentShader:to.linedashed_frag},depth:{uniforms:Da([no.common,no.displacementmap]),vertexShader:to.depth_vert,fragmentShader:to.depth_frag},normal:{uniforms:Da([no.common,no.bumpmap,no.normalmap,no.displacementmap,{opacity:{value:1}}]),vertexShader:to.meshnormal_vert,fragmentShader:to.meshnormal_frag},sprite:{uniforms:Da([no.sprite,no.fog]),vertexShader:to.sprite_vert,fragmentShader:to.sprite_frag},background:{uniforms:{uvTransform:{value:new or},t2D:{value:null}},vertexShader:to.background_vert,fragmentShader:to.background_frag},cube:{uniforms:Da([no.envmap,{opacity:{value:1}}]),vertexShader:to.cube_vert,fragmentShader:to.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:to.equirect_vert,fragmentShader:to.equirect_frag},distanceRGBA:{uniforms:Da([no.common,no.displacementmap,{referencePosition:{value:new xr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:to.distanceRGBA_vert,fragmentShader:to.distanceRGBA_frag},shadow:{uniforms:Da([no.lights,no.fog,{color:{value:new zi(0)},opacity:{value:1}}]),vertexShader:to.shadow_vert,fragmentShader:to.shadow_frag}};function io(e,t,n,r,i){var a,o,s=new zi(0),l=0,u=null,c=0,f=null;function d(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return s},setClearColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;s.set(e),d(s,l=t)},getClearAlpha:function(){return l},setClearAlpha:function(e){d(s,l=e)},render:function(n,i){var h=!1,p=!0===i.isScene?i.background:null;p&&p.isTexture&&(p=t.get(p));var v=e.xr,m=v.getSession&&v.getSession();m&&"additive"===m.environmentBlendMode&&(p=null),null===p?d(s,l):p&&p.isColor&&(d(p,1),h=!0),(e.autoClear||h)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),p&&(p.isCubeTexture||p.mapping===Ee)?(void 0===o&&((o=new ka(new Oa(1,1,1),new Fa({name:"BackgroundCubeMaterial",uniforms:Ra(ro.cube.uniforms),vertexShader:ro.cube.vertexShader,fragmentShader:ro.cube.fragmentShader,side:O,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),o.geometry.deleteAttribute("uv"),o.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(o.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(o)),o.material.uniforms.envMap.value=p,o.material.uniforms.flipEnvMap.value=p.isCubeTexture&&!1===p.isRenderTargetTexture?-1:1,u===p&&c===p.version&&f===e.toneMapping||(o.material.needsUpdate=!0,u=p,c=p.version,f=e.toneMapping),n.unshift(o,o.geometry,o.material,0,0,null)):p&&p.isTexture&&(void 0===a&&((a=new ka(new eo(2,2),new Fa({name:"BackgroundMaterial",uniforms:Ra(ro.background.uniforms),vertexShader:ro.background.vertexShader,fragmentShader:ro.background.fragmentShader,side:B,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(a)),a.material.uniforms.t2D.value=p,!0===p.matrixAutoUpdate&&p.updateMatrix(),a.material.uniforms.uvTransform.value.copy(p.matrix),u===p&&c===p.version&&f===e.toneMapping||(a.material.needsUpdate=!0,u=p,c=p.version,f=e.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null))}}}function ao(e,t,n,r){var i=e.getParameter(34921),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),o=r.isWebGL2||null!==a,s={},l=d(null),u=l;function c(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function f(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function d(e){for(var t=[],n=[],r=[],a=0;a=0){var y=l[f];if(void 0===y&&("instanceMatrix"===f&&i.instanceMatrix&&(y=i.instanceMatrix),"instanceColor"===f&&i.instanceColor&&(y=i.instanceColor)),void 0!==y){var b=y.normalized,A=y.itemSize,x=n.get(y);if(void 0===x)continue;var w=x.buffer,M=x.type,S=x.bytesPerElement;if(y.isInterleavedBufferAttribute){var E=y.data,C=E.stride,_=y.offset;if(E&&E.isInstancedInterleavedBuffer){for(var T=0;T0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var a="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,o=void 0!==n.precision?n.precision:"highp",s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var l=a||t.has("WEBGL_draw_buffers"),u=!0===n.logarithmicDepthBuffer,c=e.getParameter(34930),f=e.getParameter(35660),d=e.getParameter(3379),h=e.getParameter(34076),p=e.getParameter(34921),v=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),y=f>0,b=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){var n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:u,maxTextures:c,maxVertexTextures:f,maxTextureSize:d,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:v,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:y&&b,maxSamples:a?e.getParameter(36183):0}}function lo(e){var t=this,n=null,r=0,i=!1,a=!1,o=new Ya,s=new or,l={value:null,needsUpdate:!1};function u(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function c(e,n,r,i){var a=null!==e?e.length:0,u=null;if(0!==a){if(u=l.value,!0!==i||null===u){var c=r+4*a,f=n.matrixWorldInverse;s.getNormalMatrix(f),(null===u||u.length0){var s=e.getRenderTarget(),l=new Va(o.height/2);return l.fromEquirectangularTexture(e,i),t.set(i,l),e.setRenderTarget(s),i.addEventListener("dispose",r),n(l.texture,i.mapping)}return null}}return i},dispose:function(){t=new WeakMap}}}ro.physical={uniforms:Da([ro.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new ar(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new zi(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new ar},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new zi(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new zi(1,1,1)},specularColorMap:{value:null}}]),vertexShader:to.meshphysical_vert,fragmentShader:to.meshphysical_frag};var co=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2e3;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="OrthographicCamera",e.zoom=1,e.view=null,e.left=n,e.right=r,e.top=i,e.bottom=a,e.near=o,e.far=s,e.updateProjectionMatrix(),e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e,n){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e,n),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}},{key:"setViewOffset",value:function(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()}},{key:"clearViewOffset",value:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}},{key:"updateProjectionMatrix",value:function(){var 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,o=r+t,s=r-t;if(null!==this.view&&this.view.enabled){var l=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a=(i+=l*this.view.offsetX)+l*this.view.width,s=(o-=u*this.view.offsetY)-u*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}},{key:"toJSON",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this,e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,null!==this.view&&(n.object.view=Object.assign({},this.view)),n}}]),t}(ja);co.prototype.isOrthographicCamera=!0;var fo=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this,e))).type="RawShaderMaterial",n}return Object(f.a)(t,e),t}(Fa);fo.prototype.isRawShaderMaterial=!0;var ho=4,po=8,vo=Math.pow(2,po),mo=[.125,.215,.35,.446,.526,.582],go=po-ho+1+mo.length,yo=20,bo=(r={},Object(a.a)(r,dn,0),Object(a.a)(r,hn,1),r),Ao=new co,xo=Oo(),wo=xo._lodPlanes,Mo=xo._sizeLods,So=xo._sigmas,Eo=new zi,Co=null,_o=(1+Math.sqrt(5))/2,To=1/_o,ko=[new xr(1,1,1),new xr(-1,1,1),new xr(1,1,-1),new xr(-1,1,-1),new xr(0,_o,To),new xr(0,_o,-To),new xr(To,0,_o),new xr(-To,0,_o),new xr(_o,To,0),new xr(-_o,To,0)],Bo=function(){function e(t){var n,r,i;Object(v.a)(this,e),this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=(n=yo,r=new Float32Array(n),i=new xr(0,1,0),new fo({name:"SphericalGaussianBlur",defines:{n:n},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\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",fragmentShader:"\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".concat("\n\n\t\tuniform int inputEncoding;\n\n\t\t#include \n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t","\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"),blending:P,depthTest:!1,depthWrite:!1})),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}return Object(m.a)(e,[{key:"fromScene",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100;Co=this._renderer.getRenderTarget();var i=this._allocateTargets();return this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}},{key:"fromEquirectangular",value:function(e){return this._fromTexture(e)}},{key:"fromCubemap",value:function(e){return this._fromTexture(e)}},{key:"compileCubemapShader",value:function(){null===this._cubemapShader&&(this._cubemapShader=Po(),this._compileMaterial(this._cubemapShader))}},{key:"compileEquirectangularShader",value:function(){null===this._equirectShader&&(this._equirectShader=Lo(),this._compileMaterial(this._equirectShader))}},{key:"dispose",value:function(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(var e=0;e2?vo:0,vo,vo),s.setRenderTarget(r),d&&s.render(f,i),s.render(e,i)}f.geometry.dispose(),f.material.dispose(),s.toneMapping=u,s.autoClear=l,e.background=h}},{key:"_setEncoding",value:function(e,t){!0===this._renderer.capabilities.isWebGL2&&t.format===et&&t.type===Ue&&t.encoding===hn?e.value=bo[dn]:e.value=bo[t.encoding]}},{key:"_textureToCubeUV",value:function(e,t){var n=this._renderer,r=e.mapping===xe||e.mapping===we;r?null==this._cubemapShader&&(this._cubemapShader=Po()):null==this._equirectShader&&(this._equirectShader=Lo());var i=r?this._cubemapShader:this._equirectShader,a=new ka(wo[0],i),o=i.uniforms;o.envMap.value=e,r||o.texelSize.value.set(1/e.image.width,1/e.image.height),this._setEncoding(o.inputEncoding,e),Do(t,0,0,3*vo,2*vo),n.setRenderTarget(t),n.render(a,Ao)}},{key:"_applyPMREM",value:function(e){var t=this._renderer,n=t.autoClear;t.autoClear=!1;for(var r=1;ryo&&console.warn("sigmaRadians, ".concat(i,", is too large and will clip, as it requested ").concat(p," samples when the maximum is set to ").concat(yo));for(var v=[],m=0,g=0;gpo-ho?r-po+ho:0),3*x,2*x),s.setRenderTarget(t),s.render(u,Ao)}}]),e}();function Oo(){for(var e=[],t=[],n=[],r=po,i=0;ipo-ho?o=mo[i-po+ho-1]:0==i&&(o=0),n.push(o);for(var s=1/(a-1),l=-s/2,u=1+s/2,c=[l,l,u,l,u,u,l,l,u,u,l,u],f=new Float32Array(108),d=new Float32Array(72),h=new Float32Array(36),p=0;p<6;p++){var v=p%3*2/3-1,m=p>2?0:-1,g=[v,m,0,v+2/3,m,0,v+2/3,m+1,0,v,m,0,v+2/3,m+1,0,v,m+1,0];f.set(g,18*p),d.set(c,12*p);var y=[p,p,p,p,p,p];h.set(y,6*p)}var b=new fa;b.setAttribute("position",new Qi(f,3)),b.setAttribute("uv",new Qi(d,2)),b.setAttribute("faceIndex",new Qi(h,1)),e.push(b),r>ho&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function Ro(e){var t=new gr(3*vo,3*vo,e);return t.texture.mapping=Ee,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function Do(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Lo(){var e=new ar(1,1);return new fo({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:bo[dn]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\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",fragmentShader:"\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 vec2 texelSize;\n\n\t\t\t".concat("\n\n\t\tuniform int inputEncoding;\n\n\t\t#include \n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t","\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t}\n\t\t"),blending:P,depthTest:!1,depthWrite:!1})}function Po(){return new fo({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:bo[dn]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\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",fragmentShader:"\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 samplerCube envMap;\n\n\t\t\t".concat("\n\n\t\tuniform int inputEncoding;\n\n\t\t#include \n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t","\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) );\n\n\t\t\t}\n\t\t"),blending:P,depthTest:!1,depthWrite:!1})}function Io(e){var t=new WeakMap,n=null;function r(e){var n=e.target;n.removeEventListener("dispose",r);var i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){var a=i.mapping,o=a===Me||a===Se,s=a===xe||a===we;if(o||s){if(t.has(i))return t.get(i).texture;var l=i.image;if(o&&l&&l.height>0||s&&l&&function(e){for(var t=0,n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(l)){var u=e.getRenderTarget();null===n&&(n=new Bo(e));var c=o?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,c),e.setRenderTarget(u),i.addEventListener("dispose",r),c.texture}return null}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function Fo(e){var t={};function n(n){if(void 0!==t[n])return t[n];var r;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){var t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function jo(e,t,n,r){var i={},a=new WeakMap;function o(e){var s=e.target;for(var l in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[l]);s.removeEventListener("dispose",o),delete i[s.id];var u=a.get(s);u&&(t.remove(u),a.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){var n=[],r=e.index,i=e.attributes.position,o=0;if(null!==r){var s=r.array;o=r.version;for(var l=0,u=s.length;l65535?ea:Zi)(n,1);b.version=o;var A=a.get(e);A&&t.remove(A),a.set(e,b)}return{get:function(e,t){return!0===i[t.id]?t:(t.addEventListener("dispose",o),i[t.id]=!0,n.memory.geometries++,t)},update:function(e){var n=e.attributes;for(var r in n)t.update(n[r],34962);var i=e.morphAttributes;for(var a in i)for(var o=i[a],s=0,l=o.length;s0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this,null))).image={data:n,width:r,height:i,depth:a},e.magFilter=Be,e.minFilter=Be,e.wrapR=Te,e.generateMipmaps=!1,e.flipY=!1,e.unpackAlignment=1,e}return Object(f.a)(t,e),t}(pr);function Go(e,t){return e[0]-t[0]}function zo(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Vo(e,t){var n=1,r=t.isInterleavedBufferAttribute?t.data.array:t.array;r instanceof Int8Array?n=127:r instanceof Int16Array?n=32767:r instanceof Int32Array?n=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",r),e.divideScalar(n)}function Wo(e,t,n){for(var r={},i=new Float32Array(8),a=new WeakMap,o=new xr,s=[],l=0;l<8;l++)s[l]=[l,0];return{update:function(l,u,c,f){var d=l.morphTargetInfluences;if(!0===t.isWebGL2){var h=u.morphAttributes.position.length,p=a.get(u);if(void 0===p||p.count!==h){void 0!==p&&p.texture.dispose();var v=void 0!==u.morphAttributes.normal,m=u.morphAttributes.position,g=u.morphAttributes.normal||[],y=!0===v?2:1,b=u.attributes.position.count*y,A=1;b>t.maxTextureSize&&(A=Math.ceil(b/t.maxTextureSize),b=t.maxTextureSize);var x=new Float32Array(b*A*4*h),w=new Ho(x,b,A,h);w.format=et,w.type=Je,w.needsUpdate=!0;for(var M=4*y,S=0;S0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this,null))).image={data:n,width:r,height:i,depth:a},e.magFilter=Be,e.minFilter=Be,e.wrapR=Te,e.generateMipmaps=!1,e.flipY=!1,e.unpackAlignment=1,e}return Object(f.a)(t,e),t}(pr);Qo.prototype.isDataTexture3D=!0;var Yo=new pr,Xo=new Ho,Ko=new Qo,qo=new za,Zo=[],$o=[],es=new Float32Array(16),ts=new Float32Array(9),ns=new Float32Array(4);function rs(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,a=Zo[i];if(void 0===a&&(a=new Float32Array(i),Zo[i]=a),0!==t){r.toArray(a,0);for(var o=1,s=0;o!==t;++o)s+=n,e[o].toArray(a,s)}return a}function is(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n/gm;function ll(e){return e.replace(sl,ul)}function ul(e,t){var n=to[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return ll(n)}var cl=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,fl=/#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 dl(e){return e.replace(fl,pl).replace(cl,hl)}function hl(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),pl(e,t,n,r)}function pl(e,t,n,r){for(var i="",a=parseInt(t);a0&&(i+="\n"),(a=[g,y].filter(il).join("\n")).length>0&&(a+="\n")):(i=[vl(n),"#define SHADER_NAME "+n.shaderName,y,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+n.maxBones,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 "+v:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphTargets&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargets&&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 "+h:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",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","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(il).join("\n"),a=[g,vl(n),"#define SHADER_NAME "+n.shaderName,y,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 "+p:"",n.envMap?"#define "+v:"",n.envMap?"#define "+m:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",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 "+h:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==pe?"#define TONE_MAPPING":"",n.toneMapping!==pe?to.tonemapping_pars_fragment:"",n.toneMapping!==pe?rl("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.format===$e?"#define OPAQUE":"",to.encodings_pars_fragment,n.map?nl("mapTexelToLinear",n.mapEncoding):"",n.matcap?nl("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?nl("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?nl("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.specularColorMap?nl("specularColorMapTexelToLinear",n.specularColorMapEncoding):"",n.sheenColorMap?nl("sheenColorMapTexelToLinear",n.sheenColorMapEncoding):"",n.lightMap?nl("lightMapTexelToLinear",n.lightMapEncoding):"",(o="linearToOutputTexel",s=n.outputEncoding,l=el(s),"vec4 "+o+"( vec4 value ) { return LinearTo"+l[0]+l[1]+"; }"),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(il).join("\n")),f=ol(f=al(f=ll(f),n),n),d=ol(d=al(d=ll(d),n),n),f=dl(f),d=dl(d),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(A="#version 300 es\n",i=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,a=["#define varying in",n.glslVersion===Vn?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Vn?"":"#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);var x,w,M=A+a+d,S=Zs(u,35633,A+i+f),E=Zs(u,35632,M);if(u.attachShader(b,S),u.attachShader(b,E),void 0!==n.index0AttributeName?u.bindAttribLocation(b,0,n.index0AttributeName):!0===n.morphTargets&&u.bindAttribLocation(b,0,"position"),u.linkProgram(b),e.debug.checkShaderErrors){var C=u.getProgramInfoLog(b).trim(),B=u.getShaderInfoLog(S).trim(),O=u.getShaderInfoLog(E).trim(),R=!0,D=!0;if(!1===u.getProgramParameter(b,35714)){R=!1;var L=tl(u,S,"vertex"),P=tl(u,E,"fragment");console.error("THREE.WebGLProgram: Shader Error "+u.getError()+" - VALIDATE_STATUS "+u.getProgramParameter(b,35715)+"\n\nProgram Info Log: "+C+"\n"+L+"\n"+P)}else""!==C?console.warn("THREE.WebGLProgram: Program Info Log:",C):""!==B&&""!==O||(D=!1);D&&(this.diagnostics={runnable:R,programLog:C,vertexShader:{log:B,prefix:i},fragmentShader:{log:O,prefix:a}})}return u.deleteShader(S),u.deleteShader(E),this.getUniforms=function(){return void 0===x&&(x=new qs(u,b)),x},this.getAttributes=function(){return void 0===w&&(w=function(e,t){for(var n={},r=e.getProgramParameter(t,35721),i=0;i0,L=a.clearcoat>0;return{isWebGL2:c,shaderID:_,shaderName:a.type,vertexShader:A,fragmentShader:x,defines:a.defines,customVertexShaderID:w,customFragmentShaderID:M,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:v,instancing:!0===b.isInstancedMesh,instancingColor:!0===b.isInstancedMesh&&null!==b.instanceColor,supportsVertexTextures:p,outputEncoding:null!==B?g(B.texture):e.outputEncoding,map:!!a.map,mapEncoding:g(a.map),matcap:!!a.matcap,matcapEncoding:g(a.matcap),envMap:!!C,envMapMode:C&&C.mapping,envMapEncoding:g(C),envMapCubeUV:!!C&&(C.mapping===Ee||C.mapping===Ce),lightMap:!!a.lightMap,lightMapEncoding:g(a.lightMap),aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,emissiveMapEncoding:g(a.emissiveMap),bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===gn,tangentSpaceNormalMap:a.normalMapType===mn,clearcoat:L,clearcoatMap:L&&!!a.clearcoatMap,clearcoatRoughnessMap:L&&!!a.clearcoatRoughnessMap,clearcoatNormalMap:L&&!!a.clearcoatNormalMap,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,specularIntensityMap:!!a.specularIntensityMap,specularColorMap:!!a.specularColorMap,specularColorMapEncoding:g(a.specularColorMap),alphaMap:!!a.alphaMap,alphaTest:D,gradientMap:!!a.gradientMap,sheen:a.sheen>0,sheenColorMap:!!a.sheenColorMap,sheenColorMapEncoding:g(a.sheenColorMap),sheenRoughnessMap:!!a.sheenRoughnessMap,transmission:a.transmission>0,transmissionMap:!!a.transmissionMap,thicknessMap:!!a.thicknessMap,combine:a.combine,vertexTangents:!!a.normalMap&&!!b.geometry&&!!b.geometry.attributes.tangent,vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!b.geometry&&!!b.geometry.attributes.color&&4===b.geometry.attributes.color.itemSize,vertexUvs:!!a.map||!!a.bumpMap||!!a.normalMap||!!a.specularMap||!!a.alphaMap||!!a.emissiveMap||!!a.roughnessMap||!!a.metalnessMap||!!a.clearcoatMap||!!a.clearcoatRoughnessMap||!!a.clearcoatNormalMap||!!a.displacementMap||!!a.transmissionMap||!!a.thicknessMap||!!a.specularIntensityMap||!!a.specularColorMap||!!a.sheenColorMap||!!a.sheenRoughnessMap,uvsVertexOnly:!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatNormalMap||a.transmission>0||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularColorMap||a.sheen>0||a.sheenColorMap||a.sheenRoughnessMap)&&!!a.displacementMap,fog:!!S,useFog:a.fog,fogExp2:S&&S.isFogExp2,flatShading:!!a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:f,skinning:!0===b.isSkinnedMesh&&T>0,maxBones:T,useVertexTexture:d,morphTargets:!!b.geometry&&!!b.geometry.morphAttributes.position,morphNormals:!!b.geometry&&!!b.geometry.morphAttributes.normal,morphTargetsCount:b.geometry&&b.geometry.morphAttributes.position?b.geometry.morphAttributes.position.length:0,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,format:a.format,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:pe,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===R,flipSided:a.side===O,depthPacking:void 0!==a.depthPacking&&a.depthPacking,index0AttributeName:a.index0AttributeName,extensionDerivatives:a.extensions&&a.extensions.derivatives,extensionFragDepth:a.extensions&&a.extensions.fragDepth,extensionDrawBuffers:a.extensions&&a.extensions.drawBuffers,extensionShaderTextureLOD:a.extensions&&a.extensions.shaderTextureLOD,rendererExtensionFragDepth:c||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||r.has("EXT_shader_texture_lod"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(t){var n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(var r in t.defines)n.push(r),n.push(t.defines[r]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.mapEncoding),e.push(t.matcapEncoding),e.push(t.envMapMode),e.push(t.envMapEncoding),e.push(t.lightMapEncoding),e.push(t.emissiveMapEncoding),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.maxBones),e.push(t.morphTargetsCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.format),e.push(t.specularColorMapEncoding),e.push(t.sheenColorMapEncoding)}(n,t),function(e,t){s.disableAll(),t.isWebGL2&&s.enable(0),t.supportsVertexTextures&&s.enable(1),t.instancing&&s.enable(2),t.instancingColor&&s.enable(3),t.map&&s.enable(4),t.matcap&&s.enable(5),t.envMap&&s.enable(6),t.envMapCubeUV&&s.enable(7),t.lightMap&&s.enable(8),t.aoMap&&s.enable(9),t.emissiveMap&&s.enable(10),t.bumpMap&&s.enable(11),t.normalMap&&s.enable(12),t.objectSpaceNormalMap&&s.enable(13),t.tangentSpaceNormalMap&&s.enable(14),t.clearcoat&&s.enable(15),t.clearcoatMap&&s.enable(16),t.clearcoatRoughnessMap&&s.enable(17),t.clearcoatNormalMap&&s.enable(18),t.displacementMap&&s.enable(19),t.specularMap&&s.enable(20),t.roughnessMap&&s.enable(21),t.metalnessMap&&s.enable(22),t.gradientMap&&s.enable(23),t.alphaMap&&s.enable(24),t.alphaTest&&s.enable(25),t.vertexColors&&s.enable(26),t.vertexAlphas&&s.enable(27),t.vertexUvs&&s.enable(28),t.vertexTangents&&s.enable(29),t.uvsVertexOnly&&s.enable(30),t.fog&&s.enable(31),e.push(s.mask),s.disableAll(),t.useFog&&s.enable(0),t.flatShading&&s.enable(1),t.logarithmicDepthBuffer&&s.enable(2),t.skinning&&s.enable(3),t.useVertexTexture&&s.enable(4),t.morphTargets&&s.enable(5),t.morphNormals&&s.enable(6),t.premultipliedAlpha&&s.enable(7),t.shadowMapEnabled&&s.enable(8),t.physicallyCorrectLights&&s.enable(9),t.doubleSided&&s.enable(10),t.flipSided&&s.enable(11),t.depthPacking&&s.enable(12),t.dithering&&s.enable(13),t.specularIntensityMap&&s.enable(14),t.specularColorMap&&s.enable(15),t.transmission&&s.enable(16),t.transmissionMap&&s.enable(17),t.thicknessMap&&s.enable(18),t.sheen&&s.enable(19),t.sheenColorMap&&s.enable(20),t.sheenRoughnessMap&&s.enable(21),e.push(s.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){var t,n=m[e.type];if(n){var r=ro[n];t=La.clone(r.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){for(var r,i=0,o=u.length;i0?r.push(c):!0===o.transparent?i.push(c):n.push(c)},unshift:function(e,t,o,s,l,u){var c=a(e,t,o,s,l,u);o.transmission>0?r.unshift(c):!0===o.transparent?i.unshift(c):n.unshift(c)},finish:function(){for(var n=t,r=e.length;n1&&n.sort(e||wl),r.length>1&&r.sort(t||Ml),i.length>1&&i.sort(t||Ml)}}}function El(){var e=new WeakMap;return{get:function(t,n){var r;return!1===e.has(t)?(r=new Sl,e.set(t,[r])):n>=e.get(t).length?(r=new Sl,e.get(t).push(r)):r=e.get(t)[n],r},dispose:function(){e=new WeakMap}}}function Cl(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new xr,color:new zi};break;case"SpotLight":n={position:new xr,direction:new xr,color:new zi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new xr,color:new zi,distance:0,decay:0};break;case"HemisphereLight":n={direction:new xr,skyColor:new zi,groundColor:new zi};break;case"RectAreaLight":n={color:new zi,position:new xr,halfWidth:new xr,halfHeight:new xr}}return e[t.id]=n,n}}}var _l=0;function Tl(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function kl(e,t){for(var n,r=new Cl,i=(n={},{get:function(e){if(void 0!==n[e.id])return n[e.id];var t;switch(e.type){case"DirectionalLight":case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ar};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ar,shadowCameraNear:1,shadowCameraFar:1e3}}return n[e.id]=t,t}}),a={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},o=0;o<9;o++)a.probe.push(new xr);var s=new xr,l=new Zr,u=new Zr;return{setup:function(n,o){for(var s=0,l=0,u=0,c=0;c<9;c++)a.probe[c].set(0,0,0);var f=0,d=0,h=0,p=0,v=0,m=0,g=0,y=0;n.sort(Tl);for(var b=!0!==o?Math.PI:1,A=0,x=n.length;A0&&(t.isWebGL2?(a.rectAreaLTC1=no.LTC_FLOAT_1,a.rectAreaLTC2=no.LTC_FLOAT_2):!0===e.has("OES_texture_float_linear")?(a.rectAreaLTC1=no.LTC_FLOAT_1,a.rectAreaLTC2=no.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(a.rectAreaLTC1=no.LTC_HALF_1,a.rectAreaLTC2=no.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),a.ambient[0]=s,a.ambient[1]=l,a.ambient[2]=u;var N=a.hash;N.directionalLength===f&&N.pointLength===d&&N.spotLength===h&&N.rectAreaLength===p&&N.hemiLength===v&&N.numDirectionalShadows===m&&N.numPointShadows===g&&N.numSpotShadows===y||(a.directional.length=f,a.spot.length=h,a.rectArea.length=p,a.point.length=d,a.hemi.length=v,a.directionalShadow.length=m,a.directionalShadowMap.length=m,a.pointShadow.length=g,a.pointShadowMap.length=g,a.spotShadow.length=y,a.spotShadowMap.length=y,a.directionalShadowMatrix.length=m,a.pointShadowMatrix.length=g,a.spotShadowMatrix.length=y,N.directionalLength=f,N.pointLength=d,N.spotLength=h,N.rectAreaLength=p,N.hemiLength=v,N.numDirectionalShadows=m,N.numPointShadows=g,N.numSpotShadows=y,a.version=_l++)},setupView:function(e,t){for(var n=0,r=0,i=0,o=0,c=0,f=t.matrixWorldInverse,d=0,h=e.length;d1&&void 0!==arguments[1]?arguments[1]:0;return!1===n.has(r)?(i=new Bl(e,t),n.set(r,[i])):a>=n.get(r).length?(i=new Bl(e,t),n.get(r).push(i)):i=n.get(r)[a],i},dispose:function(){n=new WeakMap}}}var Rl=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="MeshDepthMaterial",n.depthPacking=pn,n.map=null,n.alphaMap=null,n.displacementMap=null,n.displacementScale=1,n.displacementBias=0,n.wireframe=!1,n.wireframeLinewidth=1,n.fog=!1,n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,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}}]),t}(Ii);Rl.prototype.isMeshDepthMaterial=!0;var Dl=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="MeshDistanceMaterial",n.referencePosition=new xr,n.nearDistance=1,n.farDistance=1e3,n.map=null,n.alphaMap=null,n.displacementMap=null,n.displacementScale=1,n.displacementBias=0,n.fog=!1,n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}]),t}(Ii);Dl.prototype.isMeshDistanceMaterial=!0;var Ll="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",Pl="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}";function Il(e,t,n){var r=new qa,i=new ar,a=new ar,o=new mr,s=new Rl({depthPacking:vn}),l=new Dl,u={},c=n.maxTextureSize,f={0:O,1:B,2:R},d=new Fa({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ar},radius:{value:4}},vertexShader:Ll,fragmentShader:Pl}),h=d.clone();h.defines.HORIZONTAL_PASS=1;var p=new fa;p.setAttribute("position",new Qi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var v=new ka(p,d),m=this;function g(n,r){var i=t.update(v);d.defines.VSM_SAMPLES!==n.blurSamples&&(d.defines.VSM_SAMPLES=n.blurSamples,h.defines.VSM_SAMPLES=n.blurSamples,d.needsUpdate=!0,h.needsUpdate=!0),d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,d,v,null),h.uniforms.shadow_pass.value=n.mapPass.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,h,v,null)}function y(t,n,r,i,a,o,c){var d=null,h=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(d=void 0!==h?h:!0===i.isPointLight?l:s,e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length||r.displacementMap&&0!==r.displacementScale||r.alphaMap&&r.alphaTest>0){var p=d.uuid,v=r.uuid,m=u[p];void 0===m&&(m={},u[p]=m);var g=m[v];void 0===g&&(g=d.clone(),m[v]=g),d=g}return d.visible=r.visible,d.wireframe=r.wireframe,d.side=c===k?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:f[r.side],d.alphaMap=r.alphaMap,d.alphaTest=r.alphaTest,d.clipShadows=r.clipShadows,d.clippingPlanes=r.clippingPlanes,d.clipIntersection=r.clipIntersection,d.displacementMap=r.displacementMap,d.displacementScale=r.displacementScale,d.displacementBias=r.displacementBias,d.wireframeLinewidth=r.wireframeLinewidth,d.linewidth=r.linewidth,!0===i.isPointLight&&!0===d.isMeshDistanceMaterial&&(d.referencePosition.setFromMatrixPosition(i.matrixWorld),d.nearDistance=a,d.farDistance=o),d}function b(n,i,a,o,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===k)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);var l=t.update(n),u=n.material;if(Array.isArray(u))for(var c=l.groups,f=0,d=c.length;fc||i.y>c)&&(i.x>c&&(a.x=Math.floor(c/A.x),i.x=a.x*A.x,y.mapSize.x=a.x),i.y>c&&(a.y=Math.floor(c/A.y),i.y=a.y*A.y,y.mapSize.y=a.y)),null===y.map&&!y.isPointLightShadow&&this.type===k){var x={minFilter:Pe,magFilter:Pe,format:et};y.map=new gr(i.x,i.y,x),y.map.texture.name=v.name+".shadowMap",y.mapPass=new gr(i.x,i.y,x),y.camera.updateProjectionMatrix()}if(null===y.map){var w={minFilter:Be,magFilter:Be,format:et};y.map=new gr(i.x,i.y,w),y.map.texture.name=v.name+".shadowMap",y.camera.updateProjectionMatrix()}e.setRenderTarget(y.map),e.clear();for(var M=y.getViewportCount(),S=0;S=1):-1!==fe.indexOf("OpenGL ES")&&(L=parseFloat(/^OpenGL ES (\d)/.exec(fe)[1]),D=L>=2);var de=null,he={},pe=e.getParameter(3088),ve=e.getParameter(2978),me=(new mr).fromArray(pe),ge=(new mr).fromArray(ve);function ye(t,n,r){var i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var 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){var a=t?rr:Math.floor,o=a(i*e.width),s=a(i*e.height);void 0===c&&(c=b(o,s));var l=n?b(o,s):c;return l.width=o,l.height=s,l.getContext("2d").drawImage(e,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+s+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return tr(e.width)&&tr(e.height)}function w(e,t){return e.generateMipmaps&&t&&e.minFilter!==Be&&e.minFilter!==Pe}function M(t){e.generateMipmap(t)}function S(n,r,i,a){if(!1===f)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+"'")}var o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=a===hn?35907:32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function E(e,t,n){return!0===w(e,n)||e.isFramebufferTexture&&e.minFilter!==Be&&e.minFilter!==Pe?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(e){return e===Be||e===Oe||e===De?9728:9729}function _(t){var n=t.target;n.removeEventListener("dispose",_),function(t){var n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&g.delete(n),s.memory.textures--}function T(t){var n=t.target;n.removeEventListener("dispose",T),function(t){var n=t.texture,i=r.get(t),a=r.get(n);if(!t)return;void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),s.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(var o=0;o<6;o++)e.deleteFramebuffer(i.__webglFramebuffer[o]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[o]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(var l=0,u=n.length;l0&&i.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==a.complete)return void I(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function O(t,i){var a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;P(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);for(var a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),s=r.image[0]&&r.image[0].isDataTexture,l=[],u=0;u<6;u++)l[u]=a||s?s?r.image[u].image:r.image[u]:A(r.image[u],!1,!0,h);var c,d=l[0],p=x(d)||f,v=o.convert(r.format),m=o.convert(r.type),g=S(r.internalFormat,v,m,r.encoding),y=f&&!0!==r.isVideoTexture,b=void 0===t.__version,C=E(r,d,p);if(L(34067,r,p),a){y&&b&&n.texStorage2D(34067,C,g,d.width,d.height);for(var _=0;_<6;_++){c=l[_].mipmaps;for(var T=0;T0&&C++,n.texStorage2D(34067,C,g,l[0].width,l[0].height));for(var B=0;B<6;B++)if(s){y?n.texSubImage2D(34069+B,0,0,0,l[B].width,l[B].height,v,m,l[B].data):n.texImage2D(34069+B,0,g,l[B].width,l[B].height,0,v,m,l[B].data);for(var O=0;O1||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 P(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",_),t.__webglTexture=e.createTexture(),s.memory.textures++)}function I(t,r,i){var a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),P(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);var s,l=function(e){return!f&&(e.wrapS!==Te||e.wrapT!==Te||e.minFilter!==Be&&e.minFilter!==Pe)}(r)&&!1===x(r.image),u=A(r.image,l,!1,p),c=x(u)||f,d=o.convert(r.format),h=o.convert(r.type),v=S(r.internalFormat,d,h,r.encoding);L(a,r,c);var m=r.mipmaps,g=f&&!0!==r.isVideoTexture,y=void 0===t.__version,b=E(r,u,c);if(r.isDepthTexture)v=6402,f?v=r.type===Je?36012:r.type===We?33190:r.type===qe?35056:33189:r.type===Je&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===rt&&6402===v&&r.type!==ze&&r.type!==We&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=ze,h=o.convert(r.type)),r.format===it&&6402===v&&(v=34041,r.type!==qe&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=qe,h=o.convert(r.type))),g&&y?n.texStorage2D(3553,1,v,u.width,u.height):n.texImage2D(3553,0,v,u.width,u.height,0,d,h,null);else if(r.isDataTexture)if(m.length>0&&c){g&&y&&n.texStorage2D(3553,b,v,m[0].width,m[0].height);for(var C=0,_=m.length;C<_;C++)s=m[C],g?n.texSubImage2D(3553,0,0,0,s.width,s.height,d,h,s.data):n.texImage2D(3553,C,v,s.width,s.height,0,d,h,s.data);r.generateMipmaps=!1}else g?(y&&n.texStorage2D(3553,b,v,u.width,u.height),n.texSubImage2D(3553,0,0,0,u.width,u.height,d,h,u.data)):n.texImage2D(3553,0,v,u.width,u.height,0,d,h,u.data);else if(r.isCompressedTexture){g&&y&&n.texStorage2D(3553,b,v,m[0].width,m[0].height);for(var T=0,k=m.length;T0&&c){g&&y&&n.texStorage2D(3553,b,v,m[0].width,m[0].height);for(var B=0,O=m.length;B=d&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+d),k+=1,e},this.resetTextureUnits=function(){k=0},this.setTexture2D=B,this.setTexture2DArray=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=O,this.rebindTextures=function(e,t,n){var i=r.get(e);void 0!==t&&F(i.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&N(e)},this.setupRenderTarget=function(t){var a=t.texture,l=r.get(t),u=r.get(a);t.addEventListener("dispose",T),!0!==t.isWebGLMultipleRenderTargets&&(void 0===u.__webglTexture&&(u.__webglTexture=e.createTexture()),u.__version=a.version,s.memory.textures++);var c=!0===t.isWebGLCubeRenderTarget,d=!0===t.isWebGLMultipleRenderTargets,h=a.isDataTexture3D||a.isDataTexture2DArray,p=x(t)||f;if(!f||a.format!==$e||a.type!==Je&&a.type!==Qe||(a.format=et,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),c){l.__webglFramebuffer=[];for(var v=0;v<6;v++)l.__webglFramebuffer[v]=e.createFramebuffer()}else if(l.__webglFramebuffer=e.createFramebuffer(),d)if(i.drawBuffers)for(var m=t.texture,g=0,y=m.length;g0&&void 0!==arguments[0]?arguments[0]:[];return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).cameras=n,e}return Object(f.a)(t,e),t}(Na);Ul.prototype.isArrayCamera=!0;var Hl=function(e){function t(){var e;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="Group",e}return Object(f.a)(t,e),t}(Mi);Hl.prototype.isGroup=!0;var Gl={type:"move"},zl=function(){function e(){Object(v.a)(this,e),this._targetRay=null,this._grip=null,this._hand=null}return Object(m.a)(e,[{key:"getHandSpace",value:function(){return null===this._hand&&(this._hand=new Hl,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}},{key:"getTargetRaySpace",value:function(){return null===this._targetRay&&(this._targetRay=new Hl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new xr,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new xr),this._targetRay}},{key:"getGripSpace",value:function(){return null===this._grip&&(this._grip=new Hl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new xr,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new xr),this._grip}},{key:"dispatchEvent",value:function(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}},{key:"disconnect",value:function(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}},{key:"update",value:function(e,t,n){var r=null,i=null,a=null,o=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==o&&null!==(r=t.getPose(e.targetRaySpace,n))&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Gl)),l&&e.hand){a=!0;var u,c=g(e.hand.values());try{for(c.s();!(u=c.n()).done;){var f=u.value,d=t.getJointPose(f,n);if(void 0===l.joints[f.jointName]){var h=new Hl;h.matrixAutoUpdate=!1,h.visible=!1,l.joints[f.jointName]=h,l.add(h)}var p=l.joints[f.jointName];null!==d&&(p.matrix.fromArray(d.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.jointRadius=d.radius),p.visible=null!==d}}catch(b){c.e(b)}finally{c.f()}var v=l.joints["index-finger-tip"],m=l.joints["thumb-tip"],y=v.position.distanceTo(m.position);l.inputState.pinching&&y>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&y<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1);return null!==o&&(o.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==a),this}}]),e}(),Vl=function(e){function t(e,n,r,i,a,o,s,l,f,d){var h;if(Object(v.a)(this,t),(d=void 0!==d?d:rt)!==rt&&d!==it)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");return void 0===r&&d===rt&&(r=ze),void 0===r&&d===it&&(r=qe),(h=Object(u.a)(this,Object(c.a)(t).call(this,null,i,a,o,s,l,d,r,f))).image={width:e,height:n},h.magFilter=void 0!==s?s:Be,h.minFilter=void 0!==l?l:Be,h.flipY=!1,h.generateMipmaps=!1,h}return Object(f.a)(t,e),t}(pr);Vl.prototype.isDepthTexture=!0;var Wl=function(e){function t(e,n){var r;Object(v.a)(this,t),r=Object(u.a)(this,Object(c.a)(t).call(this));var a=Object(d.a)(Object(d.a)(r)),o=null,s=1,l=null,f="local-floor",h=e.extensions.has("WEBGL_multisampled_render_to_texture"),m=null,g=null,y=null,b=null,A=!1,x=null,w=n.getContextAttributes(),M=null,S=null,E=[],C=new Map,_=new Na;_.layers.enable(1),_.viewport=new mr;var T=new Na;T.layers.enable(2),T.viewport=new mr;var k=[_,T],B=new Ul;B.layers.enable(1),B.layers.enable(2);var O=null,R=null;function D(e){var t=C.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function L(){C.forEach(function(e,t){e.disconnect(t)}),C.clear(),O=null,R=null,e.setRenderTarget(M),b=null,y=null,g=null,o=null,S=null,U.stop(),a.isPresenting=!1,a.dispatchEvent({type:"sessionend"})}function P(e){for(var t=o.inputSources,n=0;n0&&(t.alphaTest.value=n.alphaTest);var r,i,a=e.get(n).envMap;a&&(t.envMap.value=a,t.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,t.reflectivity.value=n.reflectivity,t.ior.value=n.ior,t.refractionRatio.value=n.refractionRatio),n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?r=n.map:n.specularMap?r=n.specularMap:n.displacementMap?r=n.displacementMap:n.normalMap?r=n.normalMap:n.bumpMap?r=n.bumpMap:n.roughnessMap?r=n.roughnessMap:n.metalnessMap?r=n.metalnessMap:n.alphaMap?r=n.alphaMap:n.emissiveMap?r=n.emissiveMap:n.clearcoatMap?r=n.clearcoatMap:n.clearcoatNormalMap?r=n.clearcoatNormalMap:n.clearcoatRoughnessMap?r=n.clearcoatRoughnessMap:n.specularIntensityMap?r=n.specularIntensityMap:n.specularColorMap?r=n.specularColorMap:n.transmissionMap?r=n.transmissionMap:n.thicknessMap?r=n.thicknessMap:n.sheenColorMap?r=n.sheenColorMap:n.sheenRoughnessMap&&(r=n.sheenRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix)),n.aoMap?i=n.aoMap:n.lightMap&&(i=n.lightMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uv2Transform.value.copy(i.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,n.side===O&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),n.side===O&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias),e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,a,o){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===O&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===O&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===O&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===O&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t,r){n(e,t),e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap)),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===O&&e.clearcoatNormalScale.value.negate())),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,o):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===O&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===O&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===O&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===O&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){var i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,a):r.isSpriteMaterial?function(e,t){var n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function Ql(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=void 0!==t.canvas?t.canvas:((e=fr("canvas")).style.display="block",e),r=void 0!==t.context?t.context:null,i=void 0!==t.alpha&&t.alpha,a=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,s=void 0!==t.antialias&&t.antialias,l=void 0===t.premultipliedAlpha||t.premultipliedAlpha,u=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,c=void 0!==t.powerPreference?t.powerPreference:"default",f=void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat,d=null,h=null,p=[],v=[];this.domElement=n,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=dn,this.physicallyCorrectLights=!1,this.toneMapping=pe,this.toneMappingExposure=1;var m=this,g=!1,y=0,A=0,x=null,w=-1,M=null,S=new mr,E=new mr,C=null,_=n.width,T=n.height,k=1,D=null,L=null,P=new mr(0,0,_,T),I=new mr(0,0,_,T),F=!1,j=[],N=new qa,U=!1,H=!1,G=null,z=new Zr,V=new xr,W={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function J(){return null===x?k:1}var Q,Y,X,K,q,Z,$,ee,te,ne,re,ie,ae,oe,se,le,ue,ce,fe,de,he,ve,me,ge=r;function ye(e,t){for(var r=0;r0&&function(e,t,n){if(null===G){var r=!0===s&&!0===Y.isWebGL2,i=r?br:gr;G=new i(1024,1024,{generateMipmaps:!0,type:null!==ve.convert(Qe)?Qe:Ue,minFilter:je,magFilter:Be,wrapS:Te,wrapT:Te,useRenderToTexture:Q.has("WEBGL_multisampled_render_to_texture")})}var a=m.getRenderTarget();m.setRenderTarget(G),m.clear();var o=m.toneMapping;m.toneMapping=pe,De(e,t,n),m.toneMapping=o,Z.updateMultisampleRenderTarget(G),Z.updateRenderTargetMipmap(G),m.setRenderTarget(a)}(i,t,n),r&&X.viewport(S.copy(r)),i.length>0&&De(i,t,n),a.length>0&&De(a,t,n),o.length>0&&De(o,t,n)}function De(e,t,n){for(var r=!0===t.isScene?t.overrideMaterial:null,i=0,a=e.length;i0?v[v.length-1]:null,p.pop(),d=p.length>0?p[p.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return x},this.setRenderTargetTextures=function(e,t,n){q.get(e.texture).__webglTexture=t,q.get(e.depthTexture).__webglTexture=n;var r=q.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||e.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),e.useRenderToTexture=!1,e.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(e,t){var n=q.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;x=e,y=t,A=n;var r=!0;if(e){var i=q.get(e);void 0!==i.__useDefaultFramebuffer?(X.bindFramebuffer(36160,null),r=!1):void 0===i.__webglFramebuffer?Z.setupRenderTarget(e):i.__hasExternalTextures&&Z.rebindTextures(e,q.get(e.texture).__webglTexture,q.get(e.depthTexture).__webglTexture)}var a=null,o=!1,s=!1;if(e){var l=e.texture;(l.isDataTexture3D||l.isDataTexture2DArray)&&(s=!0);var u=q.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(a=u[t],o=!0):a=e.useRenderbuffer?q.get(e).__webglMultisampledFramebuffer:u,S.copy(e.viewport),E.copy(e.scissor),C=e.scissorTest}else S.copy(P).multiplyScalar(k).floor(),E.copy(I).multiplyScalar(k).floor(),C=F;if(X.bindFramebuffer(36160,a)&&Y.drawBuffers&&r){var c=!1;if(e)if(e.isWebGLMultipleRenderTargets){var f=e.texture;if(j.length!==f.length||36064!==j[0]){for(var d=0,h=f.length;d=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ge.readPixels(t,n,r,i,ve.convert(u),ve.convert(c),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{var d=null!==x?q.get(x).__webglFramebuffer:null;X.bindFramebuffer(36160,d)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!0===t.isFramebufferTexture){var r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r);Z.setTexture2D(t,0),ge.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,a),X.unbindTexture()}else console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.")},this.copyTextureToTexture=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t.image.width,a=t.image.height,o=ve.convert(n.format),s=ve.convert(n.type);Z.setTexture2D(n,0),ge.pixelStorei(37440,n.flipY),ge.pixelStorei(37441,n.premultiplyAlpha),ge.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ge.texSubImage2D(3553,r,e.x,e.y,i,a,o,s,t.image.data):t.isCompressedTexture?ge.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):ge.texSubImage2D(3553,r,e.x,e.y,o,s,t.image),0===r&&n.generateMipmaps&&ge.generateMipmap(3553),X.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(m.isWebGL1Renderer)console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");else{var a,o=e.max.x-e.min.x+1,s=e.max.y-e.min.y+1,l=e.max.z-e.min.z+1,u=ve.convert(r.format),c=ve.convert(r.type);if(r.isDataTexture3D)Z.setTexture3D(r,0),a=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Z.setTexture2DArray(r,0),a=35866}ge.pixelStorei(37440,r.flipY),ge.pixelStorei(37441,r.premultiplyAlpha),ge.pixelStorei(3317,r.unpackAlignment);var f=ge.getParameter(3314),d=ge.getParameter(32878),h=ge.getParameter(3316),p=ge.getParameter(3315),v=ge.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ge.pixelStorei(3314,g.width),ge.pixelStorei(32878,g.height),ge.pixelStorei(3316,e.min.x),ge.pixelStorei(3315,e.min.y),ge.pixelStorei(32877,e.min.z),n.isDataTexture||n.isDataTexture3D?ge.texSubImage3D(a,i,t.x,t.y,t.z,o,s,l,u,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ge.compressedTexSubImage3D(a,i,t.x,t.y,t.z,o,s,l,u,g.data)):ge.texSubImage3D(a,i,t.x,t.y,t.z,o,s,l,u,c,g),ge.pixelStorei(3314,f),ge.pixelStorei(32878,d),ge.pixelStorei(3316,h),ge.pixelStorei(3315,p),ge.pixelStorei(32877,v),0===i&&r.generateMipmaps&&ge.generateMipmap(a),X.unbindTexture()}},this.initTexture=function(e){Z.setTexture2D(e,0),X.unbindTexture()},this.resetState=function(){y=0,A=0,x=null,X.reset(),me.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Ql.prototype.isWebGLRenderer=!0;var Yl=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(f.a)(t,e),t}(Ql);Yl.prototype.isWebGL1Renderer=!0;var Xl=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25e-5;Object(v.a)(this,e),this.name="",this.color=new zi(t),this.density=n}return Object(m.a)(e,[{key:"clone",value:function(){return new e(this.color,this.density)}},{key:"toJSON",value:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}]),e}();Xl.prototype.isFogExp2=!0;var Kl=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;Object(v.a)(this,e),this.name="",this.color=new zi(t),this.near=n,this.far=r}return Object(m.a)(e,[{key:"clone",value:function(){return new e(this.color,this.near,this.far)}},{key:"toJSON",value:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}]),e}();Kl.prototype.isFog=!0;var ql=function(e){function t(){var e;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="Scene",e.background=null,e.environment=null,e.fog=null,e.overrideMaterial=null,e.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:Object(d.a)(Object(d.a)(e))})),e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e,n){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e,n),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}},{key:"toJSON",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this,e);return null!==this.fog&&(n.object.fog=this.fog.toJSON()),n}}]),t}(Mi);ql.prototype.isScene=!0;var Zl=function(){function e(t,n){Object(v.a)(this,e),this.array=t,this.stride=n,this.count=void 0!==t?t.length/n:0,this.usage=Ln,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=qn()}return Object(m.a)(e,[{key:"onUploadCallback",value:function(){}},{key:"setUsage",value:function(e){return this.usage=e,this}},{key:"copy",value:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}},{key:"copyAt",value:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;r1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}},{key:"clone",value:function(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=qn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);var t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}},{key:"onUpload",value:function(e){return this.onUploadCallback=e,this}},{key:"toJSON",value:function(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=qn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}},{key:"needsUpdate",set:function(e){!0===e&&this.version++}}]),e}();Zl.prototype.isInterleavedBuffer=!0;var $l=new xr,eu=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object(v.a)(this,e),this.name="",this.data=t,this.itemSize=n,this.offset=r,this.normalized=!0===i}return Object(m.a)(e,[{key:"applyMatrix4",value:function(e){for(var t=0,n=this.data.count;te.far||t.push({distance:s,point:ru.clone(),uv:Li.getUV(ru,uu,cu,fu,du,hu,pu,new ar),face:null,object:this})}}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}]),t}(Mi);function mu(e,t,n,r,i,a){ou.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(su.x=a*ou.x-i*ou.y,su.y=i*ou.x+a*ou.y):su.copy(ou),e.copy(t),e.x+=su.x,e.y+=su.y,e.applyMatrix4(lu)}vu.prototype.isSprite=!0;var gu=new xr,yu=new xr,bu=function(e){function t(){var e;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this)))._currentLevel=0,e.type="LOD",Object.defineProperties(Object(d.a)(Object(d.a)(e)),{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),e.autoUpdate=!0,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e,!1);for(var n=e.levels,r=0,i=n.length;r1&&void 0!==arguments[1]?arguments[1]:0;t=Math.abs(t);var n,r=this.levels;for(n=0;n0){var n,r;for(n=1,r=t.length;n0){gu.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(gu);this.getObjectForDistance(n).raycast(e,t)}}},{key:"update",value:function(e){var t=this.levels;if(t.length>1){gu.setFromMatrixPosition(e.matrixWorld),yu.setFromMatrixPosition(this.matrixWorld);var n,r,i=gu.distanceTo(yu)/e.zoom;for(t[0].object.visible=!0,n=1,r=t.length;n=t[n].distance;n++)t[n-1].object.visible=!1,t[n].object.visible=!0;for(this._currentLevel=n-1;n0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,f=arguments.length>7?arguments[7]:void 0,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:Be,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:Be,p=arguments.length>10?arguments[10]:void 0,m=arguments.length>11?arguments[11]:void 0;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this,null,s,l,f,d,h,a,o,p,m))).image={data:n,width:r,height:i},e.magFilter=d,e.minFilter=h,e.generateMipmaps=!1,e.flipY=!1,e.unpackAlignment=1,e}return Object(f.a)(t,e),t}(pr);_u.prototype.isDataTexture=!0;var Tu=new Zr,ku=new Zr,Bu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Object(v.a)(this,e),this.uuid=qn(),this.bones=t.slice(0),this.boneInverses=n,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}return Object(m.a)(e,[{key:"init",value:function(){var e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(var n=0,r=this.bones.length;n3&&void 0!==arguments[3]?arguments[3]:1;return Object(v.a)(this,t),"number"===typeof r&&(a=r,r=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),(i=Object(u.a)(this,Object(c.a)(t).call(this,e,n,r))).meshPerAttribute=a,i}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}]),t}(Qi);Ou.prototype.isInstancedBufferAttribute=!0;var Ru=new Zr,Du=new Zr,Lu=[],Pu=new ka,Iu=function(e){function t(e,n,r){var i;return Object(v.a)(this,t),(i=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).instanceMatrix=new Ou(new Float32Array(16*r),16),i.instanceColor=null,i.count=r,i.frustumCulled=!1,i}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}},{key:"getColorAt",value:function(e,t){t.fromArray(this.instanceColor.array,3*e)}},{key:"getMatrixAt",value:function(e,t){t.fromArray(this.instanceMatrix.array,16*e)}},{key:"raycast",value:function(e,t){var n=this.matrixWorld,r=this.count;if(Pu.geometry=this.geometry,Pu.material=this.material,void 0!==Pu.material)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:new fa,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Fu;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="Line",e.geometry=n,e.material=r,e.updateMorphTargets(),e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.material=e.material,this.geometry=e.geometry,this}},{key:"computeLineDistances",value:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;rs)){f.applyMatrix4(this.matrixWorld);var b=e.ray.origin.distanceTo(f);be.far||t.push({distance:b,point:c.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else for(var A=Math.max(0,a.start),x=Math.min(p.count,a.start+a.count)-1;As)){f.applyMatrix4(this.matrixWorld);var w=e.ray.origin.distanceTo(f);we.far||t.push({distance:w,point:c.clone().applyMatrix4(this.matrixWorld),index:A,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}},{key:"updateMorphTargets",value:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=r.length;i0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}]),t}(Mi);zu.prototype.isLine=!0;var Vu=new xr,Wu=new xr,Ju=function(e){function t(e,n){var r;return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).type="LineSegments",r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"computeLineDistances",value:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;r0&&void 0!==arguments[0]?arguments[0]:new fa,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Yu;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="Points",e.geometry=n,e.material=r,e.updateMorphTargets(),e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.material=e.material,this.geometry=e.geometry,this}},{key:"raycast",value:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),qu.copy(n.boundingSphere),qu.applyMatrix4(r),qu.radius+=i,!1!==e.ray.intersectsSphere(qu)){Xu.copy(r).invert(),Ku.copy(e.ray).applyMatrix4(Xu);var o=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o;if(n.isBufferGeometry){var l=n.index,u=n.attributes.position;if(null!==l)for(var c=Math.max(0,a.start),f=Math.min(l.count,a.start+a.count);c0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=r.length;i0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}]),t}(Mi);function ec(e,t,n,r,i,a,o){var s=Ku.distanceSqToPoint(e);if(si.far)return;a.push({distance:u,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:o})}}$u.prototype.isPoints=!0;var tc=function(e){function t(e,n,r,i,a,o,s,l,f){var h;Object(v.a)(this,t),(h=Object(u.a)(this,Object(c.a)(t).call(this,e,n,r,i,a,o,s,l,f))).format=void 0!==s?s:$e,h.minFilter=void 0!==o?o:Pe,h.magFilter=void 0!==a?a:Pe,h.generateMipmaps=!1;var p=Object(d.a)(Object(d.a)(h));return"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(function t(){p.needsUpdate=!0,e.requestVideoFrameCallback(t)}),h}return Object(f.a)(t,e),Object(m.a)(t,[{key:"clone",value:function(){return new this.constructor(this.image).copy(this)}},{key:"update",value:function(){var e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}]),t}(pr);tc.prototype.isVideoTexture=!0;var nc=function(e){function t(e,n,r){var i;return Object(v.a)(this,t),(i=Object(u.a)(this,Object(c.a)(t).call(this,{width:e,height:n}))).format=r,i.magFilter=Be,i.minFilter=Be,i.generateMipmaps=!1,i.needsUpdate=!0,i}return Object(f.a)(t,e),t}(pr);nc.prototype.isFramebufferTexture=!0;var rc=function(e){function t(e,n,r,i,a,o,s,l,f,d,h,p){var m;return Object(v.a)(this,t),(m=Object(u.a)(this,Object(c.a)(t).call(this,null,o,s,l,f,d,i,a,h,p))).image={width:n,height:r},m.mipmaps=e,m.flipY=!1,m.generateMipmaps=!1,m}return Object(f.a)(t,e),t}(pr);rc.prototype.isCompressedTexture=!0;var ic=function(e){function t(e,n,r,i,a,o,s,l,f){var d;return Object(v.a)(this,t),(d=Object(u.a)(this,Object(c.a)(t).call(this,e,n,r,i,a,o,s,l,f))).needsUpdate=!0,d}return Object(f.a)(t,e),t}(pr);ic.prototype.isCanvasTexture=!0;var ac=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*Math.PI;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="CircleGeometry",e.parameters={radius:n,segments:r,thetaStart:i,thetaLength:a},r=Math.max(3,r);var o=[],s=[],l=[],f=[],d=new xr,h=new ar;s.push(0,0,0),l.push(0,0,1),f.push(.5,.5);for(var p=0,m=3;p<=r;p++,m+=3){var g=i+p/r*a;d.x=n*Math.cos(g),d.y=n*Math.sin(g),s.push(d.x,d.y,d.z),l.push(0,0,1),h.x=(s[m]/n+1)/2,h.y=(s[m+1]/n+1)/2,f.push(h.x,h.y)}for(var y=1;y<=r;y++)o.push(y,y+1,0);return e.setIndex(o),e.setAttribute("position",new na(s,3)),e.setAttribute("normal",new na(l,3)),e.setAttribute("uv",new na(f,2)),e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.segments,e.thetaStart,e.thetaLength)}}]),t}(fa),oc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:2*Math.PI;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="CylinderGeometry",e.parameters={radiusTop:n,radiusBottom:r,height:i,radialSegments:a,heightSegments:o,openEnded:s,thetaStart:l,thetaLength:f};var h=Object(d.a)(Object(d.a)(e));a=Math.floor(a),o=Math.floor(o);var p=[],m=[],g=[],y=[],b=0,A=[],x=i/2,w=0;function M(e){for(var t=b,i=new ar,o=new xr,s=0,u=!0===e?n:r,c=!0===e?1:-1,d=1;d<=a;d++)m.push(0,x*c,0),g.push(0,c,0),y.push(.5,.5),b++;for(var v=b,A=0;A<=a;A++){var M=A/a*f+l,S=Math.cos(M),E=Math.sin(M);o.x=u*E,o.y=x*c,o.z=u*S,m.push(o.x,o.y,o.z),g.push(0,c,0),i.x=.5*S+.5,i.y=.5*E*c+.5,y.push(i.x,i.y),b++}for(var C=0;C0&&M(!0),r>0&&M(!1)),e.setIndex(p),e.setAttribute("position",new na(m,3)),e.setAttribute("normal",new na(g,3)),e.setAttribute("uv",new na(y,2)),e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}]),t}(fa),sc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2*Math.PI;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this,0,n,r,i,a,o,s,l))).type="ConeGeometry",e.parameters={radius:n,height:r,radialSegments:i,heightSegments:a,openEnded:o,thetaStart:s,thetaLength:l},e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}]),t}(oc),lc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="PolyhedronGeometry",e.parameters={vertices:n,indices:r,radius:i,detail:a};var o=[],s=[];function l(e,t,n,r){for(var i=r+1,a=[],o=0;o<=i;o++){a[o]=[];for(var s=e.clone().lerp(n,o/i),l=t.clone().lerp(n,o/i),u=i-o,c=0;c<=u;c++)a[o][c]=0===c&&o===i?s:s.clone().lerp(l,c/u)}for(var d=0;d.9&&a<.1&&(t<.2&&(s[e+0]+=1),n<.2&&(s[e+2]+=1),r<.2&&(s[e+4]+=1))}}()}(),e.setAttribute("position",new na(o,3)),e.setAttribute("normal",new na(o.slice(),3)),e.setAttribute("uv",new na(s,2)),0===a?e.computeVertexNormals():e.normalizeNormals(),e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.vertices,e.indices,e.radius,e.details)}}]),t}(fa),uc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(v.a)(this,t);var i=(1+Math.sqrt(5))/2,a=1/i,o=[-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,-a,-i,0,-a,i,0,a,-i,0,a,i,-a,-i,0,-a,i,0,a,-i,0,a,i,0,-i,0,-a,i,0,-a,-i,0,a,i,0,a];return(e=Object(u.a)(this,Object(c.a)(t).call(this,o,[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],n,r))).type="DodecahedronGeometry",e.parameters={radius:n,detail:r},e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.detail)}}]),t}(lc),cc=new xr,fc=new xr,dc=new xr,hc=new Li,pc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="EdgesGeometry",e.parameters={geometry:n,thresholdAngle:r},null!==n){for(var i=Math.pow(10,4),a=Math.cos(Xn*r),o=n.getIndex(),s=n.getAttribute("position"),l=o?o.count:s.count,f=[0,0,0],d=["a","b","c"],h=new Array(3),p={},m=[],g=0;g0&&void 0!==arguments[0]?arguments[0]:5,t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}},{key:"getSpacedPoints",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}},{key:"getLength",value:function(){var e=this.getLengths();return e[e.length-1]}},{key:"getLengths",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.arcLengthDivisions;if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n=[],r=this.getPoint(0),i=0;n.push(0);for(var a=1;a<=e;a++)i+=(t=this.getPoint(a/e)).distanceTo(r),n.push(i),r=t;return this.cacheArcLengths=n,n}},{key:"updateArcLengths",value:function(){this.needsUpdate=!0,this.getLengths()}},{key:"getUtoTmapping",value:function(e,t){var n,r=this.getLengths(),i=0,a=r.length;n=t||e*r[a-1];for(var o,s=0,l=a-1;s<=l;)if((o=r[i=Math.floor(s+(l-s)/2)]-n)<0)s=i+1;else{if(!(o>0)){l=i;break}l=i-1}if(r[i=l]===n)return i/(a-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(a-1)}},{key:"getTangent",value:function(e,t){var n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);var i=this.getPoint(n),a=this.getPoint(r),o=t||(i.isVector2?new ar:new xr);return o.copy(a).sub(i).normalize(),o}},{key:"getTangentAt",value:function(e,t){var n=this.getUtoTmapping(e);return this.getTangent(n,t)}},{key:"computeFrenetFrames",value:function(e,t){for(var n=new xr,r=[],i=[],a=[],o=new xr,s=new Zr,l=0;l<=e;l++){var u=l/e;r[l]=this.getTangentAt(u,new xr)}i[0]=new xr,a[0]=new xr;var c=Number.MAX_VALUE,f=Math.abs(r[0].x),d=Math.abs(r[0].y),h=Math.abs(r[0].z);f<=c&&(c=f,n.set(1,0,0)),d<=c&&(c=d,n.set(0,1,0)),h<=c&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(var p=1;p<=e;p++){if(i[p]=i[p-1].clone(),a[p]=a[p-1].clone(),o.crossVectors(r[p-1],r[p]),o.length()>Number.EPSILON){o.normalize();var v=Math.acos(Zn(r[p-1].dot(r[p]),-1,1));i[p].applyMatrix4(s.makeRotationAxis(o,v))}a[p].crossVectors(r[p],i[p])}if(!0===t){var m=Math.acos(Zn(i[0].dot(i[e]),-1,1));m/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(m=-m);for(var g=1;g<=e;g++)i[g].applyMatrix4(s.makeRotationAxis(r[g],m*g)),a[g].crossVectors(r[g],i[g])}return{tangents:r,normals:i,binormals:a}}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},{key:"toJSON",value:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}},{key:"fromJSON",value:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}]),e}(),mc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2*Math.PI,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6],f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="EllipseCurve",e.aX=n,e.aY=r,e.xRadius=i,e.yRadius=a,e.aStartAngle=o,e.aEndAngle=s,e.aClockwise=l,e.aRotation=f,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e,t){for(var n=t||new ar,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)r;)i-=r;i0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"centripetal",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="CatmullRomCurve3",e.points=n,e.closed=r,e.curveType=i,e.tension=a,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr,i=this.points,a=i.length,o=(a-(this.closed?0:1))*e,s=Math.floor(o),l=o-s;this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/a)+1)*a:0===l&&s===a-1&&(s=a-2,l=1),this.closed||s>0?t=i[(s-1)%a]:(bc.subVectors(i[0],i[1]).add(i[0]),t=bc);var u=i[s%a],c=i[(s+1)%a];if(this.closed||s+20&&void 0!==arguments[0]?arguments[0]:new ar,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new ar,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new ar;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="CubicBezierCurve",e.v0=n,e.v1=r,e.v2=i,e.v3=a,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar,n=this.v0,r=this.v1,i=this.v2,a=this.v3;return t.set(Cc(e,n.x,r.x,i.x,a.x),Cc(e,n.y,r.y,i.y,a.y)),t}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}},{key:"fromJSON",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"fromJSON",this).call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}]),t}(vc);_c.prototype.isCubicBezierCurve=!0;var Tc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new xr,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new xr;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="CubicBezierCurve3",e.v0=n,e.v1=r,e.v2=i,e.v3=a,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr,n=this.v0,r=this.v1,i=this.v2,a=this.v3;return t.set(Cc(e,n.x,r.x,i.x,a.x),Cc(e,n.y,r.y,i.y,a.y),Cc(e,n.z,r.z,i.z,a.z)),t}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}},{key:"fromJSON",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"fromJSON",this).call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}]),t}(vc);Tc.prototype.isCubicBezierCurve3=!0;var kc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ar,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="LineCurve",e.v1=n,e.v2=r,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}},{key:"getPointAt",value:function(e,t){return this.getPoint(e,t)}},{key:"getTangent",value:function(e,t){var n=t||new ar;return n.copy(this.v2).sub(this.v1).normalize(),n}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}},{key:"fromJSON",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"fromJSON",this).call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}]),t}(vc);kc.prototype.isLineCurve=!0;var Bc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="LineCurve3",e.isLineCurve3=!0,e.v1=n,e.v2=r,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}},{key:"getPointAt",value:function(e,t){return this.getPoint(e,t)}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}},{key:"fromJSON",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"fromJSON",this).call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}]),t}(vc),Oc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ar,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new ar;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="QuadraticBezierCurve",e.v0=n,e.v1=r,e.v2=i,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar,n=this.v0,r=this.v1,i=this.v2;return t.set(Ec(e,n.x,r.x,i.x),Ec(e,n.y,r.y,i.y)),t}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}},{key:"fromJSON",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"fromJSON",this).call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}]),t}(vc);Oc.prototype.isQuadraticBezierCurve=!0;var Rc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new xr;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="QuadraticBezierCurve3",e.v0=n,e.v1=r,e.v2=i,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr,n=this.v0,r=this.v1,i=this.v2;return t.set(Ec(e,n.x,r.x,i.x),Ec(e,n.y,r.y,i.y),Ec(e,n.z,r.z,i.z)),t}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}},{key:"fromJSON",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"fromJSON",this).call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}]),t}(vc);Rc.prototype.isQuadraticBezierCurve3=!0;var Dc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="SplineCurve",e.points=n,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar,n=this.points,r=(n.length-1)*e,i=Math.floor(r),a=r-i,o=n[0===i?i:i-1],s=n[i],l=n[i>n.length-2?n.length-1:i+1],u=n[i>n.length-3?n.length-1:i+2];return t.set(Sc(a,o.x,s.x,l.x,u.x),Sc(a,o.y,s.y,l.y,u.y)),t}},{key:"copy",value:function(e){Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.points=[];for(var n=0,r=e.points.length;n=n){var a=r[i]-n,o=this.curves[i],s=o.getLength(),l=0===s?0:1-a/s;return o.getPointAt(l,t)}i++}return null}},{key:"getLength",value:function(){var e=this.getCurveLengths();return e[e.length-1]}},{key:"updateArcLengths",value:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}},{key:"getCurveLengths",value:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n0&&void 0!==arguments[0]?arguments[0]:40,t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}},{key:"getPoints",value:function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,n=[],r=0,i=this.curves;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}},{key:"copy",value:function(e){Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.curves=[];for(var n=0,r=e.curves.length;n0){var u=l.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(l);var c=l.getPoint(1);return this.currentPoint.copy(c),this}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.currentPoint.copy(e.currentPoint),this}},{key:"toJSON",value:function(){var e=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this);return e.currentPoint=this.currentPoint.toArray(),e}},{key:"fromJSON",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"fromJSON",this).call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}]),t}(Pc),Fc=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this,e))).uuid=qn(),n.type="Shape",n.holes=[],n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getPointsHoles",value:function(e){for(var t=[],n=0,r=this.holes.length;n2&&void 0!==arguments[2]?arguments[2]:2,c=t&&t.length,f=c?t[0]*u:e.length,d=Nc(e,0,f,u,!0),h=[];if(!d||d.next===d.prev)return h;if(c&&(d=function(e,t,n,r){var i,a,o,s,l,u=[];for(i=0,a=t.length;i80*u){n=i=e[0],r=a=e[1];for(var p=u;pi&&(i=o),s>a&&(a=s);l=0!==(l=Math.max(i-n,a-r))?1/l:0}return Hc(d,h,u,n,r,l),h};function Nc(e,t,n,r,i){var a,o;if(i===function(e,t,n,r){for(var i=0,a=t,o=n-r;a0)for(a=t;a=t;a-=r)o=sf(a,e[a],e[a+1],o);return o&&ef(o,o.next)&&(lf(o),o=o.next),o}function Uc(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!ef(r,r.next)&&0!==$c(r.prev,r,r.next))r=r.next;else{if(lf(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function Hc(e,t,n,r,i,a,o){if(e){!o&&a&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=Xc(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){var t,n,r,i,a,o,s,l,u=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,u*=2}while(o>1)}(i)}(e,r,i,a);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?zc(e,r,i,a):Gc(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),lf(e),e=l.next,u=l.next;else if((e=l)===u){o?1===o?Hc(e=Vc(Uc(e),t,n),t,n,r,i,a,2):2===o&&Wc(e,t,n,r,i,a):Hc(Uc(e),t,n,r,i,a,1);break}}}function Gc(e){var t=e.prev,n=e,r=e.next;if($c(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(qc(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&$c(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function zc(e,t,n,r){var i=e.prev,a=e,o=e.next;if($c(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=Xc(s,l,t,n,r),d=Xc(u,c,t,n,r),h=e.prevZ,p=e.nextZ;h&&h.z>=f&&p&&p.z<=d;){if(h!==e.prev&&h!==e.next&&qc(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&$c(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==e.prev&&p!==e.next&&qc(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&$c(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=f;){if(h!==e.prev&&h!==e.next&&qc(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&$c(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&qc(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&$c(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Vc(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!ef(i,a)&&tf(i,r,r.next,a)&&af(i,a)&&af(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),lf(r),lf(r.next),r=e=a),r=r.next}while(r!==e);return Uc(r)}function Wc(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Zc(o,s)){var l=of(o,s);return o=Uc(o,o.next),l=Uc(l,l.next),Hc(o,t,n,r,i,a),void Hc(l,t,n,r,i,a)}s=s.next}o=o.next}while(o!==e)}function Jc(e,t){return e.x-t.x}function Qc(e,t){if(t=function(e,t){var n,r=t,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>o){if(o=s,s===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&qc(an.x||r.x===n.x&&Yc(n,r)))&&(n=r,d=l)),r=r.next}while(r!==u);return n}(e,t)){var n=of(t,e);Uc(t,t.next),Uc(n,n.next)}}function Yc(e,t){return $c(e.prev,e,t.prev)<0&&$c(t.next,e,e.next)<0}function Xc(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Kc(e){var t=e,n=e;do{(t.x=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function Zc(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&tf(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(af(e,t)&&af(t,e)&&function(e,t){var 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}(e,t)&&($c(e.prev,e,t.prev)||$c(e,t.prev,t))||ef(e,t)&&$c(e.prev,e,e.next)>0&&$c(t.prev,t,t.next)>0)}function $c(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function ef(e,t){return e.x===t.x&&e.y===t.y}function tf(e,t,n,r){var i=rf($c(e,t,n)),a=rf($c(e,t,r)),o=rf($c(n,r,e)),s=rf($c(n,r,t));return i!==a&&o!==s||(!(0!==i||!nf(e,n,t))||(!(0!==a||!nf(e,r,t))||(!(0!==o||!nf(n,e,r))||!(0!==s||!nf(n,t,r)))))}function nf(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 rf(e){return e>0?1:e<0?-1:0}function af(e,t){return $c(e.prev,e,e.next)<0?$c(e,t,e.next)>=0&&$c(e,e.prev,t)>=0:$c(e,t,e.prev)<0||$c(e,e.next,t)<0}function of(e,t){var n=new uf(e.i,e.x,e.y),r=new uf(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 sf(e,t,n,r){var i=new uf(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 lf(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 uf(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var cf=function(){function e(){Object(v.a)(this,e)}return Object(m.a)(e,null,[{key:"area",value:function(e){for(var t=e.length,n=0,r=t-1,i=0;i2&&e[t-1].equals(e[0])&&e.pop()}function df(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:new Fc([new ar(.5,.5),new ar(-.5,.5),new ar(-.5,-.5),new ar(.5,-.5)]),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="ExtrudeGeometry",e.parameters={shapes:n,options:r},n=Array.isArray(n)?n:[n];for(var i=Object(d.a)(Object(d.a)(e)),a=[],o=[],s=0,l=n.length;sNumber.EPSILON){var d=Math.sqrt(c),h=Math.sqrt(l*l+u*u),p=t.x-s/d,v=t.y+o/d,m=((n.x-u/h-p)*u-(n.y+l/h-v)*l)/(o*u-s*l),g=(r=p+o*m-e.x)*r+(i=v+s*m-e.y)*i;if(g<=2)return new ar(r,i);a=Math.sqrt(g/2)}else{var y=!1;o>Number.EPSILON?l>Number.EPSILON&&(y=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=o,a=Math.sqrt(c)):(r=o,i=s,a=Math.sqrt(c/2))}return new ar(r/a,i/a)}for(var F=[],j=0,N=k.length,U=N-1,H=j+1;j=0;ge--){for(var ye=ge/h,be=c*Math.cos(ye*Math.PI/2),Ae=f*Math.sin(ye*Math.PI/2)+d,xe=0,we=k.length;xe=0;){var r=n,i=n-1;i<0&&(i=e.length-1);for(var a=0,o=s+2*h;a0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(v.a)(this,t);var i=(1+Math.sqrt(5))/2,a=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1];return(e=Object(u.a)(this,Object(c.a)(t).call(this,a,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],n,r))).type="IcosahedronGeometry",e.parameters={radius:n,detail:r},e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.detail)}}]),t}(lc),mf=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[new ar(0,.5),new ar(.5,0),new ar(0,-.5)],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*Math.PI;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="LatheGeometry",e.parameters={points:n,segments:r,phiStart:i,phiLength:a},r=Math.floor(r),a=Zn(a,0,2*Math.PI);for(var o=[],s=[],l=[],f=[],d=[],h=1/r,p=new xr,m=new ar,g=new xr,y=new xr,b=new xr,A=0,x=0,w=0;w<=n.length-1;w++)switch(w){case 0:A=n[w+1].x-n[w].x,x=n[w+1].y-n[w].y,g.x=1*x,g.y=-A,g.z=0*x,b.copy(g),g.normalize(),f.push(g.x,g.y,g.z);break;case n.length-1:f.push(b.x,b.y,b.z);break;default:A=n[w+1].x-n[w].x,x=n[w+1].y-n[w].y,g.x=1*x,g.y=-A,g.z=0*x,y.copy(g),g.x+=b.x,g.y+=b.y,g.z+=b.z,g.normalize(),f.push(g.x,g.y,g.z),b.copy(y)}for(var M=0;M<=r;M++)for(var S=i+M*h*a,E=Math.sin(S),C=Math.cos(S),_=0;_<=n.length-1;_++){p.x=n[_].x*E,p.y=n[_].y,p.z=n[_].x*C,s.push(p.x,p.y,p.z),m.x=M/r,m.y=_/(n.length-1),l.push(m.x,m.y);var T=f[3*_+0]*E,k=f[3*_+1],B=f[3*_+0]*C;d.push(T,k,B)}for(var O=0;O0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(v.a)(this,t);return(e=Object(u.a)(this,Object(c.a)(t).call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],n,r))).type="OctahedronGeometry",e.parameters={radius:n,detail:r},e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.detail)}}]),t}(lc),yf=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2*Math.PI;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="RingGeometry",e.parameters={innerRadius:n,outerRadius:r,thetaSegments:i,phiSegments:a,thetaStart:o,thetaLength:s},i=Math.max(3,i);for(var l=[],f=[],d=[],h=[],p=n,m=(r-n)/(a=Math.max(1,a)),g=new xr,y=new ar,b=0;b<=a;b++){for(var A=0;A<=i;A++){var x=o+A/i*s;g.x=p*Math.cos(x),g.y=p*Math.sin(x),f.push(g.x,g.y,g.z),d.push(0,0,1),y.x=(g.x/r+1)/2,y.y=(g.y/r+1)/2,h.push(y.x,y.y)}p+=m}for(var w=0;w0&&void 0!==arguments[0]?arguments[0]:new Fc([new ar(0,.5),new ar(-.5,-.5),new ar(.5,-.5)]),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="ShapeGeometry",e.parameters={shapes:n,curveSegments:r};var i=[],a=[],o=[],s=[],l=0,f=0;if(!1===Array.isArray(n))h(n);else for(var d=0;d0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2*Math.PI,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Math.PI;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="SphereGeometry",e.parameters={radius:n,widthSegments:r,heightSegments:i,phiStart:a,phiLength:o,thetaStart:s,thetaLength:l},r=Math.max(3,Math.floor(r)),i=Math.max(2,Math.floor(i));for(var f=Math.min(s+l,Math.PI),d=0,h=[],p=new xr,m=new xr,g=[],y=[],b=[],A=[],x=0;x<=i;x++){var w=[],M=x/i,S=0;0==x&&0==s?S=.5/r:x==i&&f==Math.PI&&(S=-.5/r);for(var E=0;E<=r;E++){var C=E/r;p.x=-n*Math.cos(a+C*o)*Math.sin(s+M*l),p.y=n*Math.cos(s+M*l),p.z=n*Math.sin(a+C*o)*Math.sin(s+M*l),y.push(p.x,p.y,p.z),m.copy(p).normalize(),b.push(m.x,m.y,m.z),A.push(C+S,1-M),w.push(d++)}h.push(w)}for(var _=0;_0)&&g.push(k,B,R),(_!==i-1||f0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(v.a)(this,t);return(e=Object(u.a)(this,Object(c.a)(t).call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],n,r))).type="TetrahedronGeometry",e.parameters={radius:n,detail:r},e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.detail)}}]),t}(lc),wf=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2*Math.PI;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="TorusGeometry",e.parameters={radius:n,tube:r,radialSegments:i,tubularSegments:a,arc:o},i=Math.floor(i),a=Math.floor(a);for(var s=[],l=[],f=[],d=[],h=new xr,p=new xr,m=new xr,g=0;g<=i;g++)for(var y=0;y<=a;y++){var b=y/a*o,A=g/i*Math.PI*2;p.x=(n+r*Math.cos(A))*Math.cos(b),p.y=(n+r*Math.cos(A))*Math.sin(b),p.z=r*Math.sin(A),l.push(p.x,p.y,p.z),h.x=n*Math.cos(b),h.y=n*Math.sin(b),m.subVectors(p,h).normalize(),f.push(m.x,m.y,m.z),d.push(y/a),d.push(g/i)}for(var x=1;x<=i;x++)for(var w=1;w<=a;w++){var M=(a+1)*x+w-1,S=(a+1)*(x-1)+w-1,E=(a+1)*(x-1)+w,C=(a+1)*x+w;s.push(M,S,C),s.push(S,E,C)}return e.setIndex(s),e.setAttribute("position",new na(l,3)),e.setAttribute("normal",new na(f,3)),e.setAttribute("uv",new na(d,2)),e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}]),t}(fa),Mf=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:64,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3;Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="TorusKnotGeometry",e.parameters={radius:n,tube:r,tubularSegments:i,radialSegments:a,p:o,q:s},i=Math.floor(i),a=Math.floor(a);for(var l=[],f=[],d=[],h=[],p=new xr,m=new xr,g=new xr,y=new xr,b=new xr,A=new xr,x=new xr,w=0;w<=i;++w){var M=w/i*o*Math.PI*2;L(M,o,s,n,g),L(M+.01,o,s,n,y),A.subVectors(y,g),x.addVectors(y,g),b.crossVectors(A,x),x.crossVectors(b,A),b.normalize(),x.normalize();for(var S=0;S<=a;++S){var E=S/a*Math.PI*2,C=-r*Math.cos(E),_=r*Math.sin(E);p.x=g.x+(C*x.x+_*b.x),p.y=g.y+(C*x.y+_*b.y),p.z=g.z+(C*x.z+_*b.z),f.push(p.x,p.y,p.z),m.subVectors(p,g).normalize(),d.push(m.x,m.y,m.z),h.push(w/i),h.push(S/a)}}for(var T=1;T<=i;T++)for(var k=1;k<=a;k++){var B=(a+1)*(T-1)+(k-1),O=(a+1)*T+(k-1),R=(a+1)*T+k,D=(a+1)*(T-1)+k;l.push(B,O,D),l.push(O,R,D)}function L(e,t,n,r,i){var a=Math.cos(e),o=Math.sin(e),s=n/t*e,l=Math.cos(s);i.x=r*(2+l)*.5*a,i.y=r*(2+l)*o*.5,i.z=r*Math.sin(s)*.5}return e.setIndex(l),e.setAttribute("position",new na(f,3)),e.setAttribute("normal",new na(d,3)),e.setAttribute("uv",new na(h,2)),e}return Object(f.a)(t,e),Object(m.a)(t,null,[{key:"fromJSON",value:function(e){return new t(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}]),t}(fa),Sf=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Rc(new xr(-1,-1,0),new xr(-1,1,0),new xr(1,1,0)),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="TubeGeometry",e.parameters={path:n,tubularSegments:r,radius:i,radialSegments:a,closed:o};var s=n.computeFrenetFrames(r,o);e.tangents=s.tangents,e.normals=s.normals,e.binormals=s.binormals;var l=new xr,f=new xr,d=new ar,h=new xr,p=[],m=[],g=[],y=[];function b(e){h=n.getPointAt(e/r,h);for(var t=s.normals[e],o=s.binormals[e],u=0;u<=a;u++){var c=u/a*Math.PI*2,d=Math.sin(c),v=-Math.cos(c);f.x=v*t.x+d*o.x,f.y=v*t.y+d*o.y,f.z=v*t.z+d*o.z,f.normalize(),m.push(f.x,f.y,f.z),l.x=h.x+i*f.x,l.y=h.y+i*f.y,l.z=h.z+i*f.z,p.push(l.x,l.y,l.z)}}return function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:null;if(Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="WireframeGeometry",e.parameters={geometry:n},null!==n){var r=[],i=new Set,a=new xr,o=new xr;if(null!==n.index){var s=n.attributes.position,l=n.index,f=n.groups;0===f.length&&(f=[{start:0,count:l.count,materialIndex:0}]);for(var d=0,h=f.length;d0!==e>0&&this.version++,this._sheen=e}},{key:"clearcoat",get:function(){return this._clearcoat},set:function(e){this._clearcoat>0!==e>0&&this.version++,this._clearcoat=e}},{key:"transmission",get:function(){return this._transmission},set:function(e){this._transmission>0!==e>0&&this.version++,this._transmission=e}}]),t}(kf);Bf.prototype.isMeshPhysicalMaterial=!0;var Of=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="MeshPhongMaterial",n.color=new zi(16777215),n.specular=new zi(1118481),n.shininess=30,n.map=null,n.lightMap=null,n.lightMapIntensity=1,n.aoMap=null,n.aoMapIntensity=1,n.emissive=new zi(0),n.emissiveIntensity=1,n.emissiveMap=null,n.bumpMap=null,n.bumpScale=1,n.normalMap=null,n.normalMapType=mn,n.normalScale=new ar(1,1),n.displacementMap=null,n.displacementScale=1,n.displacementBias=0,n.specularMap=null,n.alphaMap=null,n.envMap=null,n.combine=fe,n.reflectivity=1,n.refractionRatio=.98,n.wireframe=!1,n.wireframeLinewidth=1,n.wireframeLinecap="round",n.wireframeLinejoin="round",n.flatShading=!1,n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.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.flatShading=e.flatShading,this}}]),t}(Ii);Of.prototype.isMeshPhongMaterial=!0;var Rf=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).defines={TOON:""},n.type="MeshToonMaterial",n.color=new zi(16777215),n.map=null,n.gradientMap=null,n.lightMap=null,n.lightMapIntensity=1,n.aoMap=null,n.aoMapIntensity=1,n.emissive=new zi(0),n.emissiveIntensity=1,n.emissiveMap=null,n.bumpMap=null,n.bumpScale=1,n.normalMap=null,n.normalMapType=mn,n.normalScale=new ar(1,1),n.displacementMap=null,n.displacementScale=1,n.displacementBias=0,n.alphaMap=null,n.wireframe=!1,n.wireframeLinewidth=1,n.wireframeLinecap="round",n.wireframeLinejoin="round",n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}]),t}(Ii);Rf.prototype.isMeshToonMaterial=!0;var Df=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="MeshNormalMaterial",n.bumpMap=null,n.bumpScale=1,n.normalMap=null,n.normalMapType=mn,n.normalScale=new ar(1,1),n.displacementMap=null,n.displacementScale=1,n.displacementBias=0,n.wireframe=!1,n.wireframeLinewidth=1,n.fog=!1,n.flatShading=!1,n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}]),t}(Ii);Df.prototype.isMeshNormalMaterial=!0;var Lf=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="MeshLambertMaterial",n.color=new zi(16777215),n.map=null,n.lightMap=null,n.lightMapIntensity=1,n.aoMap=null,n.aoMapIntensity=1,n.emissive=new zi(0),n.emissiveIntensity=1,n.emissiveMap=null,n.specularMap=null,n.alphaMap=null,n.envMap=null,n.combine=fe,n.reflectivity=1,n.refractionRatio=.98,n.wireframe=!1,n.wireframeLinewidth=1,n.wireframeLinecap="round",n.wireframeLinejoin="round",n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,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.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,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}}]),t}(Ii);Lf.prototype.isMeshLambertMaterial=!0;var Pf=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).defines={MATCAP:""},n.type="MeshMatcapMaterial",n.color=new zi(16777215),n.matcap=null,n.map=null,n.bumpMap=null,n.bumpScale=1,n.normalMap=null,n.normalMapType=mn,n.normalScale=new ar(1,1),n.displacementMap=null,n.displacementScale=1,n.displacementBias=0,n.alphaMap=null,n.flatShading=!1,n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}}]),t}(Ii);Pf.prototype.isMeshMatcapMaterial=!0;var If=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="LineDashedMaterial",n.scale=1,n.dashSize=3,n.gapSize=1,n.setValues(e),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}]),t}(Fu);If.prototype.isLineDashedMaterial=!0;var Ff=Object.freeze({__proto__:null,ShadowMaterial:Tf,SpriteMaterial:nu,RawShaderMaterial:fo,ShaderMaterial:Fa,PointsMaterial:Yu,MeshPhysicalMaterial:Bf,MeshStandardMaterial:kf,MeshPhongMaterial:Of,MeshToonMaterial:Rf,MeshNormalMaterial:Df,MeshLambertMaterial:Lf,MeshDepthMaterial:Rl,MeshDistanceMaterial:Dl,MeshBasicMaterial:Vi,MeshMatcapMaterial:Pf,LineDashedMaterial:If,LineBasicMaterial:Fu,Material:Ii}),jf={arraySlice:function(e,t,n){return jf.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"===typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),r=0;r!==t;++r)n[r]=r;return n.sort(function(t,n){return e[t]-e[n]}),n},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),a=0,o=0;o!==r;++a)for(var s=n[a]*t,l=0;l!==t;++l)i[o++]=e[s+l];return i},flattenJSON:function(e,t,n,r){for(var i=1,a=e[0];void 0!==a&&void 0===a[r];)a=e[i++];if(void 0!==a){var o=a[r];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[r])&&(t.push(a.time),n.push.apply(n,o)),a=e[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[r])&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{void 0!==(o=a[r])&&(t.push(a.time),n.push(o)),a=e[i++]}while(void 0!==a)}},subclip:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,a=e.clone();a.name=t;for(var o=[],s=0;s=r)){c.push(l.times[d]);for(var p=0;pa.tracks[m].times[0]&&(v=a.tracks[m].times[0]);for(var g=0;g1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;r<=0&&(r=30);for(var i=n.tracks.length,a=t/r,o=function(t){var r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)return"continue";var o=e.tracks.find(function(e){return e.name===r.name&&e.ValueTypeName===i});if(void 0===o)return"continue";var s=0,l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);var u=0,c=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=c/3);var f=r.times.length-1,d=void 0;if(a<=r.times[0]){var h=s,p=l-s;d=jf.arraySlice(r.values,h,p)}else if(a>=r.times[f]){var v=f*l+s,m=v+l-s;d=jf.arraySlice(r.values,v,m)}else{var g=r.createInterpolant(),y=s,b=l-s;g.evaluate(a),d=jf.arraySlice(g.resultBuffer,y,b)}"quaternion"===i&&(new Ar).fromArray(d).normalize().conjugate().toArray(d);for(var A=o.times.length,x=0;x=i)break e;var s=t[1];e=(i=t[--n-1]))break t}a=n,n=0}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=jf.arraySlice(n,i,a),this.values=jf.arraySlice(this.values,i*o,a*o)}return this}},{key:"validate",value:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=n[o];if("number"===typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),e=!1;break}a=s}if(void 0!==r&&jf.isTypedArray(r))for(var l=0,u=r.length;l!==u;++l){var c=r[l];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,c),e=!1;break}}return e}},{key:"optimize",value:function(){for(var e=jf.arraySlice(this.times),t=jf.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===nn,i=e.length-1,a=1,o=1;o0){e[a]=e[i];for(var g=i*n,y=a*n,b=0;b!==n;++b)t[y+b]=t[g+b];++a}return a!==e.length?(this.times=jf.arraySlice(e,0,a),this.values=jf.arraySlice(t,0,a*n)):(this.times=e,this.values=t),this}},{key:"clone",value:function(){var e=jf.arraySlice(this.times,0),t=jf.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}],[{key:"toJSON",value:function(e){var t,n=e.constructor;if(n.toJSON!==this.toJSON)t=n.toJSON(e);else{t={name:e.name,times:jf.convertArray(e.times,Array),values:jf.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t}}]),e}();zf.prototype.TimeBufferType=Float32Array,zf.prototype.ValueBufferType=Float32Array,zf.prototype.DefaultInterpolation=tn;var Vf=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(f.a)(t,e),t}(zf);Vf.prototype.ValueTypeName="bool",Vf.prototype.ValueBufferType=Array,Vf.prototype.DefaultInterpolation=en,Vf.prototype.InterpolantFactoryMethodLinear=void 0,Vf.prototype.InterpolantFactoryMethodSmooth=void 0;var Wf=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(f.a)(t,e),t}(zf);Wf.prototype.ValueTypeName="color";var Jf=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(f.a)(t,e),t}(zf);Jf.prototype.ValueTypeName="number";var Qf=function(e){function t(e,n,r,i){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,e,n,r,i))}return Object(f.a)(t,e),Object(m.a)(t,[{key:"interpolate_",value:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),l=e*o,u=l+o;l!==u;l+=4)Ar.slerpFlat(i,0,a,l-o,a,l,s);return i}}]),t}(Nf),Yf=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(f.a)(t,e),Object(m.a)(t,[{key:"InterpolantFactoryMethodLinear",value:function(e){return new Qf(this.times,this.values,this.getValueSize(),e)}}]),t}(zf);Yf.prototype.ValueTypeName="quaternion",Yf.prototype.DefaultInterpolation=tn,Yf.prototype.InterpolantFactoryMethodSmooth=void 0;var Xf=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(f.a)(t,e),t}(zf);Xf.prototype.ValueTypeName="string",Xf.prototype.ValueBufferType=Array,Xf.prototype.DefaultInterpolation=en,Xf.prototype.InterpolantFactoryMethodLinear=void 0,Xf.prototype.InterpolantFactoryMethodSmooth=void 0;var Kf=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(f.a)(t,e),t}(zf);Kf.prototype.ValueTypeName="vector";var qf=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:sn;Object(v.a)(this,e),this.name=t,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=qn(),this.duration<0&&this.resetDuration()}return Object(m.a)(e,[{key:"resetDuration",value:function(){for(var e=0,t=0,n=this.tracks.length;t!==n;++t){var r=this.tracks[t];e=Math.max(e,r.times[r.times.length-1])}return this.duration=e,this}},{key:"trim",value:function(){for(var e=0;e1){var u=l[1],c=r[u];c||(r[u]=c=[]),c.push(s)}}var f=[];for(var d in r)f.push(this.CreateFromMorphTargetSequence(d,r[d],t,n));return f}},{key:"parseAnimation",value:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var a=[],o=[];jf.flattenJSON(n,a,o,r),0!==a.length&&i.push(new e(t,a,o))}},r=[],i=e.name||"default",a=e.fps||30,o=e.blendMode,s=e.length||-1,l=e.hierarchy||[],u=0;u1&&void 0!==arguments[1]?arguments[1]:1;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="Light",n.color=new zi(e),n.intensity=r,n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"dispose",value:function(){}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this}},{key:"toJSON",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this,e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,void 0!==this.groundColor&&(n.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(n.object.distance=this.distance),void 0!==this.angle&&(n.object.angle=this.angle),void 0!==this.decay&&(n.object.decay=this.decay),void 0!==this.penumbra&&(n.object.penumbra=this.penumbra),void 0!==this.shadow&&(n.object.shadow=this.shadow.toJSON()),n}}]),t}(Mi);fd.prototype.isLight=!0;var dd=function(e){function t(e,n,r){var i;return Object(v.a)(this,t),(i=Object(u.a)(this,Object(c.a)(t).call(this,e,r))).type="HemisphereLight",i.position.copy(Mi.DefaultUp),i.updateMatrix(),i.groundColor=new zi(n),i}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return fd.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}]),t}(fd);dd.prototype.isHemisphereLight=!0;var hd=new Zr,pd=new xr,vd=new xr,md=function(){function e(t){Object(v.a)(this,e),this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ar(512,512),this.map=null,this.mapPass=null,this.matrix=new Zr,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new qa,this._frameExtents=new ar(1,1),this._viewportCount=1,this._viewports=[new mr(0,0,1,1)]}return Object(m.a)(e,[{key:"getViewportCount",value:function(){return this._viewportCount}},{key:"getFrustum",value:function(){return this._frustum}},{key:"updateMatrices",value:function(e){var t=this.camera,n=this.matrix;pd.setFromMatrixPosition(e.matrixWorld),t.position.copy(pd),vd.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(vd),t.updateMatrixWorld(),hd.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(hd),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}},{key:"getViewport",value:function(e){return this._viewports[e]}},{key:"getFrameExtents",value:function(){return this._frameExtents}},{key:"dispose",value:function(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}},{key:"copy",value:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"toJSON",value:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}]),e}(),gd=function(e){function t(){var e;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this,new Na(50,1,.5,500)))).focus=1,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"updateMatrices",value:function(e){var n=this.camera,r=2*Kn*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,a=e.distance||n.far;r===n.fov&&i===n.aspect&&a===n.far||(n.fov=r,n.aspect=i,n.far=a,n.updateProjectionMatrix()),Object(s.a)(Object(c.a)(t.prototype),"updateMatrices",this).call(this,e)}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.focus=e.focus,this}}]),t}(md);gd.prototype.isSpotLightShadow=!0;var yd=function(e){function t(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Math.PI/3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).type="SpotLight",r.position.copy(Mi.DefaultUp),r.updateMatrix(),r.target=new Mi,r.distance=i,r.angle=a,r.penumbra=o,r.decay=s,r.shadow=new gd,r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"dispose",value:function(){this.shadow.dispose()}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}},{key:"power",get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}]),t}(fd);yd.prototype.isSpotLight=!0;var bd=new Zr,Ad=new xr,xd=new xr,wd=function(e){function t(){var e;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this,new Na(90,1,.5,500))))._frameExtents=new ar(4,2),e._viewportCount=6,e._viewports=[new mr(2,1,1,1),new mr(0,1,1,1),new mr(3,1,1,1),new mr(1,1,1,1),new mr(3,0,1,1),new mr(1,0,1,1)],e._cubeDirections=[new xr(1,0,0),new xr(-1,0,0),new xr(0,0,1),new xr(0,0,-1),new xr(0,1,0),new xr(0,-1,0)],e._cubeUps=[new xr(0,1,0),new xr(0,1,0),new xr(0,1,0),new xr(0,1,0),new xr(0,0,1),new xr(0,0,-1)],e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"updateMatrices",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),Ad.setFromMatrixPosition(e.matrixWorld),n.position.copy(Ad),xd.copy(n.position),xd.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(xd),n.updateMatrixWorld(),r.makeTranslation(-Ad.x,-Ad.y,-Ad.z),bd.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(bd)}}]),t}(md);wd.prototype.isPointLightShadow=!0;var Md=function(e){function t(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).type="PointLight",r.distance=i,r.decay=a,r.shadow=new wd,r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"dispose",value:function(){this.shadow.dispose()}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}},{key:"power",get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}]),t}(fd);Md.prototype.isPointLight=!0;var Sd=function(e){function t(){return Object(v.a)(this,t),Object(u.a)(this,Object(c.a)(t).call(this,new co(-5,5,5,-5,.5,500)))}return Object(f.a)(t,e),t}(md);Sd.prototype.isDirectionalLightShadow=!0;var Ed=function(e){function t(e,n){var r;return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).type="DirectionalLight",r.position.copy(Mi.DefaultUp),r.updateMatrix(),r.target=new Mi,r.shadow=new Sd,r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"dispose",value:function(){this.shadow.dispose()}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}]),t}(fd);Ed.prototype.isDirectionalLight=!0;var Cd=function(e){function t(e,n){var r;return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).type="AmbientLight",r}return Object(f.a)(t,e),t}(fd);Cd.prototype.isAmbientLight=!0;var _d=function(e){function t(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).type="RectAreaLight",r.width=i,r.height=a,r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.width=e.width,this.height=e.height,this}},{key:"toJSON",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this,e);return n.object.width=this.width,n.object.height=this.height,n}},{key:"power",get:function(){return this.intensity*this.width*this.height*Math.PI},set:function(e){this.intensity=e/(this.width*this.height*Math.PI)}}]),t}(fd);_d.prototype.isRectAreaLight=!0;var Td=function(){function e(){Object(v.a)(this,e),this.coefficients=[];for(var t=0;t<9;t++)this.coefficients.push(new xr)}return Object(m.a)(e,[{key:"set",value:function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}},{key:"zero",value:function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}},{key:"getAt",value:function(e,t){var n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}},{key:"getIrradianceAt",value:function(e,t){var n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),t}},{key:"add",value:function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}},{key:"addScaledSH",value:function(e,t){for(var n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}},{key:"scale",value:function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}},{key:"lerp",value:function(e,t){for(var n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}},{key:"equals",value:function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}},{key:"copy",value:function(e){return this.set(e.coefficients)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.coefficients,r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.coefficients,r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}}],[{key:"getBasisAt",value:function(e,t){var n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}]),e}();Td.prototype.isSphericalHarmonics3=!0;var kd=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Td,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this,void 0,r))).sh=n,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.sh.copy(e.sh),this}},{key:"fromJSON",value:function(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}},{key:"toJSON",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this,e);return n.object.sh=this.sh.toArray(),n}}]),t}(fd);kd.prototype.isLightProbe=!0;var Bd=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this,e))).textures={},n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"load",value:function(e,t,n,r){var i=this,a=new id(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(a){r?r(a):console.error(a),i.manager.itemError(e)}},n,r)}},{key:"parse",value:function(e){var t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var r=new Ff[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new zi).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.format&&(r.format=e.format),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"===typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(var i in e.uniforms){var a=e.uniforms[i];switch(r.uniforms[i]={},a.type){case"t":r.uniforms[i].value=n(a.value);break;case"c":r.uniforms[i].value=(new zi).setHex(a.value);break;case"v2":r.uniforms[i].value=(new ar).fromArray(a.value);break;case"v3":r.uniforms[i].value=(new xr).fromArray(a.value);break;case"v4":r.uniforms[i].value=(new mr).fromArray(a.value);break;case"m3":r.uniforms[i].value=(new or).fromArray(a.value);break;case"m4":r.uniforms[i].value=(new Zr).fromArray(a.value);break;default:r.uniforms[i].value=a.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var o in e.extensions)r.extensions[o]=e.extensions[o];if(void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){var s=e.normalScale;!1===Array.isArray(s)&&(s=[s,s]),r.normalScale=(new ar).fromArray(s)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new ar).fromArray(e.clearcoatNormalScale)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}},{key:"setTextures",value:function(e){return this.textures=e,this}}]),t}(nd),Od=function(){function e(){Object(v.a)(this,e)}return Object(m.a)(e,null,[{key:"decodeText",value:function(e){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",n=0,r=e.length;n0){var o=new ed(t);(n=new sd(o)).setCrossOrigin(this.crossOrigin);for(var s=0,l=e.length;s0)){e.next=32;break}(a=new sd(this.manager)).setCrossOrigin(this.crossOrigin),l=0,u=t.length;case 8:if(!(l2&&void 0!==arguments[2]?arguments[2]:1;Object(v.a)(this,t),r=Object(u.a)(this,Object(c.a)(t).call(this,void 0,i));var a=(new zi).set(e),o=(new zi).set(n),s=new xr(a.r,a.g,a.b),l=new xr(o.r,o.g,o.b),f=Math.sqrt(Math.PI),d=f*Math.sqrt(.75);return r.sh.coefficients[0].copy(s).add(l).multiplyScalar(f),r.sh.coefficients[1].copy(s).sub(l).multiplyScalar(d),r}return Object(f.a)(t,e),t}(kd);Gd.prototype.isHemisphereLightProbe=!0;var zd=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Object(v.a)(this,t),n=Object(u.a)(this,Object(c.a)(t).call(this,void 0,r));var i=(new zi).set(e);return n.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI)),n}return Object(f.a)(t,e),t}(kd);zd.prototype.isAmbientLightProbe=!0;var Vd=new Zr,Wd=new Zr,Jd=new Zr,Qd=function(){function e(){Object(v.a)(this,e),this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Na,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Na,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}return Object(m.a)(e,[{key:"update",value:function(e){var t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,Jd.copy(e.projectionMatrix);var n,r,i=t.eyeSep/2,a=i*t.near/t.focus,o=t.near*Math.tan(Xn*t.fov*.5)/t.zoom;Wd.elements[12]=-i,Vd.elements[12]=i,n=-o*t.aspect+a,r=o*t.aspect+a,Jd.elements[0]=2*t.near/(r-n),Jd.elements[8]=(r+n)/(r-n),this.cameraL.projectionMatrix.copy(Jd),n=-o*t.aspect-a,r=o*t.aspect-a,Jd.elements[0]=2*t.near/(r-n),Jd.elements[8]=(r+n)/(r-n),this.cameraR.projectionMatrix.copy(Jd)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Wd),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Vd)}}]),e}(),Yd=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Object(v.a)(this,e),this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}return Object(m.a)(e,[{key:"start",value:function(){this.startTime=Xd(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}},{key:"stop",value:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}},{key:"getElapsedTime",value:function(){return this.getDelta(),this.elapsedTime}},{key:"getDelta",value:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=Xd();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}]),e}();function Xd(){return("undefined"===typeof performance?Date:performance).now()}var Kd=new xr,qd=new Ar,Zd=new xr,$d=new xr,eh=function(e){function t(){var e;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="AudioListener",e.context=Ud.getContext(),e.gain=e.context.createGain(),e.gain.connect(e.context.destination),e.filter=null,e.timeDelta=0,e._clock=new Yd,e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getInput",value:function(){return this.gain}},{key:"removeFilter",value:function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}},{key:"getFilter",value:function(){return this.filter}},{key:"setFilter",value:function(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}},{key:"getMasterVolume",value:function(){return this.gain.gain.value}},{key:"setMasterVolume",value:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}},{key:"updateMatrixWorld",value:function(e){Object(s.a)(Object(c.a)(t.prototype),"updateMatrixWorld",this).call(this,e);var n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Kd,qd,Zd),$d.set(0,0,-1).applyQuaternion(qd),n.positionX){var i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(Kd.x,i),n.positionY.linearRampToValueAtTime(Kd.y,i),n.positionZ.linearRampToValueAtTime(Kd.z,i),n.forwardX.linearRampToValueAtTime($d.x,i),n.forwardY.linearRampToValueAtTime($d.y,i),n.forwardZ.linearRampToValueAtTime($d.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(Kd.x,Kd.y,Kd.z),n.setOrientation($d.x,$d.y,$d.z,r.x,r.y,r.z)}}]),t}(Mi),th=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this))).type="Audio",n.listener=e,n.context=e.context,n.gain=n.context.createGain(),n.gain.connect(e.getInput()),n.autoplay=!1,n.buffer=null,n.detune=0,n.loop=!1,n.loopStart=0,n.loopEnd=0,n.offset=0,n.duration=void 0,n.playbackRate=1,n.isPlaying=!1,n.hasPlaybackControl=!0,n.source=null,n.sourceType="empty",n._startedAt=0,n._progress=0,n._connected=!1,n.filters=[],n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"getOutput",value:function(){return this.gain}},{key:"setNodeSource",value:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}},{key:"setMediaElementSource",value:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}},{key:"setMediaStreamSource",value:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}},{key:"setBuffer",value:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}},{key:"play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){this._startedAt=this.context.currentTime+e;var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")}},{key:"pause",value:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}},{key:"stop",value:function(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}},{key:"connect",value:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e1&&void 0!==arguments[1]?arguments[1]:2048;Object(v.a)(this,e),this.analyser=t.context.createAnalyser(),this.analyser.fftSize=n,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}return Object(m.a)(e,[{key:"getFrequencyData",value:function(){return this.analyser.getByteFrequencyData(this.data),this.data}},{key:"getAverageFrequency",value:function(){for(var e=0,t=this.getFrequencyData(),n=0;n0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(var l=t,u=t+t;l!==u;++l)if(n[l]!==n[l+t]){o.setValue(n,r);break}}},{key:"saveOriginalState",value:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(var i=n,a=r;i!==a;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}},{key:"restoreOriginalState",value:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)}},{key:"_setAdditiveIdentityNumeric",value:function(){for(var e=this._addIndex*this.valueSize,t=e+this.valueSize,n=e;n=.5)for(var a=0;a!==i;++a)e[t+a]=e[n+a]}},{key:"_slerp",value:function(e,t,n,r){Ar.slerpFlat(e,t,e,t,e,n,r)}},{key:"_slerpAdditive",value:function(e,t,n,r,i){var a=this._workIndex*i;Ar.multiplyQuaternionsFlat(e,a,e,t,e,n),Ar.slerpFlat(e,t,e,t,e,a,r)}},{key:"_lerp",value:function(e,t,n,r,i){for(var a=1-r,o=0;o!==i;++o){var s=t+o;e[s]=e[s]*a+e[n+o]*r}}},{key:"_lerpAdditive",value:function(e,t,n,r,i){for(var a=0;a!==i;++a){var o=t+a;e[o]=e[o]+e[n+a]*r}}}]),e}(),uh=new RegExp("[\\[\\]\\.:\\/]","g"),ch="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",fh=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),dh=/(WCOD+)?/.source.replace("WCOD",ch),hh=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),ph=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),vh=new RegExp("^"+fh+dh+hh+ph+"$"),mh=["material","materials","bones"],gh=function(){function e(t,n,r){Object(v.a)(this,e);var i=r||yh.parseTrackName(n);this._targetGroup=t,this._bindings=t.subscribe_(n,i)}return Object(m.a)(e,[{key:"getValue",value:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}},{key:"setValue",value:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}},{key:"bind",value:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}},{key:"unbind",value:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}]),e}(),yh=function(){function e(t,n,r){Object(v.a)(this,e),this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}return Object(m.a)(e,[{key:"_getValue_unavailable",value:function(){}},{key:"_setValue_unavailable",value:function(){}},{key:"_getValue_direct",value:function(e,t){e[t]=this.targetObject[this.propertyName]}},{key:"_getValue_array",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]}},{key:"_getValue_arrayElement",value:function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}},{key:"_getValue_toArray",value:function(e,t){this.resolvedProperty.toArray(e,t)}},{key:"_setValue_direct",value:function(e,t){this.targetObject[this.propertyName]=e[t]}},{key:"_setValue_direct_setNeedsUpdate",value:function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}},{key:"_setValue_direct_setMatrixWorldNeedsUpdate",value:function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_array",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]}},{key:"_setValue_array_setNeedsUpdate",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}},{key:"_setValue_array_setMatrixWorldNeedsUpdate",value:function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_arrayElement",value:function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}},{key:"_setValue_arrayElement_setNeedsUpdate",value:function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}},{key:"_setValue_arrayElement_setMatrixWorldNeedsUpdate",value:function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_fromArray",value:function(e,t){this.resolvedProperty.fromArray(e,t)}},{key:"_setValue_fromArray_setNeedsUpdate",value:function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}},{key:"_setValue_fromArray_setMatrixWorldNeedsUpdate",value:function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_getValue_unbound",value:function(e,t){this.bind(),this.getValue(e,t)}},{key:"_setValue_unbound",value:function(e,t){this.bind(),this.setValue(e,t)}},{key:"bind",value:function(){var t=this.node,n=this.parsedPath,r=n.objectName,i=n.propertyName,a=n.propertyIndex;if(t||(t=e.findNode(this.rootNode,n.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(r){var o=n.objectIndex;switch(r){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var s=0;s=i){var c=i++,f=e[c];t[f.uuid]=u,e[u]=f,t[l]=c,e[c]=s;for(var d=0,h=r;d!==h;++d){var p=n[d],v=p[c],m=p[u];p[u]=v,p[c]=m}}}this.nCachedObjects_=i}},{key:"uncache",value:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,a=e.length,o=0,s=arguments.length;o!==s;++o){var l=arguments[o].uuid,u=t[l];if(void 0!==u)if(delete t[l],u0&&(t[A.uuid]=u),e[u]=A,e.pop();for(var x=0,w=r;x!==w;++x){var M=n[x];M[u]=M[b],M.pop()}}}this.nCachedObjects_=i}},{key:"subscribe_",value:function(e,t){var n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];var a=this._paths,o=this._parsedPaths,s=this._objects,l=s.length,u=this.nCachedObjects_,c=new Array(l);r=i.length,n[e]=r,a.push(e),o.push(t),i.push(c);for(var f=u,d=s.length;f!==d;++f){var h=s[f];c[f]=new yh(h,e,t)}return c}},{key:"unsubscribe_",value:function(e){var t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){var r=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];t[e[o]]=n,a[n]=s,a.pop(),i[n]=i[o],i.pop(),r[n]=r[o],r.pop()}}}]),e}();bh.prototype.isAnimationObjectGroup=!0;var Ah=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.blendMode;Object(v.a)(this,e),this._mixer=t,this._clip=n,this._localRoot=r,this.blendMode=i;for(var a=n.tracks,o=a.length,s=new Array(o),l={endingStart:rn,endingEnd:rn},u=0;u!==o;++u){var c=a[u].createInterpolant(null);s[u]=c,c.settings=l}this._interpolantSettings=l,this._interpolants=s,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Zt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}return Object(m.a)(e,[{key:"play",value:function(){return this._mixer._activateAction(this),this}},{key:"stop",value:function(){return this._mixer._deactivateAction(this),this.reset()}},{key:"reset",value:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}},{key:"isRunning",value:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}},{key:"isScheduled",value:function(){return this._mixer._isActiveAction(this)}},{key:"startAt",value:function(e){return this._startTime=e,this}},{key:"setLoop",value:function(e,t){return this.loop=e,this.repetitions=t,this}},{key:"setEffectiveWeight",value:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}},{key:"getEffectiveWeight",value:function(){return this._effectiveWeight}},{key:"fadeIn",value:function(e){return this._scheduleFading(e,0,1)}},{key:"fadeOut",value:function(e){return this._scheduleFading(e,1,0)}},{key:"crossFadeFrom",value:function(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){var r=this._clip.duration,i=e._clip.duration,a=i/r,o=r/i;e.warp(1,a,t),this.warp(o,1,t)}return this}},{key:"crossFadeTo",value:function(e,t,n){return e.crossFadeFrom(this,t,n)}},{key:"stopFading",value:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}},{key:"setEffectiveTimeScale",value:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}},{key:"getEffectiveTimeScale",value:function(){return this._effectiveTimeScale}},{key:"setDuration",value:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}},{key:"syncWith",value:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}},{key:"halt",value:function(e){return this.warp(this._effectiveTimeScale,0,e)}},{key:"warp",value:function(e,t,n){var r=this._mixer,i=r.time,a=this.timeScale,o=this._timeScaleInterpolant;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,l=o.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/a,l[1]=t/a,this}},{key:"stopWarping",value:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}},{key:"getMixer",value:function(){return this._mixer}},{key:"getClip",value:function(){return this._clip}},{key:"getRoot",value:function(){return this._localRoot||this._mixer._root}},{key:"_update",value:function(e,t,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var a=(e-i)*n;if(a<0||0===n)return;this._startTime=null,t=n*a}t*=this._updateTimeScale(e);var o=this._updateTime(t),s=this._updateWeight(e);if(s>0){var l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case ln:for(var c=0,f=l.length;c!==f;++c)l[c].evaluate(o),u[c].accumulateAdditive(s);break;case sn:default:for(var d=0,h=l.length;d!==h;++d)l[d].evaluate(o),u[d].accumulate(r,s)}}}else this._updateWeight(e)}},{key:"_updateWeight",value:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}},{key:"_updateTimeScale",value:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t}},{key:"_updateTime",value:function(e){var t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,a=n===$t;if(0===e)return-1===i?r:a&&1===(1&i)?t-r:r;if(n===qt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){var o=Math.floor(r/t);r-=t*o,i+=Math.abs(o);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var l=e<0;this._setEndings(l,!l,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=r;if(a&&1===(1&i))return t-r}return r}},{key:"_setEndings",value:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=an,r.endingEnd=an):(r.endingStart=e?this.zeroSlopeAtStart?an:rn:on,r.endingEnd=t?this.zeroSlopeAtEnd?an:rn:on)}},{key:"_scheduleFading",value:function(e,t,n){var r=this._mixer,i=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}]),e}(),xh=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(u.a)(this,Object(c.a)(t).call(this)))._root=e,n._initMemoryManager(),n._accuIndex=0,n.time=0,n.timeScale=1,n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"_bindAction",value:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName,u=l[s];void 0===u&&(u={},l[s]=u);for(var c=0;c!==i;++c){var f=r[c],d=f.name,h=u[d];if(void 0!==h)a[c]=h;else{if(void 0!==(h=a[c])){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,s,d));continue}var p=t&&t._propertyBindings[c].binding.parsedPath;++(h=new lh(yh.create(n,d,p),f.ValueTypeName,f.getValueSize())).referenceCount,this._addInactiveBinding(h,s,d),a[c]=h}o[c].resultBuffer=h.buffer}}},{key:"_activateAction",value:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,a=0,o=i.length;a!==o;++a){var s=i[a];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}},{key:"_deactivateAction",value:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0===--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}}},{key:"_initMemoryManager",value:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}},{key:"_isActiveAction",value:function(e){var t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}},{key:"update",value:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1,o=0;o!==n;++o){t[o]._update(r,e,i,a)}for(var s=this._bindings,l=this._nActiveBindings,u=0;u!==l;++u)s[u].apply(a);return this}},{key:"setTime",value:function(e){this.time=0;for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:1;return Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this,e,n))).meshPerAttribute=i,r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}},{key:"clone",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"clone",this).call(this,e);return n.meshPerAttribute=this.meshPerAttribute,n}},{key:"toJSON",value:function(e){var n=Object(s.a)(Object(c.a)(t.prototype),"toJSON",this).call(this,e);return n.isInstancedInterleavedBuffer=!0,n.meshPerAttribute=this.meshPerAttribute,n}}]),t}(Zl);Mh.prototype.isInstancedInterleavedBuffer=!0;var Sh=function(){function e(t,n,r,i,a){Object(v.a)(this,e),this.buffer=t,this.type=n,this.itemSize=r,this.elementSize=i,this.count=a,this.version=0}return Object(m.a)(e,[{key:"setBuffer",value:function(e){return this.buffer=e,this}},{key:"setType",value:function(e,t){return this.type=e,this.elementSize=t,this}},{key:"setItemSize",value:function(e){return this.itemSize=e,this}},{key:"setCount",value:function(e){return this.count=e,this}},{key:"needsUpdate",set:function(e){!0===e&&this.version++}}]),e}();Sh.prototype.isGLBufferAttribute=!0;var Eh=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0;Object(v.a)(this,e),this.ray=new qr(t,n),this.near=r,this.far=i,this.camera=null,this.layers=new ui,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}return Object(m.a)(e,[{key:"set",value:function(e,t){this.ray.set(e,t)}},{key:"setFromCamera",value:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}},{key:"intersectObject",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return _h(e,this,n,t),n.sort(Ch),n}},{key:"intersectObjects",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0,i=e.length;r0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(v.a)(this,e),this.radius=t,this.phi=n,this.theta=r,this}return Object(m.a)(e,[{key:"set",value:function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}},{key:"copy",value:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}},{key:"makeSafe",value:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}},{key:"setFromVector3",value:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}},{key:"setFromCartesianCoords",value:function(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Zn(t/this.radius,-1,1))),this}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),kh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(v.a)(this,e),this.radius=t,this.theta=n,this.y=r,this}return Object(m.a)(e,[{key:"set",value:function(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}},{key:"copy",value:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}},{key:"setFromVector3",value:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}},{key:"setFromCartesianCoords",value:function(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),Bh=new ar,Oh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ar(1/0,1/0),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ar(-1/0,-1/0);Object(v.a)(this,e),this.min=t,this.max=n}return Object(m.a)(e,[{key:"set",value:function(e,t){return this.min.copy(e),this.max.copy(t),this}},{key:"setFromPoints",value:function(e){this.makeEmpty();for(var t=0,n=e.length;tthis.max.x||e.ythis.max.y)}},{key:"containsBox",value:function(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}},{key:"getParameter",value:function(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))}},{key:"intersectsBox",value:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}},{key:"clampPoint",value:function(e,t){return t.copy(e).clamp(this.min,this.max)}},{key:"distanceToPoint",value:function(e){return Bh.copy(e).clamp(this.min,this.max).sub(e).length()}},{key:"intersect",value:function(e){return this.min.max(e.min),this.max.min(e.max),this}},{key:"union",value:function(e){return this.min.min(e.min),this.max.max(e.max),this}},{key:"translate",value:function(e){return this.min.add(e),this.max.add(e),this}},{key:"equals",value:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}]),e}();Oh.prototype.isBox2=!0;var Rh=new xr,Dh=new xr,Lh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr;Object(v.a)(this,e),this.start=t,this.end=n}return Object(m.a)(e,[{key:"set",value:function(e,t){return this.start.copy(e),this.end.copy(t),this}},{key:"copy",value:function(e){return this.start.copy(e.start),this.end.copy(e.end),this}},{key:"getCenter",value:function(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}},{key:"delta",value:function(e){return e.subVectors(this.end,this.start)}},{key:"distanceSq",value:function(){return this.start.distanceToSquared(this.end)}},{key:"distance",value:function(){return this.start.distanceTo(this.end)}},{key:"at",value:function(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}},{key:"closestPointToPointParameter",value:function(e,t){Rh.subVectors(e,this.start),Dh.subVectors(this.end,this.start);var n=Dh.dot(Dh),r=Dh.dot(Rh)/n;return t&&(r=Zn(r,0,1)),r}},{key:"closestPointToPoint",value:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}},{key:"applyMatrix4",value:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}},{key:"equals",value:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}]),e}(),Ph=new xr,Ih=function(e){function t(e,n){var r;Object(v.a)(this,t),(r=Object(u.a)(this,Object(c.a)(t).call(this))).light=e,r.light.updateMatrixWorld(),r.matrix=e.matrixWorld,r.matrixAutoUpdate=!1,r.color=n;for(var i=new fa,a=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],o=0,s=1;o<32;o++,s++){var l=o/32*Math.PI*2,f=s/32*Math.PI*2;a.push(Math.cos(l),Math.sin(l),1,Math.cos(f),Math.sin(f),1)}i.setAttribute("position",new na(a,3));var d=new Fu({fog:!1,toneMapped:!1});return r.cone=new Ju(i,d),r.add(r.cone),r.update(),r}return Object(f.a)(t,e),Object(m.a)(t,[{key:"dispose",value:function(){this.cone.geometry.dispose(),this.cone.material.dispose()}},{key:"update",value:function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Ph.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Ph),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}]),t}(Mi),Fh=new xr,jh=new Zr,Nh=new Zr,Uh=function(e){function t(e){var n;Object(v.a)(this,t);for(var r=function e(t){var n=[];t&&t.isBone&&n.push(t);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:10,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4473924,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8947848;Object(v.a)(this,t),i=new zi(i),a=new zi(a);for(var o=r/2,s=n/r,l=n/2,f=[],d=[],h=0,p=0,m=-l;h<=r;h++,m+=s){f.push(-l,0,m,l,0,m),f.push(m,0,-l,m,0,l);var g=h===o?i:a;g.toArray(d,p),p+=3,g.toArray(d,p),p+=3,g.toArray(d,p),p+=3,g.toArray(d,p),p+=3}var y=new fa;y.setAttribute("position",new na(f,3)),y.setAttribute("color",new na(d,3));var b=new Fu({vertexColors:!0,toneMapped:!1});return(e=Object(u.a)(this,Object(c.a)(t).call(this,y,b))).type="GridHelper",e}return Object(f.a)(t,e),t}(Ju),Qh=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4473924,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8947848;Object(v.a)(this,t),o=new zi(o),s=new zi(s);for(var l=[],f=[],d=0;d<=r;d++){var h=d/r*(2*Math.PI),p=Math.sin(h)*n,m=Math.cos(h)*n;l.push(0,0,0),l.push(p,0,m);var g=1&d?o:s;f.push(g.r,g.g,g.b),f.push(g.r,g.g,g.b)}for(var y=0;y<=i;y++)for(var b=1&y?o:s,A=n-n/i*y,x=0;x1&&void 0!==arguments[1]?arguments[1]:16776960;Object(v.a)(this,t);var i=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]),a=new Float32Array(24),o=new fa;return o.setIndex(new Qi(i,1)),o.setAttribute("position",new Qi(a,3)),(n=Object(u.a)(this,Object(c.a)(t).call(this,o,new Fu({color:r,toneMapped:!1})))).object=e,n.type="BoxHelper",n.matrixAutoUpdate=!1,n.update(),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"update",value:function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&ip.setFromObject(this.object),!ip.isEmpty()){var t=ip.min,n=ip.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}}},{key:"setFromObject",value:function(e){return this.object=e,this.update(),this}},{key:"copy",value:function(e){return Ju.prototype.copy.call(this,e),this.object=e.object,this}}]),t}(Ju),op=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16776960;Object(v.a)(this,t);var i=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]),a=new fa;return a.setIndex(new Qi(i,1)),a.setAttribute("position",new na([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),(n=Object(u.a)(this,Object(c.a)(t).call(this,a,new Fu({color:r,toneMapped:!1})))).box=e,n.type="Box3Helper",n.geometry.computeBoundingSphere(),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"updateMatrixWorld",value:function(e){var n=this.box;n.isEmpty()||(n.getCenter(this.position),n.getSize(this.scale),this.scale.multiplyScalar(.5),Object(s.a)(Object(c.a)(t.prototype),"updateMatrixWorld",this).call(this,e))}}]),t}(Ju),sp=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16776960;Object(v.a)(this,t);var a=i,o=new fa;o.setAttribute("position",new na([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,0,1,0,0,0],3)),o.computeBoundingSphere(),(n=Object(u.a)(this,Object(c.a)(t).call(this,o,new Fu({color:a,toneMapped:!1})))).type="PlaneHelper",n.plane=e,n.size=r;var s=new fa;return s.setAttribute("position",new na([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),s.computeBoundingSphere(),n.add(new ka(s,new Vi({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1}))),n}return Object(f.a)(t,e),Object(m.a)(t,[{key:"updateMatrixWorld",value:function(e){var n=-this.plane.constant;Math.abs(n)<1e-8&&(n=1e-8),this.scale.set(.5*this.size,.5*this.size,n),this.children[0].material.side=n<0?O:B,this.lookAt(this.plane.normal),Object(s.a)(Object(c.a)(t.prototype),"updateMatrixWorld",this).call(this,e)}}]),t}(zu),lp=new xr,up=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xr(0,0,1),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xr(0,0,0),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:16776960,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.2*i,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:.2*o;return Object(v.a)(this,t),(e=Object(u.a)(this,Object(c.a)(t).call(this))).type="ArrowHelper",void 0===np&&((np=new fa).setAttribute("position",new na([0,0,0,0,1,0],3)),(rp=new oc(0,.5,1,5,1)).translate(0,-.5,0)),e.position.copy(r),e.line=new zu(np,new Fu({color:a,toneMapped:!1})),e.line.matrixAutoUpdate=!1,e.add(e.line),e.cone=new ka(rp,new Vi({color:a,toneMapped:!1})),e.cone.matrixAutoUpdate=!1,e.add(e.cone),e.setDirection(n),e.setLength(i,o,s),e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"setDirection",value:function(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{lp.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(lp,t)}}},{key:"setLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2*e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.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()}},{key:"setColor",value:function(e){this.line.material.color.set(e),this.cone.material.color.set(e)}},{key:"copy",value:function(e){return Object(s.a)(Object(c.a)(t.prototype),"copy",this).call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}}]),t}(Mi),cp=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;Object(v.a)(this,t);var r=[0,0,0,n,0,0,0,0,0,0,n,0,0,0,0,0,0,n],i=new fa;i.setAttribute("position",new na(r,3)),i.setAttribute("color",new na([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var a=new Fu({vertexColors:!0,toneMapped:!1});return(e=Object(u.a)(this,Object(c.a)(t).call(this,i,a))).type="AxesHelper",e}return Object(f.a)(t,e),Object(m.a)(t,[{key:"setColors",value:function(e,t,n){var r=new zi,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}},{key:"dispose",value:function(){this.geometry.dispose(),this.material.dispose()}}]),t}(Ju),fp=function(){function e(){Object(v.a)(this,e),this.type="ShapePath",this.color=new zi,this.subPaths=[],this.currentPath=null}return Object(m.a)(e,[{key:"moveTo",value:function(e,t){return this.currentPath=new Ic,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}},{key:"lineTo",value:function(e,t){return this.currentPath.lineTo(e,t),this}},{key:"quadraticCurveTo",value:function(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}},{key:"bezierCurveTo",value:function(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}},{key:"splineThru",value:function(e){return this.currentPath.splineThru(e),this}},{key:"toShapes",value:function(e,t){function n(e){for(var t=[],n=0,r=e.length;nNumber.EPSILON){if(u<0&&(o=t[a],l=-l,s=t[i],u=-u),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var c=u*(e.x-o.x)-l*(e.y-o.y);if(0===c)return!0;if(c<0)continue;r=!r}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return r}var i,a,o,s=cf.isClockWise,l=this.subPaths;if(0===l.length)return[];if(!0===t)return n(l);var u=[];if(1===l.length)return a=l[0],(o=new Fc).curves=a.curves,u.push(o),u;var c=!s(l[0].getPoints());c=e?!c:c;var f,d,h=[],p=[],v=[],m=0;p[m]=void 0,v[m]=[];for(var g=0,y=l.length;g1){for(var b=!1,A=[],x=0,w=p.length;x0&&(b||(v=h))}for(var B=0,O=p.length;B65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),e=65504),dp[0]=e;var t=hp[0],n=t>>16&32768,r=t>>12&2047,i=t>>23&255;return i<103?n:i>142?(n|=31744,n|=(255==i?0:1)&&8388607&t):i<113?n|=((r|=2048)>>114-i)+(r>>113-i&1):(n|=i-112<<10|r>>1,n+=1&r)}}]),e}(),vp=0,mp=1,gp=0,yp=1,bp=2;function Ap(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function xp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}function wp(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $u(e,t)}function Mp(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new vu(e)}function Sp(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $u(e,t)}function Ep(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Yu(e)}function Cp(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Yu(e)}function _p(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Yu(e)}function Tp(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new xr(e,t,n)}function kp(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Qi(e,t).setUsage(Pn)}function Bp(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Yi(e,t)}function Op(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Xi(e,t)}function Rp(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Ki(e,t)}function Dp(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new qi(e,t)}function Lp(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Zi(e,t)}function Pp(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new $i(e,t)}function Ip(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new ea(e,t)}function Fp(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new na(e,t)}function jp(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ra(e,t)}function Np(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cp(e)}function Up(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new ap(e,t)}function Hp(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ju(new pc(e.geometry),new Fu({color:void 0!==t?t:16777215}))}function Gp(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ju(new Ef(e.geometry),new Fu({color:void 0!==t?t:16777215}))}function zp(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new id(e)}function Vp(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ud(e)}function Wp(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Va(e,n)}function Jp(){console.error("THREE.CanvasRenderer has been removed")}function Qp(){console.error("THREE.JSONLoader has been removed.")}vc.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(vc.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Ic.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},Jh.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Uh.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},nd.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Od.extractUrlBase(e)},nd.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Oh.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},Oh.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Oh.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Oh.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},Sr.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Sr.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Sr.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Sr.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},Sr.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},zr.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},qa.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Lh.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},or.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},or.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},or.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},or.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},or.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},or.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Zr.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},Zr.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},Zr.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new xr).setFromMatrixColumn(this,3)},Zr.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},Zr.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},Zr.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Zr.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Zr.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},Zr.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},Zr.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Zr.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},Zr.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},Zr.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},Zr.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},Zr.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},Zr.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Zr.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},Zr.prototype.makeFrustum=function(e,t,n,r,i,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,a)},Zr.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Ya.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Ar.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Ar.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},qr.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},qr.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},qr.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},Li.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Li.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},Li.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},Li.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},Li.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},Li.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Li.getBarycoord(e,t,n,r,i)},Li.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Li.getNormal(e,t,n,r)},Fc.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},Fc.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new hf(this,e)},Fc.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new bf(this,e)},ar.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},ar.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},ar.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},xr.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},xr.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},xr.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},xr.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},xr.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},xr.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},xr.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},xr.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},xr.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},mr.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},mr.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Mi.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},Mi.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Mi.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},Mi.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Mi.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Mi.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),ka.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(ka.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),un},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Eu.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Na.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(fd.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(Qi.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Pn},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Pn)}}}),Qi.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Pn:Ln),this},Qi.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Qi.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},fa.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},fa.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new Qi(arguments[1],arguments[2])))},fa.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},fa.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},fa.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},fa.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},fa.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(fa.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Zl.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Pn:Ln),this},Zl.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},hf.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},hf.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},hf.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},ql.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},wh.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Ii.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new zi}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===D}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(Fa.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Ql.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},Ql.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},Ql.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},Ql.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},Ql.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},Ql.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},Ql.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},Ql.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},Ql.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},Ql.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},Ql.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},Ql.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},Ql.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},Ql.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},Ql.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},Ql.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},Ql.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},Ql.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},Ql.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},Ql.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},Ql.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},Ql.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},Ql.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},Ql.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},Ql.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(Ql.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?hn:dn}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}}),Object.defineProperties(Il.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(gr.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),th.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new Hd).load(e,function(e){t.setBuffer(e)}),this},sh.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ga.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Ga.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},dr.crossOrigin=void 0,dr.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new cd;i.setCrossOrigin(this.crossOrigin);var a=i.load(e,n,void 0,r);return t&&(a.mapping=t),a},dr.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new ld;i.setCrossOrigin(this.crossOrigin);var a=i.load(e,n,void 0,r);return t&&(a.mapping=t),a},dr.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},dr.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};var Yp={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function Xp(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function Kp(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new fa}function qp(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new fa}function Zp(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function $p(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function ev(){console.error("THREE.ImmediateRenderObject has been removed.")}"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:b}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=b)},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=C(t);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(E()(n,s.args)){if(a)return;if(s.error)throw s.error;if(s.response)return s.response;throw s.promise}}}catch(u){o.e(u)}finally{o.f()}var l={args:n,promise:e.apply(void 0,Object(v.a)(n)).then(function(e){return l.response=null==e||e}).catch(function(e){return l.error=null!=e?e:"unknown error"}).then(function(){i>0&&setTimeout(function(){var e=t.indexOf(l);-1!==e&&t.splice(e,1)},i)})};if(t.push(l),!a)throw l.promise}function B(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:o().camera,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o().size,r=n.width,i=n.height,a=r/i;t instanceof g.Vector3?R.copy(t):R.set.apply(R,Object(v.a)(t));var s=e.getWorldPosition(S).distanceTo(R);if(q(e))return{width:r/e.zoom,height:i/e.zoom,factor:1,distance:s,aspect:a};var l=e.fov*Math.PI/180,u=2*Math.tan(l/2)*s,c=u*(r/i);return{width:c,height:u,factor:r/c,distance:s,aspect:a}}var L=void 0,P=function(e){return a(function(t){return{performance:Object(m.a)({},t.performance,{current:e})}})};return{gl:i,set:a,get:o,invalidate:function(){return t(o())},advance:function(e,t){return n(e,t,o())},linear:u,flat:f,scene:K(new g.Scene),camera:A,controls:null,raycaster:s,clock:T,mouse:new g.Vector2,vr:h,frameloop:M,onPointerMissed:O,performance:Object(m.a)({current:1,min:.5,max:1,debounce:200},C,{regress:function(){var e=o();L&&clearTimeout(L),e.performance.current!==e.performance.min&&P(e.performance.min),L=setTimeout(function(){return P(o().performance.max)},e.performance.debounce)}}),size:{width:0,height:0},viewport:{initialDpr:w,dpr:w,width:0,height:0,aspect:0,distance:0,factor:0,getCurrentViewport:D},setSize:function(e,t){var n={width:e,height:t};a(function(e){return{size:n,viewport:Object(m.a)({},e.viewport,D(A,_,n))}})},setDpr:function(e){return a(function(t){return{viewport:Object(m.a)({},t.viewport,{dpr:Z(e)})}})},setFrameloop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"always";return a(function(){return{frameloop:e}})},events:{connected:!1},internal:{active:!1,priority:0,frames:0,lastProps:r,lastEvent:y.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return a(function(n){var r=n.internal;return{internal:Object(m.a)({},r,{priority:r.priority+(t>0?1:0),subscribers:[].concat(Object(v.a)(r.subscribers),[{ref:e,priority:t}]).sort(function(e,t){return e.priority-t.priority})})}}),function(){a(function(n){var r=n.internal;return{internal:Object(m.a)({},r,{priority:r.priority-(t>0?1:0),subscribers:r.subscribers.filter(function(t){return t.ref!==e})})}})}}}}}),D=R.getState(),L=D.size,P=D.viewport.dpr;return R.subscribe(function(){var e=R.getState(),t=e.camera,n=e.size,r=e.viewport,a=e.internal;n===L&&r.dpr===P||(t.manual||a.lastProps.camera instanceof g.Camera||(q(t)?(t.left=n.width/-2,t.right=n.width/2,t.top=n.height/2,t.bottom=n.height/-2):t.aspect=n.width/n.height,t.updateProjectionMatrix(),t.updateMatrixWorld()),i.setPixelRatio(r.dpr),i.setSize(n.width,n.height),L=n,P=r.dpr)}),a&&D.setSize(a.width,a.height),R.subscribe(function(e){return t(e)}),R};var ne=[],re=[],ie=[];function ae(e,t){for($=0;$0&&A>0&&function(e,t){var n,r,i,a,o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=s.gl,u=s.size,c=s.mode,f=void 0===c?be[1]:c,d=s.events,h=s.onCreated,v=Object(p.a)(s,["gl","size","mode","events","onCreated"]);u||(u={width:null!=(r=null==(i=t.parentElement)?void 0:i.clientWidth)?r:0,height:null!=(a=null==(o=t.parentElement)?void 0:o.clientHeight)?a:0});var g=ye.get(t),b=null==g?void 0:g.fiber,A=null==g?void 0:g.store,x=null==(n=A)?void 0:n.getState();if(b&&x){void 0===v.dpr||U.equ(x.viewport.dpr,Z(v.dpr))||x.setDpr(v.dpr),x.size.width===u.width&&x.size.height===u.height||x.setSize(u.width,u.height),x.frameloop!==v.frameloop&&x.setFrameloop(v.frameloop);var w=v.linear!==x.internal.lastProps.linear;w&&(Te(t),b=void 0)}if(!b){var M=Ce(l,t);v.vr&&(M.xr.enabled=!0,M.setAnimationLoop(function(e){return we(e,!0)}));var S=(A=te(Ee,xe,we,Object(m.a)({gl:M,size:u},v))).getState();b=Se.createContainer(A,be.indexOf(f),!1,null),ye.set(t,{fiber:b,store:A}),d&&S.set({events:d(A)})}if(A&&b)return Se.updateContainer(y.createElement(_e,{store:A,element:e,onCreated:h,target:t}),b,null,function(){}),A;throw"Error creating root!"}(y.createElement(ce,{set:k},y.createElement(y.Suspense,{fallback:y.createElement(ue,{set:E})},n)),x.current,Object(m.a)({},c,{size:{width:b,height:A},events:u||se}))},[b,A,n]),le(function(){var e=x.current;return function(){return Te(e)}},[]),y.createElement("div",{ref:v,id:o,className:l,tabIndex:i,style:Object(m.a)({position:"relative",width:"100%",height:"100%",overflow:"hidden"},s)},y.createElement("canvas",{ref:R([x,t]),style:{display:"block"}},r))});function de(){var e=y.useContext(ee);if(!e)throw"R3F hooks can only be used within the Canvas component!";return e}function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e},t=arguments.length>1?arguments[1]:void 0;return de()(e,t)}function pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=de().getState().internal.subscribe,r=y.useRef(e);return y.useLayoutEffect(function(){r.current=e},[e]),y.useLayoutEffect(function(){return n(r,t)},[t,n]),null}function ve(e){var t={nodes:{},materials:{}};return e&&e.traverse(function(e){e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)}),t}function me(e,t){return function(n){var r=new n;e&&e(r);for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o0)&&(t+=oe(i,n))}),ae(re,i),t>0)return requestAnimationFrame(r);ae(ie,i),n=!1}return{loop:r,invalidate:function t(i){if(!i)return e.forEach(function(e){return t(e.store.getState())});!i.vr&&i.internal.active&&"never"!==i.frameloop&&(i.internal.frames=Math.min(60,i.internal.frames+1),n||(n=!0,requestAnimationFrame(r)))},advance:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0;n&&ae(ne,t),r?oe(t,r):e.forEach(function(e){return oe(t,e.store.getState())}),n&&ae(re,t)}}}(ye),xe=Ae.invalidate,we=Ae.advance,Me=function(e){function t(e,t){t.children,t.key,t.ref;var n,r=Object(p.a)(t,["children","key","ref"]),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(i.children,i.key,i.ref,Object(p.a)(i,["children","key","ref"])),o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=null!=(n=null==e?void 0:e.__r3f)?n:{},l=Object.entries(r),u=[];if(o)for(var c=Object.keys(a),f=0;f-1&&p.internal.interaction.splice(x,1),l.eventCount&&p.internal.interaction.push(e)}return b.length&&null!=(s=e.__r3f)&&s.parent&&i(e),e}function r(e){var t,n,r=null==(t=e.__r3f)?void 0:null==(n=t.root)?void 0:null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function i(e){null==e.onUpdate||e.onUpdate(e)}function a(e,t,r,i,a){var o,s=t.args,l=void 0===s?[]:s,c=Object(p.a)(t,["args"]),f="".concat(e[0].toUpperCase()).concat(e.slice(1));if(!W(r)&&a&&(r=function e(t){return t.return?e(t.return):t.stateNode&&t.stateNode.containerInfo}(a)),!r||!W(r))throw"No valid root for ".concat(f,"!");if("primitive"===e){if(void 0===c.object)throw"Primitives without 'object' are invalid!";o=K(c.object,{root:r,primitive:!0})}else{var d=X[f]||g[f];if(!d)throw"".concat(f," is not part of the THREE namespace! Did you forget to extend? See: https://github.com/pmndrs/react-three-fiber/blob/master/markdown/api.md#using-3rd-party-objects-declaratively");if(!Array.isArray(l))throw"The args prop must be an array!";o=K(Object(u.a)(d,Object(v.a)(l)),{root:r,memoizedProps:{args:0===l.length?null:l}})}return"attachFns"in c||(f.endsWith("Geometry")?c=Object(m.a)({attach:"geometry"},c):f.endsWith("Material")&&(c=Object(m.a)({attach:"material"},c))),n(o,c),o}function o(e,t){var n=!1;if(t){if(t.attachArray)U.arr(e[t.attachArray])||(e[t.attachArray]=[]),e[t.attachArray].push(t);else if(t.attachObject)U.obj(e[t.attachObject[0]])||(e[t.attachObject[0]]={}),e[t.attachObject[0]][t.attachObject[1]]=t;else if(t.attach&&!U.fun(t.attach))e[t.attach]=t;else if(U.arr(t.attachFns)){var a=Object(h.a)(t.attachFns,1)[0];U.str(a)&&U.fun(e[a])?e[a](t):U.fun(a)&&a(t,e)}else t.isObject3D&&e.isObject3D&&(e.add(t),n=!0);n||e.__r3f.objects.push(t),t.__r3f||K(t,{}),t.__r3f.parent=e,i(t),r(t)}}function s(e,t,n){var a=!1;if(t){if(t.attachArray){var s=e[t.attachArray];U.arr(s)||(e[t.attachArray]=[]),s.splice(s.indexOf(n),0,t)}else{if(t.attachObject||t.attach&&!U.fun(t.attach))return o(e,t);if(t.isObject3D&&e.isObject3D){t.parent=e,t.dispatchEvent({type:"added"});var l=e.children.filter(function(e){return e!==t}),u=l.indexOf(n);e.children=[].concat(Object(v.a)(l.slice(0,u)),[t],Object(v.a)(l.slice(u))),a=!0}}a||e.__r3f.objects.push(t),t.__r3f||K(t,{}),t.__r3f.parent=e,i(t),r(t)}}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e&&Object(v.a)(e).forEach(function(e){return y(t,e,n)})}function y(e,t,n){if(t){var i,a;if(t.__r3f&&(t.__r3f.parent=null),null!=(i=e.__r3f)&&i.objects&&(e.__r3f.objects=e.__r3f.objects.filter(function(e){return e!==t})),t.attachArray)e[t.attachArray]=e[t.attachArray].filter(function(e){return e!==t});else if(t.attachObject)delete e[t.attachObject[0]][t.attachObject[1]];else if(t.attach&&!U.fun(t.attach)&&e[t.attach]===t)e[t.attach]=null;else if(U.arr(t.attachFns)){var o=Object(h.a)(t.attachFns,2)[1];U.str(o)&&U.fun(e[o])?e[o](t):U.fun(o)&&o(t,e)}else if(t.isObject3D&&e.isObject3D){var s;e.remove(t),null!=(s=t.__r3f)&&s.root&&(d=t.__r3f.root,p=t,(v=d.getState().internal).interaction=v.interaction.filter(function(e){return e!==p}),v.initialHits=v.initialHits.filter(function(e){return e!==p}),v.hovered.forEach(function(e,t){e.eventObject!==p&&e.object!==p||v.hovered.delete(t)}),v.capturedMap.forEach(function(e,t){G(v.capturedMap,p,e,t)}))}var u,c=null==(a=t.__r3f)?void 0:a.primitive,f=void 0===n?null!==t.dispose&&!c:n;c||(l(null==(u=t.__r3f)?void 0:u.objects,t,f),l(t.children,t,f)),t.__r3f&&(delete t.__r3f.root,delete t.__r3f.objects,delete t.__r3f.handlers,delete t.__r3f.memoizedProps,c||delete t.__r3f),f&&t.dispose&&"Scene"!==t.type&&Object(M.unstable_runWithPriority)(M.unstable_IdlePriority,function(){try{t.dispose()}catch(e){}}),r(e)}var d,p,v}return{reconciler:w()({now:M.unstable_now,createInstance:a,removeChild:y,appendChild:o,appendInitialChild:o,insertBefore:s,warnsIfNotActing:!0,supportsMutation:!0,isPrimaryRenderer:!1,scheduleTimeout:U.fun(setTimeout)?setTimeout:void 0,cancelTimeout:U.fun(clearTimeout)?clearTimeout:void 0,setTimeout:U.fun(setTimeout)?setTimeout:void 0,clearTimeout:U.fun(clearTimeout)?clearTimeout:void 0,noTimeout:-1,appendChildToContainer:function(e,t){var n=J(e,t),r=n.container,i=n.root;r.__r3f.root=i,o(r,t)},removeChildFromContainer:function(e,t){return y(J(e,t).container,t)},insertInContainerBefore:function(e,t,n){return s(J(e,t).container,t,n)},prepareUpdate:function(e,n,r,i){if(e.__r3f.primitive&&i.object&&i.object!==e)return[!0];var a=i.args,s=void 0===a?[]:a,l=(i.children,Object(p.a)(i,["args","children"])),u=r.args,c=void 0===u?[]:u,f=(r.children,Object(p.a)(r,["args","children"]));if(!Array.isArray(s))throw"The args prop must be an array!";if(s.some(function(e,t){return e!==c[t]}))return[!0];var d=t(e,l,f,!0);if(d.changes.length)return[!1,d];if(e.attach&&"function"!==typeof e.attach){var h=e.__r3f.parent;h&&h[e.attach]!==e&&o(h,e)}return null},commitUpdate:function(e,t,r,i,s,l){var u=Object(h.a)(t,2),c=u[0],f=u[1];c?function(e,t,n,r){var i,s=null==(i=e.__r3f)?void 0:i.parent;if(s){var l=a(t,n,e.__r3f.root);"primitive"!==t&&e.children&&(e.children.forEach(function(e){return o(l,e)}),e.children=[]),e.__r3f.objects.forEach(function(e){return o(l,e)}),e.__r3f.objects=[],y(s,e),o(s,l),l.raycast&&l.__r3f.eventCount&&l.__r3f.root.getState().internal.interaction.push(l),[r,r.alternate].forEach(function(e){null!==e&&(e.stateNode=l,e.ref&&("function"===typeof e.ref?e.ref(l):e.ref.current=l))})}}(e,r,s,l):n(e,f)},hideInstance:function(e){e.isObject3D&&(e.visible=!1,r(e))},unhideInstance:function(e,t){(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0,r(e))},hideTextInstance:function(){throw new Error("Text is not allowed in the R3F tree.")},getPublicInstance:function(e){return e},getRootHostContext:function(e){return Y},getChildHostContext:function(e){return e},createTextInstance:function(){},finalizeInitialChildren:function(e){var t;return!!(null!=(t=null==e?void 0:e.__r3f)?t:{}).handlers},commitMount:function(e){var t,n=null!=(t=null==e?void 0:e.__r3f)?t:{};e.raycast&&n.handlers&&n.eventCount&&e.__r3f.root.getState().internal.interaction.push(e)},shouldDeprioritizeSubtree:function(){return!1},prepareForCommit:function(){return null},preparePortalMount:function(e){K(e)},resetAfterCommit:function(){},shouldSetTextContent:function(){return!1},clearContainer:function(){return!1}}),applyProps:n}}(),Se=Me.reconciler,Ee=Me.applyProps,Ce=function(e,t){var n,r="function"===typeof e?e(t):e;if(null!=(n=r)&&n.render)return r;var i=new g.WebGLRenderer(Object(m.a)({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0},e));return i.outputEncoding=g.sRGBEncoding,i.toneMapping=g.ACESFilmicToneMapping,e&&Ee(i,e),i};function _e(e){var t=e.store,n=e.element,r=e.onCreated,i=e.target;return y.useEffect(function(){var e=t.getState();e.set(function(e){return{internal:Object(m.a)({},e.internal,{active:!0})}}),null==e.events.connect||e.events.connect(i),r&&r(e)},[]),y.createElement(ee.Provider,{value:t},n)}function Te(e,t){var n=ye.get(e),r=null==n?void 0:n.fiber;if(r){var i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),Se.updateContainer(null,r,null,function(){i&&setTimeout(function(){var n,r,a;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),function(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(var t in e){var n,r;null==(n=(r=t).dispose)||n.call(r),delete e[t]}}(i),ye.delete(e),t&&t(e)},500)})}}Se.act;Se.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:"17.0.2"})},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(12);function i(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",function(){return r})},function(e,t,n){e.exports=n(55)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(17);function i(e,t,n){return(i=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&Object(r.a)(a,n.prototype),a}).apply(null,arguments)}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(16),i=n(13),a=(n(11),n(9)),o=n(14),s=n(42),l=n(7),u=n(1),c=n(27),f=n(12);function d(e,t,n,r){return(d="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(e,t,n,r){var i,a=Object(c.a)(e,t);if(a){if((i=Object.getOwnPropertyDescriptor(a,t)).set)return i.set.call(r,n),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(r,t)){if(!i.writable)return!1;i.value=n,Object.defineProperty(r,t,i)}else Object(f.a)(r,t,n);return!0})(e,t,n,r)}var h=n(8),p=n(5),v=n(6),m=n(2),g=n(3),y=n(0);function b(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\nuniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));\n#if __VERSION__ < 300\nfloat l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#else\nfloat l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#endif\nl0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)? vec4(1.0): packFloatToRGBA(adaptedLum);}",M="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",S=function(e){function t(){var e;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,{name:"AdaptiveLuminanceMaterial",defines:{MIP_LEVEL_1X1:"0.0"},uniforms:{luminanceBuffer0:new y.Uniform(null),luminanceBuffer1:new y.Uniform(null),minLuminance:new y.Uniform(.01),deltaTime:new y.Uniform(0),tau:new y.Uniform(1)},extensions:{shaderTextureLOD:!0},blending:y.NoBlending,depthWrite:!1,depthTest:!1,fragmentShader:w,vertexShader:M}))).toneMapped=!1,e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"setLuminanceBuffer0",value:function(e){this.uniforms.luminanceBuffer0.value=e}},{key:"setLuminanceBuffer1",value:function(e){this.uniforms.luminanceBuffer1.value=e}},{key:"setMipLevel1x1",value:function(e){this.defines.MIP_LEVEL_1X1=e.toFixed(1),this.needsUpdate=!0}},{key:"setDeltaTime",value:function(e){this.uniforms.deltaTime.value=e}},{key:"getMinLuminance",value:function(){return this.uniforms.minLuminance.value}},{key:"setMinLuminance",value:function(e){this.uniforms.minLuminance.value=e}},{key:"getAdaptationRate",value:function(){return this.uniforms.tau.value}},{key:"setAdaptationRate",value:function(e){this.uniforms.tau.value=e}}]),t}(y.ShaderMaterial),E="#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;\n#if PASS == 1\nuniform vec4 kernel64[32];\n#else\nuniform vec4 kernel16[8];\n#endif\nvarying vec2 vUv;void main(){\n#ifdef FOREGROUND\nvec2 CoCNearFar=texture2D(cocBuffer,vUv).rg;float CoC=CoCNearFar.r*scale;\n#else\nfloat CoC=texture2D(cocBuffer,vUv).g*scale;\n#endif\nif(CoC==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{\n#ifdef FOREGROUND\nvec2 step=texelSize*max(CoC,CoCNearFar.g*scale);\n#else\nvec2 step=texelSize*CoC;\n#endif\n#if PASS == 1\nvec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0;\n#else\nvec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue;\n#endif\n}}",C=(y.ShaderMaterial,"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float focusDistance;uniform float focalLength;uniform float cameraNear;uniform float cameraFar;varying vec2 vUv;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}void main(){float depth=readDepth(vUv);\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);\n#else\nfloat linearDepth=depth;\n#endif\nfloat signedDistance=linearDepth-focusDistance;float magnitude=smoothstep(0.0,focalLength,abs(signedDistance));gl_FragColor.rg=vec2(step(signedDistance,0.0)*magnitude,step(0.0,signedDistance)*magnitude);}"),_=(y.ShaderMaterial,"#include \n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include \n#include \n}"),T="uniform vec2 texelSize;uniform vec2 halfTexelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize*vec2(kernel)+halfTexelSize)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",k=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new y.Vector2;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,{name:"KawaseBlurMaterial",uniforms:{inputBuffer:new y.Uniform(null),texelSize:new y.Uniform(new y.Vector2),halfTexelSize:new y.Uniform(new y.Vector2),kernel:new y.Uniform(0),scale:new y.Uniform(1)},blending:y.NoBlending,depthWrite:!1,depthTest:!1,fragmentShader:_,vertexShader:T}))).toneMapped=!1,e.setTexelSize(n.x,n.y),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"setInputBuffer",value:function(e){this.uniforms.inputBuffer.value=e}},{key:"getScale",value:function(){return this.uniforms.scale.value}},{key:"setScale",value:function(e){this.uniforms.scale.value=e}},{key:"getKernel",value:function(){return null}},{key:"setKernel",value:function(e){this.uniforms.kernel.value=e}},{key:"setTexelSize",value:function(e,t){this.uniforms.texelSize.value.set(e,t),this.uniforms.halfTexelSize.value.set(e,t).multiplyScalar(.5)}},{key:"setSize",value:function(e,t){var n=this.uniforms;n.texelSize.value.set(1/e,1/t),n.halfTexelSize.value.copy(n.texelSize.value).multiplyScalar(.5)}}]),t}(y.ShaderMaterial),B="#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel;\n#include \n}",O=function(e){function t(){var e;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,{name:"CopyMaterial",uniforms:{inputBuffer:new y.Uniform(null),opacity:new y.Uniform(1)},blending:y.NoBlending,depthWrite:!1,depthTest:!1,fragmentShader:B,vertexShader:M}))).toneMapped=!1,e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"setInputBuffer",value:function(e){this.uniforms.inputBuffer.value=e}},{key:"getOpacity",value:function(e){return this.uniforms.opacity.value}},{key:"setOpacity",value:function(e){this.uniforms.opacity.value=e}}]),t}(y.ShaderMaterial),R="#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float cameraNear;uniform float cameraFar;varying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include \nvec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998);\n#if DEPTH_PACKING == 3201\nfloat fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));\n#else\nfloat fragCoordZ=texture2D(depthBuffer,projTexCoord).r;\n#endif\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#else\nfloat viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#endif\nfloat depthTest=(-vViewZ>-viewZ)? 1.0 : 0.0;gl_FragColor.rg=vec2(0.0,depthTest);}",D="#include \n#include \n#include \n#include \nvarying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include \n#include \n#include \n#include \n#include \nvViewZ=mvPosition.z;vProjTexCoord=gl_Position;\n#include \n}",L=(y.ShaderMaterial,"#include \n#if INPUT_DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#else\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\n#endif\nvarying vec2 vUv;void main(){\n#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING\ngl_FragColor=texture2D(depthBuffer,vUv);\n#else\n#if INPUT_DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,vUv));gl_FragColor=vec4(vec3(depth),1.0);\n#else\nfloat depth=texture2D(depthBuffer,vUv).r;gl_FragColor=(depth==1.0)? vec4(1.0): packDepthToRGBA(depth);\n#endif\n#endif\n}"),P="varying vec2 vUv;\n#if DEPTH_COPY_MODE == 1\nuniform vec2 texelPosition;\n#endif\nvoid main(){\n#if DEPTH_COPY_MODE == 1\nvUv=texelPosition;\n#else\nvUv=position.xy*0.5+0.5;\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}",I={FULL:0,SINGLE:1},F=(y.ShaderMaterial,"#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\n#ifdef DOWNSAMPLE_NORMALS\nuniform lowp sampler2D normalBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])/4.0;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]\n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1;\n#else\nuniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1;\n#endif\nuniform sampler2D inputBuffer;varying vec2 vUv;void main(){vec2 depth;\n#if DEPTH_PACKING_0 == 3201\ndepth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv));\n#else\ndepth.x=texture2D(depthBuffer0,vUv).r;\n#endif\n#if DEPTH_PACKING_1 == 3201\ndepth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv));\n#else\ndepth.y=texture2D(depthBuffer1,vUv).r;\n#endif\ndepth=clamp(depth,0.0,1.0);\n#if DEPTH_TEST_STRATEGY == 0\nbool keep=depthTest(depth.x,depth.y);\n#elif DEPTH_TEST_STRATEGY == 1\nbool keep=(depth.x==1.0)||depthTest(depth.x,depth.y);\n#else\nbool keep=(depth.x!=1.0)&&depthTest(depth.x,depth.y);\n#endif\nif(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}"),U={DEFAULT:0,KEEP_MAX_DEPTH:1,DISCARD_MAX_DEPTH:2},H=(y.ShaderMaterial,"varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\n#if EDGE_DETECTION_MODE == 1\n#include \n#endif\n#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}\n#elif PREDICATION_MODE == 2\nuniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}\n#endif\n#if PREDICATION_MODE != 0\nvec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}\n#endif\n#if EDGE_DETECTION_MODE != 0\nuniform sampler2D inputBuffer;\n#endif\nvoid main(){\n#if EDGE_DETECTION_MODE == 0\nconst vec2 threshold=vec2(DEPTH_THRESHOLD);\n#elif PREDICATION_MODE != 0\nvec2 threshold=calculatePredicatedThreshold();\n#else\nconst vec2 threshold=vec2(EDGE_THRESHOLD);\n#endif\n#if EDGE_DETECTION_MODE == 0\nvec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 1\nfloat l=linearToRelativeLuminance(texture2D(inputBuffer,vUv).rgb);float lLeft=linearToRelativeLuminance(texture2D(inputBuffer,vUv0).rgb);float lTop=linearToRelativeLuminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=linearToRelativeLuminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=linearToRelativeLuminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=linearToRelativeLuminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=linearToRelativeLuminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 2\nvec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#endif\n}"),G="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\nvoid main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);\n#if EDGE_DETECTION_MODE != 0\nvUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}",z={DEPTH:0,LUMA:1,COLOR:2},V=(y.ShaderMaterial,{FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"}),W=function(e){function t(e,n,r,i){var a,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return Object(m.a)(this,t),(a=Object(p.a)(this,Object(u.a)(t).call(this,{name:"EffectMaterial",defines:{THREE_REVISION:y.REVISION.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new y.Uniform(null),depthBuffer:new y.Uniform(null),resolution:new y.Uniform(new y.Vector2),texelSize:new y.Uniform(new y.Vector2),cameraNear:new y.Uniform(.3),cameraFar:new y.Uniform(1e3),aspect:new y.Uniform(1),time:new y.Uniform(0)},blending:y.NoBlending,depthWrite:!1,depthTest:!1,dithering:o}))).toneMapped=!1,e&&a.setShaderParts(e),n&&a.setDefines(n),r&&a.setUniforms(r),a.adoptCameraSettings(i),a}return Object(v.a)(t,e),Object(g.a)(t,[{key:"setInputBuffer",value:function(e){this.uniforms.inputBuffer.value=e}},{key:"setDepthBuffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.BasicDepthPacking;this.uniforms.depthBuffer.value=e,this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}},{key:"setShaderParts",value:function(e){return this.fragmentShader="#include \n#include \n#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;\n#if THREE_REVISION >= 137\nvec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}FRAGMENT_HEADvoid main(){FRAGMENT_MAIN_UVvec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGEgl_FragColor=color0;\n#ifdef ENCODE_OUTPUT\n#include \n#endif\n#include \n}".replace(V.FRAGMENT_HEAD,e.get(V.FRAGMENT_HEAD)).replace(V.FRAGMENT_MAIN_UV,e.get(V.FRAGMENT_MAIN_UV)).replace(V.FRAGMENT_MAIN_IMAGE,e.get(V.FRAGMENT_MAIN_IMAGE)),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEADvoid main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORTgl_Position=vec4(position.xy,1.0,1.0);}".replace(V.VERTEX_HEAD,e.get(V.VERTEX_HEAD)).replace(V.VERTEX_MAIN_SUPPORT,e.get(V.VERTEX_MAIN_SUPPORT)),this.needsUpdate=!0,this}},{key:"setDefines",value:function(e){var t,n=b(e.entries());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.defines[r[0]]=r[1]}}catch(i){n.e(i)}finally{n.f()}return this.needsUpdate=!0,this}},{key:"setUniforms",value:function(e){var t,n=b(e.entries());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.uniforms[r[0]]=r[1]}}catch(i){n.e(i)}finally{n.f()}return this}},{key:"setExtensions",value:function(e){this.extensions={};var t,n=b(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.extensions[r]=!0}}catch(i){n.e(i)}finally{n.f()}return this}},{key:"isOutputEncodingEnabled",value:function(e){return void 0!==this.defines.ENCODE_OUTPUT}},{key:"setOutputEncodingEnabled",value:function(e){this.isOutputEncodingEnabled()!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}},{key:"setDeltaTime",value:function(e){this.uniforms.time.value+=e}},{key:"adoptCameraSettings",value:function(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof y.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},{key:"setSize",value:function(e,t){var n=this.uniforms;n.resolution.value.set(e,t),n.texelSize.value.set(1/e,1/t),n.aspect.value=e/t}},{key:"depthPacking",get:function(){return Number(this.defines.DEPTH_PACKING)},set:function(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}}],[{key:"Section",get:function(){return V}}]),t}(y.ShaderMaterial),J="#include \n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i\n}",Q=(y.ShaderMaterial,"#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=linearToRelativeLuminance(texel.rgb);\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);l*=low*high;\n#elif defined(THRESHOLD)\nl=smoothstep(threshold,threshold+smoothing,l);\n#endif\n#ifdef COLOR\ngl_FragColor=vec4(texel.rgb*l,l);\n#else\ngl_FragColor=vec4(l);\n#endif\n}"),Y=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,{name:"LuminanceMaterial",uniforms:{inputBuffer:new y.Uniform(null),threshold:new y.Uniform(0),smoothing:new y.Uniform(1),range:new y.Uniform(null)},blending:y.NoBlending,depthWrite:!1,depthTest:!1,fragmentShader:Q,vertexShader:M}))).toneMapped=!1,e.setColorOutputEnabled(n),e.setLuminanceRange(r),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"setInputBuffer",value:function(e){this.uniforms.inputBuffer.value=e}},{key:"getThreshold",value:function(){return this.uniforms.threshold.value}},{key:"setThreshold",value:function(e){this.getSmoothingFactor()>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}},{key:"getSmoothingFactor",value:function(){return this.uniforms.smoothing.value}},{key:"setSmoothingFactor",value:function(e){this.getThreshold()>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}},{key:"isColorOutputEnabled",value:function(e){return void 0!==this.defines.COLOR}},{key:"setColorOutputEnabled",value:function(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}},{key:"getLuminanceRange",value:function(){return this.uniforms.range.value}},{key:"setLuminanceRange",value:function(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}},{key:"threshold",get:function(){return this.getThreshold()},set:function(e){this.setThreshold(e)}},{key:"smoothing",get:function(){return this.getSmoothingFactor()},set:function(e){this.setSmoothingFactor(e)}},{key:"useThreshold",get:function(){return this.isThresholdEnabled()},set:function(e){this.setThresholdEnabled(e)}},{key:"colorOutput",get:function(){return this.isColorOutputEnabled()},set:function(e){this.setColorOutputEnabled(e)}},{key:"useRange",get:function(){return this.isLuminanceRangeEnabled()},set:function(e){this.setLuminanceRangeEnabled(e)}},{key:"luminanceRange",get:function(){return null!==this.getLuminanceRange()},set:function(e){}}]),t}(y.ShaderMaterial),X="#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef MASK_PRECISION_HIGH\nuniform mediump sampler2D maskTexture;\n#else\nuniform lowp sampler2D maskTexture;\n#endif\n#if MASK_FUNCTION != 0\nuniform float strength;\n#endif\nvarying vec2 vUv;void main(){\n#if COLOR_CHANNEL == 0\nfloat mask=texture2D(maskTexture,vUv).r;\n#elif COLOR_CHANNEL == 1\nfloat mask=texture2D(maskTexture,vUv).g;\n#elif COLOR_CHANNEL == 2\nfloat mask=texture2D(maskTexture,vUv).b;\n#else\nfloat mask=texture2D(maskTexture,vUv).a;\n#endif\n#if MASK_FUNCTION == 0\n#ifdef INVERTED\nmask=step(mask,0.0);\n#else\nmask=1.0-step(mask,0.0);\n#endif\n#else\nmask=clamp(mask*strength,0.0,1.0);\n#ifdef INVERTED\nmask=1.0-mask;\n#endif\n#endif\n#if MASK_FUNCTION == 2\ngl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask);\n#else\ngl_FragColor=mask*texture2D(inputBuffer,vUv);\n#endif\n}",K={DISCARD:0,MULTIPLY:1,MULTIPLY_RGB_SET_ALPHA:2},q=(y.ShaderMaterial,"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)? vec2(d,0.0): vec2(0.0,d);}"),Z="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}",$=(y.ShaderMaterial,"#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)\n#if __VERSION__ < 300\n#define round(v) floor(v + 0.5)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;iend&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;iend&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);\n#endif\n}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);\n#endif\n}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){\n#if !defined(DISABLE_DIAG_DETECTION)\nweights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){\n#endif\nvec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);\n#if !defined(DISABLE_DIAG_DETECTION)\n}else{e.r=0.0;}\n#endif\n}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}"),ee="uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}",te=(y.ShaderMaterial,"#include \n#include \n#ifdef NORMAL_DEPTH\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\n#else\nuniform lowp sampler2D normalBuffer;\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}\n#endif\nuniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float minRadiusScale;uniform float intensity;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){\n#ifdef DISTANCE_SCALING\nfloat radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;\n#else\nfloat radius=RADIUS;\n#endif\nfloat noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float invSamples=1.0/SAMPLES_FLOAT;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i1.0||coord.t<0.0||coord.t>1.0){continue;}\n#ifdef NORMAL_DEPTH\nfloat sampleDepth=texture2D(normalDepthBuffer,coord).a;\n#else\nfloat sampleDepth=readDepth(coord);\n#endif\nfloat viewZ=getViewZ(sampleDepth);\n#ifdef PERSPECTIVE_CAMERA\nfloat linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);\n#else\nfloat linearSampleDepth=sampleDepth;\n#endif\nfloat proximity=abs(depth-linearSampleDepth);if(proximity0&&void 0!==arguments[0]?arguments[0]:"Pass",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new y.Scene,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:re;Object(m.a)(this,e),this.name=t,this.renderer=null,this.scene=n,this.camera=r,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}return Object(g.a)(e,[{key:"setRenderer",value:function(e){this.renderer=e}},{key:"isEnabled",value:function(){return this.enabled}},{key:"setEnabled",value:function(e){this.enabled=e}},{key:"getFullscreenMaterial",value:function(){return null!==this.screen?this.screen.material:null}},{key:"setFullscreenMaterial",value:function(e){var t=this.screen;null!==t?t.material=e:((t=new y.Mesh(function(){if(null===ie){var e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]);void 0!==(ie=new y.BufferGeometry).setAttribute?(ie.setAttribute("position",new y.BufferAttribute(e,3)),ie.setAttribute("uv",new y.BufferAttribute(t,2))):(ie.addAttribute("position",new y.BufferAttribute(e,3)),ie.addAttribute("uv",new y.BufferAttribute(t,2)))}return ie}(),e)).frustumCulled=!1,null===this.scene&&(this.scene=new y.Scene),this.scene.add(t),this.screen=t)}},{key:"getDepthTexture",value:function(){return null}},{key:"setDepthTexture",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]}},{key:"render",value:function(e,t,n,r,i){throw new Error("Render method not implemented!")}},{key:"setSize",value:function(e,t){}},{key:"initialize",value:function(e,t,n){}},{key:"dispose",value:function(){var e=this.getFullscreenMaterial();null!==e&&e.dispose();for(var t=0,n=Object.keys(this);t1&&void 0!==arguments[1])||arguments[1];return Object(m.a)(this,t),(n=Object(p.a)(this,Object(u.a)(t).call(this,"CopyPass"))).setFullscreenMaterial(new O),n.needsSwap=!1,n.renderTarget=e,void 0===e&&(n.renderTarget=new y.WebGLRenderTarget(1,1,{minFilter:y.LinearFilter,magFilter:y.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),n.renderTarget.texture.name="CopyPass.Target"),n.resize=r,n}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getTexture",value:function(){return this.renderTarget.texture}},{key:"setAutoResizeEnabled",value:function(e){this.resize=e}},{key:"render",value:function(e,t,n,r,i){this.getFullscreenMaterial().setInputBuffer(t.texture),e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}},{key:"setSize",value:function(e,t){this.resize&&this.renderTarget.setSize(e,t)}},{key:"initialize",value:function(e,t,n){void 0!==n&&(this.renderTarget.texture.type=n,n!==y.UnsignedByteType&&(this.getFullscreenMaterial().defines.FRAMEBUFFER_PRECISION_HIGH="1"))}},{key:"texture",get:function(){return this.getTexture()}}]),t}(ae),se=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.minLuminance,a=void 0===i?.01:i,o=r.adaptationRate,s=void 0===o?1:o;Object(m.a)(this,t),(n=Object(p.a)(this,Object(u.a)(t).call(this,"AdaptiveLuminancePass"))).setFullscreenMaterial(new S),n.needsSwap=!1,n.renderTargetPrevious=new y.WebGLRenderTarget(1,1,{minFilter:y.NearestFilter,magFilter:y.NearestFilter,stencilBuffer:!1,depthBuffer:!1}),n.renderTargetPrevious.texture.name="Luminance.Previous";var l=n.getFullscreenMaterial();return l.setLuminanceBuffer0(n.renderTargetPrevious.texture),l.setLuminanceBuffer1(e),l.setMinLuminance(a),l.setAdaptationRate(s),n.renderTargetAdapted=n.renderTargetPrevious.clone(),n.renderTargetAdapted.texture.name="Luminance.Adapted",n.copyPass=new oe(n.renderTargetPrevious,!1),n}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getTexture",value:function(){return this.renderTargetAdapted.texture}},{key:"render",value:function(e,t,n,r,i){this.getFullscreenMaterial().setDeltaTime(r),e.setRenderTarget(this.renderToScreen?null:this.renderTargetAdapted),e.render(this.scene,this.camera),this.copyPass.render(e,this.renderTargetAdapted)}},{key:"texture",get:function(){return this.getTexture()}},{key:"mipLevel1x1",set:function(e){this.getFullscreenMaterial().setMipLevel1x1(e)}},{key:"adaptationRate",get:function(){return this.getFullscreenMaterial().getAdaptationRate()},set:function(e){this.getFullscreenMaterial().setAdaptationRate(e)}}]),t}(ae),le=function(e){function t(){var e;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"ClearMaskPass",null,null))).needsSwap=!1,e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"render",value:function(e,t,n,r,i){var a=e.state.buffers.stencil;a.setLocked(!1),a.setTest(!1)}}]),t}(ae),ue=new y.Color,ce=function(e){function t(){var e,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"ClearPass",null,null))).needsSwap=!1,e.color=n,e.depth=r,e.stencil=i,e.overrideClearColor=null,e.overrideClearAlpha=-1,e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"setClearFlags",value:function(e,t,n){this.color=e,this.depth=t,this.stencil=n}},{key:"getOverrideClearColor",value:function(){return this.overrideClearColor}},{key:"setOverrideClearColor",value:function(e){this.overrideClearColor=e}},{key:"getOverrideClearAlpha",value:function(){return this.overrideClearAlpha}},{key:"setOverrideClearAlpha",value:function(e){this.overrideClearAlpha=e}},{key:"render",value:function(e,t,n,r,i){var a=this.overrideClearColor,o=this.overrideClearAlpha,s=e.getClearAlpha(),l=null!==a,u=o>=0;l?(ue.copy(e.getClearColor(ue)),e.setClearColor(a,u?o:s)):u&&e.setClearAlpha(o),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(ue,s):u&&e.setClearAlpha(s)}}]),t}(ae),fe=-1,de=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fe,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(m.a)(this,t),(n=Object(p.a)(this,Object(u.a)(t).call(this))).resizable=e,n.base=new y.Vector2(1,1),n.preferred=new y.Vector2(r,i),n.target=n.preferred,n.s=a,n}return Object(v.a)(t,e),Object(g.a)(t,[{key:"copy",value:function(e){this.base.set(e.getBaseWidth(),e.getBaseHeight()),this.preferred.set(e.getPreferredWidth(),e.getPreferredHeight()),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height)}},{key:"getWidth",value:function(){var e=this.base,t=this.preferred,n=this.scale;return t.width!==fe?t.width:t.height!==fe?Math.round(t.height*(e.width/Math.max(e.height,1))):Math.round(e.width*n)}},{key:"getHeight",value:function(){var e=this.base,t=this.preferred,n=this.scale;return t.height!==fe?t.height:t.width!==fe?Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):Math.round(e.height*n)}},{key:"getScale",value:function(){return this.s}},{key:"setScale",value:function(e){this.s!==e&&(this.s=e,this.preferred.setScalar(fe),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}},{key:"getBaseWidth",value:function(){return this.base.width}},{key:"setBaseWidth",value:function(e){this.base.width!==e&&(this.base.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}},{key:"getBaseHeight",value:function(){return this.base.height}},{key:"setBaseHeight",value:function(e){this.base.height!==e&&(this.base.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}},{key:"setBaseSize",value:function(e,t){this.base.width===e&&this.base.height===t||(this.base.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}},{key:"getPreferredWidth",value:function(){return this.preferred.width}},{key:"setPreferredWidth",value:function(e){this.preferred.width!==e&&(this.preferred.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}},{key:"getPreferredHeight",value:function(){return this.preferred.height}},{key:"setPreferredHeight",value:function(e){this.preferred.height!==e&&(this.preferred.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}},{key:"setPreferredSize",value:function(e,t){this.preferred.width===e&&this.preferred.height===t||(this.preferred.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.base.width,this.base.height))}},{key:"scale",get:function(){return this.getScale()},set:function(e){this.setScale(e)}},{key:"width",get:function(){return this.getWidth()},set:function(e){this.setPreferredWidth(e)}},{key:"height",get:function(){return this.getHeight()},set:function(e){this.setPreferredHeight(e)}}],[{key:"AUTO_SIZE",get:function(){return fe}}]),t}(y.EventDispatcher),he=!1,pe=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(m.a)(this,e),this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(n),this.meshCount=0,this.replaceMaterial=function(e){if(e.isMesh){var n;if(e.material.flatShading)switch(e.material.side){case y.DoubleSide:n=t.materialsFlatShadedDoubleSide;break;case y.BackSide:n=t.materialsFlatShadedBackSide;break;default:n=t.materialsFlatShaded}else switch(e.material.side){case y.DoubleSide:n=t.materialsDoubleSide;break;case y.BackSide:n=t.materialsBackSide;break;default:n=t.materials}t.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=n[2]:e.isInstancedMesh?e.material=n[1]:e.material=n[0],++t.meshCount}}}return Object(g.a)(e,[{key:"setMaterial",value:function(e){if(this.disposeMaterials(),this.material=e,null!==e){for(var t=this.materials=[e.clone(),e.clone(),e.clone()],n=0,r=t;n2&&void 0!==arguments[2]?arguments[2]:null;return Object(m.a)(this,t),(r=Object(p.a)(this,Object(u.a)(t).call(this,"RenderPass",e,n))).needsSwap=!1,r.clearPass=new ce,r.overrideMaterialManager=null===i?null:new pe(i),r.backgroundDisabled=!1,r.shadowMapDisabled=!1,r.selection=null,r}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getOverrideMaterial",value:function(){var e=this.overrideMaterialManager;return null!==e?e.material:null}},{key:"setOverrideMaterial",value:function(e){var t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new pe(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}},{key:"getSelection",value:function(){return this.selection}},{key:"setSelection",value:function(e){this.selection=e}},{key:"isBackgroundDisabled",value:function(){return this.backgroundDisabled}},{key:"setBackgroundDisabled",value:function(e){this.backgroundDisabled=e}},{key:"isShadowMapDisabled",value:function(){return this.shadowMapDisabled}},{key:"setShadowMapDisabled",value:function(e){this.shadowMapDisabled=e}},{key:"getClearPass",value:function(){return this.clearPass}},{key:"render",value:function(e,t,n,r,i){var a=this.scene,o=this.camera,s=this.selection,l=o.layers.mask,u=a.background,c=e.shadowMap.autoUpdate,f=this.renderToScreen?null:t;null!==s&&o.layers.set(s.getLayer()),this.shadowMapDisabled&&(e.shadowMap.autoUpdate=!1),(this.backgroundDisabled||null!==this.clearPass.overrideClearColor)&&(a.background=null),this.clearPass.isEnabled()&&this.clearPass.render(e,t),e.setRenderTarget(f),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,a,o):e.render(a,o),o.layers.mask=l,a.background=u,e.shadowMap.autoUpdate=c}},{key:"renderToScreen",get:function(){return Object(h.a)(Object(u.a)(t.prototype),"renderToScreen",this)},set:function(e){!function(e,t,n,r,i){if(!d(e,t,n,r||e)&&i)throw new Error("failed to set property")}(Object(u.a)(t.prototype),"renderToScreen",e,this,!0),this.clearPass.renderToScreen=e}},{key:"overrideMaterial",get:function(){return this.getOverrideMaterial()},set:function(e){this.setOverrideMaterial(e)}},{key:"clear",get:function(){return this.clearPass.isEnabled()},set:function(e){this.clearPass.setEnabled(e)}}]),t}(ae);new Float32Array([255/256/Math.pow(256,3),255/256/Math.pow(256,2),255/256/256,255/256]);var me={SKIP:0,ADD:1,ALPHA:2,AVERAGE:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,EXCLUSION:8,LIGHTEN:9,MULTIPLY:10,DIVIDE:11,NEGATION:12,NORMAL:13,OVERLAY:14,REFLECT:15,SCREEN:16,SOFT_LIGHT:17,SUBTRACT:18},ge=new Map([[me.SKIP,null],[me.ADD,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[me.ALPHA,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[me.AVERAGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[me.COLOR_BURN,"float blend(const in float x,const in float y){return(y==0.0)? y : max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[me.COLOR_DODGE,"float blend(const in float x,const in float y){return(y==1.0)? y : min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[me.DARKEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[me.DIFFERENCE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[me.EXCLUSION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[me.LIGHTEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[me.MULTIPLY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[me.DIVIDE,"float blend(const in float x,const in float y){return(y>0.0)? min(x/y,1.0): 1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[me.NEGATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[me.NORMAL,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[me.OVERLAY,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[me.REFLECT,"float blend(const in float x,const in float y){return(y==1.0)? y : min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[me.SCREEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[me.SOFT_LIGHT,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[me.SUBTRACT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),ye=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Object(m.a)(this,t),(n=Object(p.a)(this,Object(u.a)(t).call(this))).blendFunction=e,n.opacity=new y.Uniform(r),n}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getOpacity",value:function(){return this.opacity.value}},{key:"setOpacity",value:function(e){this.opacity.value=e}},{key:"getBlendFunction",value:function(){return this.blendFunction}},{key:"setBlendFunction",value:function(e){this.blendFunction=e,this.dispatchEvent({type:"change"})}},{key:"getShaderCode",value:function(){return ge.get(this.blendFunction)}}]),t}(y.EventDispatcher),be={NONE:0,DEPTH:1,CONVOLUTION:2},Ae=function(e){function t(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.attributes,o=void 0===a?be.NONE:a,s=i.blendFunction,l=void 0===s?me.SCREEN:s,c=i.defines,f=void 0===c?new Map:c,d=i.uniforms,h=void 0===d?new Map:d,v=i.extensions,g=void 0===v?null:v,y=i.vertexShader,b=void 0===y?null:y;return Object(m.a)(this,t),(r=Object(p.a)(this,Object(u.a)(t).call(this))).name=e,r.renderer=null,r.attributes=o,r.fragmentShader=n,r.vertexShader=b,r.defines=f,r.uniforms=h,r.extensions=g,r.blendMode=new ye(l),r.blendMode.addEventListener("change",function(e){return r.setChanged()}),r}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getName",value:function(){return this.name}},{key:"setRenderer",value:function(e){this.renderer=e}},{key:"getDefines",value:function(){return this.defines}},{key:"getUniforms",value:function(){return this.uniforms}},{key:"getExtensions",value:function(){return this.extensions}},{key:"getBlendMode",value:function(){return this.blendMode}},{key:"getAttributes",value:function(){return this.attributes}},{key:"setAttributes",value:function(e){this.attributes=e,this.setChanged()}},{key:"getFragmentShader",value:function(){return this.fragmentShader}},{key:"setFragmentShader",value:function(e){this.fragmentShader=e,this.setChanged()}},{key:"getVertexShader",value:function(){return this.vertexShader}},{key:"setVertexShader",value:function(e){this.vertexShader=e,this.setChanged()}},{key:"setChanged",value:function(){this.dispatchEvent({type:"change"})}},{key:"setDepthTexture",value:function(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.BasicDepthPacking}},{key:"update",value:function(e,t,n){}},{key:"setSize",value:function(e,t){}},{key:"initialize",value:function(e,t,n){}},{key:"dispose",value:function(){for(var e=0,t=Object.keys(this);e1?r-1:0),a=1;at&&console.warn("The current rendering context doesn't support more than "+t+" uniforms, but "+this.uniformCount+" were defined"),t=e.maxVaryings,this.varyingCount>t&&console.warn("The current rendering context doesn't support more than "+t+" varyings, but "+this.varyingCount+" were defined")}},{key:"updateMaterial",value:function(){var e,t=W.Section,n=new Map([[t.FRAGMENT_HEAD,""],[t.FRAGMENT_MAIN_UV,""],[t.FRAGMENT_MAIN_IMAGE,""],[t.VERTEX_HEAD,""],[t.VERTEX_MAIN_SUPPORT,""]]),r=new Map,i=new Map,a=new Map,o=new Set,s=0,l=0,u=0,c=!1,f=!1,d=b(this.effects);try{for(d.s();!(e=d.n()).done;){var h=e.value;if(h.getBlendMode().getBlendFunction()===me.SKIP)u|=h.getAttributes()&be.DEPTH;else if(0!==(u&h.getAttributes()&be.CONVOLUTION))console.error("Convolution effects cannot be merged",h);else{u|=h.getAttributes();var p=we("e"+s++,h,n,r,i,a,u);if(l+=p.varyings.length,c=c||p.transformedUv,f=f||p.readDepth,null!==h.getExtensions()){var v,m=b(h.getExtensions());try{for(m.s();!(v=m.n()).done;){var g=v.value;o.add(g)}}catch(S){m.e(S)}finally{m.f()}}}}}catch(S){d.e(S)}finally{d.f()}var y,A=/\bblend\b/g,x=b(r.values());try{for(x.s();!(y=x.n()).done;){var w=y.value,M=w.getShaderCode().replace(A,"blend"+w.getBlendFunction());n.set(t.FRAGMENT_HEAD,n.get(t.FRAGMENT_HEAD)+M+"\n")}}catch(S){x.e(S)}finally{x.f()}if(0!==(u&be.DEPTH)){if(f){n.set(t.FRAGMENT_MAIN_IMAGE,"float depth = readDepth(UV);\n\n\t"+n.get(t.FRAGMENT_MAIN_IMAGE))}this.needsDepthTexture=null===this.getDepthTexture()}else this.needsDepthTexture=!1;if(c){n.set(t.FRAGMENT_MAIN_UV,"vec2 transformedUv = vUv;\n"+n.get(t.FRAGMENT_MAIN_UV)),i.set("UV","transformedUv")}else i.set("UV","vUv");n.forEach(function(e,t,n){return n.set(t,e.trim().replace(/^#/,"\n#"))}),this.uniformCount=a.size,this.varyingCount=l,this.skipRendering=0===s,this.needsSwap=!this.skipRendering,this.getFullscreenMaterial().setShaderParts(n).setExtensions(o).setUniforms(a).setDefines(i)}},{key:"recompile",value:function(e){this.updateMaterial(),this.verifyResources()}},{key:"setRenderer",value:function(e){Object(h.a)(Object(u.a)(t.prototype),"setRenderer",this).call(this,e);var n,r=b(this.effects);try{for(r.s();!(n=r.n()).done;){n.value.setRenderer(e)}}catch(i){r.e(i)}finally{r.f()}}},{key:"getDepthTexture",value:function(){return this.getFullscreenMaterial().uniforms.depthBuffer.value}},{key:"setDepthTexture",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.BasicDepthPacking;this.getFullscreenMaterial().setDepthBuffer(e,t);var n,r=b(this.effects);try{for(r.s();!(n=r.n()).done;){n.value.setDepthTexture(e,t)}}catch(i){r.e(i)}finally{r.f()}}},{key:"render",value:function(e,t,n,r,i){var a,o=b(this.effects);try{for(o.s();!(a=o.n()).done;){a.value.update(e,t,r)}}catch(l){o.e(l)}finally{o.f()}if(!this.skipRendering||this.renderToScreen){var s=this.getFullscreenMaterial();s.setInputBuffer(t.texture),s.setDeltaTime(r),e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}}},{key:"setSize",value:function(e,t){this.getFullscreenMaterial().setSize(e,t);var n,r=b(this.effects);try{for(r.s();!(n=r.n()).done;){n.value.setSize(e,t)}}catch(i){r.e(i)}finally{r.f()}}},{key:"initialize",value:function(e,t,n){var r,i=this,a=b(this.effects);try{for(a.s();!(r=a.n()).done;){var o=r.value;o.initialize(e,t,n),o.addEventListener("change",function(e){return i.handleEvent(e)})}}catch(s){a.e(s)}finally{a.f()}this.updateMaterial(),this.verifyResources(e),void 0!==n&&n!==y.UnsignedByteType&&(this.getFullscreenMaterial().defines.FRAMEBUFFER_PRECISION_HIGH="1")}},{key:"dispose",value:function(){Object(h.a)(Object(u.a)(t.prototype),"dispose",this).call(this);var e,n=b(this.effects);try{for(n.s();!(e=n.n()).done;){e.value.dispose()}}catch(r){n.e(r)}finally{n.f()}}},{key:"handleEvent",value:function(e){switch(e.type){case"change":this.recompile()}}},{key:"encodeOutput",get:function(){return this.getFullscreenMaterial().isOutputEncodingEnabled()},set:function(e){this.getFullscreenMaterial().setOutputEncodingEnabled(e)}},{key:"dithering",get:function(){return this.getFullscreenMaterial().dithering},set:function(e){var t=this.getFullscreenMaterial();t.dithering=e,t.needsUpdate=!0}}]),t}(ae),Se=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],Ee=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.resolutionScale,i=void 0===r?.5:r,a=n.width,o=void 0===a?de.AUTO_SIZE:a,s=n.height,c=void 0===s?de.AUTO_SIZE:s,f=n.kernelSize,d=void 0===f?Oe.LARGE:f;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"KawaseBlurPass"))).renderTargetA=new y.WebGLRenderTarget(1,1,{minFilter:y.LinearFilter,magFilter:y.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),e.renderTargetA.texture.name="Blur.Target.A",e.renderTargetB=e.renderTargetA.clone(),e.renderTargetB.texture.name="Blur.Target.B",e.resolution=new de(Object(l.a)(Object(l.a)(e)),o,c,i),e.resolution.addEventListener("change",function(t){return e.setSize(e.resolution.getBaseWidth(),e.resolution.getBaseHeight())}),e.blurMaterial=new k,e.ditheredBlurMaterial=new k,e.ditheredBlurMaterial.dithering=!0,e.dithering=!1,e.kernelSize=d,e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getResolution",value:function(){return this.resolution}},{key:"getScale",value:function(){return this.blurMaterial.getScale()}},{key:"setScale",value:function(e){this.blurMaterial.setScale(e),this.ditheredBlurMaterial.setScale(e)}},{key:"getKernelSize",value:function(){return this.kernelSize}},{key:"setKernelSize",value:function(e){this.kernelSize=e}},{key:"getResolutionScale",value:function(){return this.resolution.scale}},{key:"setResolutionScale",value:function(e){this.resolution.scale=e}},{key:"render",value:function(e,t,n,r,i){var a,o,s=this.scene,l=this.camera,u=this.renderTargetA,c=this.renderTargetB,f=Se[this.kernelSize],d=this.blurMaterial,h=t;for(this.setFullscreenMaterial(d),a=0,o=f.length-1;a0&&void 0!==arguments[0]?arguments[0]:{},r=n.width,i=void 0===r?de.AUTO_SIZE:r,a=n.height,o=void 0===a?de.AUTO_SIZE:a,s=n.renderTarget,c=n.luminanceRange,f=n.colorOutput;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"LuminancePass"))).setFullscreenMaterial(new Y(f,c)),e.needsSwap=!1,e.renderTarget=s,void 0===e.renderTarget&&(e.renderTarget=new y.WebGLRenderTarget(1,1,{minFilter:y.LinearFilter,magFilter:y.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),e.renderTarget.texture.name="LuminancePass.Target",e.renderTarget.texture.generateMipmaps=!1),e.resolution=new de(Object(l.a)(Object(l.a)(e)),i,o),e.resolution.addEventListener("change",function(t){return e.setSize(e.resolution.getBaseWidth(),e.resolution.getBaseHeight())}),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getTexture",value:function(){return this.renderTarget.texture}},{key:"getResolution",value:function(){return this.resolution}},{key:"render",value:function(e,t,n,r,i){this.getFullscreenMaterial().setInputBuffer(t.texture),e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}},{key:"setSize",value:function(e,t){var n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.getWidth(),n.getHeight())}},{key:"initialize",value:function(e,t,n){void 0!==n&&n!==y.UnsignedByteType&&(this.getFullscreenMaterial().defines.FRAMEBUFFER_PRECISION_HIGH="1")}},{key:"texture",get:function(){return this.getTexture()}}]),t}(ae),_e=function(e){function t(e,n){var r;return Object(m.a)(this,t),(r=Object(p.a)(this,Object(u.a)(t).call(this,"MaskPass",e,n))).needsSwap=!1,r.clearPass=new ce(!1,!1,!0),r.inverse=!1,r}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getClearPass",value:function(){return this.clearPass}},{key:"isInverted",value:function(){return this.inverse}},{key:"setInverted",value:function(e){this.inverse=e}},{key:"render",value:function(e,t,n,r,i){var a=e.getContext(),o=e.state.buffers,s=this.scene,l=this.camera,u=this.clearPass,c=this.inverse?0:1,f=1-c;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),o.stencil.setFunc(a.ALWAYS,c,4294967295),o.stencil.setClear(f),o.stencil.setLocked(!0),this.clear&&(this.renderToScreen?u.render(e,null):(u.render(e,t),u.render(e,n))),this.renderToScreen?(e.setRenderTarget(null),e.render(s,l)):(e.setRenderTarget(t),e.render(s,l),e.setRenderTarget(n),e.render(s,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(a.EQUAL,1,4294967295),o.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),o.stencil.setLocked(!0)}},{key:"clear",get:function(){return this.clearPass.isEnabled()},set:function(e){this.clearPass.enabled=e}}]),t}(ae),Te=function(e){function t(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.resolutionScale,o=void 0===a?1:a,s=i.width,c=void 0===s?de.AUTO_SIZE:s,f=i.height,d=void 0===f?de.AUTO_SIZE:f,h=i.renderTarget;Object(m.a)(this,t),(r=Object(p.a)(this,Object(u.a)(t).call(this,"NormalPass"))).needsSwap=!1,r.renderPass=new ve(e,n,new y.MeshNormalMaterial);var v=r.renderPass;v.setBackgroundDisabled(!0),v.setShadowMapDisabled(!0);var g=v.getClearPass();return g.setOverrideClearColor(new y.Color(7829503)),g.setOverrideClearAlpha(1),r.renderTarget=h,void 0===r.renderTarget&&(r.renderTarget=new y.WebGLRenderTarget(1,1,{minFilter:y.NearestFilter,magFilter:y.NearestFilter,stencilBuffer:!1}),r.renderTarget.texture.name="NormalPass.Target"),r.resolution=new de(Object(l.a)(Object(l.a)(r)),c,d,o),r.resolution.addEventListener("change",function(e){return r.setSize(r.resolution.getBaseWidth(),r.resolution.getBaseHeight())}),r}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getTexture",value:function(){return this.renderTarget.texture}},{key:"getResolution",value:function(){return this.resolution}},{key:"getResolutionScale",value:function(){return this.resolution.getScale()}},{key:"setResolutionScale",value:function(e){this.resolution.setScale(e)}},{key:"render",value:function(e,t,n,r,i){var a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a,a)}},{key:"setSize",value:function(e,t){var n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.getWidth(),n.getHeight())}},{key:"texture",get:function(){return this.getTexture()}}]),t}(ae),ke=function(){function e(){Object(m.a)(this,e),this.previousTime=0,this.currentTime=0,this.delta=0,this.fixedDelta=1e3/60,this.elapsed=0,this.timescale=1,this.fixedDeltaEnabled=!1}return Object(g.a)(e,[{key:"setFixedDeltaEnabled",value:function(e){return this.fixedDeltaEnabled=e,this}},{key:"setAutoResetEnabled",value:function(e){return"undefined"!==typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this)),this}},{key:"getDelta",value:function(){return.001*this.delta}},{key:"getFixedDelta",value:function(){return.001*this.fixedDelta}},{key:"setFixedDelta",value:function(e){return this.fixedDelta=1e3*e,this}},{key:"getElapsed",value:function(){return.001*this.elapsed}},{key:"getTimescale",value:function(){return this.timescale}},{key:"setTimescale",value:function(e){return this.timescale=e,this}},{key:"update",value:function(e){return this.fixedDeltaEnabled?this.delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=void 0!==e?e:performance.now(),this.delta=this.currentTime-this.previousTime),this.delta*=this.timescale,this.elapsed+=this.delta,this}},{key:"reset",value:function(){return this.delta=0,this.elapsed=0,this.currentTime=performance.now(),this}},{key:"handleEvent",value:function(e){document.hidden||(this.currentTime=performance.now())}},{key:"dispose",value:function(){"undefined"!==typeof document&&document.removeEventListener("visibilitychange",this)}}]),e}(),Be=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.depthBuffer,i=void 0===r||r,a=n.stencilBuffer,o=void 0!==a&&a,s=n.multisampling,l=void 0===s?0:s,u=n.frameBufferType;Object(m.a)(this,e),this.renderer=null,this.inputBuffer=this.createBuffer(i,o,u,l),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new oe,this.depthTexture=null,this.passes=[],this.timer=new ke,this.autoRenderToScreen=!0,this.setRenderer(t)}return Object(g.a)(e,[{key:"getTimer",value:function(){return this.timer}},{key:"getRenderer",value:function(){return this.renderer}},{key:"setRenderer",value:function(e){if(this.renderer=e,null!==e){var t=e.getSize(new y.Vector2),n=e.getContext().getContextAttributes().alpha,r=this.inputBuffer.texture.type;e.autoClear=!1,this.setSize(t.width,t.height);var i,a=b(this.passes);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.setRenderer(e),o.initialize(e,n,r)}}catch(s){a.e(s)}finally{a.f()}}}},{key:"replaceRenderer",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.renderer,r=n.domElement.parentNode;return this.setRenderer(e),t&&null!==r&&(r.removeChild(n.domElement),r.appendChild(e.domElement)),n}},{key:"createDepthTexture",value:function(){var e=this.depthTexture=new y.DepthTexture;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=y.DepthStencilFormat,e.type=y.UnsignedInt248Type):e.type=y.UnsignedIntType,e}},{key:"deleteDepthTexture",value:function(){if(null!==this.depthTexture){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();var e,t=b(this.passes);try{for(t.s();!(e=t.n()).done;){e.value.setDepthTexture(null)}}catch(n){t.e(n)}finally{t.f()}}}},{key:"createBuffer",value:function(e,t,n,r){var i,a=null===this.renderer?new y.Vector2:this.renderer.getDrawingBufferSize(new y.Vector2),o={minFilter:y.LinearFilter,magFilter:y.LinearFilter,stencilBuffer:t,depthBuffer:e,type:n};return r>0?((i=Number(y.REVISION.replace(/\D+/g,""))<138?new y.WebGLMultisampleRenderTarget(a.width,a.height,o):new y.WebGLRenderTarget(a.width,a.height,o)).ignoreDepthForMultisampleCopy=!1,i.samples=r):i=new y.WebGLRenderTarget(a.width,a.height,o),i.texture.name="EffectComposer.Buffer",i.texture.generateMipmaps=!1,i}},{key:"addPass",value:function(e,t){var n=this.passes,r=this.renderer,i=r.getDrawingBufferSize(new y.Vector2),a=r.getContext().getContextAttributes().alpha,o=this.inputBuffer.texture.type;if(e.setRenderer(r),e.setSize(i.width,i.height),e.initialize(r,a,o),this.autoRenderToScreen&&(n.length>0&&(n[n.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?n.splice(t,0,e):n.push(e),this.autoRenderToScreen&&(n[n.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){var s,l=this.createDepthTexture(),u=b(n);try{for(u.s();!(s=u.n()).done;)(e=s.value).setDepthTexture(l)}catch(c){u.e(c)}finally{u.f()}}else e.setDepthTexture(this.depthTexture)}},{key:"removePass",value:function(e){var t=this.passes,n=t.indexOf(e);if(-1!==n&&t.splice(n,1).length>0){if(null!==this.depthTexture){t.reduce(function(e,t){return e||t.needsDepthTexture},!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&n===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}},{key:"removeAllPasses",value:function(){var e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}},{key:"render",value:function(e){var t,n,r,i=this.renderer,a=this.copyPass,o=this.inputBuffer,s=this.outputBuffer,l=!1;void 0===e&&(e=this.timer.update().getDelta());var u,c=b(this.passes);try{for(c.s();!(u=c.n()).done;){var f=u.value;f.isEnabled()&&(f.render(i,o,s,e,l),f.needsSwap&&(l&&(a.renderToScreen=f.renderToScreen,t=i.getContext(),(n=i.state.buffers.stencil).setFunc(t.NOTEQUAL,1,4294967295),a.render(i,o,s,e,l),n.setFunc(t.EQUAL,1,4294967295)),r=o,o=s,s=r),f instanceof _e?l=!0:f instanceof le&&(l=!1))}}catch(d){c.e(d)}finally{c.f()}}},{key:"setSize",value:function(e,t,n){var r=this.renderer;if(void 0===e||void 0===t){var i=r.getSize(new y.Vector2);e=i.width,t=i.height}r.setSize(e,t,n);var a=r.getDrawingBufferSize(new y.Vector2);this.inputBuffer.setSize(a.width,a.height),this.outputBuffer.setSize(a.width,a.height);var o,s=b(this.passes);try{for(s.s();!(o=s.n()).done;){o.value.setSize(a.width,a.height)}}catch(l){s.e(l)}finally{s.f()}}},{key:"reset",value:function(){this.dispose(),this.autoRenderToScreen=!0}},{key:"dispose",value:function(){var e,t=b(this.passes);try{for(t.s();!(e=t.n()).done;){e.value.dispose()}}catch(n){t.e(n)}finally{t.f()}this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}},{key:"multisampling",get:function(){return this.inputBuffer.samples||0},set:function(e){var t=this.inputBuffer,n=this.multisampling;n>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):n!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}}]),e}(),Oe={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},Re=(Object(s.a)(Set),"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D map;\n#else\nuniform lowp sampler2D map;\n#endif\nuniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=clamp(texture2D(map,uv)*intensity,0.0,1.0);}"),De=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.SCREEN:r,a=n.luminanceThreshold,o=void 0===a?.9:a,s=n.luminanceSmoothing,l=void 0===s?.025:s,c=n.resolutionScale,f=void 0===c?.5:c,d=n.intensity,h=void 0===d?1:d,v=n.width,g=void 0===v?de.AUTO_SIZE:v,b=n.height,A=void 0===b?de.AUTO_SIZE:b,x=n.kernelSize,w=void 0===x?Oe.LARGE:x;Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"BloomEffect",Re,{blendFunction:i,uniforms:new Map([["map",new y.Uniform(null)],["intensity",new y.Uniform(h)]])}))).renderTarget=new y.WebGLRenderTarget(1,1,{minFilter:y.LinearFilter,magFilter:y.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),e.renderTarget.texture.name="Bloom.Target",e.renderTarget.texture.generateMipmaps=!1,e.uniforms.get("map").value=e.renderTarget.texture,e.luminancePass=new Ce({renderTarget:e.renderTarget,colorOutput:!0}),e.luminanceMaterial.setThreshold(o),e.luminanceMaterial.setSmoothingFactor(l),e.blurPass=new Ee({resolutionScale:f,width:g,height:A,kernelSize:w});var M=e.blurPass.getResolution();return M.addEventListener("change",function(t){return e.setSize(M.getBaseWidth(),M.getBaseHeight())}),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getTexture",value:function(){return this.renderTarget.texture}},{key:"getResolution",value:function(){return this.blurPass.getResolution()}},{key:"getBlurPass",value:function(){return this.blurPass}},{key:"getLuminancePass",value:function(){return this.luminancePass}},{key:"getLuminanceMaterial",value:function(){return this.luminancePass.getFullscreenMaterial()}},{key:"getIntensity",value:function(){return this.uniforms.get("intensity").value}},{key:"setIntensity",value:function(e){this.uniforms.get("intensity").value=e}},{key:"getResolutionScale",value:function(){return this.getResolution().getScale()}},{key:"setResolutionScale",value:function(e){this.getResolution().setScale(e)}},{key:"update",value:function(e,t,n){var r=this.renderTarget;this.luminancePass.isEnabled()?(this.luminancePass.render(e,t,r),this.blurPass.render(e,r,r)):this.blurPass.render(e,t,r)}},{key:"setSize",value:function(e,t){var n=this.getResolution();n.setBaseSize(e,t),this.renderTarget.setSize(n.getWidth(),n.getHeight()),this.luminancePass.getResolution().copy(n)}},{key:"initialize",value:function(e,t,n){this.blurPass.initialize(e,t,n),void 0!==n&&(this.renderTarget.texture.type=n)}},{key:"texture",get:function(){return this.renderTarget.texture}},{key:"resolution",get:function(){return this.getResolution()}},{key:"luminanceMaterial",get:function(){return this.luminancePass.getFullscreenMaterial()}},{key:"width",get:function(){return this.getResolution().getWidth()},set:function(e){this.getResolution().setPreferredWidth(e)}},{key:"height",get:function(){return this.getResolution().getHeight()},set:function(e){this.getResolution().setPreferredHeight(e)}},{key:"dithering",get:function(){return this.blurPass.dithering},set:function(e){this.blurPass.dithering=e}},{key:"kernelSize",get:function(){return this.blurPass.getKernelSize()},set:function(e){this.blurPass.setKernelSize(e)}},{key:"distinction",get:function(){return console.warn(this.name,"distinction was removed, use getLuminanceMaterial().getThreshold() and getLuminanceMaterial().getSmoothingFactor() instead."),1},set:function(e){console.warn(this.name,"distinction was removed, use getLuminanceMaterial().setThreshold() and getLuminanceMaterial().setSmoothingFactor() instead.")}},{key:"intensity",get:function(){return this.getIntensity()},set:function(e){this.setIntensity(e)}}]),t}(Ae),Le="uniform float brightness;uniform float contrast;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=inputColor.rgb+vec3(brightness-0.5);if(contrast>0.0){color/=vec3(1.0-contrast);}else{color*=vec3(1.0+contrast);}outputColor=vec4(min(color+vec3(0.5),1.0),inputColor.a);}",Pe=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.blendFunction,r=void 0===n?me.NORMAL:n,i=e.brightness,a=void 0===i?0:i,o=e.contrast,s=void 0===o?0:o;return Object(m.a)(this,t),Object(p.a)(this,Object(u.a)(t).call(this,"BrightnessContrastEffect",Le,{blendFunction:r,uniforms:new Map([["brightness",new y.Uniform(a)],["contrast",new y.Uniform(s)]])}))}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getBrightness",value:function(e){return this.uniforms.get("brightness").value}},{key:"setBrightness",value:function(e){this.uniforms.get("brightness").value=e}},{key:"getContrast",value:function(e){return this.uniforms.get("contrast").value}},{key:"setContrast",value:function(e){this.uniforms.get("contrast").value=e}}]),t}(Ae),Ie="uniform float factor;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(floor(inputColor.rgb*factor+0.5)/factor,inputColor.a);}",Fe=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.NORMAL:r,a=n.bits,o=void 0===a?16:a;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"ColorDepthEffect",Ie,{blendFunction:i,uniforms:new Map([["factor",new y.Uniform(1)]])}))).bits=0,e.setBitDepth(o),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getBitDepth",value:function(){return this.bits}},{key:"setBitDepth",value:function(e){this.bits=e,this.uniforms.get("factor").value=Math.pow(2,e/3)}}]),t}(Ae),je="void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){\n#ifdef INVERTED\nvec3 color=vec3(1.0-depth);\n#else\nvec3 color=vec3(depth);\n#endif\noutputColor=vec4(color,inputColor.a);}",Ne=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.NORMAL:r,a=n.inverted,o=void 0!==a&&a;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"DepthEffect",je,{blendFunction:i,attributes:be.DEPTH}))).setInverted(o),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"isInverted",value:function(){return this.defines.has("INVERTED")}},{key:"setInverted",value:function(e){this.inverted!==e&&(e?this.defines.set("INVERTED","1"):this.defines.delete("INVERTED"),this.setChanged())}},{key:"inverted",get:function(){return this.isInverted},set:function(e){this.setInverted(e)}}]),t}(Ae),Ue="uniform vec2 angle;uniform float scale;float pattern(const in vec2 uv){vec2 point=scale*vec2(dot(angle.yx,vec2(uv.x,-uv.y)),dot(angle,uv));return(sin(point.x)*sin(point.y))*4.0;}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(inputColor.rgb*10.0-5.0+pattern(uv*resolution));outputColor=vec4(color,inputColor.a);}",He=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.NORMAL:r,a=n.angle,o=void 0===a?.5*Math.PI:a,s=n.scale,l=void 0===s?1:s;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"DotScreenEffect",Ue,{blendFunction:i,uniforms:new Map([["angle",new y.Uniform(new y.Vector2)],["scale",new y.Uniform(l)]])}))).setAngle(o),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getAngle",value:function(e){return Math.acos(this.uniforms.get("angle").value.y)}},{key:"setAngle",value:function(e){this.uniforms.get("angle").value.set(Math.sin(e),Math.cos(e))}}]),t}(Ae);y.DataTexture;new y.Vector3,new y.Matrix4;var Ge="uniform vec3 hue;uniform float saturation;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,hue.xyz),dot(inputColor.rgb,hue.zxy),dot(inputColor.rgb,hue.yzx));float average=(color.r+color.g+color.b)/3.0;vec3 diff=average-color;if(saturation>0.0){color+=diff*(1.0-1.0/(1.001-saturation));}else{color+=diff*-saturation;}outputColor=vec4(min(color,1.0),inputColor.a);}",ze=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.NORMAL:r,a=n.hue,o=void 0===a?0:a,s=n.saturation,l=void 0===s?0:s;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"HueSaturationEffect",Ge,{blendFunction:i,uniforms:new Map([["hue",new y.Uniform(new y.Vector3)],["saturation",new y.Uniform(l)]])}))).setHue(o),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getSaturation",value:function(e){return this.uniforms.get("saturation").value}},{key:"setSaturation",value:function(e){this.uniforms.get("saturation").value=e}},{key:"getHue",value:function(e){var t=this.uniforms.get("hue").value;return Math.acos((3*t.x-1)/2)}},{key:"setHue",value:function(e){var t=Math.sin(e),n=Math.cos(e);this.uniforms.get("hue").value.set((2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3)}}]),t}(Ae);function Ve(e,t,n){var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),i=r.getContext("2d");if(r.width=e,r.height=t,n instanceof Image)i.drawImage(n,0,0);else{var a=i.createImageData(e,t);a.data.set(n),i.putImageData(a,0,0)}return r}var We=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(m.a)(this,e),this.width=t,this.height=n,this.data=r}return Object(g.a)(e,[{key:"toCanvas",value:function(){return"undefined"===typeof document?null:Ve(this.width,this.height,this.data)}}],[{key:"from",value:function(t){var n,r=t.width,i=t.height;if(t instanceof Image){var a=Ve(r,i,t);if(null!==a)n=a.getContext("2d").getImageData(0,0,r,i).data}else n=t.data;return new e(r,i,n)}}]),e}(),Je="lut.scaleup",Qe=new y.Color,Ye=function(e){function t(e,n){var r;return Object(m.a)(this,t),(r=Object(p.a)(this,Object(u.a)(t).call(this,e,n,n,n))).type=y.FloatType,r.format=y.RGBAFormat,r.encoding=y.LinearEncoding,r.minFilter=y.LinearFilter,r.magFilter=y.LinearFilter,r.wrapS=y.ClampToEdgeWrapping,r.wrapT=y.ClampToEdgeWrapping,r.wrapR=y.ClampToEdgeWrapping,r.unpackAlignment=1,r.needsUpdate=!0,r.domainMin=new y.Vector3(0,0,0),r.domainMax=new y.Vector3(1,1,1),r}return Object(v.a)(t,e),Object(g.a)(t,[{key:"scaleUp",value:function(e){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.image;return e<=i.width?Promise.reject(new Error("The target size must be greater than the current size")):new Promise(function(a,o){var s=URL.createObjectURL(new Blob(['(()=>{var E=Math.pow;var _={SCALE_UP:"lut.scaleup"};var k=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function S(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function U(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function j(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)U(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=k[0];P[0]=s,P[1]=F,P[2]=f;let o=k[1],V=x-w,d=u-c,L=b-l;o[0]=V*M[0]+w,o[1]=d*M[1]+c,o[2]=L*M[2]+l,U(a,t,o[0],o[1],o[2],n[0]),o[0]=V*g[0]+w,o[1]=d*g[1]+c,o[2]=L*g[2]+l,U(a,t,o[0],o[1],o[2],n[1]),o[0]=V*X[0]+w,o[1]=d*X[1]+c,o[2]=L*X[2]+l,U(a,t,o[0],o[1],o[2],n[2]),o[0]=V*Y[0]+w,o[1]=d*Y[1]+c,o[2]=L*Y[2]+l,U(a,t,o[0],o[1],o[2],n[3]);let T=S(g,X,Y,P)*6,v=S(M,X,Y,P)*6,q=S(M,g,Y,P)*6,C=S(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=v,n[1][1]*=v,n[1][2]*=v,n[2][0]*=q,n[2][1]*=q,n[2][2]*=q,n[3][0]*=C,n[3][1]*=C,n[3][2]*=C,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var O=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(E(r,3)*4),y=t instanceof Uint8Array?255:1,h=E(r,2),A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case _.SCALE_UP:r=O.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})();\n'],{type:"text/javascript"})),l=new Worker(s);l.addEventListener("error",function(e){return o(e.error)}),l.addEventListener("message",function(r){var i=new t(r.data,e);i.encoding=n.encoding,i.type=n.type,i.name=n.name,URL.revokeObjectURL(s),a(i)});var u=r?[i.data.buffer]:[];l.postMessage({operation:Je,data:i.data,size:e},u)})}},{key:"applyLUT",value:function(e){var t=this.image,n=e.image,r=Math.min(t.width,t.height,t.depth);if(r!==Math.min(n.width,n.height,n.depth))console.error("Size mismatch");else if(e.type!==y.FloatType||this.type!==y.FloatType)console.error("Both LUTs must be FloatType textures");else if(e.format!==y.RGBAFormat||this.format!==y.RGBAFormat)console.error("Both LUTs must be RGBA textures");else{for(var i=t.data,a=n.data,o=r,s=Math.pow(o,2),l=o-1,u=0,c=Math.pow(o,3);ua){n=new Uint8Array(s.length);for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.SCREEN:r,a=n.premultiply,o=void 0!==a&&a;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"NoiseEffect",Xe,{blendFunction:i}))).setPremultiplied(o),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"isPremultiplied",value:function(){return this.defines.has("PREMULTIPLIED")}},{key:"setPremultiplied",value:function(e){this.isPremultiplied()!==e&&(e?this.defines.set("PREMULTIPLIED","1"):this.defines.delete("PREMULTIPLIED"),this.setChanged())}},{key:"premultiply",get:function(){return this.isPremultiplied()},set:function(e){this.setPremultiplied(e)}}]),t}(Ae);var qe="uniform float count;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 sl=vec2(sin(uv.y*count),cos(uv.y*count));vec3 scanlines=vec3(sl.x,sl.y,sl.x);outputColor=vec4(scanlines,inputColor.a);}",Ze=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.OVERLAY:r,a=n.density,o=void 0===a?1.25:a;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"ScanlineEffect",qe,{blendFunction:i,uniforms:new Map([["count",new y.Uniform(0)]])}))).resolution=new y.Vector2,e.density=o,e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getDensity",value:function(){return this.density}},{key:"setDensity",value:function(e){this.density=e,this.setSize(this.resolution.width,this.resolution.height)}},{key:"setSize",value:function(e,t){this.resolution.set(e,t),this.uniforms.get("count").value=Math.round(t*this.density)}}]),t}(Ae),$e="uniform bool active;uniform vec2 center;uniform float waveSize;uniform float radius;uniform float maxRadius;uniform float amplitude;varying float vSize;void mainUv(inout vec2 uv){if(active){vec2 aspectCorrection=vec2(aspect,1.0);vec2 difference=uv*aspectCorrection-center*aspectCorrection;float distance=sqrt(dot(difference,difference))*vSize;if(distance>radius){if(distance1&&void 0!==arguments[1]?arguments[1]:new y.Vector3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.speed,o=void 0===a?2:a,s=i.maxRadius,l=void 0===s?1:s,c=i.waveSize,f=void 0===c?.2:c,d=i.amplitude,h=void 0===d?.05:d;return Object(m.a)(this,t),(n=Object(p.a)(this,Object(u.a)(t).call(this,"ShockWaveEffect",$e,{vertexShader:et,uniforms:new Map([["active",new y.Uniform(!1)],["center",new y.Uniform(new y.Vector2(.5,.5))],["cameraDistance",new y.Uniform(1)],["size",new y.Uniform(1)],["radius",new y.Uniform(-f)],["maxRadius",new y.Uniform(l)],["waveSize",new y.Uniform(f)],["amplitude",new y.Uniform(h)]])}))).camera=e,n.epicenter=r,n.screenPosition=n.uniforms.get("center").value,n.speed=o,n.time=0,n.active=!1,n}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getPosition",value:function(){return this.epicenter}},{key:"setPosition",value:function(e){this.epicenter=e}},{key:"getSpeed",value:function(){return this.speed}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"explode",value:function(){this.time=0,this.active=!0,this.uniforms.get("active").value=!0}},{key:"update",value:function(e,t,n){var r=this.getPosition(),i=this.camera,a=this.uniforms,o=a.get("active");if(this.active){var s=a.get("waveSize").value;i.getWorldDirection(nt),rt.copy(i.position).sub(r),o.value=nt.angleTo(rt)>tt,o.value&&(a.get("cameraDistance").value=i.position.distanceTo(r),nt.copy(r).project(i),this.screenPosition.set(.5*(nt.x+1),.5*(nt.y+1))),this.time+=n*this.speed;var l=this.time-s;a.get("radius").value=l,l>=2*(a.get("maxRadius").value+s)&&(this.active=!1,o.value=!1)}}}]),t}(Ae),at="uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,vec3(1.0-0.607*intensity,0.769*intensity,0.189*intensity)),dot(inputColor.rgb,vec3(0.349*intensity,1.0-0.314*intensity,0.168*intensity)),dot(inputColor.rgb,vec3(0.272*intensity,0.534*intensity,1.0-0.869*intensity)));outputColor=vec4(color,inputColor.a);}",ot=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.blendFunction,r=void 0===n?me.NORMAL:n,i=e.intensity,a=void 0===i?1:i;return Object(m.a)(this,t),Object(p.a)(this,Object(u.a)(t).call(this,"SepiaEffect",at,{blendFunction:r,uniforms:new Map([["intensity",new y.Uniform(a)]])}))}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getIntensity",value:function(){return this.uniforms.get("intensity").value}},{key:"setIntensity",value:function(e){this.uniforms.get("intensity").value=e}}]),t}(Ae),st="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAA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ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC",ut="#include \nuniform lowp sampler2D luminanceBuffer;uniform float whitePoint;uniform float middleGrey;\n#ifndef ADAPTIVE\nuniform float averageLuminance;\n#endif\nvec3 Reinhard2ToneMapping(vec3 color){color*=toneMappingExposure;float l=linearToRelativeLuminance(color);\n#ifdef ADAPTIVE\nfloat lumAvg=unpackRGBAToFloat(texture2D(luminanceBuffer,vec2(0.5)));\n#else\nfloat lumAvg=averageLuminance;\n#endif\nfloat lumScaled=(l*middleGrey)/max(lumAvg,1e-6);float lumCompressed=lumScaled*(1.0+lumScaled/(whitePoint*whitePoint));lumCompressed/=(1.0+lumScaled);return clamp(lumCompressed*color,0.0,1.0);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){\n#ifdef REINHARD2\noutputColor=vec4(Reinhard2ToneMapping(inputColor.rgb),inputColor.a);\n#else\noutputColor=vec4(toneMapping(inputColor.rgb),inputColor.a);\n#endif\n}",ct={REINHARD:0,REINHARD2:1,REINHARD2_ADAPTIVE:2,OPTIMIZED_CINEON:3,ACES_FILMIC:4},ft=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.blendFunction,i=void 0===r?me.NORMAL:r,a=n.adaptive,o=void 0===a||a,s=n.mode,l=void 0===s?o?ct.REINHARD2_ADAPTIVE:ct.REINHARD2:s,c=n.resolution,f=void 0===c?256:c,d=n.maxLuminance,h=void 0===d?16:d,v=n.whitePoint,g=void 0===v?h:v,b=n.middleGrey,A=void 0===b?.6:b,x=n.minLuminance,w=void 0===x?.01:x,M=n.averageLuminance,S=void 0===M?1:M,E=n.adaptationRate,C=void 0===E?1:E;return Object(m.a)(this,t),(e=Object(p.a)(this,Object(u.a)(t).call(this,"ToneMappingEffect",ut,{blendFunction:i,uniforms:new Map([["luminanceBuffer",new y.Uniform(null)],["maxLuminance",new y.Uniform(h)],["whitePoint",new y.Uniform(g)],["middleGrey",new y.Uniform(A)],["averageLuminance",new y.Uniform(S)]])}))).renderTargetLuminance=new y.WebGLRenderTarget(1,1,{minFilter:void 0!==y.LinearMipmapLinearFilter?y.LinearMipmapLinearFilter:y.LinearMipMapLinearFilter,magFilter:y.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),e.renderTargetLuminance.texture.name="Luminance",e.renderTargetLuminance.texture.generateMipmaps=!0,e.luminancePass=new Ce({renderTarget:e.renderTargetLuminance}),e.adaptiveLuminancePass=new se(e.luminancePass.getTexture(),{minLuminance:w,adaptationRate:C}),e.uniforms.get("luminanceBuffer").value=e.adaptiveLuminancePass.getTexture(),e.mode=null,e.setMode(l),e.setResolution(f),e}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getMode",value:function(){return this.mode}},{key:"setMode",value:function(e){if(this.mode!==e){switch(this.defines.clear(),e){case ct.REINHARD:this.defines.set("toneMapping(texel)","ReinhardToneMapping(texel)");break;case ct.OPTIMIZED_CINEON:this.defines.set("toneMapping(texel)","OptimizedCineonToneMapping(texel)");break;case ct.ACES_FILMIC:this.defines.set("toneMapping(texel)","ACESFilmicToneMapping(texel)");break;default:this.defines.set("toneMapping(texel)","texel")}e===ct.REINHARD2?this.defines.set("REINHARD2","1"):e===ct.REINHARD2_ADAPTIVE&&(this.defines.set("REINHARD2","1"),this.defines.set("ADAPTIVE","1")),this.mode=e,this.setChanged()}}},{key:"getAdaptiveLuminanceMaterial",value:function(){return this.adaptiveLuminancePass.getFullscreenMaterial()}},{key:"getResolution",value:function(){return this.luminancePass.getResolution().getWidth()}},{key:"setResolution",value:function(e){var t=Math.max(0,Math.ceil(Math.log2(e))),n=Math.pow(2,t);this.luminancePass.getResolution().setPreferredSize(n,n),this.getAdaptiveLuminanceMaterial().setMipLevel1x1(t)}},{key:"update",value:function(e,t,n){this.mode===ct.REINHARD2_ADAPTIVE&&(this.luminancePass.render(e,t),this.adaptiveLuminancePass.render(e,null,null,n))}},{key:"initialize",value:function(e,t,n){this.adaptiveLuminancePass.initialize(e,t,n)}},{key:"resolution",get:function(){return this.getResolution()},set:function(e){this.setResolution(e)}},{key:"adaptive",get:function(){return this.defines.has("ADAPTIVE")},set:function(e){this.mode=e?ct.REINHARD2_ADAPTIVE:ct.REINHARD2}},{key:"adaptationRate",get:function(){return this.getAdaptiveLuminanceMaterial().getAdaptationRate()},set:function(e){this.getAdaptiveLuminanceMaterial().setAdaptationRate(e)}},{key:"distinction",get:function(){return console.warn(this.name,"distinction was removed."),1},set:function(e){console.warn(this.name,"distinction was removed.")}}]),t}(Ae),dt="uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb;\n#if VIGNETTE_TECHNIQUE == 0\nfloat d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset));\n#else\nvec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord));\n#endif\noutputColor=vec4(color,inputColor.a);}",ht={DEFAULT:0,ESKIL:1},pt=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.blendFunction,r=void 0===n?me.NORMAL:n,i=e.technique,a=void 0===i?ht.DEFAULT:i,o=(e.eskil,e.offset),s=void 0===o?.5:o,l=e.darkness,c=void 0===l?.5:l;return Object(m.a)(this,t),Object(p.a)(this,Object(u.a)(t).call(this,"VignetteEffect",dt,{blendFunction:r,defines:new Map([["VIGNETTE_TECHNIQUE",a.toFixed(0)]]),uniforms:new Map([["offset",new y.Uniform(s)],["darkness",new y.Uniform(c)]])}))}return Object(v.a)(t,e),Object(g.a)(t,[{key:"getTechnique",value:function(){return Number(this.defines.get("VIGNETTE_TECHNIQUE"))}},{key:"setTechnique",value:function(e){this.getTechnique()!==e&&(this.defines.set("VIGNETTE_TECHNIQUE",e.toFixed(0)),this.setChanged())}},{key:"getOffset",value:function(){return this.uniforms.get("offset").value}},{key:"setOffset",value:function(e){this.uniforms.get("offset").value=e}},{key:"getDarkness",value:function(){return this.uniforms.get("darkness").value}},{key:"setDarkness",value:function(e){this.uniforms.get("darkness").value=e}},{key:"eskil",get:function(){return this.getTechnique()===ht.ESKIL},set:function(e){this.setTechnique(e?ht.ESKIL:ht.DEFAULT)}}]),t}(Ae);new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]);new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]);mt(0,0,0,0),new Float32Array([0,0,0,0]),mt(0,0,0,1),new Float32Array([0,0,0,1]),mt(0,0,1,0),new Float32Array([0,0,1,0]),mt(0,0,1,1),new Float32Array([0,0,1,1]),mt(0,1,0,0),new Float32Array([0,1,0,0]),mt(0,1,0,1),new Float32Array([0,1,0,1]),mt(0,1,1,0),new Float32Array([0,1,1,0]),mt(0,1,1,1),new Float32Array([0,1,1,1]),mt(1,0,0,0),new Float32Array([1,0,0,0]),mt(1,0,0,1),new Float32Array([1,0,0,1]),mt(1,0,1,0),new Float32Array([1,0,1,0]),mt(1,0,1,1),new Float32Array([1,0,1,1]),mt(1,1,0,0),new Float32Array([1,1,0,0]),mt(1,1,0,1),new Float32Array([1,1,0,1]),mt(1,1,1,0),new Float32Array([1,1,1,0]),mt(1,1,1,1),new Float32Array([1,1,1,1]);function vt(e,t,n){return e+(t-e)*n}function mt(e,t,n,r){var i=vt(e,t,.75),a=vt(n,r,.75);return vt(i,a,.875)}y.Loader,y.Loader,y.Loader;var gt,yt=n(4),bt=n.n(yt),At=n(10);function xt(){if(void 0!==gt)return gt;try{var e,t,n=document.createElement("canvas");return gt=!(!window.WebGL2RenderingContext||!(t=n.getContext("webgl2"))),t&&(null===(e=t.getExtension("WEBGL_lose_context"))||void 0===e||e.loseContext()),gt}catch(r){return gt=!1}}n.d(t,"a",function(){return Mt}),n.d(t,"b",function(){return Et});var wt=function(e,t){return void 0===t&&(t=me.NORMAL),Object(yt.forwardRef)(function(n,r){var i=n.blendFunction,a=n.opacity,s=Object(o.a)(n,["blendFunction","opacity"]),l=Object(yt.useMemo)(function(){return new e(s)},[s]);return Object(yt.useLayoutEffect)(function(){l.blendMode.blendFunction=i||t,void 0!==a&&(l.blendMode.opacity.value=a)},[i,l.blendMode,a]),bt.a.createElement("primitive",{ref:r,object:l,dispose:null})})},Mt=wt(De,me.SCREEN),St=(wt(Pe),wt(Fe),wt(Ne),Object(yt.createContext)(null)),Et=bt.a.memo(Object(yt.forwardRef)(function(e,t){var n=e.children,o=e.camera,s=e.scene,l=e.enabled,u=void 0===l||l,c=e.renderPriority,f=void 0===c?1:c,d=e.autoClear,h=void 0===d||d,p=e.depthBuffer,v=e.disableNormalPass,m=e.stencilBuffer,g=e.multisampling,b=void 0===g?8:g,A=e.frameBufferType,x=void 0===A?y.HalfFloatType:A,w=Object(At.d)(),M=w.gl,S=w.scene,E=w.camera,C=w.size;s=s||S,o=o||E;var _=Object(yt.useMemo)(function(){var e=new Be(M,{depthBuffer:p,stencilBuffer:m,multisampling:b>0&&xt()?b:0,frameBufferType:x});e.addPass(new ve(s,o));var t=v?null:new Te(s,o);return t&&(t.enabled=!1),t&&e.addPass(t),[e,t]},[o,M,p,m,b,x,s,v]),T=Object(a.a)(_,2),k=T[0],B=T[1];Object(yt.useLayoutEffect)(function(){return null==k?void 0:k.setSize(C.width,C.height)},[k,C]),Object(At.b)(function(e,t){u&&(M.autoClear=h,k.render(t))},u?f:0);var O=Object(yt.useRef)(null);Object(yt.useLayoutEffect)(function(){var e;return O.current&&O.current.__r3f&&k&&(e=Object(r.a)(Me,[o].concat(Object(i.a)(O.current.__r3f.objects))),k.addPass(e),e.renderToScreen=!0,B&&(B.enabled=!0)),function(){e&&(null==k||k.removePass(e)),B&&(B.enabled=!1)}},[k,n,o]);var R=Object(yt.useMemo)(function(){return{composer:k,normalPass:B,camera:o,scene:s}},[k,B,o,s]);return Object(yt.useImperativeHandle)(t,function(){return k},[k]),bt.a.createElement(St.Provider,{value:R},bt.a.createElement("group",{ref:O},n))}));wt(He),wt(ze),wt(Ke,me.COLOR_DODGE),wt(Ze,me.OVERLAY),wt(ot),wt(ft),wt(pt),wt(it)},function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,l,"next",e)}function l(e){r(o,i,a,s,l,"throw",e)}s(void 0)})}}n.d(t,"a",function(){return i})},function(e,t,n){"use strict";e.exports=n(54)},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!==i--;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return Re});var r=n(28),i=n(4),a=n.n(i),o=n(39),s=n.n(o),l=n(40),u=n(41),c=n(33),f=n(32),d=n.n(f);function h(){return(h=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var E=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&S(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a=T&&(T=t+1),C.set(e,t),_.set(t,e)},R="style["+x+'][data-styled-version="5.3.3"]',D=new RegExp("^"+x+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,i=n.split(","),a=0,o=i.length;a=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(x))return r}}(n),a=void 0!==i?i.nextSibling:null;r.setAttribute(x,"active"),r.setAttribute("data-styled-version","5.3.3");var o=I();return o&&r.setAttribute("nonce",o),n.insertBefore(r,a),r},j=function(){function e(e){var t=this.element=F(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+",")}),r+=""+s+l+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),V=/(a)(d)/gi,W=function(e){return String.fromCharCode(e+(e>25?39:97))};function J(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=W(t%52)+n;return(W(t%52)+n).replace(V,"$1-$2")}var Q=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return Q(5381,e)};function X(e){for(var t=0;t>>0);if(!t.hasNameForId(r,o)){var s=n(a,"."+o,void 0,r);t.insertRules(r,o,s)}i.push(o),this.staticRulesId=o}else{for(var l=this.rules.length,u=Q(this.baseHash,n.hash),c="",f=0;f>>0);if(!t.hasNameForId(r,v)){var m=n(c,"."+v,void 0,r);t.insertRules(r,v,m)}i.push(v)}}return i.join(" ")},e}(),Z=/^\s*\/\/.*$/gm,$=[":","[",".","#"];function ee(e){var t,n,r,i,a=void 0===e?g:e,o=a.options,s=void 0===o?g:o,u=a.plugins,c=void 0===u?m:u,f=new l.a(s),d=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,a,o,s,l,u,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}(function(e){d.push(e)}),p=function(e,r,a){return 0===r&&-1!==$.indexOf(a[n.length])||a.match(i)?e:"."+t};function v(e,a,o,s){void 0===s&&(s="&");var l=e.replace(Z,""),u=a&&o?o+" "+a+" { "+l+" }":l;return t=s,n=a,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),f(o||!a?"":a,u)}return f.use([].concat(c,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),v.hash=c.length?c.reduce(function(e,t){return t.name||S(15),Q(e,t.name)},5381).toString():"",v}var te=a.a.createContext(),ne=(te.Consumer,a.a.createContext()),re=(ne.Consumer,new z),ie=ee();function ae(){return Object(i.useContext)(te)||re}function oe(){return Object(i.useContext)(ne)||ie}function se(e){var t=Object(i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=ae(),l=Object(i.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target]),u=Object(i.useMemo)(function(){return ee({options:{prefix:!e.disableVendorPrefixes},plugins:n})},[e.disableVendorPrefixes,n]);return Object(i.useEffect)(function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]),a.a.createElement(te.Provider,{value:l},a.a.createElement(ne.Provider,{value:u},e.children))}var le=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ie);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return S(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ie),this.name+e.hash},e}(),ue=/([A-Z])/,ce=/([A-Z])/g,fe=/^ms-/,de=function(e){return"-"+e.toLowerCase()};function he(e){return ue.test(e)?e.replace(ce,de).replace(fe,"-ms-"):e}var pe=function(e){return null==e||!1===e||""===e};function ve(e,t,n,r){if(Array.isArray(e)){for(var i,a=[],o=0,s=e.length;o1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,Ae=/(^-|-$)/g;function xe(e){return e.replace(be,"-").replace(Ae,"")}var we=function(e){return J(Y(e)>>>0)};function Me(e){return"string"==typeof e&&!0}var Se=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ee=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ce(e,t,n){var r=e[n];Se(t)&&Se(r)?_e(r,t):e[n]=t}function _e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(i[n]=e[n]);return i}(t,["componentId"]),a=r&&r+"-"+(Me(e)?e:xe(b(e)));return Be(e,h({},i,{attrs:w,componentId:a}),n)},Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?_e({},e.defaultProps,t):t}}),S.toString=function(){return"."+S.styledComponentId},o&&d()(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),S}var Oe=function(e){return function e(t,n,i){if(void 0===i&&(i=g),!Object(r.isValidElementType)(n))return S(1,String(n));var a=function(){return t(n,i,ge.apply(void 0,arguments))};return a.withConfig=function(r){return e(t,n,h({},i,{},r))},a.attrs=function(r){return e(t,n,h({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},a}(Be,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Oe[e]=Oe(e)});!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=X(e),z.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var i=r(ve(this.rules,t,n,r).join(""),""),a=this.componentId+e;n.insertRules(a,a,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&z.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();function Re(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?S(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return S(2);var n=((t={})[x]="",t["data-styled-version"]="5.3.3",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=I();return r&&(n.nonce=r),[a.a.createElement("style",h({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new z({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?S(2):a.a.createElement(se,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return S(3)}}();t.a=Oe}).call(this,n(35))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(1);function i(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}},function(e,t,n){"use strict";e.exports=n(57)},,function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(46)},function(e,t){function n(e,t,n){var r,i,a,o,s;function l(){var u=Date.now()-o;u=0?r=setTimeout(l,t-u):(r=null,n||(s=e.apply(a,i),a=i=null))}null==t&&(t=100);var u=function(){a=this,i=arguments,o=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(s=e.apply(a,i),a=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=e.apply(a,i),a=i=null,clearTimeout(r),r=null)},u}n.debounce=n,e.exports=n},function(e,t,n){"use strict";var r=n(58),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var o=c(n);f&&(o=o.concat(f(n)));for(var s=l(t),v=l(n),m=0;m1)for(var n=1;nr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0h)&&(N=(G=G.replace(" ",":")).length),0