@matematrolii/sketchbook
Version:
3D matematrolii playground built on three.js and cannon.js
5 lines • 1.06 MB
JavaScript
/*!
* Sketchbook 0.4 (https://github.com/swift502/Sketchbook)
* Built on three.js (https://github.com/mrdoob/three.js) and cannon.js (https://github.com/schteppe/cannon.js)
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Sketchbook=e():t.Sketchbook=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=21)}([function(t,e,n){"use strict";n.r(e),n.d(e,"ACESFilmicToneMapping",(function(){return ct})),n.d(e,"AddEquation",(function(){return R})),n.d(e,"AddOperation",(function(){return nt})),n.d(e,"AdditiveBlending",(function(){return A})),n.d(e,"AlphaFormat",(function(){return Ht})),n.d(e,"AlwaysDepth",(function(){return q})),n.d(e,"AlwaysStencilFunc",(function(){return hn})),n.d(e,"AmbientLight",(function(){return nh})),n.d(e,"AmbientLightProbe",(function(){return Th})),n.d(e,"AnimationClip",(function(){return lu})),n.d(e,"AnimationLoader",(function(){return gu})),n.d(e,"AnimationMixer",(function(){return ep})),n.d(e,"AnimationObjectGroup",(function(){return $h})),n.d(e,"AnimationUtils",(function(){return Zl})),n.d(e,"ArcCurve",(function(){return Tu})),n.d(e,"ArrayCamera",(function(){return ws})),n.d(e,"ArrowHelper",(function(){return jp})),n.d(e,"Audio",(function(){return Nh})),n.d(e,"AudioAnalyser",(function(){return Gh})),n.d(e,"AudioContext",(function(){return wh})),n.d(e,"AudioListener",(function(){return Oh})),n.d(e,"AudioLoader",(function(){return _h})),n.d(e,"AxesHelper",(function(){return kp})),n.d(e,"AxisHelper",(function(){return $d})),n.d(e,"BackSide",(function(){return g})),n.d(e,"BasicDepthPacking",(function(){return We})),n.d(e,"BasicShadowMap",(function(){return p})),n.d(e,"BinaryTextureLoader",(function(){return of})),n.d(e,"Bone",(function(){return Ks})),n.d(e,"BooleanKeyframeTrack",(function(){return nu})),n.d(e,"BoundingBoxHelper",(function(){return tf})),n.d(e,"Box2",(function(){return up})),n.d(e,"Box3",(function(){return Si})),n.d(e,"Box3Helper",(function(){return zp})),n.d(e,"BoxBufferGeometry",(function(){return eo})),n.d(e,"BoxGeometry",(function(){return to})),n.d(e,"BoxHelper",(function(){return Dp})),n.d(e,"BufferAttribute",(function(){return lr})),n.d(e,"BufferGeometry",(function(){return Pr})),n.d(e,"BufferGeometryLoader",(function(){return ch})),n.d(e,"ByteType",(function(){return Ct})),n.d(e,"Cache",(function(){return hu})),n.d(e,"Camera",(function(){return co})),n.d(e,"CameraHelper",(function(){return Op})),n.d(e,"CanvasRenderer",(function(){return cf})),n.d(e,"CanvasTexture",(function(){return Sc})),n.d(e,"CatmullRomCurve3",(function(){return Cu})),n.d(e,"CineonToneMapping",(function(){return st})),n.d(e,"CircleBufferGeometry",(function(){return Dl})),n.d(e,"CircleGeometry",(function(){return Bl})),n.d(e,"ClampToEdgeWrapping",(function(){return yt})),n.d(e,"Clock",(function(){return Lh})),n.d(e,"ClosedSplineCurve3",(function(){return Zd})),n.d(e,"Color",(function(){return tr})),n.d(e,"ColorKeyframeTrack",(function(){return iu})),n.d(e,"CompressedTexture",(function(){return Mc})),n.d(e,"CompressedTextureLoader",(function(){return yu})),n.d(e,"ConeBufferGeometry",(function(){return Nl})),n.d(e,"ConeGeometry",(function(){return Ol})),n.d(e,"CubeCamera",(function(){return po})),n.d(e,"CubeGeometry",(function(){return to})),n.d(e,"CubeReflectionMapping",(function(){return ut})),n.d(e,"CubeRefractionMapping",(function(){return ht})),n.d(e,"CubeTexture",(function(){return Do})),n.d(e,"CubeTextureLoader",(function(){return _u})),n.d(e,"CubeUVReflectionMapping",(function(){return mt})),n.d(e,"CubeUVRefractionMapping",(function(){return vt})),n.d(e,"CubicBezierCurve",(function(){return Nu})),n.d(e,"CubicBezierCurve3",(function(){return Bu})),n.d(e,"CubicInterpolant",(function(){return Kl})),n.d(e,"CullFaceBack",(function(){return s})),n.d(e,"CullFaceFront",(function(){return c})),n.d(e,"CullFaceFrontBack",(function(){return l})),n.d(e,"CullFaceNone",(function(){return a})),n.d(e,"Curve",(function(){return Mu})),n.d(e,"CurvePath",(function(){return ju})),n.d(e,"CustomBlending",(function(){return L})),n.d(e,"CylinderBufferGeometry",(function(){return Il})),n.d(e,"CylinderGeometry",(function(){return Fl})),n.d(e,"Cylindrical",(function(){return cp})),n.d(e,"DataTexture",(function(){return mo})),n.d(e,"DataTexture2DArray",(function(){return zo})),n.d(e,"DataTexture3D",(function(){return Uo})),n.d(e,"DataTextureLoader",(function(){return xu})),n.d(e,"DecrementStencilOp",(function(){return $e})),n.d(e,"DecrementWrapStencilOp",(function(){return en})),n.d(e,"DefaultLoadingManager",(function(){return du})),n.d(e,"DepthFormat",(function(){return Yt})),n.d(e,"DepthStencilFormat",(function(){return Qt})),n.d(e,"DepthTexture",(function(){return Tc})),n.d(e,"DirectionalLight",(function(){return eh})),n.d(e,"DirectionalLightHelper",(function(){return Cp})),n.d(e,"DirectionalLightShadow",(function(){return th})),n.d(e,"DiscreteInterpolant",(function(){return tu})),n.d(e,"DodecahedronBufferGeometry",(function(){return zc})),n.d(e,"DodecahedronGeometry",(function(){return Dc})),n.d(e,"DoubleSide",(function(){return y})),n.d(e,"DstAlphaFactor",(function(){return G})),n.d(e,"DstColorFactor",(function(){return j})),n.d(e,"DynamicBufferAttribute",(function(){return Vd})),n.d(e,"DynamicCopyUsage",(function(){return xn})),n.d(e,"DynamicDrawUsage",(function(){return dn})),n.d(e,"DynamicReadUsage",(function(){return vn})),n.d(e,"EdgesGeometry",(function(){return Cl})),n.d(e,"EdgesHelper",(function(){return ef})),n.d(e,"EllipseCurve",(function(){return Su})),n.d(e,"EqualDepth",(function(){return Z})),n.d(e,"EqualStencilFunc",(function(){return an})),n.d(e,"EquirectangularReflectionMapping",(function(){return pt})),n.d(e,"EquirectangularRefractionMapping",(function(){return dt})),n.d(e,"Euler",(function(){return Yn})),n.d(e,"EventDispatcher",(function(){return _n})),n.d(e,"ExtrudeBufferGeometry",(function(){return gl})),n.d(e,"ExtrudeGeometry",(function(){return vl})),n.d(e,"Face3",(function(){return rr})),n.d(e,"Face4",(function(){return Pd})),n.d(e,"FaceColors",(function(){return b})),n.d(e,"FileLoader",(function(){return vu})),n.d(e,"FlatShading",(function(){return x})),n.d(e,"Float32Attribute",(function(){return Yd})),n.d(e,"Float32BufferAttribute",(function(){return gr})),n.d(e,"Float64Attribute",(function(){return Qd})),n.d(e,"Float64BufferAttribute",(function(){return yr})),n.d(e,"FloatType",(function(){return Bt})),n.d(e,"Fog",(function(){return Ts})),n.d(e,"FogExp2",(function(){return Ss})),n.d(e,"Font",(function(){return gh})),n.d(e,"FontLoader",(function(){return xh})),n.d(e,"FrontFaceDirectionCCW",(function(){return h})),n.d(e,"FrontFaceDirectionCW",(function(){return u})),n.d(e,"FrontSide",(function(){return v})),n.d(e,"Frustum",(function(){return yo})),n.d(e,"GammaEncoding",(function(){return Ue})),n.d(e,"Geometry",(function(){return $r})),n.d(e,"GeometryUtils",(function(){return sf})),n.d(e,"GreaterDepth",(function(){return K})),n.d(e,"GreaterEqualDepth",(function(){return J})),n.d(e,"GreaterEqualStencilFunc",(function(){return un})),n.d(e,"GreaterStencilFunc",(function(){return cn})),n.d(e,"GridHelper",(function(){return Ap})),n.d(e,"Group",(function(){return _s})),n.d(e,"HalfFloatType",(function(){return Dt})),n.d(e,"HemisphereLight",(function(){return qu})),n.d(e,"HemisphereLightHelper",(function(){return Tp})),n.d(e,"HemisphereLightProbe",(function(){return Sh})),n.d(e,"IcosahedronBufferGeometry",(function(){return Bc})),n.d(e,"IcosahedronGeometry",(function(){return Nc})),n.d(e,"ImageBitmapLoader",(function(){return mh})),n.d(e,"ImageLoader",(function(){return wu})),n.d(e,"ImageUtils",(function(){return Pn})),n.d(e,"ImmediateRenderObject",(function(){return fp})),n.d(e,"IncrementStencilOp",(function(){return Ke})),n.d(e,"IncrementWrapStencilOp",(function(){return tn})),n.d(e,"InstancedBufferAttribute",(function(){return sh})),n.d(e,"InstancedBufferGeometry",(function(){return ah})),n.d(e,"InstancedInterleavedBuffer",(function(){return ip})),n.d(e,"InstancedMesh",(function(){return ic})),n.d(e,"Int16Attribute",(function(){return kd})),n.d(e,"Int16BufferAttribute",(function(){return dr})),n.d(e,"Int32Attribute",(function(){return Xd})),n.d(e,"Int32BufferAttribute",(function(){return mr})),n.d(e,"Int8Attribute",(function(){return Gd})),n.d(e,"Int8BufferAttribute",(function(){return ur})),n.d(e,"IntType",(function(){return Ot})),n.d(e,"InterleavedBuffer",(function(){return As})),n.d(e,"InterleavedBufferAttribute",(function(){return Ls})),n.d(e,"Interpolant",(function(){return Jl})),n.d(e,"InterpolateDiscrete",(function(){return Pe})),n.d(e,"InterpolateLinear",(function(){return Le})),n.d(e,"InterpolateSmooth",(function(){return Re})),n.d(e,"InvertStencilOp",(function(){return nn})),n.d(e,"JSONLoader",(function(){return lf})),n.d(e,"KeepStencilOp",(function(){return Ze})),n.d(e,"KeyframeTrack",(function(){return eu})),n.d(e,"LOD",(function(){return qs})),n.d(e,"LatheBufferGeometry",(function(){return El})),n.d(e,"LatheGeometry",(function(){return Al})),n.d(e,"Layers",(function(){return Qn})),n.d(e,"LensFlare",(function(){return hf})),n.d(e,"LessDepth",(function(){return Y})),n.d(e,"LessEqualDepth",(function(){return Q})),n.d(e,"LessEqualStencilFunc",(function(){return sn})),n.d(e,"LessStencilFunc",(function(){return on})),n.d(e,"Light",(function(){return Xu})),n.d(e,"LightProbe",(function(){return Mh})),n.d(e,"LightShadow",(function(){return Yu})),n.d(e,"Line",(function(){return uc})),n.d(e,"Line3",(function(){return dp})),n.d(e,"LineBasicMaterial",(function(){return rc})),n.d(e,"LineCurve",(function(){return Du})),n.d(e,"LineCurve3",(function(){return zu})),n.d(e,"LineDashedMaterial",(function(){return Yl})),n.d(e,"LineLoop",(function(){return fc})),n.d(e,"LinePieces",(function(){return Rd})),n.d(e,"LineSegments",(function(){return dc})),n.d(e,"LineStrip",(function(){return Ld})),n.d(e,"LinearEncoding",(function(){return De})),n.d(e,"LinearFilter",(function(){return Tt})),n.d(e,"LinearInterpolant",(function(){return $l})),n.d(e,"LinearMipMapLinearFilter",(function(){return Lt})),n.d(e,"LinearMipMapNearestFilter",(function(){return Et})),n.d(e,"LinearMipmapLinearFilter",(function(){return Pt})),n.d(e,"LinearMipmapNearestFilter",(function(){return At})),n.d(e,"LinearToneMapping",(function(){return rt})),n.d(e,"Loader",(function(){return fu})),n.d(e,"LoaderUtils",(function(){return oh})),n.d(e,"LoadingManager",(function(){return pu})),n.d(e,"LogLuvEncoding",(function(){return Ge})),n.d(e,"LoopOnce",(function(){return Te})),n.d(e,"LoopPingPong",(function(){return Ee})),n.d(e,"LoopRepeat",(function(){return Ae})),n.d(e,"LuminanceAlphaFormat",(function(){return Xt})),n.d(e,"LuminanceFormat",(function(){return Wt})),n.d(e,"MOUSE",(function(){return r})),n.d(e,"Material",(function(){return ar})),n.d(e,"MaterialLoader",(function(){return rh})),n.d(e,"Math",(function(){return Tn})),n.d(e,"MathUtils",(function(){return Tn})),n.d(e,"Matrix3",(function(){return En})),n.d(e,"Matrix4",(function(){return Wn})),n.d(e,"MaxEquation",(function(){return O})),n.d(e,"Mesh",(function(){return Xr})),n.d(e,"MeshBasicMaterial",(function(){return sr})),n.d(e,"MeshDepthMaterial",(function(){return us})),n.d(e,"MeshDistanceMaterial",(function(){return hs})),n.d(e,"MeshFaceMaterial",(function(){return Cd})),n.d(e,"MeshLambertMaterial",(function(){return Xl})),n.d(e,"MeshMatcapMaterial",(function(){return ql})),n.d(e,"MeshNormalMaterial",(function(){return Wl})),n.d(e,"MeshPhongMaterial",(function(){return jl})),n.d(e,"MeshPhysicalMaterial",(function(){return Hl})),n.d(e,"MeshStandardMaterial",(function(){return Gl})),n.d(e,"MeshToonMaterial",(function(){return kl})),n.d(e,"MinEquation",(function(){return I})),n.d(e,"MirroredRepeatWrapping",(function(){return xt})),n.d(e,"MixOperation",(function(){return et})),n.d(e,"MultiMaterial",(function(){return Fd})),n.d(e,"MultiplyBlending",(function(){return P})),n.d(e,"MultiplyOperation",(function(){return tt})),n.d(e,"NearestFilter",(function(){return wt})),n.d(e,"NearestMipMapLinearFilter",(function(){return St})),n.d(e,"NearestMipMapNearestFilter",(function(){return bt})),n.d(e,"NearestMipmapLinearFilter",(function(){return Mt})),n.d(e,"NearestMipmapNearestFilter",(function(){return _t})),n.d(e,"NeverDepth",(function(){return X})),n.d(e,"NeverStencilFunc",(function(){return rn})),n.d(e,"NoBlending",(function(){return S})),n.d(e,"NoColors",(function(){return _})),n.d(e,"NoToneMapping",(function(){return it})),n.d(e,"NormalBlending",(function(){return T})),n.d(e,"NotEqualDepth",(function(){return $})),n.d(e,"NotEqualStencilFunc",(function(){return ln})),n.d(e,"NumberKeyframeTrack",(function(){return ru})),n.d(e,"Object3D",(function(){return li})),n.d(e,"ObjectLoader",(function(){return uh})),n.d(e,"ObjectSpaceNormalMap",(function(){return Ye})),n.d(e,"OctahedronBufferGeometry",(function(){return Oc})),n.d(e,"OctahedronGeometry",(function(){return Ic})),n.d(e,"OneFactor",(function(){return B})),n.d(e,"OneMinusDstAlphaFactor",(function(){return H})),n.d(e,"OneMinusDstColorFactor",(function(){return k})),n.d(e,"OneMinusSrcAlphaFactor",(function(){return V})),n.d(e,"OneMinusSrcColorFactor",(function(){return z})),n.d(e,"OrthographicCamera",(function(){return $u})),n.d(e,"PCFShadowMap",(function(){return d})),n.d(e,"PCFSoftShadowMap",(function(){return f})),n.d(e,"PMREMGenerator",(function(){return md})),n.d(e,"ParametricBufferGeometry",(function(){return Pc})),n.d(e,"ParametricGeometry",(function(){return Ec})),n.d(e,"Particle",(function(){return Od})),n.d(e,"ParticleBasicMaterial",(function(){return Dd})),n.d(e,"ParticleSystem",(function(){return Nd})),n.d(e,"ParticleSystemMaterial",(function(){return zd})),n.d(e,"Path",(function(){return ku})),n.d(e,"PerspectiveCamera",(function(){return lo})),n.d(e,"Plane",(function(){return Ui})),n.d(e,"PlaneBufferGeometry",(function(){return Mo})),n.d(e,"PlaneGeometry",(function(){return bo})),n.d(e,"PlaneHelper",(function(){return Up})),n.d(e,"PointCloud",(function(){return Id})),n.d(e,"PointCloudMaterial",(function(){return Bd})),n.d(e,"PointLight",(function(){return Ku})),n.d(e,"PointLightHelper",(function(){return _p})),n.d(e,"Points",(function(){return wc})),n.d(e,"PointsMaterial",(function(){return mc})),n.d(e,"PolarGridHelper",(function(){return Ep})),n.d(e,"PolyhedronBufferGeometry",(function(){return Rc})),n.d(e,"PolyhedronGeometry",(function(){return Lc})),n.d(e,"PositionalAudio",(function(){return Vh})),n.d(e,"PropertyBinding",(function(){return Kh})),n.d(e,"PropertyMixer",(function(){return Hh})),n.d(e,"QuadraticBezierCurve",(function(){return Uu})),n.d(e,"QuadraticBezierCurve3",(function(){return Vu})),n.d(e,"Quaternion",(function(){return On})),n.d(e,"QuaternionKeyframeTrack",(function(){return au})),n.d(e,"QuaternionLinearInterpolant",(function(){return ou})),n.d(e,"REVISION",(function(){return i})),n.d(e,"RGBADepthPacking",(function(){return Xe})),n.d(e,"RGBAFormat",(function(){return kt})),n.d(e,"RGBAIntegerFormat",(function(){return ee})),n.d(e,"RGBA_ASTC_10x10_Format",(function(){return be})),n.d(e,"RGBA_ASTC_10x5_Format",(function(){return xe})),n.d(e,"RGBA_ASTC_10x6_Format",(function(){return we})),n.d(e,"RGBA_ASTC_10x8_Format",(function(){return _e})),n.d(e,"RGBA_ASTC_12x10_Format",(function(){return Me})),n.d(e,"RGBA_ASTC_12x12_Format",(function(){return Se})),n.d(e,"RGBA_ASTC_4x4_Format",(function(){return he})),n.d(e,"RGBA_ASTC_5x4_Format",(function(){return pe})),n.d(e,"RGBA_ASTC_5x5_Format",(function(){return de})),n.d(e,"RGBA_ASTC_6x5_Format",(function(){return fe})),n.d(e,"RGBA_ASTC_6x6_Format",(function(){return me})),n.d(e,"RGBA_ASTC_8x5_Format",(function(){return ve})),n.d(e,"RGBA_ASTC_8x6_Format",(function(){return ge})),n.d(e,"RGBA_ASTC_8x8_Format",(function(){return ye})),n.d(e,"RGBA_PVRTC_2BPPV1_Format",(function(){return le})),n.d(e,"RGBA_PVRTC_4BPPV1_Format",(function(){return ce})),n.d(e,"RGBA_S3TC_DXT1_Format",(function(){return ie})),n.d(e,"RGBA_S3TC_DXT3_Format",(function(){return re})),n.d(e,"RGBA_S3TC_DXT5_Format",(function(){return oe})),n.d(e,"RGBDEncoding",(function(){return ke})),n.d(e,"RGBEEncoding",(function(){return Ve})),n.d(e,"RGBEFormat",(function(){return qt})),n.d(e,"RGBFormat",(function(){return jt})),n.d(e,"RGBIntegerFormat",(function(){return te})),n.d(e,"RGBM16Encoding",(function(){return je})),n.d(e,"RGBM7Encoding",(function(){return He})),n.d(e,"RGB_ETC1_Format",(function(){return ue})),n.d(e,"RGB_PVRTC_2BPPV1_Format",(function(){return se})),n.d(e,"RGB_PVRTC_4BPPV1_Format",(function(){return ae})),n.d(e,"RGB_S3TC_DXT1_Format",(function(){return ne})),n.d(e,"RGFormat",(function(){return Kt})),n.d(e,"RGIntegerFormat",(function(){return $t})),n.d(e,"RawShaderMaterial",(function(){return Vl})),n.d(e,"Ray",(function(){return Ni})),n.d(e,"Raycaster",(function(){return rp})),n.d(e,"RectAreaLight",(function(){return ih})),n.d(e,"RedFormat",(function(){return Zt})),n.d(e,"RedIntegerFormat",(function(){return Jt})),n.d(e,"ReinhardToneMapping",(function(){return ot})),n.d(e,"RepeatWrapping",(function(){return gt})),n.d(e,"ReplaceStencilOp",(function(){return Je})),n.d(e,"ReverseSubtractEquation",(function(){return F})),n.d(e,"RingBufferGeometry",(function(){return Tl})),n.d(e,"RingGeometry",(function(){return Sl})),n.d(e,"Scene",(function(){return ui})),n.d(e,"SceneUtils",(function(){return uf})),n.d(e,"ShaderChunk",(function(){return So})),n.d(e,"ShaderLib",(function(){return To})),n.d(e,"ShaderMaterial",(function(){return so})),n.d(e,"ShadowMaterial",(function(){return Ul})),n.d(e,"Shape",(function(){return Wu})),n.d(e,"ShapeBufferGeometry",(function(){return Ll})),n.d(e,"ShapeGeometry",(function(){return Pl})),n.d(e,"ShapePath",(function(){return vh})),n.d(e,"ShapeUtils",(function(){return dl})),n.d(e,"ShortType",(function(){return Ft})),n.d(e,"Skeleton",(function(){return Js})),n.d(e,"SkeletonHelper",(function(){return wp})),n.d(e,"SkinnedMesh",(function(){return Ys})),n.d(e,"SmoothShading",(function(){return w})),n.d(e,"Sphere",(function(){return Ei})),n.d(e,"SphereBufferGeometry",(function(){return Ml})),n.d(e,"SphereGeometry",(function(){return bl})),n.d(e,"Spherical",(function(){return sp})),n.d(e,"SphericalHarmonics3",(function(){return bh})),n.d(e,"SphericalReflectionMapping",(function(){return ft})),n.d(e,"Spline",(function(){return Kd})),n.d(e,"SplineCurve",(function(){return Gu})),n.d(e,"SplineCurve3",(function(){return Jd})),n.d(e,"SpotLight",(function(){return Zu})),n.d(e,"SpotLightHelper",(function(){return vp})),n.d(e,"SpotLightShadow",(function(){return Qu})),n.d(e,"Sprite",(function(){return js})),n.d(e,"SpriteMaterial",(function(){return Rs})),n.d(e,"SrcAlphaFactor",(function(){return U})),n.d(e,"SrcAlphaSaturateFactor",(function(){return W})),n.d(e,"SrcColorFactor",(function(){return D})),n.d(e,"StaticCopyUsage",(function(){return yn})),n.d(e,"StaticDrawUsage",(function(){return pn})),n.d(e,"StaticReadUsage",(function(){return mn})),n.d(e,"StereoCamera",(function(){return Ph})),n.d(e,"StreamCopyUsage",(function(){return wn})),n.d(e,"StreamDrawUsage",(function(){return fn})),n.d(e,"StreamReadUsage",(function(){return gn})),n.d(e,"StringKeyframeTrack",(function(){return su})),n.d(e,"SubtractEquation",(function(){return C})),n.d(e,"SubtractiveBlending",(function(){return E})),n.d(e,"TOUCH",(function(){return o})),n.d(e,"TangentSpaceNormalMap",(function(){return qe})),n.d(e,"TetrahedronBufferGeometry",(function(){return Fc})),n.d(e,"TetrahedronGeometry",(function(){return Cc})),n.d(e,"TextBufferGeometry",(function(){return _l})),n.d(e,"TextGeometry",(function(){return wl})),n.d(e,"Texture",(function(){return Rn})),n.d(e,"TextureLoader",(function(){return bu})),n.d(e,"TorusBufferGeometry",(function(){return kc})),n.d(e,"TorusGeometry",(function(){return jc})),n.d(e,"TorusKnotBufferGeometry",(function(){return Hc})),n.d(e,"TorusKnotGeometry",(function(){return Gc})),n.d(e,"Triangle",(function(){return Zi})),n.d(e,"TriangleFanDrawMode",(function(){return Be})),n.d(e,"TriangleStripDrawMode",(function(){return Ne})),n.d(e,"TrianglesDrawMode",(function(){return Oe})),n.d(e,"TubeBufferGeometry",(function(){return Vc})),n.d(e,"TubeGeometry",(function(){return Uc})),n.d(e,"UVMapping",(function(){return lt})),n.d(e,"Uint16Attribute",(function(){return Wd})),n.d(e,"Uint16BufferAttribute",(function(){return fr})),n.d(e,"Uint32Attribute",(function(){return qd})),n.d(e,"Uint32BufferAttribute",(function(){return vr})),n.d(e,"Uint8Attribute",(function(){return Hd})),n.d(e,"Uint8BufferAttribute",(function(){return hr})),n.d(e,"Uint8ClampedAttribute",(function(){return jd})),n.d(e,"Uint8ClampedBufferAttribute",(function(){return pr})),n.d(e,"Uncharted2ToneMapping",(function(){return at})),n.d(e,"Uniform",(function(){return np})),n.d(e,"UniformsLib",(function(){return xo})),n.d(e,"UniformsUtils",(function(){return ro})),n.d(e,"UnsignedByteType",(function(){return Rt})),n.d(e,"UnsignedInt248Type",(function(){return Gt})),n.d(e,"UnsignedIntType",(function(){return Nt})),n.d(e,"UnsignedShort4444Type",(function(){return zt})),n.d(e,"UnsignedShort5551Type",(function(){return Ut})),n.d(e,"UnsignedShort565Type",(function(){return Vt})),n.d(e,"UnsignedShortType",(function(){return It})),n.d(e,"VSMShadowMap",(function(){return m})),n.d(e,"Vector2",(function(){return An})),n.d(e,"Vector3",(function(){return Dn})),n.d(e,"Vector4",(function(){return Cn})),n.d(e,"VectorKeyframeTrack",(function(){return cu})),n.d(e,"Vertex",(function(){return Ud})),n.d(e,"VertexColors",(function(){return M})),n.d(e,"VideoTexture",(function(){return bc})),n.d(e,"WebGLCubeRenderTarget",(function(){return fo})),n.d(e,"WebGLMultisampleRenderTarget",(function(){return In})),n.d(e,"WebGLRenderTarget",(function(){return Fn})),n.d(e,"WebGLRenderTargetCube",(function(){return af})),n.d(e,"WebGLRenderer",(function(){return Ms})),n.d(e,"WebGLUtils",(function(){return gs})),n.d(e,"WireframeGeometry",(function(){return Ac})),n.d(e,"WireframeHelper",(function(){return nf})),n.d(e,"WrapAroundEnding",(function(){return Ie})),n.d(e,"XHRLoader",(function(){return rf})),n.d(e,"ZeroCurvatureEnding",(function(){return Ce})),n.d(e,"ZeroFactor",(function(){return N})),n.d(e,"ZeroSlopeEnding",(function(){return Fe})),n.d(e,"ZeroStencilOp",(function(){return Qe})),n.d(e,"sRGBEncoding",(function(){return ze})),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e});var i="113",r={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},a=0,s=1,c=2,l=3,u=0,h=1,p=0,d=1,f=2,m=3,v=0,g=1,y=2,x=1,w=2,_=0,b=1,M=2,S=0,T=1,A=2,E=3,P=4,L=5,R=100,C=101,F=102,I=103,O=104,N=200,B=201,D=202,z=203,U=204,V=205,G=206,H=207,j=208,k=209,W=210,X=0,q=1,Y=2,Q=3,Z=4,J=5,K=6,$=7,tt=0,et=1,nt=2,it=0,rt=1,ot=2,at=3,st=4,ct=5,lt=300,ut=301,ht=302,pt=303,dt=304,ft=305,mt=306,vt=307,gt=1e3,yt=1001,xt=1002,wt=1003,_t=1004,bt=1004,Mt=1005,St=1005,Tt=1006,At=1007,Et=1007,Pt=1008,Lt=1008,Rt=1009,Ct=1010,Ft=1011,It=1012,Ot=1013,Nt=1014,Bt=1015,Dt=1016,zt=1017,Ut=1018,Vt=1019,Gt=1020,Ht=1021,jt=1022,kt=1023,Wt=1024,Xt=1025,qt=kt,Yt=1026,Qt=1027,Zt=1028,Jt=1029,Kt=1030,$t=1031,te=1032,ee=1033,ne=33776,ie=33777,re=33778,oe=33779,ae=35840,se=35841,ce=35842,le=35843,ue=36196,he=37808,pe=37809,de=37810,fe=37811,me=37812,ve=37813,ge=37814,ye=37815,xe=37816,we=37817,_e=37818,be=37819,Me=37820,Se=37821,Te=2200,Ae=2201,Ee=2202,Pe=2300,Le=2301,Re=2302,Ce=2400,Fe=2401,Ie=2402,Oe=0,Ne=1,Be=2,De=3e3,ze=3001,Ue=3007,Ve=3002,Ge=3003,He=3004,je=3005,ke=3006,We=3200,Xe=3201,qe=0,Ye=1,Qe=0,Ze=7680,Je=7681,Ke=7682,$e=7683,tn=34055,en=34056,nn=5386,rn=512,on=513,an=514,sn=515,cn=516,ln=517,un=518,hn=519,pn=35044,dn=35048,fn=35040,mn=35045,vn=35049,gn=35041,yn=35046,xn=35050,wn=35042;function _n(){}Object.assign(_n.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var i=n.indexOf(e);-1!==i&&n.splice(i,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),i=0,r=n.length;i<r;i++)n[i].call(this,t)}}}});for(var bn=[],Mn=0;Mn<256;Mn++)bn[Mn]=(Mn<16?"0":"")+Mn.toString(16);var Sn,Tn={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(bn[255&t]+bn[t>>8&255]+bn[t>>16&255]+bn[t>>24&255]+"-"+bn[255&e]+bn[e>>8&255]+"-"+bn[e>>16&15|64]+bn[e>>24&255]+"-"+bn[63&n|128]+bn[n>>8&255]+"-"+bn[n>>16&255]+bn[n>>24&255]+bn[255&i]+bn[i>>8&255]+bn[i>>16&255]+bn[i>>24&255]).toUpperCase()},clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Tn.DEG2RAD},radToDeg:function(t){return t*Tn.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,e,n,i,r){var o=Math.cos,a=Math.sin,s=o(n/2),c=a(n/2),l=o((e+i)/2),u=a((e+i)/2),h=o((e-i)/2),p=a((e-i)/2),d=o((i-e)/2),f=a((i-e)/2);"XYX"===r?t.set(s*u,c*h,c*p,s*l):"YZY"===r?t.set(c*p,s*u,c*h,s*l):"ZXZ"===r?t.set(c*h,c*p,s*u,s*l):"XZX"===r?t.set(s*u,c*f,c*d,s*l):"YXY"===r?t.set(c*d,s*u,c*f,s*l):"ZYZ"===r?t.set(c*f,c*d,s*u,s*l):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function An(t,e){this.x=t||0,this.y=e||0}function En(){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.")}Object.defineProperties(An.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(An.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this},clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero: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},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}}),Object.assign(En.prototype,{isMatrix3:!0,set:function(t,e,n,i,r,o,a,s,c){var l=this.elements;return l[0]=t,l[1]=i,l[2]=a,l[3]=e,l[4]=r,l[5]=s,l[6]=n,l[7]=o,l[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,i=e.elements,r=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],l=n[4],u=n[7],h=n[2],p=n[5],d=n[8],f=i[0],m=i[3],v=i[6],g=i[1],y=i[4],x=i[7],w=i[2],_=i[5],b=i[8];return r[0]=o*f+a*g+s*w,r[3]=o*m+a*y+s*_,r[6]=o*v+a*x+s*b,r[1]=c*f+l*g+u*w,r[4]=c*m+l*y+u*_,r[7]=c*v+l*x+u*b,r[2]=h*f+p*g+d*w,r[5]=h*m+p*y+d*_,r[8]=h*v+p*x+d*b,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],c=t[7],l=t[8];return e*o*l-e*a*c-n*r*l+n*a*s+i*r*c-i*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,i=this.elements,r=n[0],o=n[1],a=n[2],s=n[3],c=n[4],l=n[5],u=n[6],h=n[7],p=n[8],d=p*c-l*h,f=l*u-p*s,m=h*s-c*u,v=r*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return i[0]=d*y,i[1]=(a*h-p*o)*y,i[2]=(l*o-a*c)*y,i[3]=f*y,i[4]=(p*r-a*u)*y,i[5]=(a*s-l*r)*y,i[6]=m*y,i[7]=(o*u-h*r)*y,i[8]=(c*r-o*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,n,i,r,o,a){var s=Math.cos(r),c=Math.sin(r);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-i*c,i*s,-i*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=this.elements,r=i[0],o=i[3],a=i[6],s=i[1],c=i[4],l=i[7];return i[0]=e*r+n*s,i[3]=e*o+n*c,i[6]=e*a+n*l,i[1]=-n*r+e*s,i[4]=-n*o+e*c,i[7]=-n*a+e*l,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Pn={getDataURL:function(t){var e;if("undefined"==typeof HTMLCanvasElement)return t.src;if(t instanceof HTMLCanvasElement)e=t;else{void 0===Sn&&(Sn=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Sn.width=t.width,Sn.height=t.height;var n=Sn.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Sn}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},Ln=0;function Rn(t,e,n,i,r,o,a,s,c,l){Object.defineProperty(this,"id",{value:Ln++}),this.uuid=Tn.generateUUID(),this.name="",this.image=void 0!==t?t:Rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:Rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:yt,this.wrapT=void 0!==i?i:yt,this.magFilter=void 0!==r?r:Tt,this.minFilter=void 0!==o?o:Pt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:kt,this.internalFormat=null,this.type=void 0!==s?s:Rt,this.offset=new An(0,0),this.repeat=new An(1,1),this.center=new An(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new En,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:De,this.version=0,this.onUpdate=null}function Cn(t,e,n,i){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==i?i:1}function Fn(t,e,n){this.width=t,this.height=e,this.scissor=new Cn(0,0,t,e),this.scissorTest=!1,this.viewport=new Cn(0,0,t,e),n=n||{},this.texture=new Rn(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=t,this.texture.image.height=e,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:Tt,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function In(t,e,n){Fn.call(this,t,e,n),this.samples=4}function On(t,e,n,i){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==i?i:1}Rn.DEFAULT_IMAGE=void 0,Rn.DEFAULT_MAPPING=lt,Rn.prototype=Object.assign(Object.create(_n.prototype),{constructor:Rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.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 i=this.image;if(void 0===i.uuid&&(i.uuid=Tn.generateUUID()),!e&&void 0===t.images[i.uuid]){var r;if(Array.isArray(i)){r=[];for(var o=0,a=i.length;o<a;o++)r.push(Pn.getDataURL(i[o]))}else r=Pn.getDataURL(i);t.images[i.uuid]={uuid:i.uuid,url:r}}n.image=i.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==lt)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case gt:t.x=t.x-Math.floor(t.x);break;case yt:t.x=t.x<0?0:1;break;case xt:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case gt:t.y=t.y-Math.floor(t.y);break;case yt:t.y=t.y<0?0:1;break;case xt:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(Rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.defineProperties(Cn.prototype,{width:{get:function(){return this.z},set:function(t){this.z=t}},height:{get:function(){return this.w},set:function(t){this.w=t}}}),Object.assign(Cn.prototype,{isVector4:!0,set:function(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){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: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,i,r,o=t.elements,a=o[0],s=o[4],c=o[8],l=o[1],u=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-l)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+l)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+u+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(u+1)/2,g=(f+1)/2,y=(s+l)/4,x=(c+p)/4,w=(h+d)/4;return m>v&&m>g?m<.01?(n=0,i=.707106781,r=.707106781):(i=y/(n=Math.sqrt(m)),r=x/n):v>g?v<.01?(n=.707106781,i=0,r=.707106781):(n=y/(i=Math.sqrt(v)),r=w/i):g<.01?(n=.707106781,i=.707106781,r=0):(n=x/(r=Math.sqrt(g)),i=w/r),this.set(n,i,r,e),this}var _=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(l-s)*(l-s));return Math.abs(_)<.001&&(_=1),this.x=(d-h)/_,this.y=(c-p)/_,this.z=(l-s)/_,this.w=Math.acos((a+u+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this},clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor: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},ceil: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},round: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},roundToZero: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},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),Fn.prototype=Object.assign(Object.create(_n.prototype),{constructor:Fn,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.texture.image.width=t,this.texture.image.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),In.prototype=Object.assign(Object.create(Fn.prototype),{constructor:In,isWebGLMultisampleRenderTarget:!0,copy:function(t){return Fn.prototype.copy.call(this,t),this.samples=t.samples,this}}),Object.assign(On,{slerp:function(t,e,n,i){return n.copy(t).slerp(e,i)},slerpFlat:function(t,e,n,i,r,o,a){var s=n[i+0],c=n[i+1],l=n[i+2],u=n[i+3],h=r[o+0],p=r[o+1],d=r[o+2],f=r[o+3];if(u!==f||s!==h||c!==p||l!==d){var m=1-a,v=s*h+c*p+l*d+u*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),w=Math.atan2(x,v*g);m=Math.sin(m*w)/x,a=Math.sin(a*w)/x}var _=a*g;if(s=s*m+h*_,c=c*m+p*_,l=l*m+d*_,u=u*m+f*_,m===1-a){var b=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=b,c*=b,l*=b,u*=b}}t[e]=s,t[e+1]=c,t[e+2]=l,t[e+3]=u}}),Object.defineProperties(On.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this._onChangeCallback()}}}),Object.assign(On.prototype,{isQuaternion:!0,set:function(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,i=t._y,r=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),l=a(i/2),u=a(r/2),h=s(n/2),p=s(i/2),d=s(r/2);return"XYZ"===o?(this._x=h*l*u+c*p*d,this._y=c*p*u-h*l*d,this._z=c*l*d+h*p*u,this._w=c*l*u-h*p*d):"YXZ"===o?(this._x=h*l*u+c*p*d,this._y=c*p*u-h*l*d,this._z=c*l*d-h*p*u,this._w=c*l*u+h*p*d):"ZXY"===o?(this._x=h*l*u-c*p*d,this._y=c*p*u+h*l*d,this._z=c*l*d+h*p*u,this._w=c*l*u-h*p*d):"ZYX"===o?(this._x=h*l*u-c*p*d,this._y=c*p*u+h*l*d,this._z=c*l*d-h*p*u,this._w=c*l*u+h*p*d):"YZX"===o?(this._x=h*l*u+c*p*d,this._y=c*p*u+h*l*d,this._z=c*l*d-h*p*u,this._w=c*l*u-h*p*d):"XZY"===o&&(this._x=h*l*u-c*p*d,this._y=c*p*u-h*l*d,this._z=c*l*d+h*p*u,this._w=c*l*u+h*p*d),!1!==e&&this._onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,i=n[0],r=n[4],o=n[8],a=n[1],s=n[5],c=n[9],l=n[2],u=n[6],h=n[10],p=i+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(u-c)*e,this._y=(o-l)*e,this._z=(a-r)*e):i>s&&i>h?(e=2*Math.sqrt(1+i-s-h),this._w=(u-c)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(o+l)/e):s>h?(e=2*Math.sqrt(1+s-i-h),this._w=(o-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(c+u)/e):(e=2*Math.sqrt(1+h-i-s),this._w=(a-r)/e,this._x=(o+l)/e,this._y=(c+u)/e,this._z=.25*e),this._onChangeCallback(),this},setFromUnitVectors:function(t,e){var n=t.dot(e)+1;return n<1e-6?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()},angleTo:function(t){return 2*Math.acos(Math.abs(Tn.c