mage-engine 3.17.5 → 3.17.6
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 +144 -108
- package/package.json +1 -1
package/dist/mage.js
CHANGED
|
@@ -53543,9 +53543,11 @@ if ( typeof window !== 'undefined' ) {
|
|
|
53543
53543
|
}
|
|
53544
53544
|
|
|
53545
53545
|
}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,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]';
|
|
53546
|
+
var DEPRECATED = '[DEPRECATED]';
|
|
53546
53547
|
var DEPRECATIONS = {
|
|
53547
|
-
|
|
53548
|
-
|
|
53548
|
+
MODELS_GETMODEL: "".concat(PREFIX, " ").concat(DEPRECATED, " Models.getModel is deprecated, use Models.get instead. WIll be removed in next major release"),
|
|
53549
|
+
SCRIPTS_CREATE: "".concat(PREFIX, " ").concat(DEPRECATED, " Scripts.create is deprecated, use Scripts.register instead. Will be removed in next major release."),
|
|
53550
|
+
ELEMENT_SET_TEXTURE_MAP: "".concat(PREFIX, " ").concat(DEPRECATED, " Element.setTextureMap is deprecated, use Element.setTexture() instead. Will be removed in next major release.")
|
|
53549
53551
|
};
|
|
53550
53552
|
var ONCREATE_NOT_AVAILABLE = "".concat(PREFIX, " Your scene needs a onCreate method.");
|
|
53551
53553
|
var PATH_NOT_FOUND = "".concat(PREFIX, " can't find requested path");
|
|
@@ -53560,10 +53562,11 @@ var METHOD_NOT_SUPPORTED = "".concat(PREFIX, " This method is not supported.");
|
|
|
53560
53562
|
var ANIMATION_NOT_FOUND = "".concat(PREFIX, " Required animation can't be found.");
|
|
53561
53563
|
var ANIMATION_HANDLER_NOT_FOUND = "".concat(PREFIX, " AnimationHander hasn't been defined yet.");
|
|
53562
53564
|
var ELEMENT_NOT_SET$1 = "".concat(PREFIX, " Body hasn't been defined yet.");
|
|
53563
|
-
var ELEMENT_NAME_NOT_PROVIDED = "".concat(PREFIX, " Desired element name wasn't provided.");
|
|
53564
53565
|
var ELEMENT_SET_COLOR_MISSING_COLOR = "".concat(PREFIX, " Can't set color for this element, missing color");
|
|
53565
53566
|
var ELEMENT_MATERIAL_NO_SUPPORT_FOR_TEXTURE = "".concat(PREFIX, " This element's material does not support texture: ");
|
|
53567
|
+
var ENTITY_NOT_SET = "".concat(PREFIX, " This entity does not have a body.");
|
|
53566
53568
|
var ENTITY_TYPE_NOT_ALLOWED = "".concat(PREFIX, " The desired Entity type is not allowed.");
|
|
53569
|
+
var ENTITY_CANT_ADD_NOT_ENTITY = "".concat(PREFIX, " Entity.add requires an Entity.");
|
|
53567
53570
|
var ERROR_LOADING_TEXTURE = "".concat(PREFIX, " Error while loading texture:");
|
|
53568
53571
|
var TAG_CANT_BE_REMOVED = "".concat(PREFIX, " The default tag can't be removed.");
|
|
53569
53572
|
var TAG_ALREADY_EXISTS = "".concat(PREFIX, " The following tag has already been added: ");
|
|
@@ -55303,7 +55306,7 @@ var convertAmmoVector = function convertAmmoVector(_ref2) {
|
|
|
55303
55306
|
};
|
|
55304
55307
|
};var utils=/*#__PURE__*/Object.freeze({__proto__:null,DEFAULT_DESCRIPTION:DEFAULT_DESCRIPTION$1,mapColliderTypeToAddEvent:mapColliderTypeToAddEvent$1,extractBoundingBox:extractBoundingBox,extractBiggestBoundingBox:extractBiggestBoundingBox,extractBoundingSphere:extractBoundingSphere,extractBiggestBoundingSphere:extractBiggestBoundingSphere,parseBoundingBoxSize:parseBoundingBoxSize,extractPositionAndQuaternion:extractPositionAndQuaternion$1,extractBoxDescription:extractBoxDescription,extractSphereDescription:extractSphereDescription,getBoxDescriptionForElement:getBoxDescriptionForElement$1,getSphereDescriptionForElement:getSphereDescriptionForElement,mapColliderTypeToDescription:mapColliderTypeToDescription$1,iterateGeometries:iterateGeometries$1,convertAmmoVector:convertAmmoVector});var getHostURL = function getHostURL() {
|
|
55305
55308
|
return "".concat(document.location.protocol, "//").concat(document.location.host);
|
|
55306
|
-
};var _excluded$
|
|
55309
|
+
};var _excluded$7 = ["uuid"];
|
|
55307
55310
|
var COLLIDER_TYPES = COLLIDER_TYPES$1;
|
|
55308
55311
|
var getBoxDescriptionForElement = getBoxDescriptionForElement$1,
|
|
55309
55312
|
extractPositionAndQuaternion = extractPositionAndQuaternion$1,
|
|
@@ -55369,7 +55372,7 @@ var Physics = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
55369
55372
|
|
|
55370
55373
|
_defineProperty$1(_assertThisInitialized(_this), "handleBodyUpdate", function (_ref3) {
|
|
55371
55374
|
var uuid = _ref3.uuid,
|
|
55372
|
-
data = _objectWithoutProperties(_ref3, _excluded$
|
|
55375
|
+
data = _objectWithoutProperties(_ref3, _excluded$7);
|
|
55373
55376
|
|
|
55374
55377
|
var element = Universe$1.getByUUID(uuid);
|
|
55375
55378
|
|
|
@@ -57193,7 +57196,7 @@ function applyMiddleware() {
|
|
|
57193
57196
|
|
|
57194
57197
|
var thunk = createThunkMiddleware();
|
|
57195
57198
|
thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
|
|
57196
|
-
var version = "3.17.
|
|
57199
|
+
var version = "3.17.6";
|
|
57197
57200
|
var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
|
|
57198
57201
|
var main = "dist/mage.js";
|
|
57199
57202
|
var author$1 = {
|
|
@@ -58459,7 +58462,7 @@ if (!self.fetch) {
|
|
|
58459
58462
|
self.Headers = Headers;
|
|
58460
58463
|
self.Request = Request;
|
|
58461
58464
|
self.Response = Response;
|
|
58462
|
-
}var _excluded$
|
|
58465
|
+
}var _excluded$6 = ["wheels", "accelerationKey", "brakingKey", "rightKey", "leftKey", "debug"];
|
|
58463
58466
|
|
|
58464
58467
|
var BaseCar = /*#__PURE__*/function (_BaseScript) {
|
|
58465
58468
|
_inherits(BaseCar, _BaseScript);
|
|
@@ -58485,7 +58488,7 @@ var BaseCar = /*#__PURE__*/function (_BaseScript) {
|
|
|
58485
58488
|
_options$leftKey = options.leftKey,
|
|
58486
58489
|
leftKey = _options$leftKey === void 0 ? 'a' : _options$leftKey;
|
|
58487
58490
|
options.debug;
|
|
58488
|
-
var physicsOptions = _objectWithoutProperties(options, _excluded$
|
|
58491
|
+
var physicsOptions = _objectWithoutProperties(options, _excluded$6);
|
|
58489
58492
|
|
|
58490
58493
|
this.car = element;
|
|
58491
58494
|
this.wheels = wheels;
|
|
@@ -58714,10 +58717,11 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
58714
58717
|
|
|
58715
58718
|
var _super = _createSuper(Entity);
|
|
58716
58719
|
|
|
58717
|
-
function Entity(
|
|
58720
|
+
function Entity() {
|
|
58718
58721
|
var _this;
|
|
58719
58722
|
|
|
58720
|
-
var _ref
|
|
58723
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
58724
|
+
_ref$serializable = _ref.serializable,
|
|
58721
58725
|
serializable = _ref$serializable === void 0 ? true : _ref$serializable,
|
|
58722
58726
|
_ref$tag = _ref.tag,
|
|
58723
58727
|
tag = _ref$tag === void 0 ? '' : _ref$tag,
|
|
@@ -58728,6 +58732,14 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
58728
58732
|
|
|
58729
58733
|
_this = _super.call(this);
|
|
58730
58734
|
|
|
58735
|
+
_defineProperty$1(_assertThisInitialized(_this), "getBodyByName", function (name) {
|
|
58736
|
+
if (name && _this.hasBody()) {
|
|
58737
|
+
return _this.getBody().getObjectByName(name);
|
|
58738
|
+
}
|
|
58739
|
+
|
|
58740
|
+
console.warn(ELEMENT_NAME_NOT_PROVIDED);
|
|
58741
|
+
});
|
|
58742
|
+
|
|
58731
58743
|
_defineProperty$1(_assertThisInitialized(_this), "addTag", function (tagName) {
|
|
58732
58744
|
if (!tagName) return;
|
|
58733
58745
|
|
|
@@ -58803,6 +58815,7 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
58803
58815
|
_this.tags = [];
|
|
58804
58816
|
_this.children = [];
|
|
58805
58817
|
_this.isMage = true;
|
|
58818
|
+
_this.parent = false;
|
|
58806
58819
|
|
|
58807
58820
|
_this.addTags([DEFAULT_TAG, tag].concat(_toConsumableArray(tags)));
|
|
58808
58821
|
|
|
@@ -58811,9 +58824,17 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
58811
58824
|
}
|
|
58812
58825
|
|
|
58813
58826
|
_createClass(Entity, [{
|
|
58827
|
+
key: "isSerializable",
|
|
58828
|
+
value: function isSerializable() {
|
|
58829
|
+
return !!this.serializable;
|
|
58830
|
+
}
|
|
58831
|
+
}, {
|
|
58814
58832
|
key: "reset",
|
|
58815
58833
|
value: function reset() {
|
|
58816
58834
|
this.scripts = [];
|
|
58835
|
+
this.children = [];
|
|
58836
|
+
this.isMage = true;
|
|
58837
|
+
this.parent = false;
|
|
58817
58838
|
this.tags = [DEFAULT_TAG];
|
|
58818
58839
|
}
|
|
58819
58840
|
}, {
|
|
@@ -58848,35 +58869,42 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
58848
58869
|
}
|
|
58849
58870
|
}, {
|
|
58850
58871
|
key: "add",
|
|
58851
|
-
value: function add(
|
|
58872
|
+
value: function add(child) {
|
|
58852
58873
|
var _this2 = this;
|
|
58853
58874
|
|
|
58875
|
+
var container = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getBody();
|
|
58876
|
+
|
|
58854
58877
|
if (this.hasBody()) {
|
|
58855
58878
|
var _add = function _add(toAdd) {
|
|
58856
|
-
|
|
58879
|
+
if (toAdd instanceof Entity) {
|
|
58880
|
+
_this2.children.push(toAdd);
|
|
58857
58881
|
|
|
58858
|
-
|
|
58859
|
-
|
|
58860
|
-
|
|
58882
|
+
toAdd.setParent(_this2);
|
|
58883
|
+
container.add(toAdd.getBody());
|
|
58884
|
+
} else {
|
|
58885
|
+
console.log(ENTITY_CANT_ADD_NOT_ENTITY);
|
|
58886
|
+
}
|
|
58861
58887
|
};
|
|
58862
58888
|
|
|
58863
|
-
if (Array.isArray(
|
|
58864
|
-
|
|
58889
|
+
if (Array.isArray(child)) {
|
|
58890
|
+
child.forEach(_add);
|
|
58865
58891
|
} else {
|
|
58866
|
-
_add(
|
|
58892
|
+
_add(child);
|
|
58867
58893
|
}
|
|
58894
|
+
} else {
|
|
58895
|
+
console.log(ENTITY_NOT_SET);
|
|
58868
58896
|
}
|
|
58869
58897
|
}
|
|
58870
58898
|
}, {
|
|
58871
58899
|
key: "isParentOf",
|
|
58872
|
-
value: function isParentOf(
|
|
58900
|
+
value: function isParentOf(child) {
|
|
58873
58901
|
var comparator = function comparator(child) {
|
|
58874
|
-
return !!child.getBody().getObjectById(
|
|
58902
|
+
return !!child.getBody().getObjectById(child.id);
|
|
58875
58903
|
};
|
|
58876
58904
|
|
|
58877
|
-
if (
|
|
58905
|
+
if (child.isMage) {
|
|
58878
58906
|
comparator = function comparator(child) {
|
|
58879
|
-
return child.getBody().getObjectById(
|
|
58907
|
+
return child.getBody().getObjectById(child.id());
|
|
58880
58908
|
};
|
|
58881
58909
|
}
|
|
58882
58910
|
|
|
@@ -58884,22 +58912,37 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
58884
58912
|
}
|
|
58885
58913
|
}, {
|
|
58886
58914
|
key: "has",
|
|
58887
|
-
value: function has(
|
|
58888
|
-
if (
|
|
58889
|
-
return this.equals(
|
|
58915
|
+
value: function has(child) {
|
|
58916
|
+
if (child.isMage) {
|
|
58917
|
+
return this.equals(child) || this.isParentOf(child);
|
|
58890
58918
|
} else {
|
|
58891
|
-
return this.getBody().getObjectById(
|
|
58919
|
+
return !!this.getBody().getObjectById(child.id);
|
|
58892
58920
|
}
|
|
58893
58921
|
}
|
|
58894
58922
|
}, {
|
|
58895
58923
|
key: "remove",
|
|
58896
58924
|
value: function remove(element) {
|
|
58897
58925
|
if (this.hasBody() && this.has(element)) {
|
|
58898
|
-
|
|
58899
|
-
|
|
58900
|
-
|
|
58901
|
-
|
|
58902
|
-
|
|
58926
|
+
if (element.isMage) {
|
|
58927
|
+
this.body.remove(element.getBody());
|
|
58928
|
+
var index = this.children.findIndex(function (m) {
|
|
58929
|
+
return m.equals(element);
|
|
58930
|
+
});
|
|
58931
|
+
if (index) this.children.splice(index, 1);
|
|
58932
|
+
} else {
|
|
58933
|
+
this.body.remove(element.getBody());
|
|
58934
|
+
}
|
|
58935
|
+
}
|
|
58936
|
+
}
|
|
58937
|
+
}, {
|
|
58938
|
+
key: "addTo",
|
|
58939
|
+
value: function addTo(target, childName) {
|
|
58940
|
+
if (target && target.isMage) {
|
|
58941
|
+
if (childName) {
|
|
58942
|
+
target.add(this, target.getBodyByName(childName));
|
|
58943
|
+
} else {
|
|
58944
|
+
target.add(this);
|
|
58945
|
+
}
|
|
58903
58946
|
}
|
|
58904
58947
|
}
|
|
58905
58948
|
}, {
|
|
@@ -59435,13 +59478,21 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
59435
59478
|
}, {
|
|
59436
59479
|
key: "toJSON",
|
|
59437
59480
|
value: function toJSON() {
|
|
59438
|
-
|
|
59439
|
-
|
|
59440
|
-
|
|
59441
|
-
|
|
59442
|
-
|
|
59443
|
-
|
|
59444
|
-
|
|
59481
|
+
if (this.isSerializable()) {
|
|
59482
|
+
return {
|
|
59483
|
+
position: this.getPosition(),
|
|
59484
|
+
rotation: this.getRotation(),
|
|
59485
|
+
scale: this.getScale(),
|
|
59486
|
+
entityType: this.getEntityType(),
|
|
59487
|
+
tags: this.getTags()
|
|
59488
|
+
};
|
|
59489
|
+
}
|
|
59490
|
+
}
|
|
59491
|
+
}], [{
|
|
59492
|
+
key: "create",
|
|
59493
|
+
value: function create() {
|
|
59494
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
59495
|
+
return new this(options);
|
|
59445
59496
|
}
|
|
59446
59497
|
}]);
|
|
59447
59498
|
|
|
@@ -59475,7 +59526,7 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
59475
59526
|
|
|
59476
59527
|
_this.mixer = new AnimationMixer(mesh);
|
|
59477
59528
|
_this.animations = animations;
|
|
59478
|
-
_this.
|
|
59529
|
+
_this.isPlaying = false;
|
|
59479
59530
|
|
|
59480
59531
|
_this.addEventsListeners();
|
|
59481
59532
|
|
|
@@ -59513,7 +59564,7 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
59513
59564
|
key: "stopAll",
|
|
59514
59565
|
value: function stopAll() {
|
|
59515
59566
|
this.mixer.stopAllAction();
|
|
59516
|
-
this.
|
|
59567
|
+
this.isPlaying = false;
|
|
59517
59568
|
}
|
|
59518
59569
|
}, {
|
|
59519
59570
|
key: "stopCurrentAnimation",
|
|
@@ -59522,7 +59573,7 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
59522
59573
|
this.currentAction.stop();
|
|
59523
59574
|
}
|
|
59524
59575
|
|
|
59525
|
-
this.
|
|
59576
|
+
this.isPlaying = false;
|
|
59526
59577
|
}
|
|
59527
59578
|
}, {
|
|
59528
59579
|
key: "playAnimation",
|
|
@@ -59530,7 +59581,7 @@ var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatch
|
|
|
59530
59581
|
var action = this.getAction(id);
|
|
59531
59582
|
var _options$loop = options.loop,
|
|
59532
59583
|
loop = _options$loop === void 0 ? LoopRepeat : _options$loop;
|
|
59533
|
-
this.
|
|
59584
|
+
this.isPlaying = true;
|
|
59534
59585
|
|
|
59535
59586
|
if (this.currentAction) {
|
|
59536
59587
|
this.fadeToAnimation(action, options);
|
|
@@ -60259,7 +60310,7 @@ var prepareModel = function prepareModel(model) {
|
|
|
60259
60310
|
var MATERIAL_TEXTURE_MAP = (_MATERIAL_TEXTURE_MAP = {}, _defineProperty$1(_MATERIAL_TEXTURE_MAP, MATERIALS.BASIC, [TEXTURES.ALPHA, TEXTURES.AO, TEXTURES.ENV, TEXTURES.LIGHT, TEXTURES.MAP, TEXTURES.SPECULAR]), _defineProperty$1(_MATERIAL_TEXTURE_MAP, MATERIALS.LAMBERT, [TEXTURES.ALPHA, TEXTURES.AO, TEXTURES.ENV, TEXTURES.LIGHT, TEXTURES.MAP, TEXTURES.SPECULAR, TEXTURES.EMISSIVE]), _defineProperty$1(_MATERIAL_TEXTURE_MAP, MATERIALS.PHONG, [TEXTURES.ALPHA, TEXTURES.AO, TEXTURES.ENV, TEXTURES.LIGHT, TEXTURES.MAP, TEXTURES.SPECULAR, TEXTURES.EMISSIVE, TEXTURES.BUMP, TEXTURES.DISPLACEMENT, TEXTURES.NORMAL]), _defineProperty$1(_MATERIAL_TEXTURE_MAP, MATERIALS.DEPTH, [TEXTURES.ALPHA, TEXTURES.MAP, TEXTURES.DISPLACEMENT]), _defineProperty$1(_MATERIAL_TEXTURE_MAP, MATERIALS.STANDARD, [TEXTURES.ALPHA, TEXTURES.AO, TEXTURES.ENV, TEXTURES.LIGHT, TEXTURES.MAP, TEXTURES.EMISSIVE, TEXTURES.BUMP, TEXTURES.DISPLACEMENT, TEXTURES.NORMAL, TEXTURES.METALNESS, TEXTURES.ROUGHNESS]), _defineProperty$1(_MATERIAL_TEXTURE_MAP, MATERIALS.THREE_TOON, [TEXTURES.ALPHA, TEXTURES.AO, TEXTURES.BUMP, TEXTURES.DISPLACEMENT, TEXTURES.EMISSIVE, TEXTURES.GRADIENT, TEXTURES.LIGHT, TEXTURES.MAP, TEXTURES.NORMAL]), _MATERIAL_TEXTURE_MAP);
|
|
60260
60311
|
var isTextureMapAllowedForMaterial = function isTextureMapAllowedForMaterial(materialType, textureType) {
|
|
60261
60312
|
return MATERIAL_TEXTURE_MAP[materialType] && MATERIAL_TEXTURE_MAP[materialType].includes(textureType);
|
|
60262
|
-
};var _excluded$
|
|
60313
|
+
};var _excluded$5 = ["position", "quaternion"],
|
|
60263
60314
|
_excluded2 = ["applyPhysicsUpdate"],
|
|
60264
60315
|
_excluded3 = ["dt", "event"];
|
|
60265
60316
|
var COLLIDER_TAG = 'collider';
|
|
@@ -60286,30 +60337,6 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60286
60337
|
|
|
60287
60338
|
_this = _super.call(this, _options);
|
|
60288
60339
|
|
|
60289
|
-
_defineProperty$1(_assertThisInitialized(_this), "getBodyByName", function (name) {
|
|
60290
|
-
if (name) {
|
|
60291
|
-
if (_this.hasBody()) {
|
|
60292
|
-
return _this.body.getObjectByName(name);
|
|
60293
|
-
} else {
|
|
60294
|
-
var body;
|
|
60295
|
-
|
|
60296
|
-
_this.body.traverse(function (element) {
|
|
60297
|
-
if (element.name === name) {
|
|
60298
|
-
body = element;
|
|
60299
|
-
}
|
|
60300
|
-
});
|
|
60301
|
-
|
|
60302
|
-
if (body) {
|
|
60303
|
-
return body;
|
|
60304
|
-
}
|
|
60305
|
-
|
|
60306
|
-
console.warn(ELEMENT_NOT_SET$1);
|
|
60307
|
-
}
|
|
60308
|
-
} else {
|
|
60309
|
-
console.warn(ELEMENT_NAME_NOT_PROVIDED);
|
|
60310
|
-
}
|
|
60311
|
-
});
|
|
60312
|
-
|
|
60313
60340
|
_defineProperty$1(_assertThisInitialized(_this), "handleAnimationHandlerEvents", function (e) {
|
|
60314
60341
|
_this.dispatchEvent(e);
|
|
60315
60342
|
});
|
|
@@ -60473,7 +60500,7 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60473
60500
|
_defineProperty$1(_assertThisInitialized(_this), "handlePhysicsUpdate", function (_ref6) {
|
|
60474
60501
|
var position = _ref6.position,
|
|
60475
60502
|
quaternion = _ref6.quaternion,
|
|
60476
|
-
data = _objectWithoutProperties(_ref6, _excluded$
|
|
60503
|
+
data = _objectWithoutProperties(_ref6, _excluded$5);
|
|
60477
60504
|
|
|
60478
60505
|
_this.setPosition(position);
|
|
60479
60506
|
|
|
@@ -60491,15 +60518,14 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60491
60518
|
});
|
|
60492
60519
|
|
|
60493
60520
|
var _options$name = _options.name,
|
|
60494
|
-
|
|
60521
|
+
name = _options$name === void 0 ? "default_".concat(Math.random()) : _options$name,
|
|
60495
60522
|
geometry = _options.geometry,
|
|
60496
60523
|
material = _options.material,
|
|
60497
60524
|
_body = _options.body;
|
|
60498
|
-
|
|
60499
60525
|
_this.textures = {};
|
|
60500
60526
|
_this.opacity = 1;
|
|
60501
60527
|
_this.options = _objectSpread2$1(_objectSpread2$1({}, _options), {}, {
|
|
60502
|
-
name:
|
|
60528
|
+
name: name
|
|
60503
60529
|
});
|
|
60504
60530
|
_this.physicsOptions = DEFAULT_PHYSICS_OPTIONS;
|
|
60505
60531
|
_this.physicsState = {};
|
|
@@ -61011,7 +61037,7 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
61011
61037
|
this.checkCollisions();
|
|
61012
61038
|
}
|
|
61013
61039
|
|
|
61014
|
-
if (this.hasAnimationHandler() && this.animationHandler.
|
|
61040
|
+
if (this.hasAnimationHandler() && this.animationHandler.isPlaying) {
|
|
61015
61041
|
this.animationHandler.update(dt);
|
|
61016
61042
|
}
|
|
61017
61043
|
}
|
|
@@ -61034,7 +61060,7 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
61034
61060
|
}, {
|
|
61035
61061
|
key: "toJSON",
|
|
61036
61062
|
value: function toJSON() {
|
|
61037
|
-
if (this.
|
|
61063
|
+
if (this.isSerializable()) {
|
|
61038
61064
|
return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(Element.prototype), "toJSON", this).call(this)), {}, {
|
|
61039
61065
|
body: this.body.toJSON(),
|
|
61040
61066
|
scripts: this.mapScriptsToJSON(),
|
|
@@ -61481,7 +61507,7 @@ var Plane = /*#__PURE__*/function (_Element) {
|
|
|
61481
61507
|
}
|
|
61482
61508
|
|
|
61483
61509
|
return Box;
|
|
61484
|
-
}(Element);var _excluded$
|
|
61510
|
+
}(Element);var _excluded$4 = ["anisotropy"];
|
|
61485
61511
|
|
|
61486
61512
|
var validateAnisotropy = function validateAnisotropy(anisotropy) {
|
|
61487
61513
|
var max = Scene$1.getRenderer().capabilities.getMaxAnisotropy();
|
|
@@ -61507,7 +61533,7 @@ var Sprite = /*#__PURE__*/function (_Element) {
|
|
|
61507
61533
|
|
|
61508
61534
|
var _options$anisotropy = options.anisotropy,
|
|
61509
61535
|
anisotropy = _options$anisotropy === void 0 ? 1 : _options$anisotropy,
|
|
61510
|
-
rest = _objectWithoutProperties(options, _excluded$
|
|
61536
|
+
rest = _objectWithoutProperties(options, _excluded$4);
|
|
61511
61537
|
|
|
61512
61538
|
var texture = Images$1.get(spriteTexture);
|
|
61513
61539
|
texture.anisotropy = validateAnisotropy(anisotropy);
|
|
@@ -72487,7 +72513,9 @@ var colladaParser = function colladaParser(_ref3) {
|
|
|
72487
72513
|
var fbxParser = function fbxParser(scene) {
|
|
72488
72514
|
scene.traverse(function (node) {
|
|
72489
72515
|
if (node.isSkinnedMesh) {
|
|
72490
|
-
node.material
|
|
72516
|
+
processMaterial(node.material, function (material) {
|
|
72517
|
+
return material.skinning = true;
|
|
72518
|
+
});
|
|
72491
72519
|
}
|
|
72492
72520
|
});
|
|
72493
72521
|
return {
|
|
@@ -72518,6 +72546,12 @@ var Models = function Models() {
|
|
|
72518
72546
|
|
|
72519
72547
|
_defineProperty$1(this, "getModel", function (name) {
|
|
72520
72548
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
72549
|
+
console.warn(DEPRECATIONS.MODELS_GETMODEL);
|
|
72550
|
+
return _this.get(name, options);
|
|
72551
|
+
});
|
|
72552
|
+
|
|
72553
|
+
_defineProperty$1(this, "get", function (name) {
|
|
72554
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
72521
72555
|
|
|
72522
72556
|
var _ref4 = _this.map[name] || _this.map[buildAssetId(name, _this.currentLevel)] || {},
|
|
72523
72557
|
scene = _ref4.scene,
|
|
@@ -73618,7 +73652,7 @@ var Stats$1 = new Stats();var Loader = /*#__PURE__*/function () {
|
|
|
73618
73652
|
}]);
|
|
73619
73653
|
|
|
73620
73654
|
return Loader;
|
|
73621
|
-
}();var _excluded$
|
|
73655
|
+
}();var _excluded$3 = ["mesh", "scripts", "texture"];
|
|
73622
73656
|
var MeshLoader = /*#__PURE__*/function (_Loader) {
|
|
73623
73657
|
_inherits(MeshLoader, _Loader);
|
|
73624
73658
|
|
|
@@ -73644,7 +73678,7 @@ var MeshLoader = /*#__PURE__*/function (_Loader) {
|
|
|
73644
73678
|
var mesh = _ref.mesh,
|
|
73645
73679
|
scripts = _ref.scripts,
|
|
73646
73680
|
texture = _ref.texture,
|
|
73647
|
-
opts = _objectWithoutProperties(_ref, _excluded$
|
|
73681
|
+
opts = _objectWithoutProperties(_ref, _excluded$3);
|
|
73648
73682
|
|
|
73649
73683
|
return _this.loadMesh(_this.parseMesh(mesh), scripts, texture, opts);
|
|
73650
73684
|
});
|
|
@@ -74079,9 +74113,11 @@ var AmbientLight = /*#__PURE__*/function (_Light) {
|
|
|
74079
74113
|
|
|
74080
74114
|
var _super = _createSuper(AmbientLight);
|
|
74081
74115
|
|
|
74082
|
-
function AmbientLight(
|
|
74116
|
+
function AmbientLight() {
|
|
74083
74117
|
var _this;
|
|
74084
74118
|
|
|
74119
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
74120
|
+
|
|
74085
74121
|
_classCallCheck(this, AmbientLight);
|
|
74086
74122
|
|
|
74087
74123
|
var _options$color = options.color,
|
|
@@ -76594,12 +76630,12 @@ var index$1=/*#__PURE__*/Object.freeze({__proto__:null,Emitter:k,Particle:P,Part
|
|
|
76594
76630
|
|
|
76595
76631
|
_this.setSystem();
|
|
76596
76632
|
|
|
76633
|
+
_this.setName(name);
|
|
76634
|
+
|
|
76597
76635
|
_this.setBody({
|
|
76598
76636
|
body: new Object3D()
|
|
76599
76637
|
});
|
|
76600
76638
|
|
|
76601
|
-
_this.setName(name);
|
|
76602
|
-
|
|
76603
76639
|
_this.setEntityType(ENTITY_TYPES.EFFECT.PARTICLE);
|
|
76604
76640
|
|
|
76605
76641
|
return _this;
|
|
@@ -76947,7 +76983,8 @@ var index$1=/*#__PURE__*/Object.freeze({__proto__:null,Emitter:k,Particle:P,Part
|
|
|
76947
76983
|
}]);
|
|
76948
76984
|
|
|
76949
76985
|
return ParticleEmitterGroup;
|
|
76950
|
-
}(Entity);var
|
|
76986
|
+
}(Entity);var _excluded$2 = ["initializers", "behaviours", "texture", "color", "rate"];
|
|
76987
|
+
var DEFAULT_PARTICLE_COLOR = PALETTES.BASE.BLACK;
|
|
76951
76988
|
|
|
76952
76989
|
var ProtonParticleEmitter = /*#__PURE__*/function (_ParticleEmitter) {
|
|
76953
76990
|
_inherits(ProtonParticleEmitter, _ParticleEmitter);
|
|
@@ -76967,14 +77004,17 @@ var ProtonParticleEmitter = /*#__PURE__*/function (_ParticleEmitter) {
|
|
|
76967
77004
|
texture = _options$texture === void 0 ? false : _options$texture,
|
|
76968
77005
|
_options$color = options.color,
|
|
76969
77006
|
color = _options$color === void 0 ? DEFAULT_PARTICLE_COLOR : _options$color,
|
|
76970
|
-
rate = options.rate
|
|
76971
|
-
|
|
77007
|
+
rate = options.rate,
|
|
77008
|
+
rest = _objectWithoutProperties(options, _excluded$2);
|
|
77009
|
+
|
|
77010
|
+
var parsedOptions = _objectSpread2$1({
|
|
76972
77011
|
initializers: initializers,
|
|
76973
77012
|
behaviours: behaviours,
|
|
76974
77013
|
texture: texture,
|
|
76975
77014
|
color: color,
|
|
76976
77015
|
rate: rate
|
|
76977
|
-
};
|
|
77016
|
+
}, rest);
|
|
77017
|
+
|
|
76978
77018
|
return _super.call(this, parsedOptions);
|
|
76979
77019
|
}
|
|
76980
77020
|
|
|
@@ -77164,7 +77204,9 @@ var Explosion = /*#__PURE__*/function (_ParticleEmitterGroup) {
|
|
|
77164
77204
|
}
|
|
77165
77205
|
|
|
77166
77206
|
return Explosion;
|
|
77167
|
-
}(ParticleEmitterGroup);var
|
|
77207
|
+
}(ParticleEmitterGroup);var _excluded$1 = ["texture", "direction", "size", "strength", "colors"];
|
|
77208
|
+
|
|
77209
|
+
var getFireRate = function getFireRate() {
|
|
77168
77210
|
return new Proton.Rate(new Proton.Span(10, 15), new Proton.Span(.05, .1));
|
|
77169
77211
|
};
|
|
77170
77212
|
|
|
@@ -77174,7 +77216,8 @@ var getFireInitializers = function getFireInitializers(direction, strength, size
|
|
|
77174
77216
|
};
|
|
77175
77217
|
|
|
77176
77218
|
var getFireBehaviours = function getFireBehaviours(direction, strength) {
|
|
77177
|
-
|
|
77219
|
+
var colors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [PALETTES.FRENCH.MANDARIN_RED, PALETTES.FRENCH.MELON_MELODY];
|
|
77220
|
+
return [new Proton.Scale(new Proton.Span(2, 2.5), 0), new Proton.G(strength / 100), new Proton.Color(colors[0], colors[1], Infinity, Proton.easeOutSine), new Proton.RandomDrift(direction.x / 100, direction.y / 100, direction.z / 100, 2.5)];
|
|
77178
77221
|
};
|
|
77179
77222
|
|
|
77180
77223
|
var Fire = /*#__PURE__*/function (_ProtonParticleEmitte) {
|
|
@@ -77191,13 +77234,17 @@ var Fire = /*#__PURE__*/function (_ProtonParticleEmitte) {
|
|
|
77191
77234
|
_options$size = options.size,
|
|
77192
77235
|
size = _options$size === void 0 ? 20 : _options$size,
|
|
77193
77236
|
_options$strength = options.strength,
|
|
77194
|
-
strength = _options$strength === void 0 ? 100 : _options$strength
|
|
77195
|
-
|
|
77237
|
+
strength = _options$strength === void 0 ? 100 : _options$strength,
|
|
77238
|
+
colors = options.colors,
|
|
77239
|
+
rest = _objectWithoutProperties(options, _excluded$1);
|
|
77240
|
+
|
|
77241
|
+
var fireOptions = _objectSpread2$1({
|
|
77196
77242
|
rate: getFireRate(),
|
|
77197
77243
|
texture: texture,
|
|
77198
77244
|
initializers: getFireInitializers(direction, strength, size),
|
|
77199
|
-
behaviours: getFireBehaviours(direction, strength)
|
|
77200
|
-
};
|
|
77245
|
+
behaviours: getFireBehaviours(direction, strength, colors)
|
|
77246
|
+
}, rest);
|
|
77247
|
+
|
|
77201
77248
|
return _super.call(this, fireOptions);
|
|
77202
77249
|
}
|
|
77203
77250
|
|
|
@@ -80735,13 +80782,13 @@ var Level = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
80735
80782
|
});
|
|
80736
80783
|
|
|
80737
80784
|
_defineProperty$1(_assertThisInitialized(_this), "getJSONUrl", function () {
|
|
80738
|
-
return
|
|
80785
|
+
return null;
|
|
80739
80786
|
});
|
|
80740
80787
|
|
|
80741
80788
|
_defineProperty$1(_assertThisInitialized(_this), "loadScene", function () {
|
|
80742
80789
|
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.getJSONUrl();
|
|
80743
80790
|
|
|
80744
|
-
if (getWindow()) {
|
|
80791
|
+
if (getWindow() && url) {
|
|
80745
80792
|
return fetch$1(url).then(function (res) {
|
|
80746
80793
|
return res.json();
|
|
80747
80794
|
}).then(_this.parseScene).catch(function () {
|
|
@@ -80758,11 +80805,10 @@ var Level = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
80758
80805
|
});
|
|
80759
80806
|
|
|
80760
80807
|
_defineProperty$1(_assertThisInitialized(_this), "cancelNextAnimationFrame", function () {
|
|
80761
|
-
cancelAnimationFrame(_this.requestAnimationFrameId);
|
|
80808
|
+
return cancelAnimationFrame(_this.requestAnimationFrameId);
|
|
80762
80809
|
});
|
|
80763
80810
|
|
|
80764
80811
|
_defineProperty$1(_assertThisInitialized(_this), "init", function () {
|
|
80765
|
-
_this.options.path;
|
|
80766
80812
|
Scene$1.create(_this.getName());
|
|
80767
80813
|
Scene$1.createCamera(new Camera());
|
|
80768
80814
|
Physics$1.init().then(function () {
|
|
@@ -80818,24 +80864,12 @@ var Level = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
80818
80864
|
}, {
|
|
80819
80865
|
key: "onUpdate",
|
|
80820
80866
|
value: function onUpdate() {}
|
|
80821
|
-
}, {
|
|
80822
|
-
key: "onFailedTest",
|
|
80823
|
-
value: function onFailedTest(message, test) {}
|
|
80824
|
-
}, {
|
|
80825
|
-
key: "onSuccededTest",
|
|
80826
|
-
value: function onSuccededTest(message) {}
|
|
80827
80867
|
}, {
|
|
80828
80868
|
key: "onBeforeDispose",
|
|
80829
80869
|
value: function onBeforeDispose() {}
|
|
80830
80870
|
}, {
|
|
80831
80871
|
key: "onDispose",
|
|
80832
80872
|
value: function onDispose() {}
|
|
80833
|
-
}, {
|
|
80834
|
-
key: "onInputEnabled",
|
|
80835
|
-
value: function onInputEnabled() {}
|
|
80836
|
-
}, {
|
|
80837
|
-
key: "onInputDisabled",
|
|
80838
|
-
value: function onInputDisabled() {}
|
|
80839
80873
|
}, {
|
|
80840
80874
|
key: "requestNextAnimationFrame",
|
|
80841
80875
|
value: function requestNextAnimationFrame() {
|
|
@@ -86835,9 +86869,11 @@ var HemisphereLight = /*#__PURE__*/function (_Light) {
|
|
|
86835
86869
|
|
|
86836
86870
|
var _super = _createSuper(HemisphereLight);
|
|
86837
86871
|
|
|
86838
|
-
function HemisphereLight(
|
|
86872
|
+
function HemisphereLight() {
|
|
86839
86873
|
var _this;
|
|
86840
86874
|
|
|
86875
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
86876
|
+
|
|
86841
86877
|
_classCallCheck(this, HemisphereLight);
|
|
86842
86878
|
|
|
86843
86879
|
var _options$color = options.color,
|