mage-engine 3.22.0 → 3.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/mage.js +536 -374
  2. package/package.json +1 -1
package/dist/mage.js CHANGED
@@ -53918,13 +53918,17 @@ if ( typeof window !== 'undefined' ) {
53918
53918
 
53919
53919
  }
53920
53920
 
53921
- }var three_module=/*#__PURE__*/Object.freeze({__proto__:null,ACESFilmicToneMapping:ACESFilmicToneMapping,AddEquation:AddEquation,AddOperation:AddOperation,AdditiveAnimationBlendMode:AdditiveAnimationBlendMode,AdditiveBlending:AdditiveBlending,AlphaFormat:AlphaFormat,AlwaysDepth:AlwaysDepth,AlwaysStencilFunc:AlwaysStencilFunc,AmbientLight:AmbientLight$1,AmbientLightProbe:AmbientLightProbe,AnimationClip:AnimationClip,AnimationLoader:AnimationLoader,AnimationMixer:AnimationMixer,AnimationObjectGroup:AnimationObjectGroup,AnimationUtils:AnimationUtils,ArcCurve:ArcCurve,ArrayCamera:ArrayCamera,ArrowHelper:ArrowHelper,Audio:Audio$2,AudioAnalyser:AudioAnalyser,AudioContext:AudioContext,AudioListener:AudioListener,AudioLoader:AudioLoader,AxesHelper:AxesHelper$1,AxisHelper:AxisHelper,BackSide:BackSide,BasicDepthPacking:BasicDepthPacking,BasicShadowMap:BasicShadowMap,BinaryTextureLoader:BinaryTextureLoader,Bone:Bone,BooleanKeyframeTrack:BooleanKeyframeTrack,BoundingBoxHelper:BoundingBoxHelper,Box2:Box2,Box3:Box3,Box3Helper:Box3Helper,BoxBufferGeometry:BoxGeometry,BoxGeometry:BoxGeometry,BoxHelper:BoxHelper,BufferAttribute:BufferAttribute,BufferGeometry:BufferGeometry,BufferGeometryLoader:BufferGeometryLoader,ByteType:ByteType,Cache:Cache,Camera:Camera$1,CameraHelper:CameraHelper,CanvasRenderer:CanvasRenderer,CanvasTexture:CanvasTexture,CatmullRomCurve3:CatmullRomCurve3,CineonToneMapping:CineonToneMapping,CircleBufferGeometry:CircleGeometry,CircleGeometry:CircleGeometry,ClampToEdgeWrapping:ClampToEdgeWrapping,Clock:Clock,Color:Color$1,ColorKeyframeTrack:ColorKeyframeTrack,CompressedTexture:CompressedTexture,CompressedTextureLoader:CompressedTextureLoader,ConeBufferGeometry:ConeGeometry,ConeGeometry:ConeGeometry,CubeCamera:CubeCamera,CubeReflectionMapping:CubeReflectionMapping,CubeRefractionMapping:CubeRefractionMapping,CubeTexture:CubeTexture,CubeTextureLoader:CubeTextureLoader,CubeUVReflectionMapping:CubeUVReflectionMapping,CubeUVRefractionMapping:CubeUVRefractionMapping,CubicBezierCurve:CubicBezierCurve,CubicBezierCurve3:CubicBezierCurve3,CubicInterpolant:CubicInterpolant,CullFaceBack:CullFaceBack,CullFaceFront:CullFaceFront,CullFaceFrontBack:CullFaceFrontBack,CullFaceNone:CullFaceNone,Curve:Curve,CurvePath:CurvePath,CustomBlending:CustomBlending,CustomToneMapping:CustomToneMapping,CylinderBufferGeometry:CylinderGeometry,CylinderGeometry:CylinderGeometry,Cylindrical:Cylindrical,DataTexture:DataTexture,DataTexture2DArray:DataTexture2DArray,DataTexture3D:DataTexture3D,DataTextureLoader:DataTextureLoader,DataUtils:DataUtils,DecrementStencilOp:DecrementStencilOp,DecrementWrapStencilOp:DecrementWrapStencilOp,DefaultLoadingManager:DefaultLoadingManager,DepthFormat:DepthFormat,DepthStencilFormat:DepthStencilFormat,DepthTexture:DepthTexture,DirectionalLight:DirectionalLight,DirectionalLightHelper:DirectionalLightHelper,DiscreteInterpolant:DiscreteInterpolant,DodecahedronBufferGeometry:DodecahedronGeometry,DodecahedronGeometry:DodecahedronGeometry,DoubleSide:DoubleSide,DstAlphaFactor:DstAlphaFactor,DstColorFactor:DstColorFactor,DynamicBufferAttribute:DynamicBufferAttribute,DynamicCopyUsage:DynamicCopyUsage,DynamicDrawUsage:DynamicDrawUsage,DynamicReadUsage:DynamicReadUsage,EdgesGeometry:EdgesGeometry,EdgesHelper:EdgesHelper,EllipseCurve:EllipseCurve,EqualDepth:EqualDepth,EqualStencilFunc:EqualStencilFunc,EquirectangularReflectionMapping:EquirectangularReflectionMapping,EquirectangularRefractionMapping:EquirectangularRefractionMapping,Euler:Euler,EventDispatcher:EventDispatcher,ExtrudeBufferGeometry:ExtrudeGeometry,ExtrudeGeometry:ExtrudeGeometry,FaceColors:FaceColors,FileLoader:FileLoader,FlatShading:FlatShading,Float16BufferAttribute:Float16BufferAttribute,Float32Attribute:Float32Attribute,Float32BufferAttribute:Float32BufferAttribute,Float64Attribute:Float64Attribute,Float64BufferAttribute:Float64BufferAttribute,FloatType:FloatType$1,Fog:Fog,FogExp2:FogExp2,Font:Font,FontLoader:FontLoader,FrontSide:FrontSide,Frustum:Frustum$1,GLBufferAttribute:GLBufferAttribute,GLSL1:GLSL1,GLSL3:GLSL3,GammaEncoding:GammaEncoding,GreaterDepth:GreaterDepth,GreaterEqualDepth:GreaterEqualDepth,GreaterEqualStencilFunc:GreaterEqualStencilFunc,GreaterStencilFunc:GreaterStencilFunc,GridHelper:GridHelper,Group:Group,HalfFloatType:HalfFloatType,HemisphereLight:HemisphereLight$1,HemisphereLightHelper:HemisphereLightHelper,HemisphereLightProbe:HemisphereLightProbe,IcosahedronBufferGeometry:IcosahedronGeometry,IcosahedronGeometry:IcosahedronGeometry,ImageBitmapLoader:ImageBitmapLoader,ImageLoader:ImageLoader,ImageUtils:ImageUtils,ImmediateRenderObject:ImmediateRenderObject,IncrementStencilOp:IncrementStencilOp,IncrementWrapStencilOp:IncrementWrapStencilOp,InstancedBufferAttribute:InstancedBufferAttribute,InstancedBufferGeometry:InstancedBufferGeometry,InstancedInterleavedBuffer:InstancedInterleavedBuffer,InstancedMesh:InstancedMesh,Int16Attribute:Int16Attribute,Int16BufferAttribute:Int16BufferAttribute,Int32Attribute:Int32Attribute,Int32BufferAttribute:Int32BufferAttribute,Int8Attribute:Int8Attribute,Int8BufferAttribute:Int8BufferAttribute,IntType:IntType,InterleavedBuffer:InterleavedBuffer,InterleavedBufferAttribute:InterleavedBufferAttribute,Interpolant:Interpolant,InterpolateDiscrete:InterpolateDiscrete,InterpolateLinear:InterpolateLinear,InterpolateSmooth:InterpolateSmooth,InvertStencilOp:InvertStencilOp,JSONLoader:JSONLoader,KeepStencilOp:KeepStencilOp,KeyframeTrack:KeyframeTrack,LOD:LOD,LatheBufferGeometry:LatheGeometry,LatheGeometry:LatheGeometry,Layers:Layers,LensFlare:LensFlare,LessDepth:LessDepth,LessEqualDepth:LessEqualDepth,LessEqualStencilFunc:LessEqualStencilFunc,LessStencilFunc:LessStencilFunc,Light:Light$1,LightProbe:LightProbe,Line:Line$1,Line3:Line3,LineBasicMaterial:LineBasicMaterial,LineCurve:LineCurve,LineCurve3:LineCurve3,LineDashedMaterial:LineDashedMaterial,LineLoop:LineLoop,LinePieces:LinePieces,LineSegments:LineSegments,LineStrip:LineStrip,LinearEncoding:LinearEncoding,LinearFilter:LinearFilter,LinearInterpolant:LinearInterpolant,LinearMipMapLinearFilter:LinearMipMapLinearFilter,LinearMipMapNearestFilter:LinearMipMapNearestFilter,LinearMipmapLinearFilter:LinearMipmapLinearFilter,LinearMipmapNearestFilter:LinearMipmapNearestFilter,LinearToneMapping:LinearToneMapping,Loader:Loader$1,LoaderUtils:LoaderUtils,LoadingManager:LoadingManager,LogLuvEncoding:LogLuvEncoding,LoopOnce:LoopOnce,LoopPingPong:LoopPingPong,LoopRepeat:LoopRepeat,LuminanceAlphaFormat:LuminanceAlphaFormat,LuminanceFormat:LuminanceFormat,MOUSE:MOUSE,Material:Material,MaterialLoader:MaterialLoader,Math:MathUtils,MathUtils:MathUtils,Matrix3:Matrix3,Matrix4:Matrix4,MaxEquation:MaxEquation,Mesh:Mesh,MeshBasicMaterial:MeshBasicMaterial,MeshDepthMaterial:MeshDepthMaterial,MeshDistanceMaterial:MeshDistanceMaterial,MeshFaceMaterial:MeshFaceMaterial,MeshLambertMaterial:MeshLambertMaterial,MeshMatcapMaterial:MeshMatcapMaterial,MeshNormalMaterial:MeshNormalMaterial,MeshPhongMaterial:MeshPhongMaterial,MeshPhysicalMaterial:MeshPhysicalMaterial,MeshStandardMaterial:MeshStandardMaterial,MeshToonMaterial:MeshToonMaterial,MinEquation:MinEquation,MirroredRepeatWrapping:MirroredRepeatWrapping,MixOperation:MixOperation,MultiMaterial:MultiMaterial,MultiplyBlending:MultiplyBlending,MultiplyOperation:MultiplyOperation,NearestFilter:NearestFilter,NearestMipMapLinearFilter:NearestMipMapLinearFilter,NearestMipMapNearestFilter:NearestMipMapNearestFilter,NearestMipmapLinearFilter:NearestMipmapLinearFilter,NearestMipmapNearestFilter:NearestMipmapNearestFilter,NeverDepth:NeverDepth,NeverStencilFunc:NeverStencilFunc,NoBlending:NoBlending,NoColors:NoColors,NoToneMapping:NoToneMapping,NormalAnimationBlendMode:NormalAnimationBlendMode,NormalBlending:NormalBlending,NotEqualDepth:NotEqualDepth,NotEqualStencilFunc:NotEqualStencilFunc,NumberKeyframeTrack:NumberKeyframeTrack,Object3D:Object3D,ObjectLoader:ObjectLoader,ObjectSpaceNormalMap:ObjectSpaceNormalMap,OctahedronBufferGeometry:OctahedronGeometry,OctahedronGeometry:OctahedronGeometry,OneFactor:OneFactor,OneMinusDstAlphaFactor:OneMinusDstAlphaFactor,OneMinusDstColorFactor:OneMinusDstColorFactor,OneMinusSrcAlphaFactor:OneMinusSrcAlphaFactor,OneMinusSrcColorFactor:OneMinusSrcColorFactor,OrthographicCamera:OrthographicCamera,PCFShadowMap:PCFShadowMap,PCFSoftShadowMap:PCFSoftShadowMap,PMREMGenerator:PMREMGenerator,ParametricBufferGeometry:ParametricGeometry,ParametricGeometry:ParametricGeometry,Particle:Particle,ParticleBasicMaterial:ParticleBasicMaterial,ParticleSystem:ParticleSystem,ParticleSystemMaterial:ParticleSystemMaterial,Path:Path,PerspectiveCamera:PerspectiveCamera,Plane:Plane$1,PlaneBufferGeometry:PlaneGeometry,PlaneGeometry:PlaneGeometry,PlaneHelper:PlaneHelper,PointCloud:PointCloud,PointCloudMaterial:PointCloudMaterial,PointLight:PointLight$1,PointLightHelper:PointLightHelper,Points:Points,PointsMaterial:PointsMaterial,PolarGridHelper:PolarGridHelper,PolyhedronBufferGeometry:PolyhedronGeometry,PolyhedronGeometry:PolyhedronGeometry,PositionalAudio:PositionalAudio,PropertyBinding:PropertyBinding,PropertyMixer:PropertyMixer,QuadraticBezierCurve:QuadraticBezierCurve,QuadraticBezierCurve3:QuadraticBezierCurve3,Quaternion:Quaternion,QuaternionKeyframeTrack:QuaternionKeyframeTrack,QuaternionLinearInterpolant:QuaternionLinearInterpolant,REVISION:REVISION,RGBADepthPacking:RGBADepthPacking,RGBAFormat:RGBAFormat,RGBAIntegerFormat:RGBAIntegerFormat,RGBA_ASTC_10x10_Format:RGBA_ASTC_10x10_Format,RGBA_ASTC_10x5_Format:RGBA_ASTC_10x5_Format,RGBA_ASTC_10x6_Format:RGBA_ASTC_10x6_Format,RGBA_ASTC_10x8_Format:RGBA_ASTC_10x8_Format,RGBA_ASTC_12x10_Format:RGBA_ASTC_12x10_Format,RGBA_ASTC_12x12_Format:RGBA_ASTC_12x12_Format,RGBA_ASTC_4x4_Format:RGBA_ASTC_4x4_Format,RGBA_ASTC_5x4_Format:RGBA_ASTC_5x4_Format,RGBA_ASTC_5x5_Format:RGBA_ASTC_5x5_Format,RGBA_ASTC_6x5_Format:RGBA_ASTC_6x5_Format,RGBA_ASTC_6x6_Format:RGBA_ASTC_6x6_Format,RGBA_ASTC_8x5_Format:RGBA_ASTC_8x5_Format,RGBA_ASTC_8x6_Format:RGBA_ASTC_8x6_Format,RGBA_ASTC_8x8_Format:RGBA_ASTC_8x8_Format,RGBA_BPTC_Format:RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:RGBA_ETC2_EAC_Format,RGBA_PVRTC_2BPPV1_Format:RGBA_PVRTC_2BPPV1_Format,RGBA_PVRTC_4BPPV1_Format:RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format:RGBA_S3TC_DXT1_Format,RGBA_S3TC_DXT3_Format:RGBA_S3TC_DXT3_Format,RGBA_S3TC_DXT5_Format:RGBA_S3TC_DXT5_Format,RGBDEncoding:RGBDEncoding,RGBEEncoding:RGBEEncoding,RGBEFormat:RGBEFormat,RGBFormat:RGBFormat,RGBIntegerFormat:RGBIntegerFormat,RGBM16Encoding:RGBM16Encoding,RGBM7Encoding:RGBM7Encoding,RGB_ETC1_Format:RGB_ETC1_Format,RGB_ETC2_Format:RGB_ETC2_Format,RGB_PVRTC_2BPPV1_Format:RGB_PVRTC_2BPPV1_Format,RGB_PVRTC_4BPPV1_Format:RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:RGB_S3TC_DXT1_Format,RGFormat:RGFormat,RGIntegerFormat:RGIntegerFormat,RawShaderMaterial:RawShaderMaterial,Ray:Ray,Raycaster:Raycaster,RectAreaLight:RectAreaLight,RedFormat:RedFormat,RedIntegerFormat:RedIntegerFormat,ReinhardToneMapping:ReinhardToneMapping,RepeatWrapping:RepeatWrapping$1,ReplaceStencilOp:ReplaceStencilOp,ReverseSubtractEquation:ReverseSubtractEquation,RingBufferGeometry:RingGeometry,RingGeometry:RingGeometry,SRGB8_ALPHA8_ASTC_10x10_Format:SRGB8_ALPHA8_ASTC_10x10_Format,SRGB8_ALPHA8_ASTC_10x5_Format:SRGB8_ALPHA8_ASTC_10x5_Format,SRGB8_ALPHA8_ASTC_10x6_Format:SRGB8_ALPHA8_ASTC_10x6_Format,SRGB8_ALPHA8_ASTC_10x8_Format:SRGB8_ALPHA8_ASTC_10x8_Format,SRGB8_ALPHA8_ASTC_12x10_Format:SRGB8_ALPHA8_ASTC_12x10_Format,SRGB8_ALPHA8_ASTC_12x12_Format:SRGB8_ALPHA8_ASTC_12x12_Format,SRGB8_ALPHA8_ASTC_4x4_Format:SRGB8_ALPHA8_ASTC_4x4_Format,SRGB8_ALPHA8_ASTC_5x4_Format:SRGB8_ALPHA8_ASTC_5x4_Format,SRGB8_ALPHA8_ASTC_5x5_Format:SRGB8_ALPHA8_ASTC_5x5_Format,SRGB8_ALPHA8_ASTC_6x5_Format:SRGB8_ALPHA8_ASTC_6x5_Format,SRGB8_ALPHA8_ASTC_6x6_Format:SRGB8_ALPHA8_ASTC_6x6_Format,SRGB8_ALPHA8_ASTC_8x5_Format:SRGB8_ALPHA8_ASTC_8x5_Format,SRGB8_ALPHA8_ASTC_8x6_Format:SRGB8_ALPHA8_ASTC_8x6_Format,SRGB8_ALPHA8_ASTC_8x8_Format:SRGB8_ALPHA8_ASTC_8x8_Format,Scene:Scene$2,SceneUtils:SceneUtils,ShaderChunk:ShaderChunk,ShaderLib:ShaderLib,ShaderMaterial:ShaderMaterial,ShadowMaterial:ShadowMaterial,Shape:Shape,ShapeBufferGeometry:ShapeGeometry,ShapeGeometry:ShapeGeometry,ShapePath:ShapePath,ShapeUtils:ShapeUtils,ShortType:ShortType,Skeleton:Skeleton,SkeletonHelper:SkeletonHelper,SkinnedMesh:SkinnedMesh,SmoothShading:SmoothShading,Sphere:Sphere$1,SphereBufferGeometry:SphereGeometry,SphereGeometry:SphereGeometry,Spherical:Spherical,SphericalHarmonics3:SphericalHarmonics3,SplineCurve:SplineCurve,SpotLight:SpotLight$1,SpotLightHelper:SpotLightHelper,Sprite:Sprite$1,SpriteMaterial:SpriteMaterial,SrcAlphaFactor:SrcAlphaFactor,SrcAlphaSaturateFactor:SrcAlphaSaturateFactor,SrcColorFactor:SrcColorFactor,StaticCopyUsage:StaticCopyUsage,StaticDrawUsage:StaticDrawUsage,StaticReadUsage:StaticReadUsage,StereoCamera:StereoCamera,StreamCopyUsage:StreamCopyUsage,StreamDrawUsage:StreamDrawUsage,StreamReadUsage:StreamReadUsage,StringKeyframeTrack:StringKeyframeTrack,SubtractEquation:SubtractEquation,SubtractiveBlending:SubtractiveBlending,TOUCH:TOUCH,TangentSpaceNormalMap:TangentSpaceNormalMap,TetrahedronBufferGeometry:TetrahedronGeometry,TetrahedronGeometry:TetrahedronGeometry,TextBufferGeometry:TextGeometry,TextGeometry:TextGeometry,Texture:Texture,TextureLoader:TextureLoader,TorusBufferGeometry:TorusGeometry,TorusGeometry:TorusGeometry,TorusKnotBufferGeometry:TorusKnotGeometry,TorusKnotGeometry:TorusKnotGeometry,Triangle:Triangle,TriangleFanDrawMode:TriangleFanDrawMode,TriangleStripDrawMode:TriangleStripDrawMode,TrianglesDrawMode:TrianglesDrawMode,TubeBufferGeometry:TubeGeometry,TubeGeometry:TubeGeometry,UVMapping:UVMapping,Uint16Attribute:Uint16Attribute,Uint16BufferAttribute:Uint16BufferAttribute,Uint32Attribute:Uint32Attribute,Uint32BufferAttribute:Uint32BufferAttribute,Uint8Attribute:Uint8Attribute,Uint8BufferAttribute:Uint8BufferAttribute,Uint8ClampedAttribute:Uint8ClampedAttribute,Uint8ClampedBufferAttribute:Uint8ClampedBufferAttribute,Uniform:Uniform,UniformsLib:UniformsLib,UniformsUtils:UniformsUtils,UnsignedByteType:UnsignedByteType,UnsignedInt248Type:UnsignedInt248Type,UnsignedIntType:UnsignedIntType,UnsignedShort4444Type:UnsignedShort4444Type,UnsignedShort5551Type:UnsignedShort5551Type,UnsignedShort565Type:UnsignedShort565Type,UnsignedShortType:UnsignedShortType,VSMShadowMap:VSMShadowMap,Vector2:Vector2,Vector3:Vector3$1,Vector4:Vector4,VectorKeyframeTrack:VectorKeyframeTrack,Vertex:Vertex,VertexColors:VertexColors,VideoTexture:VideoTexture,WebGL1Renderer:WebGL1Renderer,WebGLCubeRenderTarget:WebGLCubeRenderTarget,WebGLMultisampleRenderTarget:WebGLMultisampleRenderTarget,WebGLRenderTarget:WebGLRenderTarget,WebGLRenderTargetCube:WebGLRenderTargetCube,WebGLRenderer:WebGLRenderer,WebGLUtils:WebGLUtils,WireframeGeometry:WireframeGeometry,WireframeHelper:WireframeHelper,WrapAroundEnding:WrapAroundEnding,XHRLoader:XHRLoader,ZeroCurvatureEnding:ZeroCurvatureEnding,ZeroFactor:ZeroFactor,ZeroSlopeEnding:ZeroSlopeEnding,ZeroStencilOp:ZeroStencilOp,sRGBEncoding:sRGBEncoding});var PREFIX = '[Mage]';
53922
- var DEPRECATED = '[DEPRECATED]';
53921
+ }var three_module=/*#__PURE__*/Object.freeze({__proto__:null,ACESFilmicToneMapping:ACESFilmicToneMapping,AddEquation:AddEquation,AddOperation:AddOperation,AdditiveAnimationBlendMode:AdditiveAnimationBlendMode,AdditiveBlending:AdditiveBlending,AlphaFormat:AlphaFormat,AlwaysDepth:AlwaysDepth,AlwaysStencilFunc:AlwaysStencilFunc,AmbientLight:AmbientLight$1,AmbientLightProbe:AmbientLightProbe,AnimationClip:AnimationClip,AnimationLoader:AnimationLoader,AnimationMixer:AnimationMixer,AnimationObjectGroup:AnimationObjectGroup,AnimationUtils:AnimationUtils,ArcCurve:ArcCurve,ArrayCamera:ArrayCamera,ArrowHelper:ArrowHelper,Audio:Audio$2,AudioAnalyser:AudioAnalyser,AudioContext:AudioContext,AudioListener:AudioListener,AudioLoader:AudioLoader,AxesHelper:AxesHelper$1,AxisHelper:AxisHelper,BackSide:BackSide,BasicDepthPacking:BasicDepthPacking,BasicShadowMap:BasicShadowMap,BinaryTextureLoader:BinaryTextureLoader,Bone:Bone,BooleanKeyframeTrack:BooleanKeyframeTrack,BoundingBoxHelper:BoundingBoxHelper,Box2:Box2,Box3:Box3,Box3Helper:Box3Helper,BoxBufferGeometry:BoxGeometry,BoxGeometry:BoxGeometry,BoxHelper:BoxHelper,BufferAttribute:BufferAttribute,BufferGeometry:BufferGeometry,BufferGeometryLoader:BufferGeometryLoader,ByteType:ByteType,Cache:Cache,Camera:Camera$1,CameraHelper:CameraHelper,CanvasRenderer:CanvasRenderer,CanvasTexture:CanvasTexture,CatmullRomCurve3:CatmullRomCurve3,CineonToneMapping:CineonToneMapping,CircleBufferGeometry:CircleGeometry,CircleGeometry:CircleGeometry,ClampToEdgeWrapping:ClampToEdgeWrapping,Clock:Clock,Color:Color$1,ColorKeyframeTrack:ColorKeyframeTrack,CompressedTexture:CompressedTexture,CompressedTextureLoader:CompressedTextureLoader,ConeBufferGeometry:ConeGeometry,ConeGeometry:ConeGeometry,CubeCamera:CubeCamera,CubeReflectionMapping:CubeReflectionMapping,CubeRefractionMapping:CubeRefractionMapping,CubeTexture:CubeTexture,CubeTextureLoader:CubeTextureLoader,CubeUVReflectionMapping:CubeUVReflectionMapping,CubeUVRefractionMapping:CubeUVRefractionMapping,CubicBezierCurve:CubicBezierCurve,CubicBezierCurve3:CubicBezierCurve3,CubicInterpolant:CubicInterpolant,CullFaceBack:CullFaceBack,CullFaceFront:CullFaceFront,CullFaceFrontBack:CullFaceFrontBack,CullFaceNone:CullFaceNone,Curve:Curve,CurvePath:CurvePath,CustomBlending:CustomBlending,CustomToneMapping:CustomToneMapping,CylinderBufferGeometry:CylinderGeometry,CylinderGeometry:CylinderGeometry,Cylindrical:Cylindrical,DataTexture:DataTexture,DataTexture2DArray:DataTexture2DArray,DataTexture3D:DataTexture3D,DataTextureLoader:DataTextureLoader,DataUtils:DataUtils,DecrementStencilOp:DecrementStencilOp,DecrementWrapStencilOp:DecrementWrapStencilOp,DefaultLoadingManager:DefaultLoadingManager,DepthFormat:DepthFormat,DepthStencilFormat:DepthStencilFormat,DepthTexture:DepthTexture,DirectionalLight:DirectionalLight,DirectionalLightHelper:DirectionalLightHelper,DiscreteInterpolant:DiscreteInterpolant,DodecahedronBufferGeometry:DodecahedronGeometry,DodecahedronGeometry:DodecahedronGeometry,DoubleSide:DoubleSide,DstAlphaFactor:DstAlphaFactor,DstColorFactor:DstColorFactor,DynamicBufferAttribute:DynamicBufferAttribute,DynamicCopyUsage:DynamicCopyUsage,DynamicDrawUsage:DynamicDrawUsage,DynamicReadUsage:DynamicReadUsage,EdgesGeometry:EdgesGeometry,EdgesHelper:EdgesHelper,EllipseCurve:EllipseCurve,EqualDepth:EqualDepth,EqualStencilFunc:EqualStencilFunc,EquirectangularReflectionMapping:EquirectangularReflectionMapping,EquirectangularRefractionMapping:EquirectangularRefractionMapping,Euler:Euler,EventDispatcher:EventDispatcher,ExtrudeBufferGeometry:ExtrudeGeometry,ExtrudeGeometry:ExtrudeGeometry,FaceColors:FaceColors,FileLoader:FileLoader,FlatShading:FlatShading,Float16BufferAttribute:Float16BufferAttribute,Float32Attribute:Float32Attribute,Float32BufferAttribute:Float32BufferAttribute,Float64Attribute:Float64Attribute,Float64BufferAttribute:Float64BufferAttribute,FloatType:FloatType$1,Fog:Fog,FogExp2:FogExp2,Font:Font,FontLoader:FontLoader,FrontSide:FrontSide,Frustum:Frustum$1,GLBufferAttribute:GLBufferAttribute,GLSL1:GLSL1,GLSL3:GLSL3,GammaEncoding:GammaEncoding,GreaterDepth:GreaterDepth,GreaterEqualDepth:GreaterEqualDepth,GreaterEqualStencilFunc:GreaterEqualStencilFunc,GreaterStencilFunc:GreaterStencilFunc,GridHelper:GridHelper,Group:Group,HalfFloatType:HalfFloatType,HemisphereLight:HemisphereLight$1,HemisphereLightHelper:HemisphereLightHelper,HemisphereLightProbe:HemisphereLightProbe,IcosahedronBufferGeometry:IcosahedronGeometry,IcosahedronGeometry:IcosahedronGeometry,ImageBitmapLoader:ImageBitmapLoader,ImageLoader:ImageLoader,ImageUtils:ImageUtils,ImmediateRenderObject:ImmediateRenderObject,IncrementStencilOp:IncrementStencilOp,IncrementWrapStencilOp:IncrementWrapStencilOp,InstancedBufferAttribute:InstancedBufferAttribute,InstancedBufferGeometry:InstancedBufferGeometry,InstancedInterleavedBuffer:InstancedInterleavedBuffer,InstancedMesh:InstancedMesh,Int16Attribute:Int16Attribute,Int16BufferAttribute:Int16BufferAttribute,Int32Attribute:Int32Attribute,Int32BufferAttribute:Int32BufferAttribute,Int8Attribute:Int8Attribute,Int8BufferAttribute:Int8BufferAttribute,IntType:IntType,InterleavedBuffer:InterleavedBuffer,InterleavedBufferAttribute:InterleavedBufferAttribute,Interpolant:Interpolant,InterpolateDiscrete:InterpolateDiscrete,InterpolateLinear:InterpolateLinear,InterpolateSmooth:InterpolateSmooth,InvertStencilOp:InvertStencilOp,JSONLoader:JSONLoader,KeepStencilOp:KeepStencilOp,KeyframeTrack:KeyframeTrack,LOD:LOD,LatheBufferGeometry:LatheGeometry,LatheGeometry:LatheGeometry,Layers:Layers,LensFlare:LensFlare,LessDepth:LessDepth,LessEqualDepth:LessEqualDepth,LessEqualStencilFunc:LessEqualStencilFunc,LessStencilFunc:LessStencilFunc,Light:Light$1,LightProbe:LightProbe,Line:Line$1,Line3:Line3,LineBasicMaterial:LineBasicMaterial,LineCurve:LineCurve,LineCurve3:LineCurve3,LineDashedMaterial:LineDashedMaterial,LineLoop:LineLoop,LinePieces:LinePieces,LineSegments:LineSegments,LineStrip:LineStrip,LinearEncoding:LinearEncoding,LinearFilter:LinearFilter,LinearInterpolant:LinearInterpolant,LinearMipMapLinearFilter:LinearMipMapLinearFilter,LinearMipMapNearestFilter:LinearMipMapNearestFilter,LinearMipmapLinearFilter:LinearMipmapLinearFilter,LinearMipmapNearestFilter:LinearMipmapNearestFilter,LinearToneMapping:LinearToneMapping,Loader:Loader$1,LoaderUtils:LoaderUtils,LoadingManager:LoadingManager,LogLuvEncoding:LogLuvEncoding,LoopOnce:LoopOnce,LoopPingPong:LoopPingPong,LoopRepeat:LoopRepeat,LuminanceAlphaFormat:LuminanceAlphaFormat,LuminanceFormat:LuminanceFormat,MOUSE:MOUSE,Material:Material,MaterialLoader:MaterialLoader,Math:MathUtils,MathUtils:MathUtils,Matrix3:Matrix3,Matrix4:Matrix4,MaxEquation:MaxEquation,Mesh:Mesh,MeshBasicMaterial:MeshBasicMaterial,MeshDepthMaterial:MeshDepthMaterial,MeshDistanceMaterial:MeshDistanceMaterial,MeshFaceMaterial:MeshFaceMaterial,MeshLambertMaterial:MeshLambertMaterial,MeshMatcapMaterial:MeshMatcapMaterial,MeshNormalMaterial:MeshNormalMaterial,MeshPhongMaterial:MeshPhongMaterial,MeshPhysicalMaterial:MeshPhysicalMaterial,MeshStandardMaterial:MeshStandardMaterial,MeshToonMaterial:MeshToonMaterial,MinEquation:MinEquation,MirroredRepeatWrapping:MirroredRepeatWrapping,MixOperation:MixOperation,MultiMaterial:MultiMaterial,MultiplyBlending:MultiplyBlending,MultiplyOperation:MultiplyOperation,NearestFilter:NearestFilter,NearestMipMapLinearFilter:NearestMipMapLinearFilter,NearestMipMapNearestFilter:NearestMipMapNearestFilter,NearestMipmapLinearFilter:NearestMipmapLinearFilter,NearestMipmapNearestFilter:NearestMipmapNearestFilter,NeverDepth:NeverDepth,NeverStencilFunc:NeverStencilFunc,NoBlending:NoBlending,NoColors:NoColors,NoToneMapping:NoToneMapping,NormalAnimationBlendMode:NormalAnimationBlendMode,NormalBlending:NormalBlending,NotEqualDepth:NotEqualDepth,NotEqualStencilFunc:NotEqualStencilFunc,NumberKeyframeTrack:NumberKeyframeTrack,Object3D:Object3D,ObjectLoader:ObjectLoader,ObjectSpaceNormalMap:ObjectSpaceNormalMap,OctahedronBufferGeometry:OctahedronGeometry,OctahedronGeometry:OctahedronGeometry,OneFactor:OneFactor,OneMinusDstAlphaFactor:OneMinusDstAlphaFactor,OneMinusDstColorFactor:OneMinusDstColorFactor,OneMinusSrcAlphaFactor:OneMinusSrcAlphaFactor,OneMinusSrcColorFactor:OneMinusSrcColorFactor,OrthographicCamera:OrthographicCamera,PCFShadowMap:PCFShadowMap,PCFSoftShadowMap:PCFSoftShadowMap,PMREMGenerator:PMREMGenerator,ParametricBufferGeometry:ParametricGeometry,ParametricGeometry:ParametricGeometry,Particle:Particle,ParticleBasicMaterial:ParticleBasicMaterial,ParticleSystem:ParticleSystem,ParticleSystemMaterial:ParticleSystemMaterial,Path:Path,PerspectiveCamera:PerspectiveCamera,Plane:Plane$1,PlaneBufferGeometry:PlaneGeometry,PlaneGeometry:PlaneGeometry,PlaneHelper:PlaneHelper,PointCloud:PointCloud,PointCloudMaterial:PointCloudMaterial,PointLight:PointLight$1,PointLightHelper:PointLightHelper,Points:Points,PointsMaterial:PointsMaterial,PolarGridHelper:PolarGridHelper,PolyhedronBufferGeometry:PolyhedronGeometry,PolyhedronGeometry:PolyhedronGeometry,PositionalAudio:PositionalAudio,PropertyBinding:PropertyBinding,PropertyMixer:PropertyMixer,QuadraticBezierCurve:QuadraticBezierCurve,QuadraticBezierCurve3:QuadraticBezierCurve3,Quaternion:Quaternion,QuaternionKeyframeTrack:QuaternionKeyframeTrack,QuaternionLinearInterpolant:QuaternionLinearInterpolant,REVISION:REVISION,RGBADepthPacking:RGBADepthPacking,RGBAFormat:RGBAFormat,RGBAIntegerFormat:RGBAIntegerFormat,RGBA_ASTC_10x10_Format:RGBA_ASTC_10x10_Format,RGBA_ASTC_10x5_Format:RGBA_ASTC_10x5_Format,RGBA_ASTC_10x6_Format:RGBA_ASTC_10x6_Format,RGBA_ASTC_10x8_Format:RGBA_ASTC_10x8_Format,RGBA_ASTC_12x10_Format:RGBA_ASTC_12x10_Format,RGBA_ASTC_12x12_Format:RGBA_ASTC_12x12_Format,RGBA_ASTC_4x4_Format:RGBA_ASTC_4x4_Format,RGBA_ASTC_5x4_Format:RGBA_ASTC_5x4_Format,RGBA_ASTC_5x5_Format:RGBA_ASTC_5x5_Format,RGBA_ASTC_6x5_Format:RGBA_ASTC_6x5_Format,RGBA_ASTC_6x6_Format:RGBA_ASTC_6x6_Format,RGBA_ASTC_8x5_Format:RGBA_ASTC_8x5_Format,RGBA_ASTC_8x6_Format:RGBA_ASTC_8x6_Format,RGBA_ASTC_8x8_Format:RGBA_ASTC_8x8_Format,RGBA_BPTC_Format:RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:RGBA_ETC2_EAC_Format,RGBA_PVRTC_2BPPV1_Format:RGBA_PVRTC_2BPPV1_Format,RGBA_PVRTC_4BPPV1_Format:RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format:RGBA_S3TC_DXT1_Format,RGBA_S3TC_DXT3_Format:RGBA_S3TC_DXT3_Format,RGBA_S3TC_DXT5_Format:RGBA_S3TC_DXT5_Format,RGBDEncoding:RGBDEncoding,RGBEEncoding:RGBEEncoding,RGBEFormat:RGBEFormat,RGBFormat:RGBFormat,RGBIntegerFormat:RGBIntegerFormat,RGBM16Encoding:RGBM16Encoding,RGBM7Encoding:RGBM7Encoding,RGB_ETC1_Format:RGB_ETC1_Format,RGB_ETC2_Format:RGB_ETC2_Format,RGB_PVRTC_2BPPV1_Format:RGB_PVRTC_2BPPV1_Format,RGB_PVRTC_4BPPV1_Format:RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:RGB_S3TC_DXT1_Format,RGFormat:RGFormat,RGIntegerFormat:RGIntegerFormat,RawShaderMaterial:RawShaderMaterial,Ray:Ray,Raycaster:Raycaster,RectAreaLight:RectAreaLight,RedFormat:RedFormat,RedIntegerFormat:RedIntegerFormat,ReinhardToneMapping:ReinhardToneMapping,RepeatWrapping:RepeatWrapping$1,ReplaceStencilOp:ReplaceStencilOp,ReverseSubtractEquation:ReverseSubtractEquation,RingBufferGeometry:RingGeometry,RingGeometry:RingGeometry,SRGB8_ALPHA8_ASTC_10x10_Format:SRGB8_ALPHA8_ASTC_10x10_Format,SRGB8_ALPHA8_ASTC_10x5_Format:SRGB8_ALPHA8_ASTC_10x5_Format,SRGB8_ALPHA8_ASTC_10x6_Format:SRGB8_ALPHA8_ASTC_10x6_Format,SRGB8_ALPHA8_ASTC_10x8_Format:SRGB8_ALPHA8_ASTC_10x8_Format,SRGB8_ALPHA8_ASTC_12x10_Format:SRGB8_ALPHA8_ASTC_12x10_Format,SRGB8_ALPHA8_ASTC_12x12_Format:SRGB8_ALPHA8_ASTC_12x12_Format,SRGB8_ALPHA8_ASTC_4x4_Format:SRGB8_ALPHA8_ASTC_4x4_Format,SRGB8_ALPHA8_ASTC_5x4_Format:SRGB8_ALPHA8_ASTC_5x4_Format,SRGB8_ALPHA8_ASTC_5x5_Format:SRGB8_ALPHA8_ASTC_5x5_Format,SRGB8_ALPHA8_ASTC_6x5_Format:SRGB8_ALPHA8_ASTC_6x5_Format,SRGB8_ALPHA8_ASTC_6x6_Format:SRGB8_ALPHA8_ASTC_6x6_Format,SRGB8_ALPHA8_ASTC_8x5_Format:SRGB8_ALPHA8_ASTC_8x5_Format,SRGB8_ALPHA8_ASTC_8x6_Format:SRGB8_ALPHA8_ASTC_8x6_Format,SRGB8_ALPHA8_ASTC_8x8_Format:SRGB8_ALPHA8_ASTC_8x8_Format,Scene:Scene$2,SceneUtils:SceneUtils,ShaderChunk:ShaderChunk,ShaderLib:ShaderLib,ShaderMaterial:ShaderMaterial,ShadowMaterial:ShadowMaterial,Shape:Shape,ShapeBufferGeometry:ShapeGeometry,ShapeGeometry:ShapeGeometry,ShapePath:ShapePath,ShapeUtils:ShapeUtils,ShortType:ShortType,Skeleton:Skeleton,SkeletonHelper:SkeletonHelper,SkinnedMesh:SkinnedMesh,SmoothShading:SmoothShading,Sphere:Sphere$1,SphereBufferGeometry:SphereGeometry,SphereGeometry:SphereGeometry,Spherical:Spherical,SphericalHarmonics3:SphericalHarmonics3,SplineCurve:SplineCurve,SpotLight:SpotLight$1,SpotLightHelper:SpotLightHelper,Sprite:Sprite$1,SpriteMaterial:SpriteMaterial,SrcAlphaFactor:SrcAlphaFactor,SrcAlphaSaturateFactor:SrcAlphaSaturateFactor,SrcColorFactor:SrcColorFactor,StaticCopyUsage:StaticCopyUsage,StaticDrawUsage:StaticDrawUsage,StaticReadUsage:StaticReadUsage,StereoCamera:StereoCamera,StreamCopyUsage:StreamCopyUsage,StreamDrawUsage:StreamDrawUsage,StreamReadUsage:StreamReadUsage,StringKeyframeTrack:StringKeyframeTrack,SubtractEquation:SubtractEquation,SubtractiveBlending:SubtractiveBlending,TOUCH:TOUCH,TangentSpaceNormalMap:TangentSpaceNormalMap,TetrahedronBufferGeometry:TetrahedronGeometry,TetrahedronGeometry:TetrahedronGeometry,TextBufferGeometry:TextGeometry,TextGeometry:TextGeometry,Texture:Texture,TextureLoader:TextureLoader,TorusBufferGeometry:TorusGeometry,TorusGeometry:TorusGeometry,TorusKnotBufferGeometry:TorusKnotGeometry,TorusKnotGeometry:TorusKnotGeometry,Triangle:Triangle,TriangleFanDrawMode:TriangleFanDrawMode,TriangleStripDrawMode:TriangleStripDrawMode,TrianglesDrawMode:TrianglesDrawMode,TubeBufferGeometry:TubeGeometry,TubeGeometry:TubeGeometry,UVMapping:UVMapping,Uint16Attribute:Uint16Attribute,Uint16BufferAttribute:Uint16BufferAttribute,Uint32Attribute:Uint32Attribute,Uint32BufferAttribute:Uint32BufferAttribute,Uint8Attribute:Uint8Attribute,Uint8BufferAttribute:Uint8BufferAttribute,Uint8ClampedAttribute:Uint8ClampedAttribute,Uint8ClampedBufferAttribute:Uint8ClampedBufferAttribute,Uniform:Uniform,UniformsLib:UniformsLib,UniformsUtils:UniformsUtils,UnsignedByteType:UnsignedByteType,UnsignedInt248Type:UnsignedInt248Type,UnsignedIntType:UnsignedIntType,UnsignedShort4444Type:UnsignedShort4444Type,UnsignedShort5551Type:UnsignedShort5551Type,UnsignedShort565Type:UnsignedShort565Type,UnsignedShortType:UnsignedShortType,VSMShadowMap:VSMShadowMap,Vector2:Vector2,Vector3:Vector3$1,Vector4:Vector4,VectorKeyframeTrack:VectorKeyframeTrack,Vertex:Vertex,VertexColors:VertexColors,VideoTexture:VideoTexture,WebGL1Renderer:WebGL1Renderer,WebGLCubeRenderTarget:WebGLCubeRenderTarget,WebGLMultisampleRenderTarget:WebGLMultisampleRenderTarget,WebGLRenderTarget:WebGLRenderTarget,WebGLRenderTargetCube:WebGLRenderTargetCube,WebGLRenderer:WebGLRenderer,WebGLUtils:WebGLUtils,WireframeGeometry:WireframeGeometry,WireframeHelper:WireframeHelper,WrapAroundEnding:WrapAroundEnding,XHRLoader:XHRLoader,ZeroCurvatureEnding:ZeroCurvatureEnding,ZeroFactor:ZeroFactor,ZeroSlopeEnding:ZeroSlopeEnding,ZeroStencilOp:ZeroStencilOp,sRGBEncoding:sRGBEncoding});var PREFIX = "[Mage]";
53922
+ var DEPRECATED = "[DEPRECATED]";
53923
53923
  var DEPRECATIONS = {
53924
53924
  PARTICLES_ADD_PARTICLE_EMITTER: "".concat(PREFIX, " ").concat(DEPRECATED, " Particles.addParticleEmitter is deprecated, use Particles.add instead. Will be removed in the next major release"),
53925
53925
  MODELS_GETMODEL: "".concat(PREFIX, " ").concat(DEPRECATED, " Models.getModel is deprecated, use Models.get instead. Will be removed in next major release"),
53926
53926
  SCRIPTS_CREATE: "".concat(PREFIX, " ").concat(DEPRECATED, " Scripts.create is deprecated, use Scripts.register instead. Will be removed in next major release."),
53927
- ELEMENT_SET_TEXTURE_MAP: "".concat(PREFIX, " ").concat(DEPRECATED, " Element.setTextureMap is deprecated, use Element.setTexture() instead. Will be removed in next major release.")
53927
+ ELEMENT_SET_TEXTURE_MAP: "".concat(PREFIX, " ").concat(DEPRECATED, " Element.setTextureMap is deprecated, use Element.setTexture() instead. Will be removed in next major release."),
53928
+ SET_ORBIT_CONTROL: "".concat(PREFIX, " ").concat(DEPRECATED, " Controls.setOrbitControl() is deprecated, use Controls.setOrbitControls() instead. Will be removed in next major release."),
53929
+ SET_TRANSFORM_CONTROL: "".concat(PREFIX, " ").concat(DEPRECATED, " Controls.setTransformControl() is deprecated, use Controls.setTransformControls() instead. Will be removed in next major release."),
53930
+ SET_FIRST_PERSON_CONTROL: "".concat(PREFIX, " ").concat(DEPRECATED, " Controls.setFirstPersonControl() is deprecated, use Controls.setFirstPersonControls() instead. Will be removed in next major release."),
53931
+ SET_FLY_CONTROL: "".concat(PREFIX, " ").concat(DEPRECATED, " Controls.setFlyControl() is deprecated, use Controls.setFlyControls() instead. Will be removed in next major release.")
53928
53932
  };
53929
53933
  var ONCREATE_NOT_AVAILABLE = "".concat(PREFIX, " Your scene needs a onCreate method.");
53930
53934
  var PATH_NOT_FOUND = "".concat(PREFIX, " can't find requested path");
@@ -54715,7 +54719,52 @@ var Keyboard = /*#__PURE__*/function (_EventDispatcher) {
54715
54719
  }]);
54716
54720
 
54717
54721
  return Keyboard;
54718
- }(EventDispatcher);var SHADOW_TYPES = {
54722
+ }(EventDispatcher);var ENTITY_TYPES = {
54723
+ SCENE: 'SCENE',
54724
+ CAMERA: 'CAMERA',
54725
+ MESH: 'MESH',
54726
+ LABEL: 'LABEL',
54727
+ LIGHT: {
54728
+ DEFAULT: 'LIGHT.DEFAULT',
54729
+ AMBIENT: 'LIGHT.AMBIENT',
54730
+ SUN: 'LIGHT.SUN',
54731
+ HEMISPHERE: 'LIGHT.HEMISPHERE',
54732
+ POINT: 'LIGHT.POINT',
54733
+ SPOT: 'LIGHT.SPOT'
54734
+ },
54735
+ AUDIO: {
54736
+ DEFAULT: 'AUDIO.DEFAULT',
54737
+ DIRECTIONAL: 'AUDIO.DIRECTIONAL',
54738
+ AMBIENT: 'AUDIO.AMBIENT'
54739
+ },
54740
+ MODEL: 'MODEL',
54741
+ SPRITE: 'SPRITE',
54742
+ PARTICLE: 'PARTICLE',
54743
+ EFFECT: {
54744
+ PARTICLE: 'EFFECT.PARTICLE',
54745
+ SCENERY: 'EFFECT.SCENERY'
54746
+ },
54747
+ HELPER: {
54748
+ GRID: 'HELPER.GRID',
54749
+ AXES: 'HELPER.AXES'
54750
+ },
54751
+ UNKNOWN: 'UNKNOWN'
54752
+ };
54753
+ var FLAT_ENTITY_TYPES = [ENTITY_TYPES.SCENE, ENTITY_TYPES.CAMERA, ENTITY_TYPES.MESH, ENTITY_TYPES.LABEL, ENTITY_TYPES.LIGHT.DEFAULT, ENTITY_TYPES.LIGHT.AMBIENT, ENTITY_TYPES.LIGHT.SUN, ENTITY_TYPES.LIGHT.HEMISPHERE, ENTITY_TYPES.LIGHT.POINT, ENTITY_TYPES.LIGHT.SPOT, ENTITY_TYPES.AUDIO.DEFAULT, ENTITY_TYPES.AUDIO.AMBIENT, ENTITY_TYPES.AUDIO.DIRECTIONAL, ENTITY_TYPES.AUDIO.BACKGROUND, ENTITY_TYPES.MODEL, ENTITY_TYPES.SPRITE, ENTITY_TYPES.PARTICLE, ENTITY_TYPES.EFFECT.PARTICLE, ENTITY_TYPES.EFFECT.SCENERY, ENTITY_TYPES.HELPER.GRID, ENTITY_TYPES.HELPER.AXES, ENTITY_TYPES.UNKNOWN];
54754
+ var ENTITY_EVENTS = {
54755
+ DISPOSE: 'DISPOSE',
54756
+ STATE_MACHINE: {
54757
+ CHANGE: 'STATE_MACHINE_CHANGE'
54758
+ },
54759
+ ANIMATION: {
54760
+ LOOP: 'LOOP',
54761
+ FINISHED: 'FINISHED'
54762
+ },
54763
+ AUDIO: {
54764
+ ENDED: 'ended'
54765
+ }
54766
+ };
54767
+ var DEFAULT_TAG = 'all';var SHADOW_TYPES = {
54719
54768
  BASIC: 'BASIC',
54720
54769
  SOFT: 'SOFT',
54721
54770
  HARD: 'HARD'
@@ -55067,12 +55116,12 @@ var Universe$1 = new Universe();var generateUUID = function generateUUID() {
55067
55116
  var generateRandomName = function generateRandomName(prefix) {
55068
55117
  return "".concat(prefix, "_").concat(generateUUID());
55069
55118
  };var uuid$1=/*#__PURE__*/Object.freeze({__proto__:null,generateUUID:generateUUID,generateRandomName:generateRandomName});var ALMOST_ZERO = 0.00001;
55070
- var UP$1 = 'UP';
55071
- var DOWN$1 = 'DOWN';
55072
- var LEFT = 'LEFT';
55073
- var RIGHT = 'RIGHT';
55074
- var FRONT = 'FRONT';
55075
- var BACK = 'BACK';
55119
+ var UP$1 = "UP";
55120
+ var DOWN$1 = "DOWN";
55121
+ var LEFT = "LEFT";
55122
+ var RIGHT = "RIGHT";
55123
+ var FRONT = "FRONT";
55124
+ var BACK = "BACK";
55076
55125
  var VECTOR_UP = {
55077
55126
  type: UP$1,
55078
55127
  vector: new Vector3$1(0, 1, 0)
@@ -55100,54 +55149,54 @@ var VECTOR_BACK = {
55100
55149
  var ORIGIN = new Vector3$1(0, 0, 0);
55101
55150
  var ZERO_QUATERNION = new Quaternion().identity();
55102
55151
  var MATERIALS = {
55103
- BASIC: 'BASIC',
55104
- LAMBERT: 'LAMBERT',
55105
- PHONG: 'PHONG',
55106
- DEPTH: 'DEPTH',
55107
- STANDARD: 'STANDARD',
55108
- TOON: 'TOOM',
55109
- THREE_TOON: 'THREE_TOON'
55152
+ BASIC: "BASIC",
55153
+ LAMBERT: "LAMBERT",
55154
+ PHONG: "PHONG",
55155
+ DEPTH: "DEPTH",
55156
+ STANDARD: "STANDARD",
55157
+ TOON: "TOOM",
55158
+ THREE_TOON: "THREE_TOON"
55110
55159
  };
55111
55160
  var TEXTURES = {
55112
- ALPHA: 'alphaMap',
55113
- AO: 'aoMap',
55114
- ENV: 'envMap',
55115
- MAP: 'map',
55116
- LIGHT: 'lightMap',
55117
- SPECULAR: 'specularMap',
55118
- EMISSIVE: 'emissiveMap',
55119
- BUMP: 'bumpMap',
55120
- DISPLACEMENT: 'displacementMap',
55121
- NORMAL: 'normalMap',
55122
- METALNESS: 'metalnessMap',
55123
- ROUGHNESS: 'roughnessMap',
55124
- GRADIENT: 'gradientMap'
55161
+ ALPHA: "alphaMap",
55162
+ AO: "aoMap",
55163
+ ENV: "envMap",
55164
+ MAP: "map",
55165
+ LIGHT: "lightMap",
55166
+ SPECULAR: "specularMap",
55167
+ EMISSIVE: "emissiveMap",
55168
+ BUMP: "bumpMap",
55169
+ DISPLACEMENT: "displacementMap",
55170
+ NORMAL: "normalMap",
55171
+ METALNESS: "metalnessMap",
55172
+ ROUGHNESS: "roughnessMap",
55173
+ GRADIENT: "gradientMap"
55125
55174
  };
55126
55175
  var EFFECTS = {
55127
- SEPIA: 'SEPIAEFFECT',
55128
- HUE_SATURATION: 'HUESATURATIONEFFECT',
55129
- BLOOM: 'BLOOM',
55130
- DEPTH_OF_FIELD: 'DOF',
55131
- SELECTIVE_OUTLINE: 'SELECTIVEOUTLINE',
55132
- OUTLINE: 'OUTLINE',
55133
- GLITCH: 'GLITCH',
55134
- PIXEL: 'PIXEL'
55176
+ SEPIA: "SEPIAEFFECT",
55177
+ HUE_SATURATION: "HUESATURATIONEFFECT",
55178
+ BLOOM: "BLOOM",
55179
+ DEPTH_OF_FIELD: "DOF",
55180
+ SELECTIVE_OUTLINE: "SELECTIVEOUTLINE",
55181
+ OUTLINE: "OUTLINE",
55182
+ GLITCH: "GLITCH",
55183
+ PIXEL: "PIXEL"
55135
55184
  };
55136
- var COLLISION_EVENT = 'COLLISION_EVENT';
55185
+ var COLLISION_EVENT = "COLLISION_EVENT";
55137
55186
  var COLORS = {
55138
- WHITE: '#ffffff',
55139
- BLACK: '#000000'
55187
+ WHITE: "#ffffff",
55188
+ BLACK: "#000000"
55140
55189
  };
55141
55190
  var ASSETS_TYPES = {
55142
- AUDIO: 'audio',
55143
- VIDEO: 'video',
55144
- IMAGES: 'images',
55145
- TEXTURES: 'textures',
55146
- CUBETEXTURES: 'cubetextures',
55147
- MODELS: 'models',
55148
- PARTICLES: 'particles',
55149
- SCRIPTS: 'scripts',
55150
- SHADERS: 'shaders'
55191
+ AUDIO: "audio",
55192
+ VIDEO: "video",
55193
+ IMAGES: "images",
55194
+ TEXTURES: "textures",
55195
+ CUBETEXTURES: "cubetextures",
55196
+ MODELS: "models",
55197
+ PARTICLES: "particles",
55198
+ SCRIPTS: "scripts",
55199
+ SHADERS: "shaders"
55151
55200
  };
55152
55201
  var OUTPUT_ENCODINGS = {
55153
55202
  LINEAR: LinearEncoding,
@@ -55161,14 +55210,21 @@ var OUTPUT_ENCODINGS = {
55161
55210
  RGBADEPTH: RGBADepthPacking
55162
55211
  };
55163
55212
  var DEFAULT_OUTPUT_ENCODING = OUTPUT_ENCODINGS.LINEAR;
55164
- var ROOT = '/';
55165
- var DIVIDER = '/';
55166
- var HASH = '#';
55167
- var EMPTY$2 = '';
55168
- var QUERY_START = '?';
55169
- var DEFAULT_SELECTOR = '#gameContainer';
55170
- var BEFORE_UNLOAD = 'beforeunload';
55171
- var HASH_CHANGE = 'hashchange';var lib_constants=/*#__PURE__*/Object.freeze({__proto__:null,ALMOST_ZERO:ALMOST_ZERO,UP:UP$1,DOWN:DOWN$1,LEFT:LEFT,RIGHT:RIGHT,FRONT:FRONT,BACK:BACK,VECTOR_UP:VECTOR_UP,VECTOR_DOWN:VECTOR_DOWN,VECTOR_LEFT:VECTOR_LEFT,VECTOR_RIGHT:VECTOR_RIGHT,VECTOR_FRONT:VECTOR_FRONT,VECTOR_BACK:VECTOR_BACK,ORIGIN:ORIGIN,ZERO_QUATERNION:ZERO_QUATERNION,MATERIALS:MATERIALS,TEXTURES:TEXTURES,EFFECTS:EFFECTS,COLLISION_EVENT:COLLISION_EVENT,COLORS:COLORS,ASSETS_TYPES:ASSETS_TYPES,OUTPUT_ENCODINGS:OUTPUT_ENCODINGS,DEFAULT_OUTPUT_ENCODING:DEFAULT_OUTPUT_ENCODING,ROOT:ROOT,DIVIDER:DIVIDER,HASH:HASH,EMPTY:EMPTY$2,QUERY_START:QUERY_START,DEFAULT_SELECTOR:DEFAULT_SELECTOR,BEFORE_UNLOAD:BEFORE_UNLOAD,HASH_CHANGE:HASH_CHANGE});var buildAssetId = function buildAssetId(name, level) {
55213
+ var ROOT = "/";
55214
+ var DIVIDER = "/";
55215
+ var HASH = "#";
55216
+ var EMPTY$2 = "";
55217
+ var QUERY_START = "?";
55218
+ var DEFAULT_SELECTOR = "#gameContainer";
55219
+ var BEFORE_UNLOAD = "beforeunload";
55220
+ var HASH_CHANGE = "hashchange";
55221
+ var TAGS = {
55222
+ LIGHTS: {
55223
+ HOLDER: "TAGS.LIGHTS.HOLDER",
55224
+ HELPER: "TAGS.LIGHTS.HELPER",
55225
+ TARGET: "TAGS.LIGHTS.TARGET"
55226
+ }
55227
+ };var lib_constants=/*#__PURE__*/Object.freeze({__proto__:null,ALMOST_ZERO:ALMOST_ZERO,UP:UP$1,DOWN:DOWN$1,LEFT:LEFT,RIGHT:RIGHT,FRONT:FRONT,BACK:BACK,VECTOR_UP:VECTOR_UP,VECTOR_DOWN:VECTOR_DOWN,VECTOR_LEFT:VECTOR_LEFT,VECTOR_RIGHT:VECTOR_RIGHT,VECTOR_FRONT:VECTOR_FRONT,VECTOR_BACK:VECTOR_BACK,ORIGIN:ORIGIN,ZERO_QUATERNION:ZERO_QUATERNION,MATERIALS:MATERIALS,TEXTURES:TEXTURES,EFFECTS:EFFECTS,COLLISION_EVENT:COLLISION_EVENT,COLORS:COLORS,ASSETS_TYPES:ASSETS_TYPES,OUTPUT_ENCODINGS:OUTPUT_ENCODINGS,DEFAULT_OUTPUT_ENCODING:DEFAULT_OUTPUT_ENCODING,ROOT:ROOT,DIVIDER:DIVIDER,HASH:HASH,EMPTY:EMPTY$2,QUERY_START:QUERY_START,DEFAULT_SELECTOR:DEFAULT_SELECTOR,BEFORE_UNLOAD:BEFORE_UNLOAD,HASH_CHANGE:HASH_CHANGE,TAGS:TAGS});var buildAssetId = function buildAssetId(name, level) {
55172
55228
  return level ? "".concat(level, "_").concat(name) : name;
55173
55229
  };
55174
55230
  var isLevelName = function isLevelName(level) {
@@ -56225,52 +56281,7 @@ var Physics = /*#__PURE__*/function (_EventDispatcher) {
56225
56281
 
56226
56282
  return Physics;
56227
56283
  }(EventDispatcher);
56228
- var Physics$1 = new Physics();var ENTITY_TYPES = {
56229
- SCENE: 'SCENE',
56230
- CAMERA: 'CAMERA',
56231
- MESH: 'MESH',
56232
- LABEL: 'LABEL',
56233
- LIGHT: {
56234
- DEFAULT: 'LIGHT.DEFAULT',
56235
- AMBIENT: 'LIGHT.AMBIENT',
56236
- SUN: 'LIGHT.SUN',
56237
- HEMISPHERE: 'LIGHT.HEMISPHERE',
56238
- POINT: 'LIGHT.POINT',
56239
- SPOT: 'LIGHT.SPOT'
56240
- },
56241
- AUDIO: {
56242
- DEFAULT: 'AUDIO.DEFAULT',
56243
- DIRECTIONAL: 'AUDIO.DIRECTIONAL',
56244
- AMBIENT: 'AUDIO.AMBIENT'
56245
- },
56246
- MODEL: 'MODEL',
56247
- SPRITE: 'SPRITE',
56248
- PARTICLE: 'PARTICLE',
56249
- EFFECT: {
56250
- PARTICLE: 'EFFECT.PARTICLE',
56251
- SCENERY: 'EFFECT.SCENERY'
56252
- },
56253
- HELPER: {
56254
- GRID: 'HELPER.GRID',
56255
- AXES: 'HELPER.AXES'
56256
- },
56257
- UNKNOWN: 'UNKNOWN'
56258
- };
56259
- var FLAT_ENTITY_TYPES = [ENTITY_TYPES.SCENE, ENTITY_TYPES.CAMERA, ENTITY_TYPES.MESH, ENTITY_TYPES.LABEL, ENTITY_TYPES.LIGHT.DEFAULT, ENTITY_TYPES.LIGHT.AMBIENT, ENTITY_TYPES.LIGHT.SUN, ENTITY_TYPES.LIGHT.HEMISPHERE, ENTITY_TYPES.LIGHT.POINT, ENTITY_TYPES.LIGHT.SPOT, ENTITY_TYPES.AUDIO.DEFAULT, ENTITY_TYPES.AUDIO.AMBIENT, ENTITY_TYPES.AUDIO.DIRECTIONAL, ENTITY_TYPES.AUDIO.BACKGROUND, ENTITY_TYPES.MODEL, ENTITY_TYPES.SPRITE, ENTITY_TYPES.PARTICLE, ENTITY_TYPES.EFFECT.PARTICLE, ENTITY_TYPES.EFFECT.SCENERY, ENTITY_TYPES.HELPER.GRID, ENTITY_TYPES.HELPER.AXES, ENTITY_TYPES.UNKNOWN];
56260
- var ENTITY_EVENTS = {
56261
- DISPOSE: 'DISPOSE',
56262
- STATE_MACHINE: {
56263
- CHANGE: 'STATE_MACHINE_CHANGE'
56264
- },
56265
- ANIMATION: {
56266
- LOOP: 'LOOP',
56267
- FINISHED: 'FINISHED'
56268
- },
56269
- AUDIO: {
56270
- ENDED: 'ended'
56271
- }
56272
- };
56273
- var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56284
+ var Physics$1 = new Physics();var Scene = /*#__PURE__*/function () {
56274
56285
  function Scene() {
56275
56286
  var _this = this;
56276
56287
 
@@ -56295,7 +56306,7 @@ var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56295
56306
  });
56296
56307
 
56297
56308
  _defineProperty$1(this, "setBackground", function (texture) {
56298
- _this.scene.background = typeof texture === 'string' ? Images$1.get(texture) : texture;
56309
+ _this.scene.background = typeof texture === "string" ? Images$1.get(texture) : texture;
56299
56310
  });
56300
56311
 
56301
56312
  _defineProperty$1(this, "setRendererShadowMap", function () {
@@ -56337,7 +56348,7 @@ var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56337
56348
  }, {
56338
56349
  key: "createScene",
56339
56350
  value: function createScene() {
56340
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : generateRandomName('LevelName');
56351
+ var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : generateRandomName("LevelName");
56341
56352
  var fog = Config$1.fog();
56342
56353
  this.scene = new Scene$2();
56343
56354
  this.scene.name = name;
@@ -56395,7 +56406,7 @@ var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56395
56406
  key: "getHierarchy",
56396
56407
  value: function getHierarchy() {
56397
56408
  return [{
56398
- element: this,
56409
+ element: this.toJSON(),
56399
56410
  children: [this.getCamera().getHierarchy()].concat(_toConsumableArray(this.elements.filter(function (e) {
56400
56411
  return !e.hasParent() && !e.isHelper();
56401
56412
  }).map(function (e) {
@@ -56455,7 +56466,7 @@ var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56455
56466
  var win = getWindow();
56456
56467
 
56457
56468
  if (win) {
56458
- win.addEventListener('resize', this.onResize);
56469
+ win.addEventListener("resize", this.onResize);
56459
56470
  }
56460
56471
  }
56461
56472
  }, {
@@ -56464,7 +56475,7 @@ var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56464
56475
  var win = getWindow();
56465
56476
 
56466
56477
  if (win) {
56467
- win.removeEventListener('resize', this.onResize);
56478
+ win.removeEventListener("resize", this.onResize);
56468
56479
  }
56469
56480
  }
56470
56481
  }, {
@@ -56545,7 +56556,7 @@ var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56545
56556
  this.renderer = new WebGLRenderer({
56546
56557
  alpha: alpha,
56547
56558
  antialias: antialias,
56548
- powerPreference: 'high-performance'
56559
+ powerPreference: "high-performance"
56549
56560
  });
56550
56561
 
56551
56562
  if (shadows) {
@@ -56607,15 +56618,29 @@ var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
56607
56618
  Universe$1.update(dt);
56608
56619
  this.getCamera().update(dt);
56609
56620
  }
56621
+ }, {
56622
+ key: "toJSON",
56623
+ value: function toJSON() {
56624
+ return {
56625
+ name: this.getName(),
56626
+ uuid: this.uuid(),
56627
+ entityType: this.getEntityType(),
56628
+ background: this.scene.background,
56629
+ clearColor: this.clearColor,
56630
+ alpha: this.alpha,
56631
+ outputEncoding: this.outputEncoding,
56632
+ fog: this.scene.fog
56633
+ };
56634
+ }
56610
56635
  }]);
56611
56636
 
56612
56637
  return Scene;
56613
56638
  }();
56614
- var Scene$1 = new Scene();var MOUSE_DOWN = 'mouseDown';
56615
- var MOUSE_UP = 'mouseUp';
56616
- var MOUSE_MOVE = 'mouseMove';
56617
- var ELEMENT_CLICK = 'elementClick';
56618
- var ELEMENT_DESELECT = 'elementDeselect';
56639
+ var Scene$1 = new Scene();var MOUSE_DOWN = "mouseDown";
56640
+ var MOUSE_UP = "mouseUp";
56641
+ var MOUSE_MOVE = "mouseMove";
56642
+ var ELEMENT_CLICK = "elementClick";
56643
+ var ELEMENT_DESELECT = "elementDeselect";
56619
56644
 
56620
56645
  var Mouse = /*#__PURE__*/function (_EventDispatcher) {
56621
56646
  _inherits(Mouse, _EventDispatcher);
@@ -56684,7 +56709,7 @@ var Mouse = /*#__PURE__*/function (_EventDispatcher) {
56684
56709
 
56685
56710
  _defineProperty$1(_assertThisInitialized(_this), "getIntersections", function () {
56686
56711
  var recursive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
56687
- var tag = arguments.length > 1 ? arguments[1] : undefined;
56712
+ var tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_TAG;
56688
56713
 
56689
56714
  if (_this.hasRaycaster()) {
56690
56715
  _this.raycaster.setFromCamera(_this.mouse, Scene$1.getCameraBody());
@@ -56696,6 +56721,7 @@ var Mouse = /*#__PURE__*/function (_EventDispatcher) {
56696
56721
 
56697
56722
  _defineProperty$1(_assertThisInitialized(_this), "onMouseDown", function (event) {
56698
56723
  if (!_this.enabled) return;
56724
+ console.log("on mouse down");
56699
56725
  event.preventDefault();
56700
56726
 
56701
56727
  var mouseEvent = _this.parseMouseEvent(event);
@@ -56707,6 +56733,7 @@ var Mouse = /*#__PURE__*/function (_EventDispatcher) {
56707
56733
 
56708
56734
  var elements = _this.getIntersections();
56709
56735
 
56736
+ console.log("clicked elements", elements);
56710
56737
  _this.elementClickEvent.elements = elements;
56711
56738
 
56712
56739
  if (!elements.length) {
@@ -56755,9 +56782,9 @@ var Mouse = /*#__PURE__*/function (_EventDispatcher) {
56755
56782
  value: function enable() {
56756
56783
  this.enabled = true;
56757
56784
  this.createRayCaster();
56758
- Scene$1.getDOMElement().addEventListener('mousemove', this.onMouseMove);
56759
- Scene$1.getDOMElement().addEventListener('mousedown', this.onMouseDown);
56760
- document.addEventListener('mouseup', this.onMouseUp);
56785
+ Scene$1.getDOMElement().addEventListener("mousemove", this.onMouseMove);
56786
+ Scene$1.getDOMElement().addEventListener("mousedown", this.onMouseDown);
56787
+ document.addEventListener("mouseup", this.onMouseUp);
56761
56788
  }
56762
56789
  }, {
56763
56790
  key: "enableMouseMoveIntersection",
@@ -56769,9 +56796,9 @@ var Mouse = /*#__PURE__*/function (_EventDispatcher) {
56769
56796
  value: function disable() {
56770
56797
  this.enabled = false;
56771
56798
  this.mouseMoveIntersectionEnabled = false;
56772
- document.removeEventListener('mouseup', this.onMouseUp);
56773
- Scene$1.getDOMElement().removeEventListener('mousemove', this.onMouseMove);
56774
- Scene$1.getDOMElement().removeEventListener('mousedown', this.onMouseDown);
56799
+ document.removeEventListener("mouseup", this.onMouseUp);
56800
+ Scene$1.getDOMElement().removeEventListener("mousemove", this.onMouseMove);
56801
+ Scene$1.getDOMElement().removeEventListener("mousedown", this.onMouseDown);
56775
56802
  }
56776
56803
  }, {
56777
56804
  key: "getRelativeMousePosition",
@@ -57736,7 +57763,7 @@ function applyMiddleware() {
57736
57763
 
57737
57764
  var thunk = createThunkMiddleware();
57738
57765
  thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
57739
- var version$1 = "3.22.0";
57766
+ var version$1 = "3.22.2";
57740
57767
  var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
57741
57768
  var main = "dist/mage.js";
57742
57769
  var author$1 = {
@@ -58377,6 +58404,9 @@ var Input = /*#__PURE__*/function (_EventDispatcher) {
58377
58404
  });
58378
58405
 
58379
58406
  _this.enabled = false;
58407
+ _this.mouse = new Mouse();
58408
+ _this.keyboard = new Keyboard();
58409
+ _this.gamepad = new Gamepad();
58380
58410
  return _this;
58381
58411
  }
58382
58412
 
@@ -58385,9 +58415,6 @@ var Input = /*#__PURE__*/function (_EventDispatcher) {
58385
58415
  value: function enable() {
58386
58416
  if (!this.enabled) {
58387
58417
  dispatch$8(inputEnabled());
58388
- this.mouse = new Mouse();
58389
- this.keyboard = new Keyboard();
58390
- this.gamepad = new Gamepad();
58391
58418
  this.enableGamepad();
58392
58419
  this.enableKeyboard();
58393
58420
  this.enableMouse();
@@ -60158,6 +60185,12 @@ var tweenTo = function tweenTo(origin, target) {
60158
60185
  value: function isSerializable() {
60159
60186
  return !!this.serializable;
60160
60187
  }
60188
+ }, {
60189
+ key: "setSerializable",
60190
+ value: function setSerializable() {
60191
+ var serializable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
60192
+ this.serializable = serializable;
60193
+ }
60161
60194
  }, {
60162
60195
  key: "isDisposed",
60163
60196
  value: function isDisposed() {
@@ -60327,7 +60360,7 @@ var tweenTo = function tweenTo(origin, target) {
60327
60360
  key: "getHierarchy",
60328
60361
  value: function getHierarchy() {
60329
60362
  return {
60330
- element: this,
60363
+ element: this.toJSON(),
60331
60364
  children: this.children.map(function (e) {
60332
60365
  return e.getHierarchy();
60333
60366
  })
@@ -60872,15 +60905,17 @@ var tweenTo = function tweenTo(origin, target) {
60872
60905
  return this.getBody().userData[key];
60873
60906
  } else {
60874
60907
  console.log(KEY_IS_MISSING);
60908
+ return this.getBody().userData;
60875
60909
  }
60876
60910
  } else {
60877
60911
  console.log(USER_DATA_IS_MISSING);
60912
+ return {};
60878
60913
  }
60879
60914
  }
60880
60915
  }, {
60881
60916
  key: "mapScriptsToJSON",
60882
60917
  value: function mapScriptsToJSON() {
60883
- this.allScripts().reduce(function (acc, _ref8) {
60918
+ return this.allScripts().reduce(function (acc, _ref8) {
60884
60919
  var name = _ref8.name,
60885
60920
  _ref8$options = _ref8.options,
60886
60921
  options = _ref8$options === void 0 ? {} : _ref8$options,
@@ -60902,10 +60937,15 @@ var tweenTo = function tweenTo(origin, target) {
60902
60937
  return {
60903
60938
  position: this.getPosition(),
60904
60939
  rotation: this.getRotation(),
60940
+ quaternion: this.getQuaternion(),
60941
+ worldTransform: this.getWorldTransform(),
60905
60942
  scale: this.getScale(),
60906
60943
  entityType: this.getEntityType(),
60907
60944
  scripts: this.mapScriptsToJSON(),
60908
- tags: this.getTags()
60945
+ tags: this.getTags(),
60946
+ name: this.getName(),
60947
+ uuid: this.uuid(),
60948
+ data: this.getData()
60909
60949
  };
60910
60950
  }
60911
60951
  }
@@ -61048,7 +61088,7 @@ var isTextureMapAllowedForMaterial = function isTextureMapAllowedForMaterial(mat
61048
61088
  };var _excluded$8 = ["position", "quaternion"],
61049
61089
  _excluded2 = ["applyPhysicsUpdate"],
61050
61090
  _excluded3 = ["dt", "event"];
61051
- var COLLIDER_TAG = 'collider';
61091
+ var COLLIDER_TAG = "collider";
61052
61092
  var DEFAULT_COLLIDER_OFFSET = {
61053
61093
  x: 0,
61054
61094
  y: 0,
@@ -61284,14 +61324,6 @@ var Element$1 = /*#__PURE__*/function (_Entity) {
61284
61324
  }
61285
61325
 
61286
61326
  _createClass(Element, [{
61287
- key: "addTag",
61288
- value: function addTag(tag) {
61289
- _get(_getPrototypeOf(Element.prototype), "addTag", this).call(this, tag);
61290
-
61291
- var existingTags = this.getBody().userData.tags || [];
61292
- this.getBody().userData.tags = [].concat(_toConsumableArray(existingTags), [tag]);
61293
- }
61294
- }, {
61295
61327
  key: "setBody",
61296
61328
  value: function setBody(_ref7) {
61297
61329
  var body = _ref7.body,
@@ -61791,9 +61823,16 @@ var Element$1 = /*#__PURE__*/function (_Entity) {
61791
61823
  value: function toJSON() {
61792
61824
  if (this.isSerializable()) {
61793
61825
  return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(Element.prototype), "toJSON", this).call(this)), {}, {
61826
+ physics: {
61827
+ state: this.getPhysicsState(),
61828
+ options: this.getPhysicsOptions()
61829
+ },
61794
61830
  body: this.body.toJSON(),
61795
- textures: this.textures
61796
- }, this.options);
61831
+ textures: this.textures,
61832
+ materialType: this.getMaterialType(),
61833
+ opacity: this.opacity,
61834
+ color: this.getColor()
61835
+ });
61797
61836
  }
61798
61837
  }
61799
61838
  }]);
@@ -61812,7 +61851,7 @@ var Element$1 = /*#__PURE__*/function (_Entity) {
61812
61851
  _classCallCheck(this, Camera);
61813
61852
 
61814
61853
  var _options$name = options.name,
61815
- name = _options$name === void 0 ? 'camera' : _options$name,
61854
+ name = _options$name === void 0 ? "Main PerspectiveCamera" : _options$name,
61816
61855
  _options$fov = options.fov,
61817
61856
  fov = _options$fov === void 0 ? Config$1.camera().fov : _options$fov,
61818
61857
  _options$ratio = options.ratio,
@@ -62432,6 +62471,24 @@ var Sprite = /*#__PURE__*/function (_Element) {
62432
62471
  var rotation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getRotation();
62433
62472
  this.body.material.rotation = rotation;
62434
62473
  }
62474
+ }, {
62475
+ key: "setSizeAttenuation",
62476
+ value: function setSizeAttenuation() {
62477
+ var attenuation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
62478
+ this.body.material.sizeAttenuation = attenuation;
62479
+ }
62480
+ }, {
62481
+ key: "setDepthTest",
62482
+ value: function setDepthTest() {
62483
+ var depthTest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
62484
+ this.body.material.depthTest = depthTest;
62485
+ }
62486
+ }, {
62487
+ key: "setDepthWrite",
62488
+ value: function setDepthWrite() {
62489
+ var depthWrite = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
62490
+ this.body.material.depthWrite = depthWrite;
62491
+ }
62435
62492
  }]);
62436
62493
 
62437
62494
  return Sprite;
@@ -82853,9 +82910,7 @@ var MeshLoader = /*#__PURE__*/function (_Loader) {
82853
82910
 
82854
82911
  return MeshLoader;
82855
82912
  }(Loader);
82856
- var MeshLoader$1 = new MeshLoader();var LAMP_COLOR = 0Xf1c40f;
82857
-
82858
- var Light = /*#__PURE__*/function (_Entity) {
82913
+ var MeshLoader$1 = new MeshLoader();var Light = /*#__PURE__*/function (_Entity) {
82859
82914
  _inherits(Light, _Entity);
82860
82915
 
82861
82916
  var _super = _createSuper(Light);
@@ -82874,36 +82929,53 @@ var Light = /*#__PURE__*/function (_Entity) {
82874
82929
  });
82875
82930
 
82876
82931
  _defineProperty$1(_assertThisInitialized(_this), "addHolder", function () {
82877
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'lightholder';
82878
- var body = Models$1.getModel(name);
82879
-
82880
- if (body) {
82881
- _this.holder = body;
82882
-
82883
- _this.holder.setMaterialFromName(MATERIALS.BASIC, {
82884
- wireframe: true,
82885
- color: LAMP_COLOR
82886
- });
82887
-
82888
- _this.holder.serializable = false;
82932
+ var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "lightholder";
82933
+ var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.05;
82934
+ var holderSprite = new Sprite(size, size, name, {
82935
+ name: name
82936
+ });
82889
82937
 
82890
- _this.holder.setPosition({
82891
- x: _this.body.position.x,
82892
- y: _this.body.position.y,
82893
- z: _this.body.position.z
82894
- });
82938
+ if (holderSprite) {
82939
+ holderSprite.setSizeAttenuation(false);
82940
+ holderSprite.setDepthTest(false);
82941
+ holderSprite.setDepthWrite(false);
82942
+ holderSprite.setSerializable(false);
82943
+ holderSprite.setPosition(_this.getPosition());
82944
+ holderSprite.addTags([TAGS.LIGHTS.HELPER, TAGS.LIGHTS.HOLDER, name]);
82945
+ _this.holder = holderSprite;
82946
+ return true;
82895
82947
  } else {
82896
82948
  console.warn(LIGHT_HOLDER_MODEL_NOT_FOUND);
82949
+ return false;
82950
+ }
82951
+ });
82952
+
82953
+ _defineProperty$1(_assertThisInitialized(_this), "addTargetHolder", function () {
82954
+ var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "targetholder";
82955
+ var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.05;
82956
+ var targetSprite = new Sprite(size, size, name, {
82957
+ name: name
82958
+ });
82959
+
82960
+ if (targetSprite) {
82961
+ targetSprite.setSizeAttenuation(false);
82962
+ targetSprite.setDepthTest(false);
82963
+ targetSprite.setDepthWrite(false);
82964
+ targetSprite.setSerializable(false);
82965
+ targetSprite.setPosition(_this.getTargetPosition());
82966
+ targetSprite.addTags([TAGS.LIGHTS.HELPER, TAGS.LIGHTS.TARGET, name]);
82967
+ targetSprite.getBody().add(_this.getBody().target);
82968
+ _this.targetHolder = targetSprite;
82897
82969
  }
82898
82970
  });
82899
82971
 
82900
82972
  _this.color = color;
82901
82973
  _this.intensity = intensity;
82902
- _this.name = _name || generateRandomName('Light');
82974
+ _this.name = _name || generateRandomName("Light");
82903
82975
  _this.isLightOn = false;
82904
82976
  _this.body = undefined; // helper body for this light
82905
82977
 
82906
- _this.helper = undefined; // holder body representing the light
82978
+ _this.isUsingHelper = undefined; // holder body representing the light
82907
82979
 
82908
82980
  _this.holder = undefined; // target body for the light (only used by directional light)
82909
82981
 
@@ -82923,15 +82995,20 @@ var Light = /*#__PURE__*/function (_Entity) {
82923
82995
  }
82924
82996
  }
82925
82997
  }, {
82926
- key: "hasHelper",
82927
- value: function hasHelper() {
82928
- return !!this.helper;
82998
+ key: "usingHelper",
82999
+ value: function usingHelper() {
83000
+ return !!this.isUsingHelper;
82929
83001
  }
82930
83002
  }, {
82931
83003
  key: "hasHolder",
82932
83004
  value: function hasHolder() {
82933
83005
  return !!this.holder;
82934
83006
  }
83007
+ }, {
83008
+ key: "hasTarget",
83009
+ value: function hasTarget() {
83010
+ return false;
83011
+ }
82935
83012
  }, {
82936
83013
  key: "getPosition",
82937
83014
  value: function getPosition() {
@@ -82981,6 +83058,7 @@ var Light = /*#__PURE__*/function (_Entity) {
82981
83058
  value: function setIntensity(value) {
82982
83059
  if (this.hasBody()) {
82983
83060
  this.body.intensity = value;
83061
+ this.intensity = value;
82984
83062
  }
82985
83063
  }
82986
83064
  }, {
@@ -82990,6 +83068,16 @@ var Light = /*#__PURE__*/function (_Entity) {
82990
83068
  return this.body.intensity;
82991
83069
  }
82992
83070
  }
83071
+ }, {
83072
+ key: "setColor",
83073
+ value: function setColor(color) {
83074
+ this.body.color = color;
83075
+ }
83076
+ }, {
83077
+ key: "getColor",
83078
+ value: function getColor() {
83079
+ return this.body.color;
83080
+ }
82993
83081
  }, {
82994
83082
  key: "dim",
82995
83083
  value: function dim() {
@@ -83043,9 +83131,9 @@ var Light = /*#__PURE__*/function (_Entity) {
83043
83131
  value: function toJSON() {
83044
83132
  return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(Light.prototype), "toJSON", this).call(this)), {}, {
83045
83133
  type: this.getEntityType(),
83046
- color: this.color,
83047
- intensity: this.intensity,
83048
- name: this.name
83134
+ color: this.getColor(),
83135
+ intensity: this.getIntensity(),
83136
+ name: this.getName()
83049
83137
  });
83050
83138
  }
83051
83139
  }]);
@@ -83081,7 +83169,7 @@ var SunLight = /*#__PURE__*/function (_Light) {
83081
83169
  _options$intensity = options.intensity,
83082
83170
  intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$4 : _options$intensity,
83083
83171
  _options$name = options.name,
83084
- name = _options$name === void 0 ? generateRandomName('SunLight') : _options$name;
83172
+ name = _options$name === void 0 ? generateRandomName("SunLight") : _options$name;
83085
83173
  _this = _super.call(this, {
83086
83174
  color: color,
83087
83175
  intensity: intensity,
@@ -83173,19 +83261,9 @@ var SunLight = /*#__PURE__*/function (_Light) {
83173
83261
  }
83174
83262
  }
83175
83263
  }, {
83176
- key: "getTargetMesh",
83177
- value: function getTargetMesh(initialPosition) {
83178
- var geometry = new SphereGeometry(3, 6, 6);
83179
- var material = new MeshBasicMaterial({
83180
- color: 0xeeeeee,
83181
- wireframe: true
83182
- });
83183
- var target = new Element$1({
83184
- geometry: geometry,
83185
- material: material
83186
- });
83187
- target.position(initialPosition);
83188
- return target;
83264
+ key: "hasTarget",
83265
+ value: function hasTarget() {
83266
+ return true;
83189
83267
  }
83190
83268
  }, {
83191
83269
  key: "setTarget",
@@ -83201,20 +83279,32 @@ var SunLight = /*#__PURE__*/function (_Light) {
83201
83279
  return this.target;
83202
83280
  }
83203
83281
  }, {
83204
- key: "addHelper",
83205
- value: function addHelper() {
83206
- this.helper = new DirectionalLightHelper(this.body, 5);
83207
- this.shadowHelper = new CameraHelper(this.body.shadow.camera);
83282
+ key: "addHelpers",
83283
+ value: function addHelpers() {
83284
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
83285
+ _ref2$holderName = _ref2.holderName,
83286
+ holderName = _ref2$holderName === void 0 ? "sunlightHelper" : _ref2$holderName,
83287
+ _ref2$holderSize = _ref2.holderSize,
83288
+ holderSize = _ref2$holderSize === void 0 ? 0.05 : _ref2$holderSize,
83289
+ _ref2$targetHolderNam = _ref2.targetHolderName,
83290
+ targetHolderName = _ref2$targetHolderNam === void 0 ? "targetholder" : _ref2$targetHolderNam,
83291
+ _ref2$targetHolderSiz = _ref2.targetHolderSize,
83292
+ targetHolderSize = _ref2$targetHolderSiz === void 0 ? 0.05 : _ref2$targetHolderSiz;
83293
+
83294
+ this.helper = new DirectionalLightHelper(this.getBody(), 5);
83295
+ this.shadowHelper = new CameraHelper(this.getBody().shadow.camera);
83208
83296
  Scene$1.add(this.helper, null, false);
83209
83297
  Scene$1.add(this.shadowHelper, null, false);
83210
- this.addHolder();
83298
+ this.addHolder(holderName, holderSize);
83299
+ this.addTargetHolder(targetHolderName, targetHolderSize);
83300
+ this.isUsingHelper = true;
83211
83301
  }
83212
83302
  }, {
83213
83303
  key: "update",
83214
83304
  value: function update(dt) {
83215
83305
  _get(_getPrototypeOf(SunLight.prototype), "update", this).call(this, dt);
83216
83306
 
83217
- if (this.hasHelper()) {
83307
+ if (this.usingHelper()) {
83218
83308
  this.helper.update();
83219
83309
  this.shadowHelper.update();
83220
83310
  }
@@ -83225,6 +83315,13 @@ var SunLight = /*#__PURE__*/function (_Light) {
83225
83315
  });
83226
83316
  }
83227
83317
  }
83318
+ }, {
83319
+ key: "toJSON",
83320
+ value: function toJSON() {
83321
+ return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(SunLight.prototype), "toJSON", this).call(this)), {}, {
83322
+ target: this.getTargetPosition()
83323
+ });
83324
+ }
83228
83325
  }]);
83229
83326
 
83230
83327
  return SunLight;
@@ -83253,7 +83350,7 @@ var AmbientLight = /*#__PURE__*/function (_Light) {
83253
83350
  _options$intensity = options.intensity,
83254
83351
  intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$3 : _options$intensity,
83255
83352
  _options$name = options.name,
83256
- name = _options$name === void 0 ? generateRandomName('AmbientLight') : _options$name;
83353
+ name = _options$name === void 0 ? generateRandomName("AmbientLight") : _options$name;
83257
83354
  _this = _super.call(this, {
83258
83355
  color: color,
83259
83356
  intensity: intensity,
@@ -83305,17 +83402,23 @@ var AmbientLight = /*#__PURE__*/function (_Light) {
83305
83402
  this.addToScene();
83306
83403
  }
83307
83404
  }, {
83308
- key: "addHelper",
83309
- value: function addHelper() {
83310
- this.helper = true;
83311
- this.addHolder('ambientlightholder');
83405
+ key: "addHelpers",
83406
+ value: function addHelpers() {
83407
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
83408
+ _ref2$holderName = _ref2.holderName,
83409
+ holderName = _ref2$holderName === void 0 ? "ambientlightholder" : _ref2$holderName,
83410
+ _ref2$holderSize = _ref2.holderSize,
83411
+ holderSize = _ref2$holderSize === void 0 ? 0.05 : _ref2$holderSize;
83412
+
83413
+ this.addHolder(holderName, holderSize);
83414
+ this.isUsingHelper = true;
83312
83415
  }
83313
83416
  }, {
83314
83417
  key: "update",
83315
83418
  value: function update(dt) {
83316
83419
  _get(_getPrototypeOf(AmbientLight.prototype), "update", this).call(this, dt);
83317
83420
 
83318
- if (this.hasHelper()) {
83421
+ if (this.usingHelper()) {
83319
83422
  this.setPosition(this.holder.getPosition(), {
83320
83423
  updateHolder: false
83321
83424
  });
@@ -83356,7 +83459,7 @@ var PointLight = /*#__PURE__*/function (_Light) {
83356
83459
  _options$intensity = options.intensity,
83357
83460
  intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$2 : _options$intensity,
83358
83461
  _options$name = options.name,
83359
- name = _options$name === void 0 ? generateRandomName('PointLight') : _options$name,
83462
+ name = _options$name === void 0 ? generateRandomName("PointLight") : _options$name,
83360
83463
  distance = options.distance,
83361
83464
  decay = options.decay;
83362
83465
  _this = _super.call(this, {
@@ -83444,20 +83547,27 @@ var PointLight = /*#__PURE__*/function (_Light) {
83444
83547
  }
83445
83548
  }
83446
83549
  }, {
83447
- key: "addHelper",
83448
- value: function addHelper() {
83449
- this.helper = new PointLightHelper(this.body, 2, GREEN$2);
83450
- this.shadowHelper = new CameraHelper(this.body.shadow.camera);
83550
+ key: "addHelpers",
83551
+ value: function addHelpers() {
83552
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
83553
+ _ref2$holderName = _ref2.holderName,
83554
+ holderName = _ref2$holderName === void 0 ? "pointlightholder" : _ref2$holderName,
83555
+ _ref2$holderSize = _ref2.holderSize,
83556
+ holderSize = _ref2$holderSize === void 0 ? 0.05 : _ref2$holderSize;
83557
+
83558
+ this.helper = new PointLightHelper(this.getBody(), 2, GREEN$2);
83559
+ this.shadowHelper = new CameraHelper(this.getBody().shadow.camera);
83451
83560
  Scene$1.add(this.helper, null, false);
83452
83561
  Scene$1.add(this.shadowHelper, null, false);
83453
- this.addHolder();
83562
+ this.addHolder(holderName, holderSize);
83563
+ this.isUsingHelper = true;
83454
83564
  }
83455
83565
  }, {
83456
83566
  key: "update",
83457
83567
  value: function update(dt) {
83458
83568
  _get(_getPrototypeOf(PointLight.prototype), "update", this).call(this, dt);
83459
83569
 
83460
- if (this.hasHelper()) {
83570
+ if (this.usingHelper()) {
83461
83571
  this.helper.update();
83462
83572
  this.shadowHelper.update();
83463
83573
  }
@@ -83509,7 +83619,7 @@ var PointLight = /*#__PURE__*/function (_Light) {
83509
83619
  }
83510
83620
 
83511
83621
  if (light && useHelper) {
83512
- light.addHelper();
83622
+ light.addHelpers();
83513
83623
  }
83514
83624
  };
83515
83625
  });
@@ -88174,17 +88284,17 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88174
88284
  if (planeIntersect) {
88175
88285
  var space = _this.space;
88176
88286
 
88177
- if (_this.mode === 'scale') {
88178
- space = 'local';
88179
- } else if (_this.axis === 'E' || _this.axis === 'XYZE' || _this.axis === 'XYZ') {
88180
- space = 'world';
88287
+ if (_this.mode === "scale") {
88288
+ space = "local";
88289
+ } else if (_this.axis === "E" || _this.axis === "XYZE" || _this.axis === "XYZ") {
88290
+ space = "world";
88181
88291
  }
88182
88292
 
88183
- if (space === 'local' && _this.mode === 'rotate') {
88293
+ if (space === "local" && _this.mode === "rotate") {
88184
88294
  var snap = _this.rotationSnap;
88185
- if (_this.axis === 'X' && snap) _this.object.rotation.x = Math.round(_this.object.rotation.x / snap) * snap;
88186
- if (_this.axis === 'Y' && snap) _this.object.rotation.y = Math.round(_this.object.rotation.y / snap) * snap;
88187
- if (_this.axis === 'Z' && snap) _this.object.rotation.z = Math.round(_this.object.rotation.z / snap) * snap;
88295
+ if (_this.axis === "X" && snap) _this.object.rotation.x = Math.round(_this.object.rotation.x / snap) * snap;
88296
+ if (_this.axis === "Y" && snap) _this.object.rotation.y = Math.round(_this.object.rotation.y / snap) * snap;
88297
+ if (_this.axis === "Z" && snap) _this.object.rotation.z = Math.round(_this.object.rotation.z / snap) * snap;
88188
88298
  }
88189
88299
 
88190
88300
  _this.object.updateMatrixWorld();
@@ -88201,7 +88311,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88201
88311
 
88202
88312
  _this.pointStart.copy(planeIntersect.point).sub(_this.worldPositionStart);
88203
88313
 
88204
- if (space === 'local') {
88314
+ if (space === "local") {
88205
88315
  _this.pointStart.applyQuaternion(_this.worldQuaternionStart.clone().invert());
88206
88316
  }
88207
88317
  }
@@ -88219,10 +88329,10 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88219
88329
  var object = _this.object;
88220
88330
  var space = _this.space;
88221
88331
 
88222
- if (mode === 'scale') {
88223
- space = 'local';
88224
- } else if (axis === 'E' || axis === 'XYZE' || axis === 'XYZ') {
88225
- space = 'world';
88332
+ if (mode === "scale") {
88333
+ space = "local";
88334
+ } else if (axis === "E" || axis === "XYZE" || axis === "XYZ") {
88335
+ space = "world";
88226
88336
  }
88227
88337
 
88228
88338
  if (object === undefined || axis === null || _this.dragging === false || pointer.button !== undefined && pointer.button !== 0) return;
@@ -88234,23 +88344,23 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88234
88344
 
88235
88345
  _this.pointEnd.copy(planeIntersect.point).sub(_this.worldPositionStart);
88236
88346
 
88237
- if (space === 'local') _this.pointEnd.applyQuaternion(_this.worldQuaternionStart.clone().invert());
88347
+ if (space === "local") _this.pointEnd.applyQuaternion(_this.worldQuaternionStart.clone().invert());
88238
88348
 
88239
- if (mode === 'translate') {
88240
- if (axis.search('X') === -1) {
88349
+ if (mode === "translate") {
88350
+ if (axis.search("X") === -1) {
88241
88351
  _this.pointEnd.x = _this.pointStart.x;
88242
88352
  }
88243
88353
 
88244
- if (axis.search('Y') === -1) {
88354
+ if (axis.search("Y") === -1) {
88245
88355
  _this.pointEnd.y = _this.pointStart.y;
88246
88356
  }
88247
88357
 
88248
- if (axis.search('Z') === -1) {
88358
+ if (axis.search("Z") === -1) {
88249
88359
  _this.pointEnd.z = _this.pointStart.z;
88250
88360
  } // Apply translate
88251
88361
 
88252
88362
 
88253
- if (space === 'local') {
88363
+ if (space === "local") {
88254
88364
  object.position.copy(_this.pointEnd).sub(_this.pointStart).applyQuaternion(_this._quaternionStart);
88255
88365
  } else {
88256
88366
  object.position.copy(_this.pointEnd).sub(_this.pointStart);
@@ -88259,38 +88369,38 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88259
88369
  object.position.add(_this._positionStart); // Apply translation snap
88260
88370
 
88261
88371
  if (_this.translationSnap) {
88262
- if (space === 'local') {
88372
+ if (space === "local") {
88263
88373
  object.position.applyQuaternion(_this._tempQuaternion.copy(_this._quaternionStart).invert());
88264
88374
 
88265
- if (axis.search('X') !== -1) {
88375
+ if (axis.search("X") !== -1) {
88266
88376
  object.position.x = Math.round(object.position.x / _this.translationSnap) * _this.translationSnap;
88267
88377
  }
88268
88378
 
88269
- if (axis.search('Y') !== -1) {
88379
+ if (axis.search("Y") !== -1) {
88270
88380
  object.position.y = Math.round(object.position.y / _this.translationSnap) * _this.translationSnap;
88271
88381
  }
88272
88382
 
88273
- if (axis.search('Z') !== -1) {
88383
+ if (axis.search("Z") !== -1) {
88274
88384
  object.position.z = Math.round(object.position.z / _this.translationSnap) * _this.translationSnap;
88275
88385
  }
88276
88386
 
88277
88387
  object.position.applyQuaternion(_this._quaternionStart);
88278
88388
  }
88279
88389
 
88280
- if (space === 'world') {
88390
+ if (space === "world") {
88281
88391
  if (object.parent) {
88282
88392
  object.position.add(_this._tempVector.setFromMatrixPosition(object.parent.matrixWorld));
88283
88393
  }
88284
88394
 
88285
- if (axis.search('X') !== -1) {
88395
+ if (axis.search("X") !== -1) {
88286
88396
  object.position.x = Math.round(object.position.x / _this.translationSnap) * _this.translationSnap;
88287
88397
  }
88288
88398
 
88289
- if (axis.search('Y') !== -1) {
88399
+ if (axis.search("Y") !== -1) {
88290
88400
  object.position.y = Math.round(object.position.y / _this.translationSnap) * _this.translationSnap;
88291
88401
  }
88292
88402
 
88293
- if (axis.search('Z') !== -1) {
88403
+ if (axis.search("Z") !== -1) {
88294
88404
  object.position.z = Math.round(object.position.z / _this.translationSnap) * _this.translationSnap;
88295
88405
  }
88296
88406
 
@@ -88299,8 +88409,8 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88299
88409
  }
88300
88410
  }
88301
88411
  }
88302
- } else if (mode === 'scale') {
88303
- if (axis.search('XYZ') !== -1) {
88412
+ } else if (mode === "scale") {
88413
+ if (axis.search("XYZ") !== -1) {
88304
88414
  var d = _this.pointEnd.length() / _this.pointStart.length();
88305
88415
 
88306
88416
  if (_this.pointEnd.dot(_this.pointStart) < 0) d *= -1;
@@ -88309,40 +88419,40 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88309
88419
  } else {
88310
88420
  _this._tempVector.copy(_this.pointEnd).divide(_this.pointStart);
88311
88421
 
88312
- if (axis.search('X') === -1) {
88422
+ if (axis.search("X") === -1) {
88313
88423
  _this._tempVector.x = 1;
88314
88424
  }
88315
88425
 
88316
- if (axis.search('Y') === -1) {
88426
+ if (axis.search("Y") === -1) {
88317
88427
  _this._tempVector.y = 1;
88318
88428
  }
88319
88429
 
88320
- if (axis.search('Z') === -1) {
88430
+ if (axis.search("Z") === -1) {
88321
88431
  _this._tempVector.z = 1;
88322
88432
  }
88323
88433
  } // Apply scale
88324
88434
 
88325
88435
 
88326
88436
  object.scale.copy(_this._scaleStart).multiply(_this._tempVector);
88327
- } else if (mode === 'rotate') {
88437
+ } else if (mode === "rotate") {
88328
88438
  var ROTATION_SPEED = 20 / _this.worldPosition.distanceTo(_this._tempVector.setFromMatrixPosition(_this.camera.matrixWorld));
88329
88439
 
88330
88440
  var quaternion = _this.space === "local" ? _this.worldQuaternion : _this._identityQuaternion;
88331
88441
  var unit = _unit[axis];
88332
88442
 
88333
- if (axis === 'E') {
88443
+ if (axis === "E") {
88334
88444
  _this._tempVector.copy(_this.pointEnd).cross(_this.pointStart);
88335
88445
 
88336
88446
  _this.rotationAxis.copy(_this.eye);
88337
88447
 
88338
88448
  _this.rotationAngle = _this.pointEnd.angleTo(_this.pointStart) * (_this._tempVector.dot(_this.eye) < 0 ? 1 : -1);
88339
- } else if (axis === 'XYZE') {
88449
+ } else if (axis === "XYZE") {
88340
88450
  _this._tempVector.copy(_this.pointEnd).sub(_this.pointStart).cross(_this.eye).normalize();
88341
88451
 
88342
88452
  _this.rotationAxis.copy(_this._tempVector);
88343
88453
 
88344
88454
  _this.rotationAngle = _this.pointEnd.sub(_this.pointStart).dot(_this._tempVector.cross(_this.eye)) * ROTATION_SPEED;
88345
- } else if (axis === 'X' || axis === 'Y' || axis === 'Z') {
88455
+ } else if (axis === "X" || axis === "Y" || axis === "Z") {
88346
88456
  _this._alignVector.copy(unit).applyQuaternion(quaternion);
88347
88457
 
88348
88458
  _this.rotationAxis.copy(unit);
@@ -88350,7 +88460,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88350
88460
  _this._tempVector = unit.clone();
88351
88461
  _this._tempVector2 = _this.pointEnd.clone().sub(_this.pointStart);
88352
88462
 
88353
- if (space === 'local') {
88463
+ if (space === "local") {
88354
88464
  _this._tempVector.applyQuaternion(quaternion);
88355
88465
 
88356
88466
  _this._tempVector2.applyQuaternion(_this.worldQuaternionStart);
@@ -88362,7 +88472,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88362
88472
 
88363
88473
  if (_this.rotationSnap) _this.rotationAngle = Math.round(_this.rotationAngle / _this.rotationSnap) * _this.rotationSnap; // Apply rotate
88364
88474
 
88365
- if (space === 'local') {
88475
+ if (space === "local") {
88366
88476
  object.quaternion.copy(_this._quaternionStart);
88367
88477
  object.quaternion.multiply(_this._tempQuaternion.setFromAxisAngle(_this.rotationAxis, _this.rotationAngle));
88368
88478
  } else {
@@ -88382,10 +88492,10 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88382
88492
  var object = _this.object;
88383
88493
  var space = _this.space;
88384
88494
 
88385
- if (mode === 'scale') {
88386
- space = 'local';
88387
- } else if (axis === 'E' || axis === 'XYZE' || axis === 'XYZ') {
88388
- space = 'world';
88495
+ if (mode === "scale") {
88496
+ space = "local";
88497
+ } else if (axis === "E" || axis === "XYZE" || axis === "XYZ") {
88498
+ space = "world";
88389
88499
  }
88390
88500
 
88391
88501
  if (object === undefined || axis === null || _this.dragging === false || pointer.button !== undefined && pointer.button !== 0) return;
@@ -88397,23 +88507,23 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88397
88507
 
88398
88508
  _this.pointEnd.copy(planeIntersect.point).sub(_this.worldPositionStart);
88399
88509
 
88400
- if (space === 'local') _this.pointEnd.applyQuaternion(_this.worldQuaternionStart.clone().invert());
88510
+ if (space === "local") _this.pointEnd.applyQuaternion(_this.worldQuaternionStart.clone().invert());
88401
88511
 
88402
- if (mode === 'translate') {
88403
- if (axis.search('X') === -1) {
88512
+ if (mode === "translate") {
88513
+ if (axis.search("X") === -1) {
88404
88514
  _this.pointEnd.x = _this.pointStart.x;
88405
88515
  }
88406
88516
 
88407
- if (axis.search('Y') === -1) {
88517
+ if (axis.search("Y") === -1) {
88408
88518
  _this.pointEnd.y = _this.pointStart.y;
88409
88519
  }
88410
88520
 
88411
- if (axis.search('Z') === -1) {
88521
+ if (axis.search("Z") === -1) {
88412
88522
  _this.pointEnd.z = _this.pointStart.z;
88413
88523
  } // Apply translate
88414
88524
 
88415
88525
 
88416
- if (space === 'local') {
88526
+ if (space === "local") {
88417
88527
  object.position.copy(_this.pointEnd).sub(_this.pointStart).applyQuaternion(_this._quaternionStart);
88418
88528
  } else {
88419
88529
  object.position.copy(_this.pointEnd).sub(_this.pointStart);
@@ -88422,38 +88532,38 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88422
88532
  object.position.add(_this._positionStart); // Apply translation snap
88423
88533
 
88424
88534
  if (_this.translationSnap) {
88425
- if (space === 'local') {
88535
+ if (space === "local") {
88426
88536
  object.position.applyQuaternion(_this._tempQuaternion.copy(_this._quaternionStart).invert());
88427
88537
 
88428
- if (axis.search('X') !== -1) {
88538
+ if (axis.search("X") !== -1) {
88429
88539
  object.position.x = Math.round(object.position.x / _this.translationSnap) * _this.translationSnap;
88430
88540
  }
88431
88541
 
88432
- if (axis.search('Y') !== -1) {
88542
+ if (axis.search("Y") !== -1) {
88433
88543
  object.position.y = Math.round(object.position.y / _this.translationSnap) * _this.translationSnap;
88434
88544
  }
88435
88545
 
88436
- if (axis.search('Z') !== -1) {
88546
+ if (axis.search("Z") !== -1) {
88437
88547
  object.position.z = Math.round(object.position.z / _this.translationSnap) * _this.translationSnap;
88438
88548
  }
88439
88549
 
88440
88550
  object.position.applyQuaternion(_this._quaternionStart);
88441
88551
  }
88442
88552
 
88443
- if (space === 'world') {
88553
+ if (space === "world") {
88444
88554
  if (object.parent) {
88445
88555
  object.position.add(_this._tempVector.setFromMatrixPosition(object.parent.matrixWorld));
88446
88556
  }
88447
88557
 
88448
- if (axis.search('X') !== -1) {
88558
+ if (axis.search("X") !== -1) {
88449
88559
  object.position.x = Math.round(object.position.x / _this.translationSnap) * _this.translationSnap;
88450
88560
  }
88451
88561
 
88452
- if (axis.search('Y') !== -1) {
88562
+ if (axis.search("Y") !== -1) {
88453
88563
  object.position.y = Math.round(object.position.y / _this.translationSnap) * _this.translationSnap;
88454
88564
  }
88455
88565
 
88456
- if (axis.search('Z') !== -1) {
88566
+ if (axis.search("Z") !== -1) {
88457
88567
  object.position.z = Math.round(object.position.z / _this.translationSnap) * _this.translationSnap;
88458
88568
  }
88459
88569
 
@@ -88462,8 +88572,8 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88462
88572
  }
88463
88573
  }
88464
88574
  }
88465
- } else if (mode === 'scale') {
88466
- if (axis.search('XYZ') !== -1) {
88575
+ } else if (mode === "scale") {
88576
+ if (axis.search("XYZ") !== -1) {
88467
88577
  var d = _this.pointEnd.length() / _this.pointStart.length();
88468
88578
 
88469
88579
  if (_this.pointEnd.dot(_this.pointStart) < 0) d *= -1;
@@ -88472,40 +88582,40 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88472
88582
  } else {
88473
88583
  _this._tempVector.copy(_this.pointEnd).divide(_this.pointStart);
88474
88584
 
88475
- if (axis.search('X') === -1) {
88585
+ if (axis.search("X") === -1) {
88476
88586
  _this._tempVector.x = 1;
88477
88587
  }
88478
88588
 
88479
- if (axis.search('Y') === -1) {
88589
+ if (axis.search("Y") === -1) {
88480
88590
  _this._tempVector.y = 1;
88481
88591
  }
88482
88592
 
88483
- if (axis.search('Z') === -1) {
88593
+ if (axis.search("Z") === -1) {
88484
88594
  _this._tempVector.z = 1;
88485
88595
  }
88486
88596
  } // Apply scale
88487
88597
 
88488
88598
 
88489
88599
  object.scale.copy(_this._scaleStart).multiply(_this._tempVector);
88490
- } else if (mode === 'rotate') {
88600
+ } else if (mode === "rotate") {
88491
88601
  var ROTATION_SPEED = 20 / _this.worldPosition.distanceTo(_this._tempVector.setFromMatrixPosition(_this.camera.matrixWorld));
88492
88602
 
88493
88603
  var quaternion = _this.space === "local" ? _this.worldQuaternion : _this._identityQuaternion;
88494
88604
  var unit = _this._unit[axis];
88495
88605
 
88496
- if (axis === 'E') {
88606
+ if (axis === "E") {
88497
88607
  _this._tempVector.copy(_this.pointEnd).cross(_this.pointStart);
88498
88608
 
88499
88609
  _this.rotationAxis.copy(_this.eye);
88500
88610
 
88501
88611
  _this.rotationAngle = _this.pointEnd.angleTo(_this.pointStart) * (_this._tempVector.dot(_this.eye) < 0 ? 1 : -1);
88502
- } else if (axis === 'XYZE') {
88612
+ } else if (axis === "XYZE") {
88503
88613
  _this._tempVector.copy(_this.pointEnd).sub(_this.pointStart).cross(_this.eye).normalize();
88504
88614
 
88505
88615
  _this.rotationAxis.copy(_this._tempVector);
88506
88616
 
88507
88617
  _this.rotationAngle = _this.pointEnd.sub(_this.pointStart).dot(_this._tempVector.cross(_this.eye)) * ROTATION_SPEED;
88508
- } else if (axis === 'X' || axis === 'Y' || axis === 'Z') {
88618
+ } else if (axis === "X" || axis === "Y" || axis === "Z") {
88509
88619
  _this._alignVector.copy(unit).applyQuaternion(quaternion);
88510
88620
 
88511
88621
  _this.rotationAxis.copy(unit);
@@ -88513,7 +88623,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88513
88623
  _this._tempVector = unit.clone();
88514
88624
  _this._tempVector2 = _this.pointEnd.clone().sub(_this.pointStart);
88515
88625
 
88516
- if (space === 'local') {
88626
+ if (space === "local") {
88517
88627
  _this._tempVector.applyQuaternion(quaternion);
88518
88628
 
88519
88629
  _this._tempVector2.applyQuaternion(_this.worldQuaternionStart);
@@ -88525,7 +88635,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88525
88635
 
88526
88636
  if (_this.rotationSnap) _this.rotationAngle = Math.round(_this.rotationAngle / _this.this.rotationSnap) * _this.this.rotationSnap; // Apply rotate
88527
88637
 
88528
- if (space === 'local') {
88638
+ if (space === "local") {
88529
88639
  object.quaternion.copy(_this._quaternionStart);
88530
88640
  object.quaternion.multiply(_this._tempQuaternion.setFromAxisAngle(_this.rotationAxis, _this.rotationAngle));
88531
88641
  } else {
@@ -88627,35 +88737,35 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88627
88737
  _this._enabled = true;
88628
88738
  _this._axis = null;
88629
88739
 
88630
- _this.setAndDispatch('axis', null);
88740
+ _this.setAndDispatch("axis", null);
88631
88741
 
88632
- _this._mode = 'translate';
88742
+ _this._mode = "translate";
88633
88743
 
88634
- _this.setAndDispatch('mode', 'translate');
88744
+ _this.setAndDispatch("mode", "translate");
88635
88745
 
88636
88746
  _this._translationSnap = null;
88637
88747
  _this._rotationSnap = null;
88638
- _this._space = 'world';
88748
+ _this._space = "world";
88639
88749
 
88640
- _this.setAndDispatch('space', 'world');
88750
+ _this.setAndDispatch("space", "world");
88641
88751
 
88642
88752
  _this._size = 1;
88643
88753
 
88644
- _this.setAndDispatch('size', 1);
88754
+ _this.setAndDispatch("size", 1);
88645
88755
 
88646
88756
  _this._dragging = false;
88647
88757
 
88648
- _this.setAndDispatch('dragging', false);
88758
+ _this.setAndDispatch("dragging", false);
88649
88759
 
88650
88760
  _this._showX = true;
88651
88761
  _this._showY = true;
88652
88762
  _this._showZ = true;
88653
88763
 
88654
- _this.setAndDispatch('showX', true);
88764
+ _this.setAndDispatch("showX", true);
88655
88765
 
88656
- _this.setAndDispatch('showY', true);
88766
+ _this.setAndDispatch("showY", true);
88657
88767
 
88658
- _this.setAndDispatch('showZ', true);
88768
+ _this.setAndDispatch("showZ", true);
88659
88769
 
88660
88770
  _this.ray = new Raycaster();
88661
88771
  _this._tempVector = new Vector3$1();
@@ -88672,16 +88782,16 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88672
88782
  _this._pointEnd = new Vector3$1();
88673
88783
  _this._rotationAxis = new Vector3$1();
88674
88784
 
88675
- _this.setAndDispatch('rotationAxis', new Vector3$1());
88785
+ _this.setAndDispatch("rotationAxis", new Vector3$1());
88676
88786
 
88677
88787
  _this._rotationAngle = 0;
88678
88788
  _this._cameraPosition = new Vector3$1();
88679
88789
 
88680
- _this.setAndDispatch('cameraPosition', new Vector3$1());
88790
+ _this.setAndDispatch("cameraPosition", new Vector3$1());
88681
88791
 
88682
88792
  _this._cameraQuaternion = new Quaternion();
88683
88793
 
88684
- _this.setAndDispatch('cameraQuaternion', new Quaternion());
88794
+ _this.setAndDispatch("cameraQuaternion", new Quaternion());
88685
88795
 
88686
88796
  _this.cameraScale = new Vector3$1();
88687
88797
  _this.parentPosition = new Vector3$1();
@@ -88689,25 +88799,25 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88689
88799
  _this.parentScale = new Vector3$1();
88690
88800
  _this._worldPositionStart = new Vector3$1();
88691
88801
 
88692
- _this.setAndDispatch('worldPositionStart', new Vector3$1());
88802
+ _this.setAndDispatch("worldPositionStart", new Vector3$1());
88693
88803
 
88694
88804
  _this._worldQuaternionStart = new Quaternion();
88695
88805
 
88696
- _this.setAndDispatch('worldQuaternionStart', new Quaternion());
88806
+ _this.setAndDispatch("worldQuaternionStart", new Quaternion());
88697
88807
 
88698
88808
  _this.worldScaleStart = new Vector3$1();
88699
88809
  _this._worldPosition = new Vector3$1();
88700
88810
 
88701
- _this.setAndDispatch('worldPosition', new Vector3$1());
88811
+ _this.setAndDispatch("worldPosition", new Vector3$1());
88702
88812
 
88703
88813
  _this._worldQuaternion = new Quaternion();
88704
88814
 
88705
- _this.setAndDispatch('worldQuaternion', new Quaternion());
88815
+ _this.setAndDispatch("worldQuaternion", new Quaternion());
88706
88816
 
88707
88817
  _this.worldScale = new Vector3$1();
88708
88818
  _this._eye = new Vector3$1();
88709
88819
 
88710
- _this.setAndDispatch('eye', new Vector3$1());
88820
+ _this.setAndDispatch("eye", new Vector3$1());
88711
88821
 
88712
88822
  _this._positionStart = new Vector3$1();
88713
88823
  _this._quaternionStart = new Quaternion();
@@ -88746,7 +88856,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88746
88856
  }, {
88747
88857
  key: "enabled",
88748
88858
  value: function enabled(value) {
88749
- this.setAndDispatch('enabled', value);
88859
+ this.setAndDispatch("enabled", value);
88750
88860
  }
88751
88861
  }, {
88752
88862
  key: "init",
@@ -88853,222 +88963,222 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
88853
88963
  }, {
88854
88964
  key: "camera",
88855
88965
  set: function set(value) {
88856
- this.setAndDispatch('camera', value);
88966
+ this.setAndDispatch("camera", value);
88857
88967
  },
88858
88968
  get: function get() {
88859
- return this.getPrivateField('camera');
88969
+ return this.getPrivateField("camera");
88860
88970
  }
88861
88971
  }, {
88862
88972
  key: "object",
88863
88973
  set: function set(value) {
88864
- this.setAndDispatch('object', value);
88974
+ this.setAndDispatch("object", value);
88865
88975
  } // no
88866
88976
  ,
88867
88977
  get: function get() {
88868
- return this.getPrivateField('object');
88978
+ return this.getPrivateField("object");
88869
88979
  }
88870
88980
  }, {
88871
88981
  key: "enabled",
88872
88982
  get: function get() {
88873
- return this.getPrivateField('enabled');
88983
+ return this.getPrivateField("enabled");
88874
88984
  }
88875
88985
  }, {
88876
88986
  key: "axis",
88877
88987
  set: function set(value) {
88878
- this.setAndDispatch('axis', value);
88988
+ this.setAndDispatch("axis", value);
88879
88989
  } // si
88880
88990
  ,
88881
88991
  get: function get() {
88882
- return this.getPrivateField('axis');
88992
+ return this.getPrivateField("axis");
88883
88993
  }
88884
88994
  }, {
88885
88995
  key: "mode",
88886
88996
  set: function set(value) {
88887
- this.setAndDispatch('mode', value);
88997
+ this.setAndDispatch("mode", value);
88888
88998
  } // si
88889
88999
  ,
88890
89000
  get: function get() {
88891
- return this.getPrivateField('mode');
89001
+ return this.getPrivateField("mode");
88892
89002
  }
88893
89003
  }, {
88894
89004
  key: "translationSnap",
88895
89005
  set: function set(value) {
88896
- this.setAndDispatch('translationSnap', value);
89006
+ this.setAndDispatch("translationSnap", value);
88897
89007
  } // no
88898
89008
  ,
88899
89009
  get: function get() {
88900
- return this.getPrivateField('translationSnap');
89010
+ return this.getPrivateField("translationSnap");
88901
89011
  }
88902
89012
  }, {
88903
89013
  key: "rotationSnap",
88904
89014
  set: function set(value) {
88905
- this.setAndDispatch('rotationSnap', value);
89015
+ this.setAndDispatch("rotationSnap", value);
88906
89016
  } // no
88907
89017
  ,
88908
89018
  get: function get() {
88909
- return this.getPrivateField('rotationSnap');
89019
+ return this.getPrivateField("rotationSnap");
88910
89020
  }
88911
89021
  }, {
88912
89022
  key: "space",
88913
89023
  set: function set(value) {
88914
- this.setAndDispatch('space', value);
89024
+ this.setAndDispatch("space", value);
88915
89025
  } // si
88916
89026
  ,
88917
89027
  get: function get() {
88918
- return this.getPrivateField('space');
89028
+ return this.getPrivateField("space");
88919
89029
  }
88920
89030
  }, {
88921
89031
  key: "size",
88922
89032
  set: function set(value) {
88923
- this.setAndDispatch('size', value);
89033
+ this.setAndDispatch("size", value);
88924
89034
  } // si
88925
89035
  ,
88926
89036
  get: function get() {
88927
- return this.getPrivateField('size');
89037
+ return this.getPrivateField("size");
88928
89038
  }
88929
89039
  }, {
88930
89040
  key: "dragging",
88931
89041
  set: function set(value) {
88932
- this.setAndDispatch('dragging', value);
89042
+ this.setAndDispatch("dragging", value);
88933
89043
  } // si
88934
89044
  ,
88935
89045
  get: function get() {
88936
- return this.getPrivateField('dragging');
89046
+ return this.getPrivateField("dragging");
88937
89047
  }
88938
89048
  }, {
88939
89049
  key: "showX",
88940
89050
  set: function set(value) {
88941
- this.setAndDispatch('showX', value);
89051
+ this.setAndDispatch("showX", value);
88942
89052
  } // si
88943
89053
  ,
88944
89054
  get: function get() {
88945
- return this.getPrivateField('showX');
89055
+ return this.getPrivateField("showX");
88946
89056
  }
88947
89057
  }, {
88948
89058
  key: "showY",
88949
89059
  set: function set(value) {
88950
- this.setAndDispatch('showY', value);
89060
+ this.setAndDispatch("showY", value);
88951
89061
  } // si
88952
89062
  ,
88953
89063
  get: function get() {
88954
- return this.getPrivateField('showY');
89064
+ return this.getPrivateField("showY");
88955
89065
  }
88956
89066
  }, {
88957
89067
  key: "showZ",
88958
89068
  set: function set(value) {
88959
- this.setAndDispatch('showZ', value);
89069
+ this.setAndDispatch("showZ", value);
88960
89070
  } // si
88961
89071
  ,
88962
89072
  get: function get() {
88963
- return this.getPrivateField('showZ');
89073
+ return this.getPrivateField("showZ");
88964
89074
  }
88965
89075
  }, {
88966
89076
  key: "parentQuaternion",
88967
89077
  set: function set(value) {
88968
- this.setAndDispatch('parentQuaternion', value);
89078
+ this.setAndDispatch("parentQuaternion", value);
88969
89079
  } // no
88970
89080
  ,
88971
89081
  get: function get() {
88972
- return this.getPrivateField('parentQuaternion');
89082
+ return this.getPrivateField("parentQuaternion");
88973
89083
  }
88974
89084
  }, {
88975
89085
  key: "worldPosition",
88976
89086
  set: function set(value) {
88977
- this.setAndDispatch('worldPosition', value);
89087
+ this.setAndDispatch("worldPosition", value);
88978
89088
  } // si
88979
89089
  ,
88980
89090
  get: function get() {
88981
- return this.getPrivateField('worldPosition');
89091
+ return this.getPrivateField("worldPosition");
88982
89092
  }
88983
89093
  }, {
88984
89094
  key: "worldPositionStart",
88985
89095
  set: function set(value) {
88986
- this.setAndDispatch('worldPositionStart', value);
89096
+ this.setAndDispatch("worldPositionStart", value);
88987
89097
  } // si
88988
89098
  ,
88989
89099
  get: function get() {
88990
- return this.getPrivateField('worldPositionStart');
89100
+ return this.getPrivateField("worldPositionStart");
88991
89101
  }
88992
89102
  }, {
88993
89103
  key: "worldQuaternion",
88994
89104
  set: function set(value) {
88995
- this.setAndDispatch('worldQuaternion', value);
89105
+ this.setAndDispatch("worldQuaternion", value);
88996
89106
  } // si
88997
89107
  ,
88998
89108
  get: function get() {
88999
- return this.getPrivateField('worldQuaternion');
89109
+ return this.getPrivateField("worldQuaternion");
89000
89110
  }
89001
89111
  }, {
89002
89112
  key: "worldQuaternionStart",
89003
89113
  set: function set(value) {
89004
- this.setAndDispatch('worldQuaternionStart', value);
89114
+ this.setAndDispatch("worldQuaternionStart", value);
89005
89115
  } // si
89006
89116
  ,
89007
89117
  get: function get() {
89008
- return this.getPrivateField('worldQuaternionStart');
89118
+ return this.getPrivateField("worldQuaternionStart");
89009
89119
  }
89010
89120
  }, {
89011
89121
  key: "cameraPosition",
89012
89122
  set: function set(value) {
89013
- this.setAndDispatch('cameraPosition', value);
89123
+ this.setAndDispatch("cameraPosition", value);
89014
89124
  } // si
89015
89125
  ,
89016
89126
  get: function get() {
89017
- return this.getPrivateField('cameraPosition');
89127
+ return this.getPrivateField("cameraPosition");
89018
89128
  }
89019
89129
  }, {
89020
89130
  key: "cameraQuaternion",
89021
89131
  set: function set(value) {
89022
- this.setAndDispatch('cameraQuaternion', value);
89132
+ this.setAndDispatch("cameraQuaternion", value);
89023
89133
  } // si
89024
89134
  ,
89025
89135
  get: function get() {
89026
- return this.getPrivateField('cameraQuaternion');
89136
+ return this.getPrivateField("cameraQuaternion");
89027
89137
  }
89028
89138
  }, {
89029
89139
  key: "pointStart",
89030
89140
  set: function set(value) {
89031
- this.setAndDispatch('pointStart', value);
89141
+ this.setAndDispatch("pointStart", value);
89032
89142
  } // no
89033
89143
  ,
89034
89144
  get: function get() {
89035
- return this.getPrivateField('pointStart');
89145
+ return this.getPrivateField("pointStart");
89036
89146
  }
89037
89147
  }, {
89038
89148
  key: "pointEnd",
89039
89149
  set: function set(value) {
89040
- this.setAndDispatch('pointEnd', value);
89150
+ this.setAndDispatch("pointEnd", value);
89041
89151
  } // no
89042
89152
  ,
89043
89153
  get: function get() {
89044
- return this.getPrivateField('pointEnd');
89154
+ return this.getPrivateField("pointEnd");
89045
89155
  }
89046
89156
  }, {
89047
89157
  key: "rotationAxis",
89048
89158
  set: function set(value) {
89049
- this.setAndDispatch('rotationAxis', value);
89159
+ this.setAndDispatch("rotationAxis", value);
89050
89160
  } // no
89051
89161
  ,
89052
89162
  get: function get() {
89053
- return this.getPrivateField('rotationAxis');
89163
+ return this.getPrivateField("rotationAxis");
89054
89164
  }
89055
89165
  }, {
89056
89166
  key: "rotationAngle",
89057
89167
  set: function set(value) {
89058
- this.setAndDispatch('rotationAngle', value);
89168
+ this.setAndDispatch("rotationAngle", value);
89059
89169
  } // no
89060
89170
  ,
89061
89171
  get: function get() {
89062
- return this.getPrivateField('rotationAngle');
89172
+ return this.getPrivateField("rotationAngle");
89063
89173
  }
89064
89174
  }, {
89065
89175
  key: "eye",
89066
89176
  set: function set(value) {
89067
- this.setAndDispatch('eye', value);
89177
+ this.setAndDispatch("eye", value);
89068
89178
  } // si
89069
89179
  ,
89070
89180
  get: function get() {
89071
- return this.getPrivateField('eye');
89181
+ return this.getPrivateField("eye");
89072
89182
  }
89073
89183
  }]);
89074
89184
 
@@ -89795,15 +89905,15 @@ var FirstPersonControl = /*#__PURE__*/function (_EventDispatcher) {
89795
89905
 
89796
89906
  return FlyControl;
89797
89907
  }(EventDispatcher);var CONTROLS = {
89798
- ORBIT: 'orbit',
89799
- TRANSFORM: 'transform',
89800
- FPS: 'fps',
89801
- FLY: 'fly'
89908
+ ORBIT: "orbit",
89909
+ TRANSFORM: "transform",
89910
+ FPS: "fps",
89911
+ FLY: "fly"
89802
89912
  };
89803
89913
  var AVAILABLE_CONTROLS = Object.keys(CONTROLS);
89804
89914
  var EVENTS = {
89805
- CHANGE: 'change',
89806
- DRAGGING_CHANGE: 'dragging-changed'
89915
+ CHANGE: "change",
89916
+ DRAGGING_CHANGE: "dragging-changed"
89807
89917
  };
89808
89918
  var Controls = /*#__PURE__*/function () {
89809
89919
  function Controls() {
@@ -89861,7 +89971,13 @@ var Controls = /*#__PURE__*/function () {
89861
89971
  }
89862
89972
  }, {
89863
89973
  key: "setOrbitControl",
89864
- value: function setOrbitControl() {
89974
+ value: function setOrbitControl(options) {
89975
+ console.warn(DEPRECATIONS.SET_ORBIT_CONTROL);
89976
+ return this.setOrbitControls(options);
89977
+ }
89978
+ }, {
89979
+ key: "setOrbitControls",
89980
+ value: function setOrbitControls() {
89865
89981
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
89866
89982
  _ref$target = _ref.target,
89867
89983
  target = _ref$target === void 0 ? new Vector3$1() : _ref$target;
@@ -89874,12 +89990,18 @@ var Controls = /*#__PURE__*/function () {
89874
89990
  }
89875
89991
  }, {
89876
89992
  key: "setTransformControl",
89877
- value: function setTransformControl() {
89993
+ value: function setTransformControl(options) {
89994
+ console.warn(DEPRECATIONS.SET_TRANSFORM_CONTROL);
89995
+ return this.setTransformControls(options);
89996
+ }
89997
+ }, {
89998
+ key: "setTransformControls",
89999
+ value: function setTransformControls() {
89878
90000
  var _this4 = this;
89879
90001
 
89880
90002
  this.controls[CONTROLS.TRANSFORM] = new TransformControls(Scene$1.getCameraBody(), Scene$1.getDOMElement());
89881
90003
  this.controls[CONTROLS.TRANSFORM].init();
89882
- this.controls[CONTROLS.TRANSFORM].addEventListener(EVENTS.CHANGE, Scene$1.render);
90004
+ this.controls[CONTROLS.TRANSFORM].addEventListener(EVENTS.CHANGE, Scene$1.render.bind(Scene$1));
89883
90005
  this.controls[CONTROLS.TRANSFORM].addEventListener(EVENTS.DRAGGING_CHANGE, function (event) {
89884
90006
  if (_this4.controls[CONTROLS.ORBIT]) {
89885
90007
  _this4.controls[CONTROLS.ORBIT].enabled = !event.value;
@@ -89890,13 +90012,25 @@ var Controls = /*#__PURE__*/function () {
89890
90012
  }, {
89891
90013
  key: "setFirstPersonControl",
89892
90014
  value: function setFirstPersonControl(options) {
90015
+ console.warn(DEPRECATIONS.SET_FIRST_PERSON_CONTROL);
90016
+ return this.setFirstPersonControls(options);
90017
+ }
90018
+ }, {
90019
+ key: "setFirstPersonControls",
90020
+ value: function setFirstPersonControls(options) {
89893
90021
  this.controls[CONTROLS.FPS] = new FirstPersonControl(Scene$1.getCamera(), Scene$1.getDOMElement(), options);
89894
90022
  this.controls[CONTROLS.FPS].init();
89895
90023
  return this.controls[CONTROLS.FPS];
89896
90024
  }
89897
90025
  }, {
89898
90026
  key: "setFlyControl",
89899
- value: function setFlyControl() {
90027
+ value: function setFlyControl(options) {
90028
+ console.warn(DEPRECATIONS.SET_FLY_CONTROL);
90029
+ return this.setFlyControls(options);
90030
+ }
90031
+ }, {
90032
+ key: "setFlyControls",
90033
+ value: function setFlyControls() {
89900
90034
  this.controls[CONTROLS.FLY] = new FlyControl(Scene$1.getCameraBody(), Scene$1.getDOMElement());
89901
90035
  this.controls[CONTROLS.FLY].init();
89902
90036
  return this.controls[CONTROLS.FLY];
@@ -91273,8 +91407,8 @@ var DEFAULT_MAP_SIZE = 2048;
91273
91407
  var DEFAULT_BIAS = -0.0001;
91274
91408
  var WHITE = 0xffffff;
91275
91409
  var GREEN$1 = 0x2ecc71;
91276
- var DEFAULT_SPOTLIGHT_ANGLE = .32;
91277
- var DEFAULT_SPOTLIGHT_PENUMBRA = .5;
91410
+ var DEFAULT_SPOTLIGHT_ANGLE = 0.32;
91411
+ var DEFAULT_SPOTLIGHT_PENUMBRA = 0.5;
91278
91412
  var DEFAULT_SPOTLIGHT_DECAY = 2;
91279
91413
 
91280
91414
  var SpotLight = /*#__PURE__*/function (_Light) {
@@ -91294,7 +91428,7 @@ var SpotLight = /*#__PURE__*/function (_Light) {
91294
91428
  _options$intensity = options.intensity,
91295
91429
  intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$1 : _options$intensity,
91296
91430
  _options$name = options.name,
91297
- name = _options$name === void 0 ? generateRandomName('SpotLight') : _options$name,
91431
+ name = _options$name === void 0 ? generateRandomName("SpotLight") : _options$name,
91298
91432
  _options$distance = options.distance,
91299
91433
  distance = _options$distance === void 0 ? DEFAULT_FAR : _options$distance,
91300
91434
  _options$angle = options.angle,
@@ -91327,19 +91461,9 @@ var SpotLight = /*#__PURE__*/function (_Light) {
91327
91461
  }
91328
91462
 
91329
91463
  _createClass(SpotLight, [{
91330
- key: "getTargetMesh",
91331
- value: function getTargetMesh(initialPosition) {
91332
- var geometry = new SphereGeometry(3, 6, 6);
91333
- var material = new MeshBasicMaterial({
91334
- color: 0xeeeeee,
91335
- wireframe: true
91336
- });
91337
- var target = new Element$1({
91338
- geometry: geometry,
91339
- material: material
91340
- });
91341
- target.position(initialPosition);
91342
- return target;
91464
+ key: "hasTarget",
91465
+ value: function hasTarget() {
91466
+ return true;
91343
91467
  }
91344
91468
  }, {
91345
91469
  key: "setLight",
@@ -91428,13 +91552,25 @@ var SpotLight = /*#__PURE__*/function (_Light) {
91428
91552
  return this.target;
91429
91553
  }
91430
91554
  }, {
91431
- key: "addHelper",
91432
- value: function addHelper() {
91433
- this.helper = new SpotLightHelper(this.body, GREEN$1);
91434
- this.shadowHelper = new CameraHelper(this.body.shadow.camera);
91555
+ key: "addHelpers",
91556
+ value: function addHelpers() {
91557
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
91558
+ _ref2$holderName = _ref2.holderName,
91559
+ holderName = _ref2$holderName === void 0 ? "spotlightholder" : _ref2$holderName,
91560
+ _ref2$holderSize = _ref2.holderSize,
91561
+ holderSize = _ref2$holderSize === void 0 ? 0.05 : _ref2$holderSize,
91562
+ _ref2$targetHolderNam = _ref2.targetHolderName,
91563
+ targetHolderName = _ref2$targetHolderNam === void 0 ? "targetholder" : _ref2$targetHolderNam,
91564
+ _ref2$targetHolderSiz = _ref2.targetHolderSize,
91565
+ targetHolderSize = _ref2$targetHolderSiz === void 0 ? 0.05 : _ref2$targetHolderSiz;
91566
+
91567
+ this.helper = new SpotLightHelper(this.getBody(), GREEN$1);
91568
+ this.shadowHelper = new CameraHelper(this.getBody().shadow.camera);
91435
91569
  Scene$1.add(this.helper, null, false);
91436
91570
  Scene$1.add(this.shadowHelper, null, false);
91437
- this.addHolder();
91571
+ this.addHolder(holderName, holderSize);
91572
+ this.addTargetHolder(targetHolderName, targetHolderSize);
91573
+ this.isUsingHelper = true;
91438
91574
  }
91439
91575
  }, {
91440
91576
  key: "hasTarget",
@@ -91446,7 +91582,7 @@ var SpotLight = /*#__PURE__*/function (_Light) {
91446
91582
  value: function update(dt) {
91447
91583
  _get(_getPrototypeOf(SpotLight.prototype), "update", this).call(this, dt);
91448
91584
 
91449
- if (this.hasHelper()) {
91585
+ if (this.usingHelper()) {
91450
91586
  this.helper.update();
91451
91587
  this.shadowHelper.update();
91452
91588
  }
@@ -91457,6 +91593,13 @@ var SpotLight = /*#__PURE__*/function (_Light) {
91457
91593
  });
91458
91594
  }
91459
91595
  }
91596
+ }, {
91597
+ key: "toJSON",
91598
+ value: function toJSON() {
91599
+ return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(SpotLight.prototype), "toJSON", this).call(this)), {}, {
91600
+ target: this.getTargetPosition()
91601
+ });
91602
+ }
91460
91603
  }]);
91461
91604
 
91462
91605
  return SpotLight;
@@ -91485,7 +91628,7 @@ var HemisphereLight = /*#__PURE__*/function (_Light) {
91485
91628
  _options$intensity = options.intensity,
91486
91629
  intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY : _options$intensity,
91487
91630
  _options$name = options.name,
91488
- name = _options$name === void 0 ? generateRandomName('HemisphereLight') : _options$name;
91631
+ name = _options$name === void 0 ? generateRandomName("HemisphereLight") : _options$name;
91489
91632
  _this = _super.call(this, {
91490
91633
  color: color,
91491
91634
  intensity: intensity,
@@ -91536,11 +91679,30 @@ var HemisphereLight = /*#__PURE__*/function (_Light) {
91536
91679
  }
91537
91680
  }
91538
91681
  }, {
91539
- key: "addHelper",
91540
- value: function addHelper() {
91541
- this.helper = new HemisphereLightHelper(this.body, 2, GREEN);
91682
+ key: "addHelpers",
91683
+ value: function addHelpers() {
91684
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
91685
+ _ref2$holderName = _ref2.holderName,
91686
+ holderName = _ref2$holderName === void 0 ? "hemispherelightholder" : _ref2$holderName,
91687
+ _ref2$holderSize = _ref2.holderSize,
91688
+ holderSize = _ref2$holderSize === void 0 ? 0.05 : _ref2$holderSize;
91689
+
91690
+ this.helper = new HemisphereLightHelper(this.getBody(), 2, GREEN);
91691
+ this.addHolder(holderName, holderSize);
91692
+ this.isUsingHelper = true;
91542
91693
  Scene$1.add(this.helper, null, false);
91543
91694
  }
91695
+ }, {
91696
+ key: "update",
91697
+ value: function update(dt) {
91698
+ _get(_getPrototypeOf(HemisphereLight.prototype), "update", this).call(this, dt);
91699
+
91700
+ if (this.usingHelper()) {
91701
+ this.setPosition(this.holder.getPosition(), {
91702
+ updateHolder: false
91703
+ });
91704
+ }
91705
+ }
91544
91706
  }]);
91545
91707
 
91546
91708
  return HemisphereLight;