mage-engine 3.17.1 → 3.17.4
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 +388 -158
- package/package.json +1 -1
package/dist/mage.js
CHANGED
|
@@ -53544,7 +53544,8 @@ if ( typeof window !== 'undefined' ) {
|
|
|
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
53546
|
var DEPRECATIONS = {
|
|
53547
|
-
SCRIPTS_CREATE: "".concat(PREFIX, " [DEPRECATED] Scripts.create is deprecated, use Scripts.register instead. Will be removed in next major release.")
|
|
53547
|
+
SCRIPTS_CREATE: "".concat(PREFIX, " [DEPRECATED] Scripts.create is deprecated, use Scripts.register instead. Will be removed in next major release."),
|
|
53548
|
+
ELEMENT_SET_TEXTURE_MAP: "".concat(PREFIX, " [DEPRECATED] Element.setTextureMap is deprecated, use Element.setTexture() instead. Will be removed in next major release.")
|
|
53548
53549
|
};
|
|
53549
53550
|
var ONCREATE_NOT_AVAILABLE = "".concat(PREFIX, " Your scene needs a onCreate method.");
|
|
53550
53551
|
var PATH_NOT_FOUND = "".concat(PREFIX, " can't find requested path");
|
|
@@ -53561,6 +53562,7 @@ var ANIMATION_HANDLER_NOT_FOUND = "".concat(PREFIX, " AnimationHander hasn't bee
|
|
|
53561
53562
|
var ELEMENT_NOT_SET$1 = "".concat(PREFIX, " Body hasn't been defined yet.");
|
|
53562
53563
|
var ELEMENT_NAME_NOT_PROVIDED = "".concat(PREFIX, " Desired element name wasn't provided.");
|
|
53563
53564
|
var ELEMENT_SET_COLOR_MISSING_COLOR = "".concat(PREFIX, " Can't set color for this element, missing color");
|
|
53565
|
+
var ELEMENT_MATERIAL_NO_SUPPORT_FOR_TEXTURE = "".concat(PREFIX, " This element's material does not support texture: ");
|
|
53564
53566
|
var ENTITY_TYPE_NOT_ALLOWED = "".concat(PREFIX, " The desired Entity type is not allowed.");
|
|
53565
53567
|
var ERROR_LOADING_TEXTURE = "".concat(PREFIX, " Error while loading texture:");
|
|
53566
53568
|
var TAG_CANT_BE_REMOVED = "".concat(PREFIX, " The default tag can't be removed.");
|
|
@@ -54637,13 +54639,28 @@ var VECTOR_BACK = {
|
|
|
54637
54639
|
var ORIGIN = new Vector3$1(0, 0, 0);
|
|
54638
54640
|
var ZERO_QUATERNION = new Quaternion().identity();
|
|
54639
54641
|
var MATERIALS = {
|
|
54640
|
-
|
|
54641
|
-
|
|
54642
|
-
|
|
54643
|
-
|
|
54644
|
-
|
|
54645
|
-
TOON:
|
|
54646
|
-
THREE_TOON:
|
|
54642
|
+
BASIC: 'BASIC',
|
|
54643
|
+
LAMBERT: 'LAMBERT',
|
|
54644
|
+
PHONG: 'PHONG',
|
|
54645
|
+
DEPTH: 'DEPTH',
|
|
54646
|
+
STANDARD: 'STANDARD',
|
|
54647
|
+
TOON: 'TOOM',
|
|
54648
|
+
THREE_TOON: 'THREE_TOON'
|
|
54649
|
+
};
|
|
54650
|
+
var TEXTURES = {
|
|
54651
|
+
ALPHA: 'alphaMap',
|
|
54652
|
+
AO: 'aoMap',
|
|
54653
|
+
ENV: 'envMap',
|
|
54654
|
+
MAP: 'map',
|
|
54655
|
+
LIGHT: 'lightMap',
|
|
54656
|
+
SPECULAR: 'specularMap',
|
|
54657
|
+
EMISSIVE: 'emissiveMap',
|
|
54658
|
+
BUMP: 'bumpMap',
|
|
54659
|
+
DISPLACEMENT: 'displacementMap',
|
|
54660
|
+
NORMAL: 'normalMap',
|
|
54661
|
+
METALNESS: 'metalnessMap',
|
|
54662
|
+
ROUGHNESS: 'roughnessMap',
|
|
54663
|
+
GRADIENT: 'gradientMap'
|
|
54647
54664
|
};
|
|
54648
54665
|
var EFFECTS = {
|
|
54649
54666
|
SEPIA: 'SEPIAEFFECT',
|
|
@@ -54689,7 +54706,7 @@ var HASH = '#';
|
|
|
54689
54706
|
var EMPTY$1 = '';
|
|
54690
54707
|
var DEFAULT_SELECTOR = '#gameContainer';
|
|
54691
54708
|
var BEFORE_UNLOAD = 'beforeunload';
|
|
54692
|
-
var HASH_CHANGE = 'hashchange';var lib_constants=/*#__PURE__*/Object.freeze({__proto__:null,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,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$1,DEFAULT_SELECTOR:DEFAULT_SELECTOR,BEFORE_UNLOAD:BEFORE_UNLOAD,HASH_CHANGE:HASH_CHANGE});var buildAssetId = function buildAssetId(name, level) {
|
|
54709
|
+
var HASH_CHANGE = 'hashchange';var lib_constants=/*#__PURE__*/Object.freeze({__proto__:null,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$1,DEFAULT_SELECTOR:DEFAULT_SELECTOR,BEFORE_UNLOAD:BEFORE_UNLOAD,HASH_CHANGE:HASH_CHANGE});var buildAssetId = function buildAssetId(name, level) {
|
|
54693
54710
|
return level ? "".concat(level, "_").concat(name) : name;
|
|
54694
54711
|
};
|
|
54695
54712
|
var isLevelName = function isLevelName(level) {
|
|
@@ -55676,7 +55693,48 @@ var Physics = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
55676
55693
|
|
|
55677
55694
|
return Physics;
|
|
55678
55695
|
}(EventDispatcher);
|
|
55679
|
-
var Physics$1 = new Physics();var
|
|
55696
|
+
var Physics$1 = new Physics();var ENTITY_TYPES = {
|
|
55697
|
+
SCENE: 'SCENE',
|
|
55698
|
+
CAMERA: 'CAMERA',
|
|
55699
|
+
MESH: 'MESH',
|
|
55700
|
+
LIGHT: {
|
|
55701
|
+
DEFAULT: 'LIGHT.DEFAULT',
|
|
55702
|
+
AMBIENT: 'LIGHT.AMBIENT',
|
|
55703
|
+
SUN: 'LIGHT.SUN',
|
|
55704
|
+
HEMISPHERE: 'LIGHT.HEMISPHERE',
|
|
55705
|
+
POINT: 'LIGHT.POINT',
|
|
55706
|
+
SPOT: 'LIGHT.SPOT'
|
|
55707
|
+
},
|
|
55708
|
+
AUDIO: {
|
|
55709
|
+
DEFAULT: 'AUDIO.DEFAULT',
|
|
55710
|
+
AMBIENT: 'AUDIO.AMBIENT',
|
|
55711
|
+
DIRECTIONAL: 'AUDIO.DIRECTIONAL',
|
|
55712
|
+
BACKGROUND: 'AUDIO.BACKGROUND'
|
|
55713
|
+
},
|
|
55714
|
+
MODEL: 'MODEL',
|
|
55715
|
+
SPRITE: 'SPRITE',
|
|
55716
|
+
PARTICLE: 'PARTICLE',
|
|
55717
|
+
EFFECT: {
|
|
55718
|
+
PARTICLE: 'EFFECT.PARTICLE',
|
|
55719
|
+
SCENERY: 'EFFECT.SCENERY'
|
|
55720
|
+
},
|
|
55721
|
+
HELPER: {
|
|
55722
|
+
GRID: 'HELPER.GRID'
|
|
55723
|
+
},
|
|
55724
|
+
UNKNOWN: 'UNKNOWN'
|
|
55725
|
+
};
|
|
55726
|
+
var FLAT_ENTITY_TYPES = ['SCENE', 'CAMERA', 'MESH', 'LIGHT.DEFAULT', 'LIGHT.AMBIENT', 'LIGHT.SUN', 'LIGHT.HEMISPHERE', 'LIGHT.POINT', 'LIGHT.SPOT', 'AUDIO.DEFAULT', 'AUDIO.AMBIENT', 'AUDIO.DIRECTIONAL', 'AUDIO.BACKGROUND', 'MODEL', 'SPRITE', 'PARTICLE', 'EFFECT.PARTICLE', 'EFFECT.SCENERY', 'HELPER.GRID', 'UNKNOWN'];
|
|
55727
|
+
var ENTITY_EVENTS = {
|
|
55728
|
+
DISPOSE: 'DISPOSE',
|
|
55729
|
+
STATE_MACHINE: {
|
|
55730
|
+
CHANGE: 'STATE_MACHINE_CHANGE'
|
|
55731
|
+
},
|
|
55732
|
+
ANIMATION: {
|
|
55733
|
+
LOOP: 'LOOP',
|
|
55734
|
+
FINISHED: 'FINISHED'
|
|
55735
|
+
}
|
|
55736
|
+
};
|
|
55737
|
+
var DEFAULT_TAG = 'all';var Scene = /*#__PURE__*/function () {
|
|
55680
55738
|
function Scene() {
|
|
55681
55739
|
var _this = this;
|
|
55682
55740
|
|
|
@@ -55739,14 +55797,21 @@ var Physics$1 = new Physics();var Scene = /*#__PURE__*/function () {
|
|
|
55739
55797
|
|
|
55740
55798
|
this.clock = new Clock();
|
|
55741
55799
|
this.rendererElements = {};
|
|
55800
|
+
this.elements = [];
|
|
55742
55801
|
this.clearColor = 0x000000;
|
|
55743
55802
|
this.alpha = 1.0;
|
|
55744
55803
|
this.shadowType = mapShadowTypeToShadowMap(DEFAULT_SHADOWTYPE);
|
|
55745
55804
|
}
|
|
55746
55805
|
|
|
55747
55806
|
_createClass(Scene, [{
|
|
55807
|
+
key: "getEntityType",
|
|
55808
|
+
value: function getEntityType() {
|
|
55809
|
+
return ENTITY_TYPES.SCENE;
|
|
55810
|
+
}
|
|
55811
|
+
}, {
|
|
55748
55812
|
key: "createScene",
|
|
55749
|
-
value: function createScene(
|
|
55813
|
+
value: function createScene() {
|
|
55814
|
+
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "LevelScene_".concat(Math.random());
|
|
55750
55815
|
var fog = Config$1.fog();
|
|
55751
55816
|
this.scene = new Scene$2();
|
|
55752
55817
|
this.scene.name = name; // this.scene.overrideMaterial = null; // should be null by default, but it's not.
|
|
@@ -55755,6 +55820,16 @@ var Physics$1 = new Physics();var Scene = /*#__PURE__*/function () {
|
|
|
55755
55820
|
this.fog(fog.color, fog.density);
|
|
55756
55821
|
}
|
|
55757
55822
|
}
|
|
55823
|
+
}, {
|
|
55824
|
+
key: "uuid",
|
|
55825
|
+
value: function uuid() {
|
|
55826
|
+
return this.scene.uuid;
|
|
55827
|
+
}
|
|
55828
|
+
}, {
|
|
55829
|
+
key: "getName",
|
|
55830
|
+
value: function getName() {
|
|
55831
|
+
return this.scene.name;
|
|
55832
|
+
}
|
|
55758
55833
|
}, {
|
|
55759
55834
|
key: "getScene",
|
|
55760
55835
|
value: function getScene() {
|
|
@@ -55780,11 +55855,28 @@ var Physics$1 = new Physics();var Scene = /*#__PURE__*/function () {
|
|
|
55780
55855
|
var addUniverse = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
55781
55856
|
this.scene.add(body);
|
|
55782
55857
|
|
|
55858
|
+
if (element) {
|
|
55859
|
+
this.elements.push(element);
|
|
55860
|
+
}
|
|
55861
|
+
|
|
55783
55862
|
if (addUniverse) {
|
|
55784
|
-
|
|
55785
|
-
Universe$1.
|
|
55863
|
+
var name = element.getName();
|
|
55864
|
+
Universe$1.set(name, element);
|
|
55865
|
+
Universe$1.storeUUIDToElementNameReference(body.uuid, name);
|
|
55786
55866
|
}
|
|
55787
55867
|
}
|
|
55868
|
+
}, {
|
|
55869
|
+
key: "getHierarchy",
|
|
55870
|
+
value: function getHierarchy() {
|
|
55871
|
+
return [{
|
|
55872
|
+
element: this,
|
|
55873
|
+
children: [this.getCamera().getHierarchy()].concat(_toConsumableArray(this.elements.filter(function (e) {
|
|
55874
|
+
return !e.hasParent() && !e.isHelper();
|
|
55875
|
+
}).map(function (e) {
|
|
55876
|
+
return e.getHierarchy();
|
|
55877
|
+
})))
|
|
55878
|
+
}];
|
|
55879
|
+
}
|
|
55788
55880
|
}, {
|
|
55789
55881
|
key: "remove",
|
|
55790
55882
|
value: function remove(body) {
|
|
@@ -57111,7 +57203,7 @@ function applyMiddleware() {
|
|
|
57111
57203
|
|
|
57112
57204
|
var thunk = createThunkMiddleware();
|
|
57113
57205
|
thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
|
|
57114
|
-
var version = "3.17.
|
|
57206
|
+
var version = "3.17.4";
|
|
57115
57207
|
var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
|
|
57116
57208
|
var main = "dist/mage.js";
|
|
57117
57209
|
var author$1 = {
|
|
@@ -58648,25 +58740,7 @@ var Scripts = /*#__PURE__*/function () {
|
|
|
58648
58740
|
|
|
58649
58741
|
return Scripts;
|
|
58650
58742
|
}();
|
|
58651
|
-
var Scripts$1 = new Scripts();var
|
|
58652
|
-
MESH: 'MESH',
|
|
58653
|
-
LIGHT: 'LIGHT',
|
|
58654
|
-
MODEL: 'MODEL',
|
|
58655
|
-
SPRITE: 'SPRITE',
|
|
58656
|
-
PARTICLE: 'PARTICLE',
|
|
58657
|
-
UNKNOWN: 'UNKNOWN'
|
|
58658
|
-
};
|
|
58659
|
-
var ENTITY_EVENTS = {
|
|
58660
|
-
DISPOSE: 'DISPOSE',
|
|
58661
|
-
STATE_MACHINE: {
|
|
58662
|
-
CHANGE: 'STATE_MACHINE_CHANGE'
|
|
58663
|
-
},
|
|
58664
|
-
ANIMATION: {
|
|
58665
|
-
LOOP: 'LOOP',
|
|
58666
|
-
FINISHED: 'FINISHED'
|
|
58667
|
-
}
|
|
58668
|
-
};
|
|
58669
|
-
var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
58743
|
+
var Scripts$1 = new Scripts();var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
58670
58744
|
_inherits(Entity, _EventDispatcher);
|
|
58671
58745
|
|
|
58672
58746
|
var _super = _createSuper(Entity);
|
|
@@ -58721,10 +58795,6 @@ var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
58721
58795
|
return _this.getEntityType() === ENTITY_TYPES.MESH;
|
|
58722
58796
|
});
|
|
58723
58797
|
|
|
58724
|
-
_defineProperty$1(_assertThisInitialized(_this), "isLight", function () {
|
|
58725
|
-
return _this.getEntityType() === ENTITY_TYPES.LIGHT;
|
|
58726
|
-
});
|
|
58727
|
-
|
|
58728
58798
|
_defineProperty$1(_assertThisInitialized(_this), "isModel", function () {
|
|
58729
58799
|
return _this.getEntityType() === ENTITY_TYPES.MODEL;
|
|
58730
58800
|
});
|
|
@@ -58733,6 +58803,18 @@ var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
58733
58803
|
return _this.getEntityType() === ENTITY_TYPES.SPRITE;
|
|
58734
58804
|
});
|
|
58735
58805
|
|
|
58806
|
+
_defineProperty$1(_assertThisInitialized(_this), "isLight", function () {
|
|
58807
|
+
return Object.values(ENTITY_TYPES.LIGHT).includes(_this.getEntityType());
|
|
58808
|
+
});
|
|
58809
|
+
|
|
58810
|
+
_defineProperty$1(_assertThisInitialized(_this), "isHelper", function () {
|
|
58811
|
+
return Object.values(ENTITY_TYPES.HELPER).includes(_this.getEntityType());
|
|
58812
|
+
});
|
|
58813
|
+
|
|
58814
|
+
_defineProperty$1(_assertThisInitialized(_this), "isEffect", function () {
|
|
58815
|
+
return Object.values(ENTITY_TYPES.EFFECT).includes(_this.getEntityType());
|
|
58816
|
+
});
|
|
58817
|
+
|
|
58736
58818
|
_defineProperty$1(_assertThisInitialized(_this), "setQuaternion", function (_ref2) {
|
|
58737
58819
|
var x = _ref2.x,
|
|
58738
58820
|
y = _ref2.y,
|
|
@@ -58780,6 +58862,21 @@ var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
58780
58862
|
value: function setBody(body) {
|
|
58781
58863
|
this.body = body;
|
|
58782
58864
|
}
|
|
58865
|
+
}, {
|
|
58866
|
+
key: "hasParent",
|
|
58867
|
+
value: function hasParent() {
|
|
58868
|
+
return !!this.parent;
|
|
58869
|
+
}
|
|
58870
|
+
}, {
|
|
58871
|
+
key: "getParent",
|
|
58872
|
+
value: function getParent() {
|
|
58873
|
+
return this.parent;
|
|
58874
|
+
}
|
|
58875
|
+
}, {
|
|
58876
|
+
key: "setParent",
|
|
58877
|
+
value: function setParent(parent) {
|
|
58878
|
+
this.parent = parent;
|
|
58879
|
+
}
|
|
58783
58880
|
}, {
|
|
58784
58881
|
key: "add",
|
|
58785
58882
|
value: function add(element) {
|
|
@@ -58789,6 +58886,8 @@ var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
58789
58886
|
var _add = function _add(toAdd) {
|
|
58790
58887
|
_this2.children.push(toAdd);
|
|
58791
58888
|
|
|
58889
|
+
toAdd.setParent(_this2);
|
|
58890
|
+
|
|
58792
58891
|
_this2.getBody().add(toAdd.getBody());
|
|
58793
58892
|
};
|
|
58794
58893
|
|
|
@@ -58834,6 +58933,16 @@ var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
58834
58933
|
this.children.splice(index, 1);
|
|
58835
58934
|
}
|
|
58836
58935
|
}
|
|
58936
|
+
}, {
|
|
58937
|
+
key: "getHierarchy",
|
|
58938
|
+
value: function getHierarchy() {
|
|
58939
|
+
return {
|
|
58940
|
+
element: this,
|
|
58941
|
+
children: this.children.map(function (e) {
|
|
58942
|
+
return e.getHierarchy();
|
|
58943
|
+
})
|
|
58944
|
+
};
|
|
58945
|
+
}
|
|
58837
58946
|
}, {
|
|
58838
58947
|
key: "addTags",
|
|
58839
58948
|
value: function addTags() {
|
|
@@ -59054,7 +59163,7 @@ var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
59054
59163
|
}, {
|
|
59055
59164
|
key: "setEntityType",
|
|
59056
59165
|
value: function setEntityType(type) {
|
|
59057
|
-
if (
|
|
59166
|
+
if (FLAT_ENTITY_TYPES.includes(type)) {
|
|
59058
59167
|
this.entityType = type;
|
|
59059
59168
|
} else {
|
|
59060
59169
|
console.log(ENTITY_TYPE_NOT_ALLOWED);
|
|
@@ -59068,7 +59177,7 @@ var DEFAULT_TAG = 'all';var Entity = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
59068
59177
|
}
|
|
59069
59178
|
}, {
|
|
59070
59179
|
key: "addLight",
|
|
59071
|
-
// TODO: sounds should become
|
|
59180
|
+
// TODO: sounds should become entities
|
|
59072
59181
|
// addSound(name, options) {
|
|
59073
59182
|
// const { autoplay = false, ...opts } = options;
|
|
59074
59183
|
// this.isPlayingSound = autoplay;
|
|
@@ -60172,6 +60281,10 @@ var prepareModel = function prepareModel(model) {
|
|
|
60172
60281
|
setUpLightsAndShadows(mesh);
|
|
60173
60282
|
});
|
|
60174
60283
|
return model;
|
|
60284
|
+
};var _MATERIAL_TEXTURE_MAP;
|
|
60285
|
+
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);
|
|
60286
|
+
var isTextureMapAllowedForMaterial = function isTextureMapAllowedForMaterial(materialType, textureType) {
|
|
60287
|
+
return MATERIAL_TEXTURE_MAP[materialType] && MATERIAL_TEXTURE_MAP[materialType].includes(textureType);
|
|
60175
60288
|
};var _excluded$3 = ["position", "quaternion"],
|
|
60176
60289
|
_excluded2 = ["applyPhysicsUpdate"],
|
|
60177
60290
|
_excluded3 = ["dt", "event"];
|
|
@@ -60190,10 +60303,10 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60190
60303
|
|
|
60191
60304
|
var _super = _createSuper(Element);
|
|
60192
60305
|
|
|
60193
|
-
function Element(
|
|
60306
|
+
function Element() {
|
|
60194
60307
|
var _this;
|
|
60195
60308
|
|
|
60196
|
-
var _options = arguments.length >
|
|
60309
|
+
var _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
60197
60310
|
|
|
60198
60311
|
_classCallCheck(this, Element);
|
|
60199
60312
|
|
|
@@ -60363,35 +60476,8 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60363
60476
|
|
|
60364
60477
|
_defineProperty$1(_assertThisInitialized(_this), "setTextureMap", function (textureId) {
|
|
60365
60478
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
60366
|
-
|
|
60367
|
-
|
|
60368
|
-
var _options$repeat = options.repeat,
|
|
60369
|
-
repeat = _options$repeat === void 0 ? {
|
|
60370
|
-
x: 1,
|
|
60371
|
-
y: 1
|
|
60372
|
-
} : _options$repeat,
|
|
60373
|
-
_options$wrap = options.wrap,
|
|
60374
|
-
wrap = _options$wrap === void 0 ? RepeatWrapping$1 : _options$wrap;
|
|
60375
|
-
|
|
60376
|
-
var applyTextureTo = function applyTextureTo(element) {
|
|
60377
|
-
var texture = Images$1.get(textureId);
|
|
60378
|
-
_this.texture = textureId;
|
|
60379
|
-
texture.wrapS = wrap;
|
|
60380
|
-
texture.wrapT = wrap;
|
|
60381
|
-
texture.repeat.set(repeat.x, repeat.y);
|
|
60382
|
-
element.material.map = texture;
|
|
60383
|
-
};
|
|
60384
|
-
|
|
60385
|
-
if (hasMaterial(_this.getBody())) {
|
|
60386
|
-
applyTextureTo(_this.getBody());
|
|
60387
|
-
} else {
|
|
60388
|
-
_this.getBody().traverse(function (child) {
|
|
60389
|
-
if (hasMaterial(child)) {
|
|
60390
|
-
applyTextureTo(child);
|
|
60391
|
-
}
|
|
60392
|
-
});
|
|
60393
|
-
}
|
|
60394
|
-
}
|
|
60479
|
+
console.warn(DEPRECATIONS.ELEMENT_SET_TEXTURE_MAP);
|
|
60480
|
+
return _this.setTexture(textureId, TEXTURES.MAP, options);
|
|
60395
60481
|
});
|
|
60396
60482
|
|
|
60397
60483
|
_defineProperty$1(_assertThisInitialized(_this), "lookAt", function () {
|
|
@@ -60431,9 +60517,12 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60431
60517
|
});
|
|
60432
60518
|
|
|
60433
60519
|
var _options$name = _options.name,
|
|
60434
|
-
_name = _options$name === void 0 ? "default_".concat(Math.random()) : _options$name
|
|
60520
|
+
_name = _options$name === void 0 ? "default_".concat(Math.random()) : _options$name,
|
|
60521
|
+
geometry = _options.geometry,
|
|
60522
|
+
material = _options.material,
|
|
60523
|
+
_body = _options.body;
|
|
60435
60524
|
|
|
60436
|
-
_this.
|
|
60525
|
+
_this.textures = {};
|
|
60437
60526
|
_this.opacity = 1;
|
|
60438
60527
|
_this.options = _objectSpread2$1(_objectSpread2$1({}, _options), {}, {
|
|
60439
60528
|
name: _name
|
|
@@ -60443,7 +60532,8 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60443
60532
|
|
|
60444
60533
|
_this.setBody({
|
|
60445
60534
|
geometry: geometry,
|
|
60446
|
-
material: material
|
|
60535
|
+
material: material,
|
|
60536
|
+
body: _body
|
|
60447
60537
|
});
|
|
60448
60538
|
|
|
60449
60539
|
_this.colliders = [];
|
|
@@ -60451,12 +60541,25 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60451
60541
|
_this.animationHandler = undefined;
|
|
60452
60542
|
_this.animations = [];
|
|
60453
60543
|
|
|
60544
|
+
_this.setMaterialType();
|
|
60545
|
+
|
|
60454
60546
|
_this.setEntityType(ENTITY_TYPES.MESH);
|
|
60455
60547
|
|
|
60456
60548
|
return _this;
|
|
60457
60549
|
}
|
|
60458
60550
|
|
|
60459
60551
|
_createClass(Element, [{
|
|
60552
|
+
key: "getMaterialType",
|
|
60553
|
+
value: function getMaterialType() {
|
|
60554
|
+
return this.materialType;
|
|
60555
|
+
}
|
|
60556
|
+
}, {
|
|
60557
|
+
key: "setMaterialType",
|
|
60558
|
+
value: function setMaterialType() {
|
|
60559
|
+
var materialType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : MATERIALS.BASIC;
|
|
60560
|
+
this.materialType = materialType;
|
|
60561
|
+
}
|
|
60562
|
+
}, {
|
|
60460
60563
|
key: "addTag",
|
|
60461
60564
|
value: function addTag(tag) {
|
|
60462
60565
|
_get(_getPrototypeOf(Element.prototype), "addTag", this).call(this, tag);
|
|
@@ -60784,15 +60887,61 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60784
60887
|
return found;
|
|
60785
60888
|
}
|
|
60786
60889
|
}
|
|
60890
|
+
}, {
|
|
60891
|
+
key: "recordTexture",
|
|
60892
|
+
value: function recordTexture(textureId, textureType) {
|
|
60893
|
+
this.textures[textureType] = textureId;
|
|
60894
|
+
}
|
|
60895
|
+
}, {
|
|
60896
|
+
key: "setTexture",
|
|
60897
|
+
value: function setTexture(textureId) {
|
|
60898
|
+
var textureType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXTURES.MAP;
|
|
60899
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
60900
|
+
|
|
60901
|
+
if (!isTextureMapAllowedForMaterial(this.getMaterialType(), textureType)) {
|
|
60902
|
+
console.log(ELEMENT_MATERIAL_NO_SUPPORT_FOR_TEXTURE, textureType, this.getMaterialType());
|
|
60903
|
+
return;
|
|
60904
|
+
}
|
|
60905
|
+
|
|
60906
|
+
if (textureId) {
|
|
60907
|
+
var _options$repeat = options.repeat,
|
|
60908
|
+
repeat = _options$repeat === void 0 ? {
|
|
60909
|
+
x: 1,
|
|
60910
|
+
y: 1
|
|
60911
|
+
} : _options$repeat,
|
|
60912
|
+
_options$wrap = options.wrap,
|
|
60913
|
+
wrap = _options$wrap === void 0 ? RepeatWrapping$1 : _options$wrap;
|
|
60914
|
+
this.recordTexture(textureId, textureType);
|
|
60915
|
+
|
|
60916
|
+
var applyTextureTo = function applyTextureTo(element) {
|
|
60917
|
+
var texture = Images$1.get(textureId);
|
|
60918
|
+
texture.wrapS = wrap;
|
|
60919
|
+
texture.wrapT = wrap;
|
|
60920
|
+
texture.repeat.set(repeat.x, repeat.y);
|
|
60921
|
+
element.material[textureType] = texture;
|
|
60922
|
+
};
|
|
60923
|
+
|
|
60924
|
+
if (hasMaterial(this.getBody())) {
|
|
60925
|
+
applyTextureTo(this.getBody());
|
|
60926
|
+
} else {
|
|
60927
|
+
this.getBody().traverse(function (child) {
|
|
60928
|
+
if (hasMaterial(child)) {
|
|
60929
|
+
applyTextureTo(child);
|
|
60930
|
+
}
|
|
60931
|
+
});
|
|
60932
|
+
}
|
|
60933
|
+
}
|
|
60934
|
+
}
|
|
60787
60935
|
}, {
|
|
60788
60936
|
key: "setMaterialFromName",
|
|
60789
60937
|
value: function setMaterialFromName(materialName) {
|
|
60790
60938
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
60939
|
+
this.setMaterialType(materialName);
|
|
60791
60940
|
|
|
60792
60941
|
if (hasMaterial(this.getBody())) {
|
|
60793
60942
|
changeMaterialByName(materialName, this.getBody(), options);
|
|
60794
60943
|
} else {
|
|
60795
|
-
this.
|
|
60944
|
+
this.getBody().traverse(function (child) {
|
|
60796
60945
|
if (hasMaterial(child)) {
|
|
60797
60946
|
changeMaterialByName(materialName, child, options);
|
|
60798
60947
|
}
|
|
@@ -60915,7 +61064,7 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60915
61064
|
return _objectSpread2$1(_objectSpread2$1({}, _get(_getPrototypeOf(Element.prototype), "toJSON", this).call(this)), {}, {
|
|
60916
61065
|
body: this.body.toJSON(),
|
|
60917
61066
|
scripts: this.mapScriptsToJSON(),
|
|
60918
|
-
|
|
61067
|
+
textures: this.textures
|
|
60919
61068
|
}, this.options);
|
|
60920
61069
|
}
|
|
60921
61070
|
}
|
|
@@ -60951,6 +61100,10 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
60951
61100
|
|
|
60952
61101
|
_this.setBody(new PerspectiveCamera(fov, ratio, near, far));
|
|
60953
61102
|
|
|
61103
|
+
_this.setEntityType(ENTITY_TYPES.CAMERA);
|
|
61104
|
+
|
|
61105
|
+
_this.setName(name);
|
|
61106
|
+
|
|
60954
61107
|
return _this;
|
|
60955
61108
|
}
|
|
60956
61109
|
|
|
@@ -61004,16 +61157,17 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
61004
61157
|
size: size,
|
|
61005
61158
|
division: division,
|
|
61006
61159
|
color1: color1,
|
|
61007
|
-
color2: color2
|
|
61160
|
+
color2: color2,
|
|
61161
|
+
name: "GridHelper_".concat(Math.random())
|
|
61008
61162
|
};
|
|
61009
|
-
_this = _super.call(this,
|
|
61163
|
+
_this = _super.call(this, options);
|
|
61010
61164
|
var body = new GridHelper(size, division, color1, color2);
|
|
61011
61165
|
|
|
61012
61166
|
_this.setBody({
|
|
61013
61167
|
body: body
|
|
61014
61168
|
});
|
|
61015
61169
|
|
|
61016
|
-
_this.setEntityType(ENTITY_TYPES.
|
|
61170
|
+
_this.setEntityType(ENTITY_TYPES.HELPER.GRID);
|
|
61017
61171
|
|
|
61018
61172
|
return _this;
|
|
61019
61173
|
}
|
|
@@ -61038,7 +61192,7 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
61038
61192
|
|
|
61039
61193
|
_classCallCheck(this, Cube);
|
|
61040
61194
|
|
|
61041
|
-
_this = _super.call(this,
|
|
61195
|
+
_this = _super.call(this, options);
|
|
61042
61196
|
var geometry = new BoxGeometry(side, side, side);
|
|
61043
61197
|
var material = new MeshBasicMaterial(_objectSpread2$1({
|
|
61044
61198
|
color: color,
|
|
@@ -61070,7 +61224,7 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
61070
61224
|
|
|
61071
61225
|
_classCallCheck(this, Sphere);
|
|
61072
61226
|
|
|
61073
|
-
_this = _super.call(this,
|
|
61227
|
+
_this = _super.call(this, options);
|
|
61074
61228
|
var segments = 32;
|
|
61075
61229
|
var geometry = new SphereGeometry(radius, segments, segments);
|
|
61076
61230
|
var material = new MeshBasicMaterial(_objectSpread2$1({
|
|
@@ -61105,7 +61259,7 @@ var Element = /*#__PURE__*/function (_Entity) {
|
|
|
61105
61259
|
|
|
61106
61260
|
_classCallCheck(this, Cylinder);
|
|
61107
61261
|
|
|
61108
|
-
_this = _super.call(this,
|
|
61262
|
+
_this = _super.call(this, options);
|
|
61109
61263
|
var segments = 32;
|
|
61110
61264
|
var geometry = new CylinderGeometry(radiusTop, radiusBottom, height, segments);
|
|
61111
61265
|
var material = new MeshBasicMaterial(_objectSpread2$1({
|
|
@@ -61141,7 +61295,7 @@ var Line = /*#__PURE__*/function (_Element) {
|
|
|
61141
61295
|
|
|
61142
61296
|
_classCallCheck(this, Line);
|
|
61143
61297
|
|
|
61144
|
-
_this = _super.call(this,
|
|
61298
|
+
_this = _super.call(this, options);
|
|
61145
61299
|
|
|
61146
61300
|
_defineProperty$1(_assertThisInitialized(_this), "updatePoints", function (points) {
|
|
61147
61301
|
var vectors = points.map(function (_ref) {
|
|
@@ -61275,7 +61429,7 @@ var Plane = /*#__PURE__*/function (_Element) {
|
|
|
61275
61429
|
|
|
61276
61430
|
_classCallCheck(this, Plane);
|
|
61277
61431
|
|
|
61278
|
-
_this = _super.call(this,
|
|
61432
|
+
_this = _super.call(this, options);
|
|
61279
61433
|
var _options$color = options.color,
|
|
61280
61434
|
color = _options$color === void 0 ? 0xfffffff : _options$color,
|
|
61281
61435
|
_options$transparent = options.transparent,
|
|
@@ -61335,7 +61489,7 @@ var Plane = /*#__PURE__*/function (_Element) {
|
|
|
61335
61489
|
|
|
61336
61490
|
_classCallCheck(this, Box);
|
|
61337
61491
|
|
|
61338
|
-
_this = _super.call(this,
|
|
61492
|
+
_this = _super.call(this, options);
|
|
61339
61493
|
var geometry = new BoxGeometry(width, height, depth);
|
|
61340
61494
|
var material = new MeshBasicMaterial(_objectSpread2$1({
|
|
61341
61495
|
color: color,
|
|
@@ -61375,7 +61529,7 @@ var Sprite = /*#__PURE__*/function (_Element) {
|
|
|
61375
61529
|
|
|
61376
61530
|
_classCallCheck(this, Sprite);
|
|
61377
61531
|
|
|
61378
|
-
_this = _super.call(this,
|
|
61532
|
+
_this = _super.call(this, options);
|
|
61379
61533
|
|
|
61380
61534
|
var _options$anisotropy = options.anisotropy,
|
|
61381
61535
|
anisotropy = _options$anisotropy === void 0 ? 1 : _options$anisotropy,
|
|
@@ -72399,10 +72553,9 @@ var Models = function Models() {
|
|
|
72399
72553
|
model = SkeletonUtils.clone(scene);
|
|
72400
72554
|
}
|
|
72401
72555
|
|
|
72402
|
-
var element = new Element(
|
|
72403
|
-
element.setBody({
|
|
72556
|
+
var element = new Element(_objectSpread2$1({
|
|
72404
72557
|
body: prepareModel(model)
|
|
72405
|
-
});
|
|
72558
|
+
}, elementOptions));
|
|
72406
72559
|
element.setEntityType(ENTITY_TYPES.MODEL);
|
|
72407
72560
|
|
|
72408
72561
|
if (hasAnimations(animations)) {
|
|
@@ -73534,13 +73687,21 @@ var MeshLoader = /*#__PURE__*/function (_Loader) {
|
|
|
73534
73687
|
}
|
|
73535
73688
|
}, {
|
|
73536
73689
|
key: "loadMesh",
|
|
73537
|
-
value: function loadMesh(
|
|
73690
|
+
value: function loadMesh(_ref2, scripts, texture, elementOptions) {
|
|
73691
|
+
var geometry = _ref2.geometry,
|
|
73692
|
+
material = _ref2.material,
|
|
73693
|
+
position = _ref2.position,
|
|
73694
|
+
rotation = _ref2.rotation,
|
|
73695
|
+
scale = _ref2.scale;
|
|
73538
73696
|
var _this$options$scriptE = this.options.scriptEnabled,
|
|
73539
73697
|
scriptEnabled = _this$options$scriptE === void 0 ? true : _this$options$scriptE;
|
|
73540
|
-
var element = new Element(
|
|
73541
|
-
|
|
73542
|
-
|
|
73543
|
-
|
|
73698
|
+
var element = new Element(_objectSpread2$1({
|
|
73699
|
+
geometry: geometry,
|
|
73700
|
+
material: material
|
|
73701
|
+
}, elementOptions));
|
|
73702
|
+
element.setPosition(_objectSpread2$1({}, position));
|
|
73703
|
+
element.setRotation(_objectSpread2$1({}, rotation));
|
|
73704
|
+
element.setScale(_objectSpread2$1({}, scale));
|
|
73544
73705
|
|
|
73545
73706
|
if (scripts && scripts.length) {
|
|
73546
73707
|
element.addScripts(scripts.names, scripts.options, scriptEnabled);
|
|
@@ -73609,7 +73770,7 @@ var Light = /*#__PURE__*/function (_Entity) {
|
|
|
73609
73770
|
|
|
73610
73771
|
_this.target = undefined;
|
|
73611
73772
|
|
|
73612
|
-
_this.setEntityType(ENTITY_TYPES.LIGHT);
|
|
73773
|
+
_this.setEntityType(ENTITY_TYPES.LIGHT.DEFAULT);
|
|
73613
73774
|
|
|
73614
73775
|
Lights$1.add(_assertThisInitialized(_this));
|
|
73615
73776
|
return _this;
|
|
@@ -73784,7 +73945,8 @@ var SunLight = /*#__PURE__*/function (_Light) {
|
|
|
73784
73945
|
color = _options$color === void 0 ? WHITE$3 : _options$color,
|
|
73785
73946
|
_options$intensity = options.intensity,
|
|
73786
73947
|
intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$4 : _options$intensity,
|
|
73787
|
-
name = options.name
|
|
73948
|
+
_options$name = options.name,
|
|
73949
|
+
name = _options$name === void 0 ? "SunLight_".concat(Math.random()) : _options$name;
|
|
73788
73950
|
_this = _super.call(this, {
|
|
73789
73951
|
color: color,
|
|
73790
73952
|
intensity: intensity,
|
|
@@ -73797,6 +73959,10 @@ var SunLight = /*#__PURE__*/function (_Light) {
|
|
|
73797
73959
|
intensity: intensity
|
|
73798
73960
|
});
|
|
73799
73961
|
|
|
73962
|
+
_this.setEntityType(ENTITY_TYPES.LIGHT.SUN);
|
|
73963
|
+
|
|
73964
|
+
_this.setName(name);
|
|
73965
|
+
|
|
73800
73966
|
return _this;
|
|
73801
73967
|
}
|
|
73802
73968
|
|
|
@@ -73873,7 +74039,10 @@ var SunLight = /*#__PURE__*/function (_Light) {
|
|
|
73873
74039
|
color: 0xeeeeee,
|
|
73874
74040
|
wireframe: true
|
|
73875
74041
|
});
|
|
73876
|
-
var target = new Element(
|
|
74042
|
+
var target = new Element({
|
|
74043
|
+
geometry: geometry,
|
|
74044
|
+
material: material
|
|
74045
|
+
});
|
|
73877
74046
|
target.position(initialPosition);
|
|
73878
74047
|
return target;
|
|
73879
74048
|
}
|
|
@@ -73947,7 +74116,8 @@ var AmbientLight = /*#__PURE__*/function (_Light) {
|
|
|
73947
74116
|
color = _options$color === void 0 ? WHITE$2 : _options$color,
|
|
73948
74117
|
_options$intensity = options.intensity,
|
|
73949
74118
|
intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$3 : _options$intensity,
|
|
73950
|
-
name = options.name
|
|
74119
|
+
_options$name = options.name,
|
|
74120
|
+
name = _options$name === void 0 ? "AmbientLight_".concat(Math.random()) : _options$name;
|
|
73951
74121
|
_this = _super.call(this, {
|
|
73952
74122
|
color: color,
|
|
73953
74123
|
intensity: intensity,
|
|
@@ -73960,6 +74130,10 @@ var AmbientLight = /*#__PURE__*/function (_Light) {
|
|
|
73960
74130
|
intensity: intensity
|
|
73961
74131
|
});
|
|
73962
74132
|
|
|
74133
|
+
_this.setEntityType(ENTITY_TYPES.LIGHT.AMBIENT);
|
|
74134
|
+
|
|
74135
|
+
_this.setName(name);
|
|
74136
|
+
|
|
73963
74137
|
return _this;
|
|
73964
74138
|
}
|
|
73965
74139
|
|
|
@@ -74046,7 +74220,8 @@ var PointLight = /*#__PURE__*/function (_Light) {
|
|
|
74046
74220
|
color = _options$color === void 0 ? WHITE$1 : _options$color,
|
|
74047
74221
|
_options$intensity = options.intensity,
|
|
74048
74222
|
intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$2 : _options$intensity,
|
|
74049
|
-
name = options.name,
|
|
74223
|
+
_options$name = options.name,
|
|
74224
|
+
name = _options$name === void 0 ? "PointLight_".concat(Math.random()) : _options$name,
|
|
74050
74225
|
distance = options.distance,
|
|
74051
74226
|
decay = options.decay;
|
|
74052
74227
|
_this = _super.call(this, {
|
|
@@ -74063,6 +74238,10 @@ var PointLight = /*#__PURE__*/function (_Light) {
|
|
|
74063
74238
|
decay: decay
|
|
74064
74239
|
});
|
|
74065
74240
|
|
|
74241
|
+
_this.setEntityType(ENTITY_TYPES.LIGHT.POINT);
|
|
74242
|
+
|
|
74243
|
+
_this.setName(name);
|
|
74244
|
+
|
|
74066
74245
|
return _this;
|
|
74067
74246
|
}
|
|
74068
74247
|
|
|
@@ -74274,11 +74453,11 @@ var LightLoader$1 = new LightLoader();var Pass = /*#__PURE__*/function () {
|
|
|
74274
74453
|
|
|
74275
74454
|
_createClass(Pass, [{
|
|
74276
74455
|
key: "setSize",
|
|
74277
|
-
value: function setSize(
|
|
74456
|
+
value: function setSize() {}
|
|
74278
74457
|
}, {
|
|
74279
74458
|
key: "render",
|
|
74280
|
-
value: function render(
|
|
74281
|
-
console.error('Pass: .render() must be implemented in derived pass.');
|
|
74459
|
+
value: function render() {
|
|
74460
|
+
console.error('THREE.Pass: .render() must be implemented in derived pass.');
|
|
74282
74461
|
}
|
|
74283
74462
|
}]);
|
|
74284
74463
|
|
|
@@ -74333,7 +74512,7 @@ var FullScreenQuad = /*#__PURE__*/function () {
|
|
|
74333
74512
|
_classCallCheck(this, ShaderPass);
|
|
74334
74513
|
|
|
74335
74514
|
_this = _super.call(this);
|
|
74336
|
-
_this.textureID = textureID !== undefined ? textureID :
|
|
74515
|
+
_this.textureID = textureID !== undefined ? textureID : 'tDiffuse';
|
|
74337
74516
|
|
|
74338
74517
|
if (shader instanceof ShaderMaterial) {
|
|
74339
74518
|
_this.uniforms = shader.uniforms;
|
|
@@ -74354,7 +74533,9 @@ var FullScreenQuad = /*#__PURE__*/function () {
|
|
|
74354
74533
|
|
|
74355
74534
|
_createClass(ShaderPass, [{
|
|
74356
74535
|
key: "render",
|
|
74357
|
-
value: function render(renderer, writeBuffer, readBuffer
|
|
74536
|
+
value: function render(renderer, writeBuffer, readBuffer
|
|
74537
|
+
/*, deltaTime, maskActive */
|
|
74538
|
+
) {
|
|
74358
74539
|
if (this.uniforms[this.textureID]) {
|
|
74359
74540
|
this.uniforms[this.textureID].value = readBuffer.texture;
|
|
74360
74541
|
}
|
|
@@ -74375,21 +74556,23 @@ var FullScreenQuad = /*#__PURE__*/function () {
|
|
|
74375
74556
|
|
|
74376
74557
|
return ShaderPass;
|
|
74377
74558
|
}(Pass);/**
|
|
74378
|
-
* @author alteredq / http://alteredqualia.com/
|
|
74379
|
-
*
|
|
74380
74559
|
* Full-screen textured quad shader
|
|
74381
74560
|
*/
|
|
74382
74561
|
var CopyShader = {
|
|
74383
74562
|
uniforms: {
|
|
74384
|
-
|
|
74563
|
+
'tDiffuse': {
|
|
74385
74564
|
value: null
|
|
74386
74565
|
},
|
|
74387
|
-
|
|
74566
|
+
'opacity': {
|
|
74388
74567
|
value: 1.0
|
|
74389
74568
|
}
|
|
74390
74569
|
},
|
|
74391
|
-
vertexShader:
|
|
74392
|
-
|
|
74570
|
+
vertexShader:
|
|
74571
|
+
/* glsl */
|
|
74572
|
+
"\n\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",
|
|
74573
|
+
fragmentShader:
|
|
74574
|
+
/* glsl */
|
|
74575
|
+
"\n\n uniform float opacity;\n\n uniform sampler2D tDiffuse;\n\n varying vec2 vUv;\n\n void main() {\n gl_FragColor = texture2D( tDiffuse, vUv );\n gl_FragColor.a *= opacity;\n }"
|
|
74393
74576
|
};var MaskPass = /*#__PURE__*/function (_Pass) {
|
|
74394
74577
|
_inherits(MaskPass, _Pass);
|
|
74395
74578
|
|
|
@@ -74411,7 +74594,9 @@ var CopyShader = {
|
|
|
74411
74594
|
|
|
74412
74595
|
_createClass(MaskPass, [{
|
|
74413
74596
|
key: "render",
|
|
74414
|
-
value: function render(renderer, writeBuffer, readBuffer
|
|
74597
|
+
value: function render(renderer, writeBuffer, readBuffer
|
|
74598
|
+
/*, deltaTime, maskActive */
|
|
74599
|
+
) {
|
|
74415
74600
|
var context = renderer.getContext();
|
|
74416
74601
|
var state = renderer.state; // don't update color or depth
|
|
74417
74602
|
|
|
@@ -74473,7 +74658,9 @@ var CopyShader = {
|
|
|
74473
74658
|
|
|
74474
74659
|
_createClass(ClearMaskPass, [{
|
|
74475
74660
|
key: "render",
|
|
74476
|
-
value: function render(renderer
|
|
74661
|
+
value: function render(renderer
|
|
74662
|
+
/*, writeBuffer, readBuffer, deltaTime, maskActive */
|
|
74663
|
+
) {
|
|
74477
74664
|
renderer.state.buffers.stencil.setLocked(false);
|
|
74478
74665
|
renderer.state.buffers.stencil.setTest(false);
|
|
74479
74666
|
}
|
|
@@ -74495,16 +74682,11 @@ var CopyShader = {
|
|
|
74495
74682
|
this.renderer = renderer;
|
|
74496
74683
|
|
|
74497
74684
|
if (renderTarget === undefined) {
|
|
74498
|
-
var parameters = {
|
|
74499
|
-
minFilter: LinearFilter,
|
|
74500
|
-
magFilter: LinearFilter,
|
|
74501
|
-
format: RGBAFormat
|
|
74502
|
-
};
|
|
74503
74685
|
var size = renderer.getSize(new Vector2());
|
|
74504
74686
|
this._pixelRatio = renderer.getPixelRatio();
|
|
74505
74687
|
this._width = size.width;
|
|
74506
74688
|
this._height = size.height;
|
|
74507
|
-
renderTarget = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio
|
|
74689
|
+
renderTarget = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio);
|
|
74508
74690
|
renderTarget.texture.name = 'EffectComposer.rt1';
|
|
74509
74691
|
} else {
|
|
74510
74692
|
this._pixelRatio = 1;
|
|
@@ -74521,11 +74703,11 @@ var CopyShader = {
|
|
|
74521
74703
|
this.passes = []; // dependencies
|
|
74522
74704
|
|
|
74523
74705
|
if (CopyShader === undefined) {
|
|
74524
|
-
console.error('EffectComposer relies on CopyShader');
|
|
74706
|
+
console.error('THREE.EffectComposer relies on CopyShader');
|
|
74525
74707
|
}
|
|
74526
74708
|
|
|
74527
74709
|
if (ShaderPass === undefined) {
|
|
74528
|
-
console.error('EffectComposer relies on ShaderPass');
|
|
74710
|
+
console.error('THREE.EffectComposer relies on ShaderPass');
|
|
74529
74711
|
}
|
|
74530
74712
|
|
|
74531
74713
|
this.copyPass = new ShaderPass(CopyShader);
|
|
@@ -74581,12 +74763,9 @@ var CopyShader = {
|
|
|
74581
74763
|
|
|
74582
74764
|
var currentRenderTarget = this.renderer.getRenderTarget();
|
|
74583
74765
|
var maskActive = false;
|
|
74584
|
-
var pass,
|
|
74585
|
-
i,
|
|
74586
|
-
il = this.passes.length;
|
|
74587
74766
|
|
|
74588
|
-
for (i = 0; i < il; i++) {
|
|
74589
|
-
pass = this.passes[i];
|
|
74767
|
+
for (var i = 0, il = this.passes.length; i < il; i++) {
|
|
74768
|
+
var pass = this.passes[i];
|
|
74590
74769
|
if (pass.enabled === false) continue;
|
|
74591
74770
|
pass.renderToScreen = this.renderToScreen && this.isLastEnabledPass(i);
|
|
74592
74771
|
pass.render(this.renderer, this.writeBuffer, this.readBuffer, deltaTime, maskActive);
|
|
@@ -74663,13 +74842,9 @@ var CopyShader = {
|
|
|
74663
74842
|
|
|
74664
74843
|
var _super = _createSuper(RenderPass);
|
|
74665
74844
|
|
|
74666
|
-
function RenderPass(scene, camera) {
|
|
74845
|
+
function RenderPass(scene, camera, overrideMaterial, clearColor, clearAlpha) {
|
|
74667
74846
|
var _this;
|
|
74668
74847
|
|
|
74669
|
-
var overrideMaterial = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
74670
|
-
var clearColor = arguments.length > 3 ? arguments[3] : undefined;
|
|
74671
|
-
var clearAlpha = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
74672
|
-
|
|
74673
74848
|
_classCallCheck(this, RenderPass);
|
|
74674
74849
|
|
|
74675
74850
|
_this = _super.call(this);
|
|
@@ -74677,7 +74852,7 @@ var CopyShader = {
|
|
|
74677
74852
|
_this.camera = camera;
|
|
74678
74853
|
_this.overrideMaterial = overrideMaterial;
|
|
74679
74854
|
_this.clearColor = clearColor;
|
|
74680
|
-
_this.clearAlpha = clearAlpha;
|
|
74855
|
+
_this.clearAlpha = clearAlpha !== undefined ? clearAlpha : 0;
|
|
74681
74856
|
_this.clear = true;
|
|
74682
74857
|
_this.clearDepth = false;
|
|
74683
74858
|
_this.needsSwap = false;
|
|
@@ -74687,7 +74862,9 @@ var CopyShader = {
|
|
|
74687
74862
|
|
|
74688
74863
|
_createClass(RenderPass, [{
|
|
74689
74864
|
key: "render",
|
|
74690
|
-
value: function render(renderer, writeBuffer, readBuffer
|
|
74865
|
+
value: function render(renderer, writeBuffer, readBuffer
|
|
74866
|
+
/*, deltaTime, maskActive */
|
|
74867
|
+
) {
|
|
74691
74868
|
var oldAutoClear = renderer.autoClear;
|
|
74692
74869
|
renderer.autoClear = false;
|
|
74693
74870
|
var oldClearAlpha, oldOverrideMaterial;
|
|
@@ -75154,6 +75331,9 @@ var PALETTES = {
|
|
|
75154
75331
|
FRENCH: FRENCH_PALETTE
|
|
75155
75332
|
};var MAX_EDGE_THICKNESS = 4;
|
|
75156
75333
|
var MAX_EDGE_GLOW = 4;
|
|
75334
|
+
var DEFAULT_EDGE_GLOW = 0.0;
|
|
75335
|
+
var DEFAULT_EDGE_THICKNES = 1.0;
|
|
75336
|
+
var DEFAULT_EDGE_STRENGTH = 10.0;
|
|
75157
75337
|
var BlurDirectionX = new Vector2(1.0, 0.0);
|
|
75158
75338
|
var BlurDirectionY = new Vector2(0.0, 1.0);
|
|
75159
75339
|
|
|
@@ -75172,15 +75352,17 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
|
|
|
75172
75352
|
|
|
75173
75353
|
var _ref$resolution = _ref.resolution,
|
|
75174
75354
|
resolution = _ref$resolution === void 0 ? {} : _ref$resolution,
|
|
75175
|
-
selectedObjects = _ref.selectedObjects,
|
|
75355
|
+
_ref$selectedObjects = _ref.selectedObjects,
|
|
75356
|
+
selectedObjects = _ref$selectedObjects === void 0 ? [] : _ref$selectedObjects,
|
|
75176
75357
|
_ref$visibleEdgeColor = _ref.visibleEdgeColor,
|
|
75177
75358
|
visibleEdgeColor = _ref$visibleEdgeColor === void 0 ? PALETTES.BASE.WHITE : _ref$visibleEdgeColor,
|
|
75178
75359
|
_ref$hiddenEdgeColor = _ref.hiddenEdgeColor,
|
|
75179
|
-
hiddenEdgeColor = _ref$hiddenEdgeColor === void 0 ? PALETTES.BASE.
|
|
75360
|
+
hiddenEdgeColor = _ref$hiddenEdgeColor === void 0 ? PALETTES.BASE.WHITE : _ref$hiddenEdgeColor;
|
|
75180
75361
|
|
|
75181
75362
|
_classCallCheck(this, SelectiveOutline);
|
|
75182
75363
|
|
|
75183
75364
|
_this = _super.call(this);
|
|
75365
|
+
_this.isPass = true;
|
|
75184
75366
|
|
|
75185
75367
|
var _config$screen = Config$1.screen(),
|
|
75186
75368
|
height = _config$screen.h,
|
|
@@ -75192,13 +75374,13 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
|
|
|
75192
75374
|
resolutionY = _resolution$y === void 0 ? height : _resolution$y;
|
|
75193
75375
|
_this.renderScene = Scene$1.getScene();
|
|
75194
75376
|
_this.renderCamera = Scene$1.getCameraBody();
|
|
75195
|
-
_this.selectedObjects = selectedObjects
|
|
75196
|
-
_this.visibleEdgeColor = visibleEdgeColor;
|
|
75197
|
-
_this.hiddenEdgeColor = hiddenEdgeColor;
|
|
75198
|
-
_this.edgeGlow =
|
|
75377
|
+
_this.selectedObjects = selectedObjects;
|
|
75378
|
+
_this.visibleEdgeColor = new Color$1(visibleEdgeColor);
|
|
75379
|
+
_this.hiddenEdgeColor = new Color$1(hiddenEdgeColor);
|
|
75380
|
+
_this.edgeGlow = DEFAULT_EDGE_GLOW;
|
|
75199
75381
|
_this.usePatternTexture = false;
|
|
75200
|
-
_this.edgeThickness =
|
|
75201
|
-
_this.edgeStrength =
|
|
75382
|
+
_this.edgeThickness = DEFAULT_EDGE_THICKNES;
|
|
75383
|
+
_this.edgeStrength = DEFAULT_EDGE_STRENGTH;
|
|
75202
75384
|
_this.downSampleRatio = 2;
|
|
75203
75385
|
_this.pulsePeriod = 0;
|
|
75204
75386
|
_this._visibilityCache = new Map();
|
|
@@ -75284,6 +75466,36 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
|
|
|
75284
75466
|
return o.getBody();
|
|
75285
75467
|
});
|
|
75286
75468
|
}
|
|
75469
|
+
}, {
|
|
75470
|
+
key: "setVisibleEdgeColor",
|
|
75471
|
+
value: function setVisibleEdgeColor() {
|
|
75472
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PALETTES.BASE.WHITE;
|
|
75473
|
+
this.visibleEdgeColor = new Color$1(color);
|
|
75474
|
+
}
|
|
75475
|
+
}, {
|
|
75476
|
+
key: "setHiddenEdgeColor",
|
|
75477
|
+
value: function setHiddenEdgeColor() {
|
|
75478
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PALETTES.BASE.WHITE;
|
|
75479
|
+
this.hiddenEdgeColor = new Color$1(color);
|
|
75480
|
+
}
|
|
75481
|
+
}, {
|
|
75482
|
+
key: "setEdgeGlow",
|
|
75483
|
+
value: function setEdgeGlow() {
|
|
75484
|
+
var glow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_EDGE_GLOW;
|
|
75485
|
+
this.edgeGlow = glow;
|
|
75486
|
+
}
|
|
75487
|
+
}, {
|
|
75488
|
+
key: "setEdgeStrength",
|
|
75489
|
+
value: function setEdgeStrength() {
|
|
75490
|
+
var strength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_EDGE_STRENGTH;
|
|
75491
|
+
this.edgeStrength = strength;
|
|
75492
|
+
}
|
|
75493
|
+
}, {
|
|
75494
|
+
key: "setEdgeThickness",
|
|
75495
|
+
value: function setEdgeThickness() {
|
|
75496
|
+
var thickness = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_EDGE_THICKNES;
|
|
75497
|
+
this.edgeThickness = thickness;
|
|
75498
|
+
}
|
|
75287
75499
|
}, {
|
|
75288
75500
|
key: "dispose",
|
|
75289
75501
|
value: function dispose() {
|
|
@@ -75452,8 +75664,8 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
|
|
|
75452
75664
|
this.fsQuad.material = this.edgeDetectionMaterial;
|
|
75453
75665
|
this.edgeDetectionMaterial.uniforms['maskTexture'].value = this.renderTargetMaskDownSampleBuffer.texture;
|
|
75454
75666
|
this.edgeDetectionMaterial.uniforms['texSize'].value.set(this.renderTargetMaskDownSampleBuffer.width, this.renderTargetMaskDownSampleBuffer.height);
|
|
75455
|
-
this.edgeDetectionMaterial.uniforms['visibleEdgeColor'].value
|
|
75456
|
-
this.edgeDetectionMaterial.uniforms['hiddenEdgeColor'].value
|
|
75667
|
+
this.edgeDetectionMaterial.uniforms['visibleEdgeColor'].value.set(this.tempPulseColor1.getHex());
|
|
75668
|
+
this.edgeDetectionMaterial.uniforms['hiddenEdgeColor'].value.set(this.tempPulseColor2.getHex());
|
|
75457
75669
|
renderer.setRenderTarget(this.renderTargetEdgeBuffer1);
|
|
75458
75670
|
renderer.clear();
|
|
75459
75671
|
this.fsQuad.render(renderer); // 4. Apply Blur on Half res
|
|
@@ -75536,10 +75748,10 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
|
|
|
75536
75748
|
value: new Vector2(0.5, 0.5)
|
|
75537
75749
|
},
|
|
75538
75750
|
'visibleEdgeColor': {
|
|
75539
|
-
value: new
|
|
75751
|
+
value: new Color$1(1.0, 1.0, 1.0)
|
|
75540
75752
|
},
|
|
75541
75753
|
'hiddenEdgeColor': {
|
|
75542
|
-
value: new
|
|
75754
|
+
value: new Color$1(1.0, 1.0, 1.0)
|
|
75543
75755
|
}
|
|
75544
75756
|
},
|
|
75545
75757
|
vertexShader: "varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }",
|
|
@@ -76405,7 +76617,7 @@ var index$1=/*#__PURE__*/Object.freeze({__proto__:null,Emitter:k,Particle:P,Part
|
|
|
76405
76617
|
|
|
76406
76618
|
_this.setName(name);
|
|
76407
76619
|
|
|
76408
|
-
_this.setEntityType(ENTITY_TYPES.PARTICLE);
|
|
76620
|
+
_this.setEntityType(ENTITY_TYPES.EFFECT.PARTICLE);
|
|
76409
76621
|
|
|
76410
76622
|
return _this;
|
|
76411
76623
|
}
|
|
@@ -78349,7 +78561,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
|
|
|
78349
78561
|
_this.scaleHandleGeometry = new BoxGeometry(0.125, 0.125, 0.125);
|
|
78350
78562
|
_this.lineGeometry = new BufferGeometry();
|
|
78351
78563
|
|
|
78352
|
-
_this.lineGeometry.
|
|
78564
|
+
_this.lineGeometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); // Make unique material for each axis/color
|
|
78353
78565
|
|
|
78354
78566
|
|
|
78355
78567
|
_this.matInvisible = _this.gizmoMaterial.clone();
|
|
@@ -78468,14 +78680,14 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
|
|
|
78468
78680
|
vertices.push(0, Math.cos(i / 32 * Math.PI) * radius, Math.sin(i / 32 * Math.PI) * radius);
|
|
78469
78681
|
}
|
|
78470
78682
|
|
|
78471
|
-
geometry.
|
|
78683
|
+
geometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));
|
|
78472
78684
|
return geometry;
|
|
78473
78685
|
}
|
|
78474
78686
|
}, {
|
|
78475
78687
|
key: "createTranslateHelperGeometry",
|
|
78476
78688
|
value: function createTranslateHelperGeometry(radius, arc) {
|
|
78477
78689
|
var geometry = new BufferGeometry();
|
|
78478
|
-
geometry.
|
|
78690
|
+
geometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 1, 1, 1], 3));
|
|
78479
78691
|
return geometry;
|
|
78480
78692
|
}
|
|
78481
78693
|
}, {
|
|
@@ -78614,7 +78826,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
|
|
|
78614
78826
|
|
|
78615
78827
|
object.updateMatrix();
|
|
78616
78828
|
var tempGeometry = object.geometry.clone();
|
|
78617
|
-
tempGeometry.
|
|
78829
|
+
tempGeometry.applyMatrix4(object.matrix);
|
|
78618
78830
|
object.geometry = tempGeometry;
|
|
78619
78831
|
object.position.set(0, 0, 0);
|
|
78620
78832
|
object.rotation.set(0, 0, 0);
|
|
@@ -79306,7 +79518,7 @@ var Particles$1 = new Particles();var Orbit = /*#__PURE__*/function (_EventDispa
|
|
|
79306
79518
|
_this._quaternionStart = new Quaternion();
|
|
79307
79519
|
_this._scaleStart = new Vector3$1();
|
|
79308
79520
|
_this.isTransformControls = true;
|
|
79309
|
-
Scene$1.add(_assertThisInitialized(_this),
|
|
79521
|
+
Scene$1.add(_assertThisInitialized(_this), null, false);
|
|
79310
79522
|
return _this;
|
|
79311
79523
|
}
|
|
79312
79524
|
|
|
@@ -80624,8 +80836,8 @@ var Level = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
80624
80836
|
});
|
|
80625
80837
|
|
|
80626
80838
|
_defineProperty$1(_assertThisInitialized(_this), "init", function () {
|
|
80627
|
-
|
|
80628
|
-
Scene$1.create(
|
|
80839
|
+
_this.options.path;
|
|
80840
|
+
Scene$1.create(_this.getName());
|
|
80629
80841
|
Scene$1.createCamera(new Camera());
|
|
80630
80842
|
|
|
80631
80843
|
_this.enableInput();
|
|
@@ -80671,6 +80883,11 @@ var Level = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
80671
80883
|
}
|
|
80672
80884
|
|
|
80673
80885
|
_createClass(Level, [{
|
|
80886
|
+
key: "getName",
|
|
80887
|
+
value: function getName() {
|
|
80888
|
+
return this.name;
|
|
80889
|
+
}
|
|
80890
|
+
}, {
|
|
80674
80891
|
key: "prepareScene",
|
|
80675
80892
|
value: function prepareScene() {}
|
|
80676
80893
|
}, {
|
|
@@ -86507,7 +86724,8 @@ var SpotLight = /*#__PURE__*/function (_Light) {
|
|
|
86507
86724
|
color = _options$color === void 0 ? WHITE : _options$color,
|
|
86508
86725
|
_options$intensity = options.intensity,
|
|
86509
86726
|
intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY$1 : _options$intensity,
|
|
86510
|
-
name = options.name
|
|
86727
|
+
_options$name = options.name,
|
|
86728
|
+
name = _options$name === void 0 ? "SpotLight_".concat(Math.random()) : _options$name;
|
|
86511
86729
|
_this = _super.call(this, {
|
|
86512
86730
|
color: color,
|
|
86513
86731
|
intensity: intensity,
|
|
@@ -86520,6 +86738,10 @@ var SpotLight = /*#__PURE__*/function (_Light) {
|
|
|
86520
86738
|
intensity: intensity
|
|
86521
86739
|
});
|
|
86522
86740
|
|
|
86741
|
+
_this.setEntityType(ENTITY_TYPES.LIGHT.SPOT);
|
|
86742
|
+
|
|
86743
|
+
_this.setName(name);
|
|
86744
|
+
|
|
86523
86745
|
return _this;
|
|
86524
86746
|
}
|
|
86525
86747
|
|
|
@@ -86531,7 +86753,10 @@ var SpotLight = /*#__PURE__*/function (_Light) {
|
|
|
86531
86753
|
color: 0xeeeeee,
|
|
86532
86754
|
wireframe: true
|
|
86533
86755
|
});
|
|
86534
|
-
var target = new Element(
|
|
86756
|
+
var target = new Element({
|
|
86757
|
+
geometry: geometry,
|
|
86758
|
+
material: material
|
|
86759
|
+
});
|
|
86535
86760
|
target.position(initialPosition);
|
|
86536
86761
|
return target;
|
|
86537
86762
|
}
|
|
@@ -86675,7 +86900,8 @@ var HemisphereLight = /*#__PURE__*/function (_Light) {
|
|
|
86675
86900
|
} : _options$color,
|
|
86676
86901
|
_options$intensity = options.intensity,
|
|
86677
86902
|
intensity = _options$intensity === void 0 ? DEFAULT_INTENSITY : _options$intensity,
|
|
86678
|
-
name = options.name
|
|
86903
|
+
_options$name = options.name,
|
|
86904
|
+
name = _options$name === void 0 ? "HemisphereLight_".concat(Math.random()) : _options$name;
|
|
86679
86905
|
_this = _super.call(this, {
|
|
86680
86906
|
color: color,
|
|
86681
86907
|
intensity: intensity,
|
|
@@ -86688,6 +86914,10 @@ var HemisphereLight = /*#__PURE__*/function (_Light) {
|
|
|
86688
86914
|
intensity: intensity
|
|
86689
86915
|
});
|
|
86690
86916
|
|
|
86917
|
+
_this.setEntityType(ENTITY_TYPES.LIGHT.HEMISPHERE);
|
|
86918
|
+
|
|
86919
|
+
_this.setName(name);
|
|
86920
|
+
|
|
86691
86921
|
return _this;
|
|
86692
86922
|
}
|
|
86693
86923
|
|
|
@@ -87955,7 +88185,7 @@ var Water = /*#__PURE__*/function (_Element) {
|
|
|
87955
88185
|
|
|
87956
88186
|
_classCallCheck(this, Water);
|
|
87957
88187
|
|
|
87958
|
-
_this = _super.call(this,
|
|
88188
|
+
_this = _super.call(this, options);
|
|
87959
88189
|
|
|
87960
88190
|
_defineProperty$1(_assertThisInitialized(_this), "update", function (dt) {
|
|
87961
88191
|
_get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(Water.prototype)), "update", _thisSuper).call(_thisSuper, dt);
|
|
@@ -88105,7 +88335,7 @@ var Sky = /*#__PURE__*/function (_Element) {
|
|
|
88105
88335
|
|
|
88106
88336
|
_classCallCheck(this, Sky);
|
|
88107
88337
|
|
|
88108
|
-
_this = _super.call(this,
|
|
88338
|
+
_this = _super.call(this, options);
|
|
88109
88339
|
var _options$scale = options.scale,
|
|
88110
88340
|
scale = _options$scale === void 0 ? DEFAULT_SCALE : _options$scale,
|
|
88111
88341
|
_options$turbidity = options.turbidity,
|
|
@@ -88134,7 +88364,7 @@ var Sky = /*#__PURE__*/function (_Element) {
|
|
|
88134
88364
|
body: body
|
|
88135
88365
|
});
|
|
88136
88366
|
|
|
88137
|
-
_this.setEntityType(ENTITY_TYPES.
|
|
88367
|
+
_this.setEntityType(ENTITY_TYPES.EFFECT.SCENERY);
|
|
88138
88368
|
|
|
88139
88369
|
_this.setScale({
|
|
88140
88370
|
x: scale,
|
|
@@ -88213,7 +88443,7 @@ var Skybox = /*#__PURE__*/function (_Element) {
|
|
|
88213
88443
|
texture = _options$texture === void 0 ? 'skybox' : _options$texture,
|
|
88214
88444
|
rest = _objectWithoutProperties(options, _excluded);
|
|
88215
88445
|
|
|
88216
|
-
_this = _super.call(this,
|
|
88446
|
+
_this = _super.call(this, _objectSpread2$1({
|
|
88217
88447
|
name: name,
|
|
88218
88448
|
texture: texture
|
|
88219
88449
|
}, rest));
|