mage-engine 3.22.5 → 3.22.7
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.
- package/dist/mage.js +864 -69
- package/package.json +1 -1
package/dist/mage.js
CHANGED
|
@@ -41959,7 +41959,7 @@ class Shape extends Path {
|
|
|
41959
41959
|
|
|
41960
41960
|
}
|
|
41961
41961
|
|
|
41962
|
-
class Light$
|
|
41962
|
+
class Light$2 extends Object3D {
|
|
41963
41963
|
|
|
41964
41964
|
constructor( color, intensity = 1 ) {
|
|
41965
41965
|
|
|
@@ -42005,9 +42005,9 @@ class Light$1 extends Object3D {
|
|
|
42005
42005
|
|
|
42006
42006
|
}
|
|
42007
42007
|
|
|
42008
|
-
Light$
|
|
42008
|
+
Light$2.prototype.isLight = true;
|
|
42009
42009
|
|
|
42010
|
-
class HemisphereLight$1 extends Light$
|
|
42010
|
+
class HemisphereLight$1 extends Light$2 {
|
|
42011
42011
|
|
|
42012
42012
|
constructor( skyColor, groundColor, intensity ) {
|
|
42013
42013
|
|
|
@@ -42024,7 +42024,7 @@ class HemisphereLight$1 extends Light$1 {
|
|
|
42024
42024
|
|
|
42025
42025
|
copy( source ) {
|
|
42026
42026
|
|
|
42027
|
-
Light$
|
|
42027
|
+
Light$2.prototype.copy.call( this, source );
|
|
42028
42028
|
|
|
42029
42029
|
this.groundColor.copy( source.groundColor );
|
|
42030
42030
|
|
|
@@ -42195,7 +42195,7 @@ class SpotLightShadow extends LightShadow {
|
|
|
42195
42195
|
|
|
42196
42196
|
SpotLightShadow.prototype.isSpotLightShadow = true;
|
|
42197
42197
|
|
|
42198
|
-
class SpotLight$1 extends Light$
|
|
42198
|
+
class SpotLight$1 extends Light$2 {
|
|
42199
42199
|
|
|
42200
42200
|
constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 1 ) {
|
|
42201
42201
|
|
|
@@ -42333,7 +42333,7 @@ class PointLightShadow extends LightShadow {
|
|
|
42333
42333
|
|
|
42334
42334
|
PointLightShadow.prototype.isPointLightShadow = true;
|
|
42335
42335
|
|
|
42336
|
-
class PointLight$1 extends Light$
|
|
42336
|
+
class PointLight$1 extends Light$2 {
|
|
42337
42337
|
|
|
42338
42338
|
constructor( color, intensity, distance = 0, decay = 1 ) {
|
|
42339
42339
|
|
|
@@ -42526,7 +42526,7 @@ class DirectionalLightShadow extends LightShadow {
|
|
|
42526
42526
|
|
|
42527
42527
|
DirectionalLightShadow.prototype.isDirectionalLightShadow = true;
|
|
42528
42528
|
|
|
42529
|
-
class DirectionalLight extends Light$
|
|
42529
|
+
class DirectionalLight extends Light$2 {
|
|
42530
42530
|
|
|
42531
42531
|
constructor( color, intensity ) {
|
|
42532
42532
|
|
|
@@ -42558,7 +42558,7 @@ class DirectionalLight extends Light$1 {
|
|
|
42558
42558
|
|
|
42559
42559
|
DirectionalLight.prototype.isDirectionalLight = true;
|
|
42560
42560
|
|
|
42561
|
-
class AmbientLight$1 extends Light$
|
|
42561
|
+
class AmbientLight$1 extends Light$2 {
|
|
42562
42562
|
|
|
42563
42563
|
constructor( color, intensity ) {
|
|
42564
42564
|
|
|
@@ -42572,7 +42572,7 @@ class AmbientLight$1 extends Light$1 {
|
|
|
42572
42572
|
|
|
42573
42573
|
AmbientLight$1.prototype.isAmbientLight = true;
|
|
42574
42574
|
|
|
42575
|
-
class RectAreaLight extends Light$
|
|
42575
|
+
class RectAreaLight extends Light$2 {
|
|
42576
42576
|
|
|
42577
42577
|
constructor( color, intensity, width = 10, height = 10 ) {
|
|
42578
42578
|
|
|
@@ -42851,7 +42851,7 @@ class SphericalHarmonics3 {
|
|
|
42851
42851
|
|
|
42852
42852
|
SphericalHarmonics3.prototype.isSphericalHarmonics3 = true;
|
|
42853
42853
|
|
|
42854
|
-
class LightProbe extends Light$
|
|
42854
|
+
class LightProbe extends Light$2 {
|
|
42855
42855
|
|
|
42856
42856
|
constructor( sh = new SphericalHarmonics3(), intensity = 1 ) {
|
|
42857
42857
|
|
|
@@ -52789,7 +52789,7 @@ PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {
|
|
|
52789
52789
|
|
|
52790
52790
|
//
|
|
52791
52791
|
|
|
52792
|
-
Object.defineProperties( Light$
|
|
52792
|
+
Object.defineProperties( Light$2.prototype, {
|
|
52793
52793
|
onlyShadow: {
|
|
52794
52794
|
set: function () {
|
|
52795
52795
|
|
|
@@ -53918,7 +53918,7 @@ 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]";
|
|
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$2,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
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"),
|
|
@@ -53962,11 +53962,13 @@ var KEYBOARD_COMBO_ALREADY_REGISTERED = "".concat(PREFIX, " Keyboard combo alrea
|
|
|
53962
53962
|
var PHYSICS_ELEMENT_CANT_BE_REMOVED = "".concat(PREFIX, " This element can't be removed from physics world.");
|
|
53963
53963
|
var PHYSICS_ELEMENT_ALREADY_STORED = "".concat(PREFIX, " This element has already been added to the world.");
|
|
53964
53964
|
var ASSETS_AUDIO_LOAD_FAIL = "".concat(PREFIX, " Could not load audio.");
|
|
53965
|
+
var ASSETS_AUDIO_FILE_LOAD_FAIL = "".concat(PREFIX, " Could not load desired audio file.");
|
|
53965
53966
|
var ASSETS_MODEL_LOAD_FAIL = "".concat(PREFIX, " Could not load model.");
|
|
53966
53967
|
var AUDIO_CONTEXT_NOT_AVAILABLE = "".concat(PREFIX, " No Audio Context available, sorry.");
|
|
53967
53968
|
var AUDIO_UNABLE_TO_LOAD_SOUND = "".concat(PREFIX, " Unable to load sound, sorry.");
|
|
53969
|
+
var AUDIO_SOURCE_NOT_DEFINED = "".concat(PREFIX, " No audio source defined. Set a source for this sound.");
|
|
53968
53970
|
var LIGHT_NOT_FOUND = "".concat(PREFIX, " This light was not created properly.");
|
|
53969
|
-
var LIGHT_HOLDER_MODEL_NOT_FOUND = "".concat(PREFIX, " This light holder model can't be found.");
|
|
53971
|
+
var LIGHT_HOLDER_MODEL_NOT_FOUND$1 = "".concat(PREFIX, " This light holder model can't be found.");
|
|
53970
53972
|
var LABEL_DOMELEMENT_MISSING = "".concat(PREFIX, " Could not create Label, domElement is missing. Did you forget to set the this.element ref on your component?");var BaseScript = /*#__PURE__*/function () {
|
|
53971
53973
|
_createClass(BaseScript, [{
|
|
53972
53974
|
key: "__check",
|
|
@@ -55219,10 +55221,15 @@ var DEFAULT_SELECTOR = "#gameContainer";
|
|
|
55219
55221
|
var BEFORE_UNLOAD = "beforeunload";
|
|
55220
55222
|
var HASH_CHANGE = "hashchange";
|
|
55221
55223
|
var TAGS = {
|
|
55224
|
+
HELPER: "TAGS.HELPER",
|
|
55222
55225
|
LIGHTS: {
|
|
55223
55226
|
HOLDER: "TAGS.LIGHTS.HOLDER",
|
|
55224
55227
|
HELPER: "TAGS.LIGHTS.HELPER",
|
|
55225
55228
|
TARGET: "TAGS.LIGHTS.TARGET"
|
|
55229
|
+
},
|
|
55230
|
+
SOUNDS: {
|
|
55231
|
+
HELPER: "TAGS.SOUNDS.HELPER",
|
|
55232
|
+
HOLDER: "TAGS.SOUNDS.HOLDER"
|
|
55226
55233
|
}
|
|
55227
55234
|
};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) {
|
|
55228
55235
|
return level ? "".concat(level, "_").concat(name) : name;
|
|
@@ -57762,8 +57769,8 @@ function applyMiddleware() {
|
|
|
57762
57769
|
}
|
|
57763
57770
|
|
|
57764
57771
|
var thunk = createThunkMiddleware();
|
|
57765
|
-
thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
|
|
57766
|
-
var version$1 = "3.22.
|
|
57772
|
+
thunk.withExtraArgument = createThunkMiddleware;var name$1 = "mage-engine";
|
|
57773
|
+
var version$1 = "3.22.7";
|
|
57767
57774
|
var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
|
|
57768
57775
|
var main = "dist/mage.js";
|
|
57769
57776
|
var author$1 = {
|
|
@@ -57846,7 +57853,7 @@ var devDependencies = {
|
|
|
57846
57853
|
"rollup-plugin-web-worker-loader": "1.6.1"
|
|
57847
57854
|
};
|
|
57848
57855
|
var packageJSON = {
|
|
57849
|
-
name: name,
|
|
57856
|
+
name: name$1,
|
|
57850
57857
|
version: version$1,
|
|
57851
57858
|
description: description,
|
|
57852
57859
|
main: main,
|
|
@@ -68761,8 +68768,8 @@ var DEFAULT_AUDIO_NODE_VOLUME = 5;
|
|
|
68761
68768
|
var DEFAULT_AUDIO_NODE_RAMP_TIME = 100; // value in ms
|
|
68762
68769
|
|
|
68763
68770
|
var AUDIO_RAMPS = {
|
|
68764
|
-
LINEAR:
|
|
68765
|
-
EXPONENTIAL:
|
|
68771
|
+
LINEAR: "LINEAR",
|
|
68772
|
+
EXPONENTIAL: "EXPONENTIAL"
|
|
68766
68773
|
};
|
|
68767
68774
|
var Audio = /*#__PURE__*/function () {
|
|
68768
68775
|
function Audio() {
|
|
@@ -68775,29 +68782,33 @@ var Audio = /*#__PURE__*/function () {
|
|
|
68775
68782
|
});
|
|
68776
68783
|
|
|
68777
68784
|
_defineProperty$1(this, "load", function () {
|
|
68778
|
-
var
|
|
68785
|
+
var audioAssets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
68779
68786
|
var level = arguments.length > 1 ? arguments[1] : undefined;
|
|
68780
|
-
_this.
|
|
68787
|
+
_this.audioAssets = audioAssets;
|
|
68781
68788
|
|
|
68782
68789
|
_this.createAudioContext();
|
|
68783
68790
|
|
|
68784
|
-
if (Object.keys(_this.
|
|
68791
|
+
if (Object.keys(_this.audioAssets).length === 0) {
|
|
68785
68792
|
return Promise.resolve();
|
|
68786
68793
|
}
|
|
68787
68794
|
|
|
68788
|
-
return Promise.all(Object.keys(_this.
|
|
68789
|
-
return _this.
|
|
68795
|
+
return Promise.all(Object.keys(_this.audioAssets).map(function (id) {
|
|
68796
|
+
return _this.loadAssetByName(id, level);
|
|
68790
68797
|
})).catch(function (e) {
|
|
68791
|
-
console.
|
|
68798
|
+
console.error(ASSETS_AUDIO_LOAD_FAIL);
|
|
68792
68799
|
console.log(e);
|
|
68793
68800
|
return Promise.resolve();
|
|
68794
68801
|
});
|
|
68795
68802
|
});
|
|
68796
68803
|
|
|
68797
|
-
_defineProperty$1(this, "
|
|
68798
|
-
var path = _this.
|
|
68799
|
-
var request = new XMLHttpRequest();
|
|
68804
|
+
_defineProperty$1(this, "loadAssetByName", function (name, level) {
|
|
68805
|
+
var path = _this.audioAssets[name];
|
|
68800
68806
|
var id = buildAssetId(name, level);
|
|
68807
|
+
return _this.loadAsset(path, id);
|
|
68808
|
+
});
|
|
68809
|
+
|
|
68810
|
+
_defineProperty$1(this, "loadAsset", function (path, id) {
|
|
68811
|
+
var request = new XMLHttpRequest();
|
|
68801
68812
|
return new Promise(function (resolve) {
|
|
68802
68813
|
request.open("GET", path, true);
|
|
68803
68814
|
request.responseType = "arraybuffer";
|
|
@@ -68805,10 +68816,11 @@ var Audio = /*#__PURE__*/function () {
|
|
|
68805
68816
|
request.onreadystatechange = function (e) {
|
|
68806
68817
|
if (request.readyState === 4 && request.status === 200) {
|
|
68807
68818
|
_this.context.decodeAudioData(request.response, function (buffer) {
|
|
68808
|
-
_this.
|
|
68819
|
+
_this.buffersMap[id] = buffer;
|
|
68809
68820
|
resolve();
|
|
68810
68821
|
}, function () {
|
|
68811
|
-
_this.
|
|
68822
|
+
_this.buffersMap[id] = null;
|
|
68823
|
+
console.error(ASSETS_AUDIO_FILE_LOAD_FAIL);
|
|
68812
68824
|
resolve();
|
|
68813
68825
|
});
|
|
68814
68826
|
}
|
|
@@ -68820,15 +68832,16 @@ var Audio = /*#__PURE__*/function () {
|
|
|
68820
68832
|
|
|
68821
68833
|
this.masterVolumeNode = null;
|
|
68822
68834
|
this.context = null;
|
|
68823
|
-
this.
|
|
68824
|
-
this.
|
|
68835
|
+
this.levelSounds = [];
|
|
68836
|
+
this.buffersMap = {};
|
|
68837
|
+
this.audioAssets = {};
|
|
68825
68838
|
this.currentLevel = ROOT;
|
|
68826
68839
|
}
|
|
68827
68840
|
|
|
68828
68841
|
_createClass(Audio, [{
|
|
68829
68842
|
key: "reset",
|
|
68830
68843
|
value: function reset() {
|
|
68831
|
-
this.
|
|
68844
|
+
this.levelSounds = [];
|
|
68832
68845
|
}
|
|
68833
68846
|
}, {
|
|
68834
68847
|
key: "hasContext",
|
|
@@ -68838,7 +68851,7 @@ var Audio = /*#__PURE__*/function () {
|
|
|
68838
68851
|
}, {
|
|
68839
68852
|
key: "hasSounds",
|
|
68840
68853
|
value: function hasSounds() {
|
|
68841
|
-
return this.
|
|
68854
|
+
return this.levelSounds.length > 0;
|
|
68842
68855
|
}
|
|
68843
68856
|
}, {
|
|
68844
68857
|
key: "createAudioContext",
|
|
@@ -68892,12 +68905,12 @@ var Audio = /*#__PURE__*/function () {
|
|
|
68892
68905
|
}, {
|
|
68893
68906
|
key: "get",
|
|
68894
68907
|
value: function get(id) {
|
|
68895
|
-
return this.
|
|
68908
|
+
return this.buffersMap[id] || this.buffersMap[buildAssetId(id, this.currentLevel)] || false;
|
|
68896
68909
|
}
|
|
68897
68910
|
}, {
|
|
68898
68911
|
key: "add",
|
|
68899
68912
|
value: function add(sound) {
|
|
68900
|
-
this.
|
|
68913
|
+
this.levelSounds.push(sound);
|
|
68901
68914
|
}
|
|
68902
68915
|
}, {
|
|
68903
68916
|
key: "updateListenerPosition",
|
|
@@ -68936,8 +68949,8 @@ var Audio = /*#__PURE__*/function () {
|
|
|
68936
68949
|
}, {
|
|
68937
68950
|
key: "dispose",
|
|
68938
68951
|
value: function dispose() {
|
|
68939
|
-
for (var index in this.
|
|
68940
|
-
var sound = this.
|
|
68952
|
+
for (var index in this.levelSounds) {
|
|
68953
|
+
var sound = this.levelSounds[index];
|
|
68941
68954
|
sound.dispose();
|
|
68942
68955
|
}
|
|
68943
68956
|
|
|
@@ -68955,8 +68968,8 @@ var Audio = /*#__PURE__*/function () {
|
|
|
68955
68968
|
|
|
68956
68969
|
var start = new Date();
|
|
68957
68970
|
|
|
68958
|
-
for (var index in this.
|
|
68959
|
-
var sound = this.
|
|
68971
|
+
for (var index in this.levelSounds) {
|
|
68972
|
+
var sound = this.levelSounds[index];
|
|
68960
68973
|
sound.update(dt);
|
|
68961
68974
|
if (+new Date() - start > TIME_FOR_UPDATE) break;
|
|
68962
68975
|
}
|
|
@@ -82945,7 +82958,7 @@ var MeshLoader = /*#__PURE__*/function (_Loader) {
|
|
|
82945
82958
|
|
|
82946
82959
|
return MeshLoader;
|
|
82947
82960
|
}(Loader);
|
|
82948
|
-
var MeshLoader$1 = new MeshLoader();var Light = /*#__PURE__*/function (_Entity) {
|
|
82961
|
+
var MeshLoader$1 = new MeshLoader();var Light$1 = /*#__PURE__*/function (_Entity) {
|
|
82949
82962
|
_inherits(Light, _Entity);
|
|
82950
82963
|
|
|
82951
82964
|
var _super = _createSuper(Light);
|
|
@@ -82976,12 +82989,12 @@ var MeshLoader$1 = new MeshLoader();var Light = /*#__PURE__*/function (_Entity)
|
|
|
82976
82989
|
holderSprite.setDepthWrite(false);
|
|
82977
82990
|
holderSprite.setSerializable(false);
|
|
82978
82991
|
holderSprite.setPosition(_this.getPosition());
|
|
82979
|
-
holderSprite.addTags([TAGS.LIGHTS.HELPER, TAGS.LIGHTS.HOLDER, name]);
|
|
82992
|
+
holderSprite.addTags([TAGS.HELPER, TAGS.LIGHTS.HELPER, TAGS.LIGHTS.HOLDER, name]);
|
|
82980
82993
|
holderSprite.setHelperTarget(_assertThisInitialized(_this));
|
|
82981
82994
|
_this.holder = holderSprite;
|
|
82982
82995
|
return true;
|
|
82983
82996
|
} else {
|
|
82984
|
-
console.warn(LIGHT_HOLDER_MODEL_NOT_FOUND);
|
|
82997
|
+
console.warn(LIGHT_HOLDER_MODEL_NOT_FOUND$1);
|
|
82985
82998
|
return false;
|
|
82986
82999
|
}
|
|
82987
83000
|
});
|
|
@@ -83072,7 +83085,7 @@ var MeshLoader$1 = new MeshLoader();var Light = /*#__PURE__*/function (_Entity)
|
|
|
83072
83085
|
this.body.position.set(x, y, z);
|
|
83073
83086
|
}
|
|
83074
83087
|
|
|
83075
|
-
if (this.hasHolder()
|
|
83088
|
+
if (this.hasHolder() && updateHolder) {
|
|
83076
83089
|
this.holder.setPosition({
|
|
83077
83090
|
x: x,
|
|
83078
83091
|
y: y,
|
|
@@ -83426,7 +83439,7 @@ var SunLight = /*#__PURE__*/function (_Light) {
|
|
|
83426
83439
|
}]);
|
|
83427
83440
|
|
|
83428
83441
|
return SunLight;
|
|
83429
|
-
}(Light);var DEFAULT_POSITION$2 = {
|
|
83442
|
+
}(Light$1);var DEFAULT_POSITION$2 = {
|
|
83430
83443
|
x: 0,
|
|
83431
83444
|
y: 0,
|
|
83432
83445
|
z: 0
|
|
@@ -83528,7 +83541,7 @@ var AmbientLight = /*#__PURE__*/function (_Light) {
|
|
|
83528
83541
|
}]);
|
|
83529
83542
|
|
|
83530
83543
|
return AmbientLight;
|
|
83531
|
-
}(Light);var DEFAULT_NEAR$1 = 0.1;
|
|
83544
|
+
}(Light$1);var DEFAULT_NEAR$1 = 0.1;
|
|
83532
83545
|
var DEFAULT_FAR$1 = 100;
|
|
83533
83546
|
var DEFAULT_POSITION$1 = {
|
|
83534
83547
|
x: 0,
|
|
@@ -83759,7 +83772,7 @@ var PointLight = /*#__PURE__*/function (_Light) {
|
|
|
83759
83772
|
}]);
|
|
83760
83773
|
|
|
83761
83774
|
return PointLight;
|
|
83762
|
-
}(Light);var LightLoader = /*#__PURE__*/function (_Loader) {
|
|
83775
|
+
}(Light$1);var LightLoader = /*#__PURE__*/function (_Loader) {
|
|
83763
83776
|
_inherits(LightLoader, _Loader);
|
|
83764
83777
|
|
|
83765
83778
|
var _super = _createSuper(LightLoader);
|
|
@@ -91040,7 +91053,11 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91040
91053
|
}
|
|
91041
91054
|
|
|
91042
91055
|
return Cone;
|
|
91043
|
-
}(Element$1);var
|
|
91056
|
+
}(Element$1);var DEFAULT_SETUP_CONFIG$1 = {
|
|
91057
|
+
deferred: false
|
|
91058
|
+
};
|
|
91059
|
+
|
|
91060
|
+
var Sound$1 = /*#__PURE__*/function (_Entity) {
|
|
91044
91061
|
_inherits(Sound, _Entity);
|
|
91045
91062
|
|
|
91046
91063
|
var _super = _createSuper(Sound);
|
|
@@ -91059,8 +91076,10 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91059
91076
|
loopEnd = options.loopEnd,
|
|
91060
91077
|
autoplay = options.autoplay,
|
|
91061
91078
|
reconnectOnReset = options.reconnectOnReset,
|
|
91079
|
+
_options$setupConfig = options.setupConfig,
|
|
91080
|
+
setupConfig = _options$setupConfig === void 0 ? DEFAULT_SETUP_CONFIG$1 : _options$setupConfig,
|
|
91062
91081
|
_options$name = options.name,
|
|
91063
|
-
name = _options$name === void 0 ? generateRandomName(
|
|
91082
|
+
name = _options$name === void 0 ? generateRandomName("sound") : _options$name;
|
|
91064
91083
|
_this = _super.call(this, _objectSpread2$1(_objectSpread2$1({}, options), {}, {
|
|
91065
91084
|
source: source,
|
|
91066
91085
|
loop: loop,
|
|
@@ -91081,6 +91100,7 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91081
91100
|
_this.connect();
|
|
91082
91101
|
});
|
|
91083
91102
|
|
|
91103
|
+
_this.setupConfig = setupConfig;
|
|
91084
91104
|
_this.source = source;
|
|
91085
91105
|
_this.loop = loop;
|
|
91086
91106
|
_this.loopStart = loopStart;
|
|
@@ -91090,12 +91110,15 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91090
91110
|
_this.name = name;
|
|
91091
91111
|
_this.connected = false;
|
|
91092
91112
|
_this.playing = false;
|
|
91113
|
+
_this.setupCompleted = false;
|
|
91093
91114
|
_this.hasPlayed = false;
|
|
91094
91115
|
_this.buffer = null;
|
|
91095
91116
|
_this.audioNode = null;
|
|
91096
91117
|
_this.volumeNode = null;
|
|
91097
91118
|
|
|
91098
|
-
_this.
|
|
91119
|
+
if (!_this.setupConfig.deferred) {
|
|
91120
|
+
_this.setupAudio();
|
|
91121
|
+
}
|
|
91099
91122
|
|
|
91100
91123
|
_this.setName(name);
|
|
91101
91124
|
|
|
@@ -91105,11 +91128,60 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91105
91128
|
|
|
91106
91129
|
_this.setEntityType(ENTITY_TYPES.AUDIO.DEFAULT);
|
|
91107
91130
|
|
|
91131
|
+
Scene$1.add(_this.getBody(), _assertThisInitialized(_this));
|
|
91108
91132
|
Audio$1.add(_assertThisInitialized(_this));
|
|
91133
|
+
|
|
91134
|
+
if (_this.isSetupCompleted()) {
|
|
91135
|
+
_this.connect();
|
|
91136
|
+
}
|
|
91137
|
+
|
|
91109
91138
|
return _this;
|
|
91110
91139
|
}
|
|
91111
91140
|
|
|
91112
91141
|
_createClass(Sound, [{
|
|
91142
|
+
key: "addHelpers",
|
|
91143
|
+
value: function addHelpers() {
|
|
91144
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
91145
|
+
_ref$holderName = _ref.holderName,
|
|
91146
|
+
holderName = _ref$holderName === void 0 ? "soundholder" : _ref$holderName,
|
|
91147
|
+
_ref$holderSize = _ref.holderSize,
|
|
91148
|
+
holderSize = _ref$holderSize === void 0 ? 0.05 : _ref$holderSize;
|
|
91149
|
+
|
|
91150
|
+
var holderSprite = new HelperSprite(holderSize, holderSize, holderName, {
|
|
91151
|
+
name: holderName
|
|
91152
|
+
});
|
|
91153
|
+
|
|
91154
|
+
if (holderSprite) {
|
|
91155
|
+
holderSprite.setSizeAttenuation(false);
|
|
91156
|
+
holderSprite.setDepthTest(false);
|
|
91157
|
+
holderSprite.setDepthWrite(false);
|
|
91158
|
+
holderSprite.setSerializable(false);
|
|
91159
|
+
holderSprite.setPosition(this.getPosition());
|
|
91160
|
+
holderSprite.addTags([TAGS.HELPER, TAGS.SOUNDS.HELPER, TAGS.SOUNDS.HOLDER, name]);
|
|
91161
|
+
holderSprite.setHelperTarget(this);
|
|
91162
|
+
this.holder = holderSprite;
|
|
91163
|
+
return true;
|
|
91164
|
+
} else {
|
|
91165
|
+
console.warn(LIGHT_HOLDER_MODEL_NOT_FOUND);
|
|
91166
|
+
return false;
|
|
91167
|
+
}
|
|
91168
|
+
}
|
|
91169
|
+
}, {
|
|
91170
|
+
key: "isPlaying",
|
|
91171
|
+
value: function isPlaying() {
|
|
91172
|
+
return this.playing;
|
|
91173
|
+
}
|
|
91174
|
+
}, {
|
|
91175
|
+
key: "isSetupCompleted",
|
|
91176
|
+
value: function isSetupCompleted() {
|
|
91177
|
+
return this.setupCompleted;
|
|
91178
|
+
}
|
|
91179
|
+
}, {
|
|
91180
|
+
key: "isConnected",
|
|
91181
|
+
value: function isConnected() {
|
|
91182
|
+
return this.connected;
|
|
91183
|
+
}
|
|
91184
|
+
}, {
|
|
91113
91185
|
key: "setupAudio",
|
|
91114
91186
|
value: function setupAudio() {
|
|
91115
91187
|
this.createAudioNode();
|
|
@@ -91118,6 +91190,17 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91118
91190
|
this.setupAudioNodeLoop();
|
|
91119
91191
|
this.audioNode.removeEventListener(ENTITY_EVENTS.AUDIO.ENDED, this.onSoundEnded.bind(this));
|
|
91120
91192
|
this.audioNode.addEventListener(ENTITY_EVENTS.AUDIO.ENDED, this.onSoundEnded.bind(this));
|
|
91193
|
+
this.setupCompleted = true;
|
|
91194
|
+
}
|
|
91195
|
+
}, {
|
|
91196
|
+
key: "setSource",
|
|
91197
|
+
value: function setSource(source) {
|
|
91198
|
+
this.source = source;
|
|
91199
|
+
}
|
|
91200
|
+
}, {
|
|
91201
|
+
key: "getSource",
|
|
91202
|
+
value: function getSource() {
|
|
91203
|
+
return this.source;
|
|
91121
91204
|
}
|
|
91122
91205
|
}, {
|
|
91123
91206
|
key: "createAudioNode",
|
|
@@ -91140,14 +91223,14 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91140
91223
|
}, {
|
|
91141
91224
|
key: "tryAutoplay",
|
|
91142
91225
|
value: function tryAutoplay() {
|
|
91143
|
-
if (this.autoplay && !this.hasPlayed) {
|
|
91226
|
+
if (this.autoplay && !this.hasPlayed && !this.setupConfig.deferred) {
|
|
91144
91227
|
this.play();
|
|
91145
91228
|
}
|
|
91146
91229
|
}
|
|
91147
91230
|
}, {
|
|
91148
91231
|
key: "connect",
|
|
91149
91232
|
value: function connect() {
|
|
91150
|
-
if (this.
|
|
91233
|
+
if (this.isConnected()) {
|
|
91151
91234
|
this.disconnect();
|
|
91152
91235
|
}
|
|
91153
91236
|
|
|
@@ -91159,7 +91242,7 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91159
91242
|
}, {
|
|
91160
91243
|
key: "disconnect",
|
|
91161
91244
|
value: function disconnect() {
|
|
91162
|
-
if (this.
|
|
91245
|
+
if (this.isConnected()) {
|
|
91163
91246
|
this.volumeNode.disconnect();
|
|
91164
91247
|
this.audioNode.disconnect();
|
|
91165
91248
|
this.connected = false;
|
|
@@ -91176,7 +91259,7 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91176
91259
|
}, {
|
|
91177
91260
|
key: "getVolume",
|
|
91178
91261
|
value: function getVolume() {
|
|
91179
|
-
return this.volumeNode.gain.value;
|
|
91262
|
+
return this.volumeNode ? this.volumeNode.gain.value : Audio$1.getVolume();
|
|
91180
91263
|
}
|
|
91181
91264
|
}, {
|
|
91182
91265
|
key: "setVolume",
|
|
@@ -91192,15 +91275,21 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91192
91275
|
}, {
|
|
91193
91276
|
key: "setBuffer",
|
|
91194
91277
|
value: function setBuffer() {
|
|
91278
|
+
if (!this.getSource()) {
|
|
91279
|
+
console.error(AUDIO_SOURCE_NOT_DEFINED);
|
|
91280
|
+
return false;
|
|
91281
|
+
}
|
|
91282
|
+
|
|
91195
91283
|
var buffer = Audio$1.get(this.source);
|
|
91196
91284
|
|
|
91197
91285
|
if (!buffer) {
|
|
91198
91286
|
console.error(AUDIO_UNABLE_TO_LOAD_SOUND);
|
|
91199
|
-
return;
|
|
91287
|
+
return false;
|
|
91200
91288
|
}
|
|
91201
91289
|
|
|
91202
91290
|
this.buffer = buffer;
|
|
91203
91291
|
this.audioNode.buffer = buffer;
|
|
91292
|
+
return true;
|
|
91204
91293
|
}
|
|
91205
91294
|
}, {
|
|
91206
91295
|
key: "play",
|
|
@@ -91208,7 +91297,10 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91208
91297
|
var volume = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getVolume();
|
|
91209
91298
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_AUDIO_NODE_RAMP_TIME;
|
|
91210
91299
|
var ramp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : AUDIO_RAMPS.LINEAR;
|
|
91211
|
-
if (this.
|
|
91300
|
+
if (this.isPlaying()) return this;
|
|
91301
|
+
if (!this.isSetupCompleted()) this.setupAudio();
|
|
91302
|
+
if (!this.isConnected()) this.connect();
|
|
91303
|
+
console.log("goin to start playing at volume", volume, this.source);
|
|
91212
91304
|
this.setVolume(0);
|
|
91213
91305
|
this.audioNode.start();
|
|
91214
91306
|
this.hasPlayed = true;
|
|
@@ -91251,9 +91343,15 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91251
91343
|
key: "detune",
|
|
91252
91344
|
value: function detune(value) {
|
|
91253
91345
|
if (this.audioNode) {
|
|
91254
|
-
this.
|
|
91346
|
+
this.detune = value;
|
|
91347
|
+
this.audioNode.detune.value = this.detune;
|
|
91255
91348
|
}
|
|
91256
91349
|
}
|
|
91350
|
+
}, {
|
|
91351
|
+
key: "getDetune",
|
|
91352
|
+
value: function getDetune() {
|
|
91353
|
+
return this.detune;
|
|
91354
|
+
}
|
|
91257
91355
|
}, {
|
|
91258
91356
|
key: "addEffect",
|
|
91259
91357
|
value: function addEffect(effect) {
|
|
@@ -91282,6 +91380,60 @@ var Cone = /*#__PURE__*/function (_Element) {
|
|
|
91282
91380
|
this.plainGainNode.gain.setValueAtTime(0.3, Audio$1.context.currentTime);
|
|
91283
91381
|
}
|
|
91284
91382
|
}
|
|
91383
|
+
}, {
|
|
91384
|
+
key: "setPosition",
|
|
91385
|
+
value: function setPosition(where) {
|
|
91386
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
91387
|
+
_ref2$updateHolder = _ref2.updateHolder,
|
|
91388
|
+
updateHolder = _ref2$updateHolder === void 0 ? true : _ref2$updateHolder;
|
|
91389
|
+
|
|
91390
|
+
var position = _objectSpread2$1(_objectSpread2$1({}, this.getPosition()), where);
|
|
91391
|
+
|
|
91392
|
+
var x = position.x,
|
|
91393
|
+
y = position.y,
|
|
91394
|
+
z = position.z;
|
|
91395
|
+
|
|
91396
|
+
if (this.hasBody()) {
|
|
91397
|
+
this.body.position.set(x, y, z);
|
|
91398
|
+
}
|
|
91399
|
+
|
|
91400
|
+
if (this.hasHolder() && updateHolder) {
|
|
91401
|
+
this.holder.setPosition({
|
|
91402
|
+
x: x,
|
|
91403
|
+
y: y,
|
|
91404
|
+
z: z
|
|
91405
|
+
});
|
|
91406
|
+
}
|
|
91407
|
+
}
|
|
91408
|
+
}, {
|
|
91409
|
+
key: "usingHelper",
|
|
91410
|
+
value: function usingHelper() {
|
|
91411
|
+
return !!this.isUsingHelper;
|
|
91412
|
+
}
|
|
91413
|
+
}, {
|
|
91414
|
+
key: "hasHolder",
|
|
91415
|
+
value: function hasHolder() {
|
|
91416
|
+
return !!this.holder;
|
|
91417
|
+
}
|
|
91418
|
+
}, {
|
|
91419
|
+
key: "toJSON",
|
|
91420
|
+
value: function toJSON() {
|
|
91421
|
+
return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(Sound.prototype), "toJSON", this).call(this)), {}, {
|
|
91422
|
+
source: this.source,
|
|
91423
|
+
loop: this.loop,
|
|
91424
|
+
loopStart: this.loopStart,
|
|
91425
|
+
loopEnd: this.loopEnd,
|
|
91426
|
+
autoplay: this.autoplay,
|
|
91427
|
+
volume: this.getVolume(),
|
|
91428
|
+
detune: this.getDetune(),
|
|
91429
|
+
hasPlayed: this.hasPlayed,
|
|
91430
|
+
playing: this.isPlaying(),
|
|
91431
|
+
connected: this.isConnected(),
|
|
91432
|
+
duration: this.hasBuffer() ? this.duration : 0,
|
|
91433
|
+
sampleRate: this.hasBuffer() ? this.sampleRate : 0,
|
|
91434
|
+
numberOfChannels: this.hasBuffer() ? this.numberOfChannels : 0
|
|
91435
|
+
});
|
|
91436
|
+
}
|
|
91285
91437
|
}, {
|
|
91286
91438
|
key: "sampleRate",
|
|
91287
91439
|
get: function get() {
|
|
@@ -91312,7 +91464,7 @@ var AmbientSound = /*#__PURE__*/function (_Sound) {
|
|
|
91312
91464
|
|
|
91313
91465
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
91314
91466
|
_ref$name = _ref.name,
|
|
91315
|
-
name = _ref$name === void 0 ? generateRandomName(
|
|
91467
|
+
name = _ref$name === void 0 ? generateRandomName("AmbientSound") : _ref$name,
|
|
91316
91468
|
options = _objectWithoutProperties(_ref, _excluded$2);
|
|
91317
91469
|
|
|
91318
91470
|
_classCallCheck(this, AmbientSound);
|
|
@@ -91324,13 +91476,11 @@ var AmbientSound = /*#__PURE__*/function (_Sound) {
|
|
|
91324
91476
|
|
|
91325
91477
|
_this.setEntityType(ENTITY_TYPES.AUDIO.AMBIENT);
|
|
91326
91478
|
|
|
91327
|
-
_this.connect();
|
|
91328
|
-
|
|
91329
91479
|
return _this;
|
|
91330
91480
|
}
|
|
91331
91481
|
|
|
91332
91482
|
return AmbientSound;
|
|
91333
|
-
}(Sound);var _excluded$1 = ["name"];
|
|
91483
|
+
}(Sound$1);var _excluded$1 = ["name"];
|
|
91334
91484
|
|
|
91335
91485
|
var DirectionalSound = /*#__PURE__*/function (_Sound) {
|
|
91336
91486
|
_inherits(DirectionalSound, _Sound);
|
|
@@ -91342,7 +91492,7 @@ var DirectionalSound = /*#__PURE__*/function (_Sound) {
|
|
|
91342
91492
|
|
|
91343
91493
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
91344
91494
|
_ref$name = _ref.name,
|
|
91345
|
-
name = _ref$name === void 0 ? generateRandomName(
|
|
91495
|
+
name = _ref$name === void 0 ? generateRandomName("DirectionalSound") : _ref$name,
|
|
91346
91496
|
options = _objectWithoutProperties(_ref, _excluded$1);
|
|
91347
91497
|
|
|
91348
91498
|
_classCallCheck(this, DirectionalSound);
|
|
@@ -91354,14 +91504,17 @@ var DirectionalSound = /*#__PURE__*/function (_Sound) {
|
|
|
91354
91504
|
|
|
91355
91505
|
_this.setEntityType(ENTITY_TYPES.AUDIO.DIRECTIONAL);
|
|
91356
91506
|
|
|
91357
|
-
_this.createPannerNode(options);
|
|
91358
|
-
|
|
91359
|
-
_this.connect();
|
|
91360
|
-
|
|
91361
91507
|
return _this;
|
|
91362
91508
|
}
|
|
91363
91509
|
|
|
91364
91510
|
_createClass(DirectionalSound, [{
|
|
91511
|
+
key: "setupAudio",
|
|
91512
|
+
value: function setupAudio() {
|
|
91513
|
+
_get(_getPrototypeOf(DirectionalSound.prototype), "setupAudio", this).call(this);
|
|
91514
|
+
|
|
91515
|
+
this.createPannerNode(this.options);
|
|
91516
|
+
}
|
|
91517
|
+
}, {
|
|
91365
91518
|
key: "hasPannerNode",
|
|
91366
91519
|
value: function hasPannerNode() {
|
|
91367
91520
|
return !!this.pannerNode;
|
|
@@ -91383,8 +91536,8 @@ var DirectionalSound = /*#__PURE__*/function (_Sound) {
|
|
|
91383
91536
|
_options$refDistance = options.refDistance,
|
|
91384
91537
|
refDistance = _options$refDistance === void 0 ? 1 : _options$refDistance;
|
|
91385
91538
|
this.pannerNode = Audio$1.context.createPanner();
|
|
91386
|
-
this.pannerNode.panningModel =
|
|
91387
|
-
this.pannerNode.distanceModel =
|
|
91539
|
+
this.pannerNode.panningModel = "HRTF";
|
|
91540
|
+
this.pannerNode.distanceModel = "inverse";
|
|
91388
91541
|
this.pannerNode.refDistance = refDistance;
|
|
91389
91542
|
this.pannerNode.maxDistance = maxDistance;
|
|
91390
91543
|
this.pannerNode.rolloffFactor = rolloffFactor;
|
|
@@ -91456,7 +91609,406 @@ var DirectionalSound = /*#__PURE__*/function (_Sound) {
|
|
|
91456
91609
|
}]);
|
|
91457
91610
|
|
|
91458
91611
|
return DirectionalSound;
|
|
91459
|
-
}(Sound);var
|
|
91612
|
+
}(Sound$1);var DEFAULT_SETUP_CONFIG = {
|
|
91613
|
+
deferred: false
|
|
91614
|
+
};
|
|
91615
|
+
|
|
91616
|
+
var Sound = /*#__PURE__*/function (_Entity) {
|
|
91617
|
+
_inherits(Sound, _Entity);
|
|
91618
|
+
|
|
91619
|
+
var _super = _createSuper(Sound);
|
|
91620
|
+
|
|
91621
|
+
function Sound() {
|
|
91622
|
+
var _this;
|
|
91623
|
+
|
|
91624
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
91625
|
+
|
|
91626
|
+
_classCallCheck(this, Sound);
|
|
91627
|
+
|
|
91628
|
+
var source = options.source,
|
|
91629
|
+
_options$loop = options.loop,
|
|
91630
|
+
loop = _options$loop === void 0 ? false : _options$loop,
|
|
91631
|
+
loopStart = options.loopStart,
|
|
91632
|
+
loopEnd = options.loopEnd,
|
|
91633
|
+
autoplay = options.autoplay,
|
|
91634
|
+
reconnectOnReset = options.reconnectOnReset,
|
|
91635
|
+
_options$setupConfig = options.setupConfig,
|
|
91636
|
+
setupConfig = _options$setupConfig === void 0 ? DEFAULT_SETUP_CONFIG : _options$setupConfig,
|
|
91637
|
+
_options$name = options.name,
|
|
91638
|
+
name = _options$name === void 0 ? generateRandomName("sound") : _options$name;
|
|
91639
|
+
_this = _super.call(this, _objectSpread2$1(_objectSpread2$1({}, options), {}, {
|
|
91640
|
+
source: source,
|
|
91641
|
+
loop: loop,
|
|
91642
|
+
loopStart: loopStart,
|
|
91643
|
+
loopEnd: loopEnd,
|
|
91644
|
+
autoplay: autoplay,
|
|
91645
|
+
reconnectOnReset: reconnectOnReset,
|
|
91646
|
+
name: name
|
|
91647
|
+
}));
|
|
91648
|
+
|
|
91649
|
+
_defineProperty$1(_assertThisInitialized(_this), "reset", function () {
|
|
91650
|
+
_this.playing = false;
|
|
91651
|
+
|
|
91652
|
+
_this.disconnect();
|
|
91653
|
+
|
|
91654
|
+
_this.setupAudio();
|
|
91655
|
+
|
|
91656
|
+
_this.connect();
|
|
91657
|
+
});
|
|
91658
|
+
|
|
91659
|
+
_this.setupConfig = setupConfig;
|
|
91660
|
+
_this.source = source;
|
|
91661
|
+
_this.loop = loop;
|
|
91662
|
+
_this.loopStart = loopStart;
|
|
91663
|
+
_this.loopEnd = loopEnd;
|
|
91664
|
+
_this.autoplay = autoplay;
|
|
91665
|
+
_this.reconnectOnReset = reconnectOnReset;
|
|
91666
|
+
_this.name = name;
|
|
91667
|
+
_this.connected = false;
|
|
91668
|
+
_this.playing = false;
|
|
91669
|
+
_this.setupCompleted = false;
|
|
91670
|
+
_this.hasPlayed = false;
|
|
91671
|
+
_this.buffer = null;
|
|
91672
|
+
_this.audioNode = null;
|
|
91673
|
+
_this.volumeNode = null;
|
|
91674
|
+
|
|
91675
|
+
if (!_this.setupConfig.deferred) {
|
|
91676
|
+
_this.setupAudio();
|
|
91677
|
+
}
|
|
91678
|
+
|
|
91679
|
+
_this.setName(name);
|
|
91680
|
+
|
|
91681
|
+
_this.setBody({
|
|
91682
|
+
body: new Object3D()
|
|
91683
|
+
});
|
|
91684
|
+
|
|
91685
|
+
_this.setEntityType(ENTITY_TYPES.AUDIO.DEFAULT);
|
|
91686
|
+
|
|
91687
|
+
Scene$1.add(_this.getBody(), _assertThisInitialized(_this));
|
|
91688
|
+
Audio$1.add(_assertThisInitialized(_this));
|
|
91689
|
+
|
|
91690
|
+
if (_this.isSetupCompleted()) {
|
|
91691
|
+
_this.connect();
|
|
91692
|
+
}
|
|
91693
|
+
|
|
91694
|
+
return _this;
|
|
91695
|
+
}
|
|
91696
|
+
|
|
91697
|
+
_createClass(Sound, [{
|
|
91698
|
+
key: "addHelpers",
|
|
91699
|
+
value: function addHelpers() {
|
|
91700
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
91701
|
+
_ref$holderName = _ref.holderName,
|
|
91702
|
+
holderName = _ref$holderName === void 0 ? "soundholder" : _ref$holderName,
|
|
91703
|
+
_ref$holderSize = _ref.holderSize,
|
|
91704
|
+
holderSize = _ref$holderSize === void 0 ? 0.05 : _ref$holderSize;
|
|
91705
|
+
|
|
91706
|
+
var holderSprite = new HelperSprite(holderSize, holderSize, holderName, {
|
|
91707
|
+
name: holderName
|
|
91708
|
+
});
|
|
91709
|
+
|
|
91710
|
+
if (holderSprite) {
|
|
91711
|
+
holderSprite.setSizeAttenuation(false);
|
|
91712
|
+
holderSprite.setDepthTest(false);
|
|
91713
|
+
holderSprite.setDepthWrite(false);
|
|
91714
|
+
holderSprite.setSerializable(false);
|
|
91715
|
+
holderSprite.setPosition(this.getPosition());
|
|
91716
|
+
holderSprite.addTags([TAGS.HELPER, TAGS.SOUNDS.HELPER, TAGS.SOUNDS.HOLDER, name]);
|
|
91717
|
+
holderSprite.setHelperTarget(this);
|
|
91718
|
+
this.holder = holderSprite;
|
|
91719
|
+
return true;
|
|
91720
|
+
} else {
|
|
91721
|
+
console.warn(LIGHT_HOLDER_MODEL_NOT_FOUND);
|
|
91722
|
+
return false;
|
|
91723
|
+
}
|
|
91724
|
+
}
|
|
91725
|
+
}, {
|
|
91726
|
+
key: "isPlaying",
|
|
91727
|
+
value: function isPlaying() {
|
|
91728
|
+
return this.playing;
|
|
91729
|
+
}
|
|
91730
|
+
}, {
|
|
91731
|
+
key: "isSetupCompleted",
|
|
91732
|
+
value: function isSetupCompleted() {
|
|
91733
|
+
return this.setupCompleted;
|
|
91734
|
+
}
|
|
91735
|
+
}, {
|
|
91736
|
+
key: "isConnected",
|
|
91737
|
+
value: function isConnected() {
|
|
91738
|
+
return this.connected;
|
|
91739
|
+
}
|
|
91740
|
+
}, {
|
|
91741
|
+
key: "setupAudio",
|
|
91742
|
+
value: function setupAudio() {
|
|
91743
|
+
this.createAudioNode();
|
|
91744
|
+
this.createVolumeNode();
|
|
91745
|
+
this.setBuffer();
|
|
91746
|
+
this.setupAudioNodeLoop();
|
|
91747
|
+
this.audioNode.removeEventListener(ENTITY_EVENTS.AUDIO.ENDED, this.onSoundEnded.bind(this));
|
|
91748
|
+
this.audioNode.addEventListener(ENTITY_EVENTS.AUDIO.ENDED, this.onSoundEnded.bind(this));
|
|
91749
|
+
this.setupCompleted = true;
|
|
91750
|
+
}
|
|
91751
|
+
}, {
|
|
91752
|
+
key: "setSource",
|
|
91753
|
+
value: function setSource(source) {
|
|
91754
|
+
this.source = source;
|
|
91755
|
+
}
|
|
91756
|
+
}, {
|
|
91757
|
+
key: "getSource",
|
|
91758
|
+
value: function getSource() {
|
|
91759
|
+
return this.source;
|
|
91760
|
+
}
|
|
91761
|
+
}, {
|
|
91762
|
+
key: "createAudioNode",
|
|
91763
|
+
value: function createAudioNode() {
|
|
91764
|
+
this.audioNode = Audio$1.context.createBufferSource();
|
|
91765
|
+
}
|
|
91766
|
+
}, {
|
|
91767
|
+
key: "setupAudioNodeLoop",
|
|
91768
|
+
value: function setupAudioNodeLoop() {
|
|
91769
|
+
this.audioNode.loop = this.loop;
|
|
91770
|
+
this.audioNode.loopEnd = this.loopEnd === undefined ? this.duration : this.loopEnd;
|
|
91771
|
+
this.audioNode.loopStart = this.loopStart === undefined ? this.duration : this.loopStart;
|
|
91772
|
+
}
|
|
91773
|
+
}, {
|
|
91774
|
+
key: "createVolumeNode",
|
|
91775
|
+
value: function createVolumeNode() {
|
|
91776
|
+
this.volumeNode = Audio$1.context.createGain();
|
|
91777
|
+
this.volumeNode.gain.value = DEFAULT_AUDIO_NODE_VOLUME;
|
|
91778
|
+
}
|
|
91779
|
+
}, {
|
|
91780
|
+
key: "tryAutoplay",
|
|
91781
|
+
value: function tryAutoplay() {
|
|
91782
|
+
if (this.autoplay && !this.hasPlayed && !this.setupConfig.deferred) {
|
|
91783
|
+
this.play();
|
|
91784
|
+
}
|
|
91785
|
+
}
|
|
91786
|
+
}, {
|
|
91787
|
+
key: "connect",
|
|
91788
|
+
value: function connect() {
|
|
91789
|
+
if (this.isConnected()) {
|
|
91790
|
+
this.disconnect();
|
|
91791
|
+
}
|
|
91792
|
+
|
|
91793
|
+
this.volumeNode.connect(Audio$1.getMasterVolumeNode());
|
|
91794
|
+
this.audioNode.connect(this.volumeNode);
|
|
91795
|
+
this.connected = true;
|
|
91796
|
+
this.tryAutoplay();
|
|
91797
|
+
}
|
|
91798
|
+
}, {
|
|
91799
|
+
key: "disconnect",
|
|
91800
|
+
value: function disconnect() {
|
|
91801
|
+
if (this.isConnected()) {
|
|
91802
|
+
this.volumeNode.disconnect();
|
|
91803
|
+
this.audioNode.disconnect();
|
|
91804
|
+
this.connected = false;
|
|
91805
|
+
}
|
|
91806
|
+
}
|
|
91807
|
+
}, {
|
|
91808
|
+
key: "dispose",
|
|
91809
|
+
value: function dispose() {
|
|
91810
|
+
_get(_getPrototypeOf(Sound.prototype), "dispose", this).call(this);
|
|
91811
|
+
|
|
91812
|
+
this.stop();
|
|
91813
|
+
this.disconnect();
|
|
91814
|
+
}
|
|
91815
|
+
}, {
|
|
91816
|
+
key: "getVolume",
|
|
91817
|
+
value: function getVolume() {
|
|
91818
|
+
return this.volumeNode ? this.volumeNode.gain.value : Audio$1.getVolume();
|
|
91819
|
+
}
|
|
91820
|
+
}, {
|
|
91821
|
+
key: "setVolume",
|
|
91822
|
+
value: function setVolume() {
|
|
91823
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_AUDIO_NODE_VOLUME;
|
|
91824
|
+
this.volumeNode.gain.setValueAtTime(value, Audio$1.context.currentTime);
|
|
91825
|
+
}
|
|
91826
|
+
}, {
|
|
91827
|
+
key: "hasBuffer",
|
|
91828
|
+
value: function hasBuffer() {
|
|
91829
|
+
return !!this.buffer;
|
|
91830
|
+
}
|
|
91831
|
+
}, {
|
|
91832
|
+
key: "setBuffer",
|
|
91833
|
+
value: function setBuffer() {
|
|
91834
|
+
if (!this.getSource()) {
|
|
91835
|
+
console.error(AUDIO_SOURCE_NOT_DEFINED);
|
|
91836
|
+
return false;
|
|
91837
|
+
}
|
|
91838
|
+
|
|
91839
|
+
var buffer = Audio$1.get(this.source);
|
|
91840
|
+
|
|
91841
|
+
if (!buffer) {
|
|
91842
|
+
console.error(AUDIO_UNABLE_TO_LOAD_SOUND);
|
|
91843
|
+
return false;
|
|
91844
|
+
}
|
|
91845
|
+
|
|
91846
|
+
this.buffer = buffer;
|
|
91847
|
+
this.audioNode.buffer = buffer;
|
|
91848
|
+
return true;
|
|
91849
|
+
}
|
|
91850
|
+
}, {
|
|
91851
|
+
key: "play",
|
|
91852
|
+
value: function play() {
|
|
91853
|
+
var volume = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getVolume();
|
|
91854
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_AUDIO_NODE_RAMP_TIME;
|
|
91855
|
+
var ramp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : AUDIO_RAMPS.LINEAR;
|
|
91856
|
+
if (this.isPlaying()) return this;
|
|
91857
|
+
if (!this.isSetupCompleted()) this.setupAudio();
|
|
91858
|
+
if (!this.isConnected()) this.connect();
|
|
91859
|
+
console.log("goin to start playing at volume", volume, this.source);
|
|
91860
|
+
this.setVolume(0);
|
|
91861
|
+
this.audioNode.start();
|
|
91862
|
+
this.hasPlayed = true;
|
|
91863
|
+
this.playing = true;
|
|
91864
|
+
var audioDelay = delay / 1000; // linearRampToValueAtTime/exponentialRampToValueAtTime requires time to be expressed in seconds
|
|
91865
|
+
|
|
91866
|
+
if (ramp === AUDIO_RAMPS.LINEAR) {
|
|
91867
|
+
this.volumeNode.gain.linearRampToValueAtTime(volume, Audio$1.context.currentTime + audioDelay);
|
|
91868
|
+
} else {
|
|
91869
|
+
this.volumeNode.gain.exponentialRampToValueAtTime(volume, Audio$1.context.currentTime + audioDelay);
|
|
91870
|
+
}
|
|
91871
|
+
|
|
91872
|
+
return this;
|
|
91873
|
+
}
|
|
91874
|
+
}, {
|
|
91875
|
+
key: "onSoundEnded",
|
|
91876
|
+
value: function onSoundEnded() {
|
|
91877
|
+
this.reset();
|
|
91878
|
+
this.dispatchEvent({
|
|
91879
|
+
type: ENTITY_EVENTS.AUDIO.ENDED
|
|
91880
|
+
});
|
|
91881
|
+
}
|
|
91882
|
+
}, {
|
|
91883
|
+
key: "stop",
|
|
91884
|
+
value: function stop() {
|
|
91885
|
+
var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_AUDIO_NODE_RAMP_TIME;
|
|
91886
|
+
var ramp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : AUDIO_RAMPS.LINEAR;
|
|
91887
|
+
var audioDelay = delay / 1000; // linearRampToValueAtTime/exponentialRampToValueAtTime requires time to be expressed in seconds
|
|
91888
|
+
|
|
91889
|
+
if (ramp === AUDIO_RAMPS.LINEAR) {
|
|
91890
|
+
this.volumeNode.gain.linearRampToValueAtTime(ALMOST_ZERO, Audio$1.context.currentTime + audioDelay);
|
|
91891
|
+
} else {
|
|
91892
|
+
this.volumeNode.gain.exponentialRampToValueAtTime(ALMOST_ZERO, Audio$1.context.currentTime + audioDelay);
|
|
91893
|
+
}
|
|
91894
|
+
|
|
91895
|
+
setTimeout(this.reset, delay);
|
|
91896
|
+
return this;
|
|
91897
|
+
}
|
|
91898
|
+
}, {
|
|
91899
|
+
key: "detune",
|
|
91900
|
+
value: function detune(value) {
|
|
91901
|
+
if (this.audioNode) {
|
|
91902
|
+
this.detune = value;
|
|
91903
|
+
this.audioNode.detune.value = this.detune;
|
|
91904
|
+
}
|
|
91905
|
+
}
|
|
91906
|
+
}, {
|
|
91907
|
+
key: "getDetune",
|
|
91908
|
+
value: function getDetune() {
|
|
91909
|
+
return this.detune;
|
|
91910
|
+
}
|
|
91911
|
+
}, {
|
|
91912
|
+
key: "addEffect",
|
|
91913
|
+
value: function addEffect(effect) {
|
|
91914
|
+
if (!this.hasEffect() && effect) {
|
|
91915
|
+
this.convolverNode = Audio$1.context.createConvolver();
|
|
91916
|
+
this.mixerNode = Audio$1.createGain();
|
|
91917
|
+
|
|
91918
|
+
if (this.hasPannerNode()) {
|
|
91919
|
+
this.pannerNode.disconnect();
|
|
91920
|
+
this.pannerNode.connect(this.mixerNode);
|
|
91921
|
+
} else {
|
|
91922
|
+
this.volumeNode.disconnect();
|
|
91923
|
+
this.volumeNode.connect(this.mixerNode);
|
|
91924
|
+
} //creating gains
|
|
91925
|
+
|
|
91926
|
+
|
|
91927
|
+
this.plainGainNode = Audio$1.context.createGain();
|
|
91928
|
+
this.convolverGainNode = Audio$1.context.createGain(); //connect mixer to new gains
|
|
91929
|
+
|
|
91930
|
+
this.mixerNode.connect(this.plainGainNode);
|
|
91931
|
+
this.mixerNode.connect(this.convolverGainNode);
|
|
91932
|
+
this.plainGainNode.connect(Audio$1.getMasterVolumeNode());
|
|
91933
|
+
this.convolverGainNode.connect(Audio$1.getMasterVolumeNode());
|
|
91934
|
+
this.convolverNode.buffer = Audio$1.get(effect);
|
|
91935
|
+
this.convolverGainNode.gain.setValueAtTime(0.7, Audio$1.context.currentTime);
|
|
91936
|
+
this.plainGainNode.gain.setValueAtTime(0.3, Audio$1.context.currentTime);
|
|
91937
|
+
}
|
|
91938
|
+
}
|
|
91939
|
+
}, {
|
|
91940
|
+
key: "setPosition",
|
|
91941
|
+
value: function setPosition(where) {
|
|
91942
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
91943
|
+
_ref2$updateHolder = _ref2.updateHolder,
|
|
91944
|
+
updateHolder = _ref2$updateHolder === void 0 ? true : _ref2$updateHolder;
|
|
91945
|
+
|
|
91946
|
+
var position = _objectSpread2$1(_objectSpread2$1({}, this.getPosition()), where);
|
|
91947
|
+
|
|
91948
|
+
var x = position.x,
|
|
91949
|
+
y = position.y,
|
|
91950
|
+
z = position.z;
|
|
91951
|
+
|
|
91952
|
+
if (this.hasBody()) {
|
|
91953
|
+
this.body.position.set(x, y, z);
|
|
91954
|
+
}
|
|
91955
|
+
|
|
91956
|
+
if (this.hasHolder() && updateHolder) {
|
|
91957
|
+
this.holder.setPosition({
|
|
91958
|
+
x: x,
|
|
91959
|
+
y: y,
|
|
91960
|
+
z: z
|
|
91961
|
+
});
|
|
91962
|
+
}
|
|
91963
|
+
}
|
|
91964
|
+
}, {
|
|
91965
|
+
key: "usingHelper",
|
|
91966
|
+
value: function usingHelper() {
|
|
91967
|
+
return !!this.isUsingHelper;
|
|
91968
|
+
}
|
|
91969
|
+
}, {
|
|
91970
|
+
key: "hasHolder",
|
|
91971
|
+
value: function hasHolder() {
|
|
91972
|
+
return !!this.holder;
|
|
91973
|
+
}
|
|
91974
|
+
}, {
|
|
91975
|
+
key: "toJSON",
|
|
91976
|
+
value: function toJSON() {
|
|
91977
|
+
return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(Sound.prototype), "toJSON", this).call(this)), {}, {
|
|
91978
|
+
source: this.source,
|
|
91979
|
+
loop: this.loop,
|
|
91980
|
+
loopStart: this.loopStart,
|
|
91981
|
+
loopEnd: this.loopEnd,
|
|
91982
|
+
autoplay: this.autoplay,
|
|
91983
|
+
volume: this.getVolume(),
|
|
91984
|
+
detune: this.getDetune(),
|
|
91985
|
+
hasPlayed: this.hasPlayed,
|
|
91986
|
+
playing: this.isPlaying(),
|
|
91987
|
+
connected: this.isConnected(),
|
|
91988
|
+
duration: this.hasBuffer() ? this.duration : 0,
|
|
91989
|
+
sampleRate: this.hasBuffer() ? this.sampleRate : 0,
|
|
91990
|
+
numberOfChannels: this.hasBuffer() ? this.numberOfChannels : 0
|
|
91991
|
+
});
|
|
91992
|
+
}
|
|
91993
|
+
}, {
|
|
91994
|
+
key: "sampleRate",
|
|
91995
|
+
get: function get() {
|
|
91996
|
+
return this.buffer.sampleRate;
|
|
91997
|
+
}
|
|
91998
|
+
}, {
|
|
91999
|
+
key: "duration",
|
|
92000
|
+
get: function get() {
|
|
92001
|
+
return this.buffer.duration * 1000;
|
|
92002
|
+
}
|
|
92003
|
+
}, {
|
|
92004
|
+
key: "numberOfChannels",
|
|
92005
|
+
get: function get() {
|
|
92006
|
+
return this.buffer.numberOfChannels;
|
|
92007
|
+
}
|
|
92008
|
+
}]);
|
|
92009
|
+
|
|
92010
|
+
return Sound;
|
|
92011
|
+
}(Entity);var BLOB_TYPE = 'application/javascript';
|
|
91460
92012
|
var createBlob = function createBlob(task) {
|
|
91461
92013
|
return new Blob(['(', task.toString(), ')()'], {
|
|
91462
92014
|
type: BLOB_TYPE
|
|
@@ -91861,7 +92413,250 @@ var SpotLight = /*#__PURE__*/function (_Light) {
|
|
|
91861
92413
|
}]);
|
|
91862
92414
|
|
|
91863
92415
|
return SpotLight;
|
|
91864
|
-
}(Light);var
|
|
92416
|
+
}(Light$1);var Light = /*#__PURE__*/function (_Entity) {
|
|
92417
|
+
_inherits(Light, _Entity);
|
|
92418
|
+
|
|
92419
|
+
var _super = _createSuper(Light);
|
|
92420
|
+
|
|
92421
|
+
function Light(_ref) {
|
|
92422
|
+
var _this;
|
|
92423
|
+
|
|
92424
|
+
var color = _ref.color,
|
|
92425
|
+
intensity = _ref.intensity,
|
|
92426
|
+
_name = _ref.name;
|
|
92427
|
+
|
|
92428
|
+
_classCallCheck(this, Light);
|
|
92429
|
+
|
|
92430
|
+
_this = _super.call(this, {
|
|
92431
|
+
name: _name
|
|
92432
|
+
});
|
|
92433
|
+
|
|
92434
|
+
_defineProperty$1(_assertThisInitialized(_this), "addHolder", function () {
|
|
92435
|
+
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "lightholder";
|
|
92436
|
+
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.05;
|
|
92437
|
+
var holderSprite = new HelperSprite(size, size, name, {
|
|
92438
|
+
name: name
|
|
92439
|
+
});
|
|
92440
|
+
|
|
92441
|
+
if (holderSprite) {
|
|
92442
|
+
holderSprite.setSizeAttenuation(false);
|
|
92443
|
+
holderSprite.setDepthTest(false);
|
|
92444
|
+
holderSprite.setDepthWrite(false);
|
|
92445
|
+
holderSprite.setSerializable(false);
|
|
92446
|
+
holderSprite.setPosition(_this.getPosition());
|
|
92447
|
+
holderSprite.addTags([TAGS.HELPER, TAGS.LIGHTS.HELPER, TAGS.LIGHTS.HOLDER, name]);
|
|
92448
|
+
holderSprite.setHelperTarget(_assertThisInitialized(_this));
|
|
92449
|
+
_this.holder = holderSprite;
|
|
92450
|
+
return true;
|
|
92451
|
+
} else {
|
|
92452
|
+
console.warn(LIGHT_HOLDER_MODEL_NOT_FOUND$1);
|
|
92453
|
+
return false;
|
|
92454
|
+
}
|
|
92455
|
+
});
|
|
92456
|
+
|
|
92457
|
+
_defineProperty$1(_assertThisInitialized(_this), "addTargetHolder", function () {
|
|
92458
|
+
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "targetholder";
|
|
92459
|
+
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.05;
|
|
92460
|
+
var targetSprite = new HelperSprite(size, size, name, {
|
|
92461
|
+
name: name
|
|
92462
|
+
});
|
|
92463
|
+
|
|
92464
|
+
if (targetSprite) {
|
|
92465
|
+
targetSprite.setSizeAttenuation(false);
|
|
92466
|
+
targetSprite.setDepthTest(false);
|
|
92467
|
+
targetSprite.setDepthWrite(false);
|
|
92468
|
+
targetSprite.setSerializable(false);
|
|
92469
|
+
targetSprite.setPosition(_this.getTarget().getPosition());
|
|
92470
|
+
targetSprite.addTags([TAGS.LIGHTS.HELPER, TAGS.LIGHTS.TARGET, name]);
|
|
92471
|
+
targetSprite.setHelperTarget(_assertThisInitialized(_this));
|
|
92472
|
+
targetSprite.getBody().add(_this.getBody().target);
|
|
92473
|
+
_this.targetHolder = targetSprite;
|
|
92474
|
+
}
|
|
92475
|
+
});
|
|
92476
|
+
|
|
92477
|
+
_this.color = color;
|
|
92478
|
+
_this.intensity = intensity;
|
|
92479
|
+
_this.name = _name || generateRandomName("Light");
|
|
92480
|
+
_this.isLightOn = false;
|
|
92481
|
+
_this.body = undefined; // helper body for this light
|
|
92482
|
+
|
|
92483
|
+
_this.isUsingHelper = undefined; // holder body representing the light
|
|
92484
|
+
|
|
92485
|
+
_this.holder = undefined; // target body for the light (only used by directional light)
|
|
92486
|
+
|
|
92487
|
+
_this.target = undefined;
|
|
92488
|
+
|
|
92489
|
+
_this.setEntityType(ENTITY_TYPES.LIGHT.DEFAULT);
|
|
92490
|
+
|
|
92491
|
+
Lights$1.add(_assertThisInitialized(_this));
|
|
92492
|
+
return _this;
|
|
92493
|
+
}
|
|
92494
|
+
|
|
92495
|
+
_createClass(Light, [{
|
|
92496
|
+
key: "addToScene",
|
|
92497
|
+
value: function addToScene() {
|
|
92498
|
+
if (this.hasBody()) {
|
|
92499
|
+
Scene$1.add(this.body, this);
|
|
92500
|
+
}
|
|
92501
|
+
}
|
|
92502
|
+
}, {
|
|
92503
|
+
key: "usingHelper",
|
|
92504
|
+
value: function usingHelper() {
|
|
92505
|
+
return !!this.isUsingHelper;
|
|
92506
|
+
}
|
|
92507
|
+
}, {
|
|
92508
|
+
key: "hasHolder",
|
|
92509
|
+
value: function hasHolder() {
|
|
92510
|
+
return !!this.holder;
|
|
92511
|
+
}
|
|
92512
|
+
}, {
|
|
92513
|
+
key: "hasTarget",
|
|
92514
|
+
value: function hasTarget() {
|
|
92515
|
+
return false;
|
|
92516
|
+
}
|
|
92517
|
+
}, {
|
|
92518
|
+
key: "getPosition",
|
|
92519
|
+
value: function getPosition() {
|
|
92520
|
+
return {
|
|
92521
|
+
x: this.body.position.x,
|
|
92522
|
+
y: this.body.position.y,
|
|
92523
|
+
z: this.body.position.z
|
|
92524
|
+
};
|
|
92525
|
+
}
|
|
92526
|
+
}, {
|
|
92527
|
+
key: "setPosition",
|
|
92528
|
+
value: function setPosition(where) {
|
|
92529
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
92530
|
+
_ref2$updateHolder = _ref2.updateHolder,
|
|
92531
|
+
updateHolder = _ref2$updateHolder === void 0 ? true : _ref2$updateHolder;
|
|
92532
|
+
|
|
92533
|
+
var position = _objectSpread2$1(_objectSpread2$1({}, this.getPosition()), where);
|
|
92534
|
+
|
|
92535
|
+
var x = position.x,
|
|
92536
|
+
y = position.y,
|
|
92537
|
+
z = position.z;
|
|
92538
|
+
|
|
92539
|
+
if (this.hasBody()) {
|
|
92540
|
+
this.body.position.set(x, y, z);
|
|
92541
|
+
}
|
|
92542
|
+
|
|
92543
|
+
if (this.hasHolder() && updateHolder) {
|
|
92544
|
+
this.holder.setPosition({
|
|
92545
|
+
x: x,
|
|
92546
|
+
y: y,
|
|
92547
|
+
z: z
|
|
92548
|
+
});
|
|
92549
|
+
}
|
|
92550
|
+
}
|
|
92551
|
+
}, {
|
|
92552
|
+
key: "isAlreadyOn",
|
|
92553
|
+
value: function isAlreadyOn() {
|
|
92554
|
+
return this.hasBody() && this.body.intensity === this.intensity;
|
|
92555
|
+
}
|
|
92556
|
+
}, {
|
|
92557
|
+
key: "isAlreadyOff",
|
|
92558
|
+
value: function isAlreadyOff() {
|
|
92559
|
+
return this.hasBody() && this.body.intensity <= 0;
|
|
92560
|
+
}
|
|
92561
|
+
}, {
|
|
92562
|
+
key: "setIntensity",
|
|
92563
|
+
value: function setIntensity(value) {
|
|
92564
|
+
if (this.hasBody()) {
|
|
92565
|
+
this.body.intensity = value;
|
|
92566
|
+
this.intensity = value;
|
|
92567
|
+
}
|
|
92568
|
+
}
|
|
92569
|
+
}, {
|
|
92570
|
+
key: "getIntensity",
|
|
92571
|
+
value: function getIntensity() {
|
|
92572
|
+
if (this.hasBody()) {
|
|
92573
|
+
return this.body.intensity;
|
|
92574
|
+
}
|
|
92575
|
+
}
|
|
92576
|
+
}, {
|
|
92577
|
+
key: "setColor",
|
|
92578
|
+
value: function setColor(color) {
|
|
92579
|
+
this.body.color = color;
|
|
92580
|
+
}
|
|
92581
|
+
}, {
|
|
92582
|
+
key: "getColor",
|
|
92583
|
+
value: function getColor() {
|
|
92584
|
+
return this.body.color;
|
|
92585
|
+
}
|
|
92586
|
+
}, {
|
|
92587
|
+
key: "setCastShadow",
|
|
92588
|
+
value: function setCastShadow(castShadow) {
|
|
92589
|
+
this.castShadow = castShadow;
|
|
92590
|
+
this.getBody().castShadow = castShadow;
|
|
92591
|
+
}
|
|
92592
|
+
}, {
|
|
92593
|
+
key: "getCastShadow",
|
|
92594
|
+
value: function getCastShadow() {
|
|
92595
|
+
return this.castShadow;
|
|
92596
|
+
}
|
|
92597
|
+
}, {
|
|
92598
|
+
key: "dim",
|
|
92599
|
+
value: function dim() {
|
|
92600
|
+
var _this2 = this;
|
|
92601
|
+
|
|
92602
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getIntensity();
|
|
92603
|
+
var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
|
|
92604
|
+
var intensity = this.getIntensity();
|
|
92605
|
+
|
|
92606
|
+
var onUpdate = function onUpdate(value) {
|
|
92607
|
+
return !_this2.isDisposed() && _this2.setIntensity(value);
|
|
92608
|
+
};
|
|
92609
|
+
|
|
92610
|
+
return tweenTo(intensity, value, {
|
|
92611
|
+
time: time,
|
|
92612
|
+
onUpdate: onUpdate
|
|
92613
|
+
});
|
|
92614
|
+
}
|
|
92615
|
+
}, {
|
|
92616
|
+
key: "on",
|
|
92617
|
+
value: function on() {
|
|
92618
|
+
var _this3 = this;
|
|
92619
|
+
|
|
92620
|
+
var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500;
|
|
92621
|
+
|
|
92622
|
+
if (this.hasBody()) {
|
|
92623
|
+
this.dim(this.intensity, time).then(function () {
|
|
92624
|
+
return _this3.isLightOn = true;
|
|
92625
|
+
});
|
|
92626
|
+
} else {
|
|
92627
|
+
console.log(LIGHT_NOT_FOUND);
|
|
92628
|
+
}
|
|
92629
|
+
}
|
|
92630
|
+
}, {
|
|
92631
|
+
key: "off",
|
|
92632
|
+
value: function off() {
|
|
92633
|
+
var _this4 = this;
|
|
92634
|
+
|
|
92635
|
+
var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500;
|
|
92636
|
+
|
|
92637
|
+
if (this.hasBody()) {
|
|
92638
|
+
this.dim(0, time).then(function () {
|
|
92639
|
+
return _this4.isLightOn = false;
|
|
92640
|
+
});
|
|
92641
|
+
} else {
|
|
92642
|
+
console.log(LIGHT_NOT_FOUND);
|
|
92643
|
+
}
|
|
92644
|
+
}
|
|
92645
|
+
}, {
|
|
92646
|
+
key: "toJSON",
|
|
92647
|
+
value: function toJSON() {
|
|
92648
|
+
return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(Light.prototype), "toJSON", this).call(this)), {}, {
|
|
92649
|
+
type: this.getEntityType(),
|
|
92650
|
+
color: this.getColor(),
|
|
92651
|
+
intensity: this.getIntensity(),
|
|
92652
|
+
name: this.getName(),
|
|
92653
|
+
castShadow: this.getCastShadow()
|
|
92654
|
+
});
|
|
92655
|
+
}
|
|
92656
|
+
}]);
|
|
92657
|
+
|
|
92658
|
+
return Light;
|
|
92659
|
+
}(Entity);var DEFAULT_INTENSITY = 0.5;
|
|
91865
92660
|
var DEFAULT_SKY_COLOR = 0xffffff;
|
|
91866
92661
|
var DEFAULT_GROUND_COLOR = 0x555555;
|
|
91867
92662
|
var GREEN = 0x2ecc71;
|