@galacean/engine-core 1.1.0-beta.6 → 1.1.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17074,13 +17074,12 @@ ShaderPool.init();
17074
17074
  /**
17075
17075
  * @internal
17076
17076
  */ _proto._resizeBackgroundTexture = function _resizeBackgroundTexture() {
17077
+ var _this = this, texture = _this._texture, mesh = _this._mesh;
17077
17078
  if (!this._texture) {
17078
17079
  return;
17079
17080
  }
17080
- var canvas = this._engine.canvas;
17081
- var width = canvas.width, height = canvas.height;
17082
- var _this = this, _backgroundTextureMesh = _this._mesh;
17083
- var positions = _backgroundTextureMesh.getPositions();
17081
+ var _this__engine_canvas = this._engine.canvas, width = _this__engine_canvas.width, height = _this__engine_canvas.height;
17082
+ var positions = mesh.getPositions();
17084
17083
  switch(this._textureFillMode){
17085
17084
  case exports.BackgroundTextureFillMode.Fill:
17086
17085
  positions[0].set(-1, -1, 1);
@@ -17089,22 +17088,22 @@ ShaderPool.init();
17089
17088
  positions[3].set(1, 1, 1);
17090
17089
  break;
17091
17090
  case exports.BackgroundTextureFillMode.AspectFitWidth:
17092
- var fitWidthScale = this._texture.height * width / this.texture.width / height;
17091
+ var fitWidthScale = texture.height * width / texture.width / height;
17093
17092
  positions[0].set(-1, -fitWidthScale, 1);
17094
17093
  positions[1].set(1, -fitWidthScale, 1);
17095
17094
  positions[2].set(-1, fitWidthScale, 1);
17096
17095
  positions[3].set(1, fitWidthScale, 1);
17097
17096
  break;
17098
17097
  case exports.BackgroundTextureFillMode.AspectFitHeight:
17099
- var fitHeightScale = this._texture.width * height / this.texture.height / width;
17098
+ var fitHeightScale = texture.width * height / texture.height / width;
17100
17099
  positions[0].set(-fitHeightScale, -1, 1);
17101
17100
  positions[1].set(fitHeightScale, -1, 1);
17102
17101
  positions[2].set(-fitHeightScale, 1, 1);
17103
17102
  positions[3].set(fitHeightScale, 1, 1);
17104
17103
  break;
17105
17104
  }
17106
- _backgroundTextureMesh.setPositions(positions);
17107
- _backgroundTextureMesh.uploadData(false);
17105
+ mesh.setPositions(positions);
17106
+ mesh.uploadData(false);
17108
17107
  };
17109
17108
  _proto._initMesh = function _initMesh(engine) {
17110
17109
  this._mesh = this._createPlane(engine);
@@ -17155,13 +17154,13 @@ ShaderPool.init();
17155
17154
  (_this__texture = this._texture) == null ? void 0 : _this__texture._addReferCount(-1);
17156
17155
  this._texture = value;
17157
17156
  this._material.shaderData.setTexture("material_BaseTexture", value);
17157
+ this._resizeBackgroundTexture();
17158
17158
  }
17159
17159
  }
17160
17160
  },
17161
17161
  {
17162
17162
  key: "textureFillMode",
17163
17163
  get: /**
17164
- * @internal
17165
17164
  * Background texture fill mode.
17166
17165
  * @remarks When `mode` is `BackgroundMode.Texture`, the property will take effects.
17167
17166
  * @defaultValue `BackgroundTextureFillMode.FitHeight`
@@ -29933,6 +29932,7 @@ exports.CharacterController = CharacterController;
29933
29932
  exports.CircleShape = CircleShape;
29934
29933
  exports.CloneManager = CloneManager;
29935
29934
  exports.ColliderShape = ColliderShape;
29935
+ exports.ColorOverLifetimeModule = ColorOverLifetimeModule;
29936
29936
  exports.Component = Component;
29937
29937
  exports.ConeShape = ConeShape;
29938
29938
  exports.ContentRestorer = ContentRestorer;
@@ -29941,12 +29941,15 @@ exports.CurveKey = CurveKey;
29941
29941
  exports.DepthState = DepthState;
29942
29942
  exports.DirectLight = DirectLight;
29943
29943
  exports.DynamicCollider = DynamicCollider;
29944
+ exports.EmissionModule = EmissionModule;
29944
29945
  exports.Engine = Engine;
29945
29946
  exports.EngineObject = EngineObject;
29946
29947
  exports.Entity = Entity;
29947
29948
  exports.EventDispatcher = EventDispatcher;
29948
29949
  exports.FixedJoint = FixedJoint;
29949
29950
  exports.Font = Font;
29951
+ exports.GradientAlphaKey = GradientAlphaKey;
29952
+ exports.GradientColorKey = GradientColorKey;
29950
29953
  exports.HemisphereShape = HemisphereShape;
29951
29954
  exports.HingeJoint = HingeJoint;
29952
29955
  exports.HitResult = HitResult;
@@ -29958,6 +29961,7 @@ exports.Keyframe = Keyframe;
29958
29961
  exports.Light = Light;
29959
29962
  exports.Loader = Loader;
29960
29963
  exports.Logger = Logger;
29964
+ exports.MainModule = MainModule;
29961
29965
  exports.Material = Material;
29962
29966
  exports.Mesh = Mesh;
29963
29967
  exports.MeshRenderer = MeshRenderer;
@@ -29966,8 +29970,10 @@ exports.PBRBaseMaterial = PBRBaseMaterial;
29966
29970
  exports.PBRMaterial = PBRMaterial;
29967
29971
  exports.PBRSpecularMaterial = PBRSpecularMaterial;
29968
29972
  exports.ParticleCompositeCurve = ParticleCompositeCurve;
29973
+ exports.ParticleCompositeGradient = ParticleCompositeGradient;
29969
29974
  exports.ParticleCurve = ParticleCurve;
29970
29975
  exports.ParticleGenerator = ParticleGenerator;
29976
+ exports.ParticleGradient = ParticleGradient;
29971
29977
  exports.ParticleMaterial = ParticleMaterial;
29972
29978
  exports.ParticleRenderer = ParticleRenderer;
29973
29979
  exports.PhysicsMaterial = PhysicsMaterial;
@@ -29986,6 +29992,7 @@ exports.RenderState = RenderState;
29986
29992
  exports.RenderTarget = RenderTarget;
29987
29993
  exports.RenderTargetBlendState = RenderTargetBlendState;
29988
29994
  exports.ResourceManager = ResourceManager;
29995
+ exports.RotationOverLifetimeModule = RotationOverLifetimeModule;
29989
29996
  exports.Scene = Scene;
29990
29997
  exports.SceneManager = SceneManager;
29991
29998
  exports.Script = Script;
@@ -29997,6 +30004,7 @@ exports.ShaderMacroCollection = ShaderMacroCollection;
29997
30004
  exports.ShaderPass = ShaderPass;
29998
30005
  exports.ShaderProperty = ShaderProperty;
29999
30006
  exports.ShaderTagKey = ShaderTagKey;
30007
+ exports.SizeOverLifetimeModule = SizeOverLifetimeModule;
30000
30008
  exports.Skin = Skin;
30001
30009
  exports.SkinnedMeshRenderer = SkinnedMeshRenderer;
30002
30010
  exports.Sky = Sky;
@@ -30022,12 +30030,14 @@ exports.Texture = Texture;
30022
30030
  exports.Texture2D = Texture2D;
30023
30031
  exports.Texture2DArray = Texture2DArray;
30024
30032
  exports.TextureCube = TextureCube;
30033
+ exports.TextureSheetAnimationModule = TextureSheetAnimationModule;
30025
30034
  exports.Time = Time;
30026
30035
  exports.TrailMaterial = TrailMaterial;
30027
30036
  exports.TrailRenderer = TrailRenderer;
30028
30037
  exports.Transform = Transform;
30029
30038
  exports.UnlitMaterial = UnlitMaterial;
30030
30039
  exports.Utils = Utils;
30040
+ exports.VelocityOverLifetimeModule = VelocityOverLifetimeModule;
30031
30041
  exports.VertexBufferBinding = VertexBufferBinding;
30032
30042
  exports.VertexElement = VertexElement;
30033
30043
  exports.assignmentClone = assignmentClone;
package/dist/module.js CHANGED
@@ -17069,13 +17069,12 @@ ShaderPool.init();
17069
17069
  /**
17070
17070
  * @internal
17071
17071
  */ _proto._resizeBackgroundTexture = function _resizeBackgroundTexture() {
17072
+ var _this = this, texture = _this._texture, mesh = _this._mesh;
17072
17073
  if (!this._texture) {
17073
17074
  return;
17074
17075
  }
17075
- var canvas = this._engine.canvas;
17076
- var width = canvas.width, height = canvas.height;
17077
- var _this = this, _backgroundTextureMesh = _this._mesh;
17078
- var positions = _backgroundTextureMesh.getPositions();
17076
+ var _this__engine_canvas = this._engine.canvas, width = _this__engine_canvas.width, height = _this__engine_canvas.height;
17077
+ var positions = mesh.getPositions();
17079
17078
  switch(this._textureFillMode){
17080
17079
  case BackgroundTextureFillMode.Fill:
17081
17080
  positions[0].set(-1, -1, 1);
@@ -17084,22 +17083,22 @@ ShaderPool.init();
17084
17083
  positions[3].set(1, 1, 1);
17085
17084
  break;
17086
17085
  case BackgroundTextureFillMode.AspectFitWidth:
17087
- var fitWidthScale = this._texture.height * width / this.texture.width / height;
17086
+ var fitWidthScale = texture.height * width / texture.width / height;
17088
17087
  positions[0].set(-1, -fitWidthScale, 1);
17089
17088
  positions[1].set(1, -fitWidthScale, 1);
17090
17089
  positions[2].set(-1, fitWidthScale, 1);
17091
17090
  positions[3].set(1, fitWidthScale, 1);
17092
17091
  break;
17093
17092
  case BackgroundTextureFillMode.AspectFitHeight:
17094
- var fitHeightScale = this._texture.width * height / this.texture.height / width;
17093
+ var fitHeightScale = texture.width * height / texture.height / width;
17095
17094
  positions[0].set(-fitHeightScale, -1, 1);
17096
17095
  positions[1].set(fitHeightScale, -1, 1);
17097
17096
  positions[2].set(-fitHeightScale, 1, 1);
17098
17097
  positions[3].set(fitHeightScale, 1, 1);
17099
17098
  break;
17100
17099
  }
17101
- _backgroundTextureMesh.setPositions(positions);
17102
- _backgroundTextureMesh.uploadData(false);
17100
+ mesh.setPositions(positions);
17101
+ mesh.uploadData(false);
17103
17102
  };
17104
17103
  _proto._initMesh = function _initMesh(engine) {
17105
17104
  this._mesh = this._createPlane(engine);
@@ -17150,13 +17149,13 @@ ShaderPool.init();
17150
17149
  (_this__texture = this._texture) == null ? void 0 : _this__texture._addReferCount(-1);
17151
17150
  this._texture = value;
17152
17151
  this._material.shaderData.setTexture("material_BaseTexture", value);
17152
+ this._resizeBackgroundTexture();
17153
17153
  }
17154
17154
  }
17155
17155
  },
17156
17156
  {
17157
17157
  key: "textureFillMode",
17158
17158
  get: /**
17159
- * @internal
17160
17159
  * Background texture fill mode.
17161
17160
  * @remarks When `mode` is `BackgroundMode.Texture`, the property will take effects.
17162
17161
  * @defaultValue `BackgroundTextureFillMode.FitHeight`
@@ -29896,5 +29895,5 @@ var cacheDir = new Vector3();
29896
29895
  return CubeProbe;
29897
29896
  }(Probe);
29898
29897
 
29899
- export { AmbientLight, AnimationArrayCurve, AnimationBoolCurve, AnimationClip, AnimationClipCurveBinding, AnimationColorCurve, AnimationCurve, AnimationEvent, AnimationFloatArrayCurve, AnimationFloatCurve, AnimationQuaternionCurve, AnimationRectCurve, AnimationRefCurve, AnimationVector2Curve, AnimationVector3Curve, AnimationVector4Curve, Animator, AnimatorConditionMode, AnimatorController, AnimatorControllerLayer, AnimatorCullingMode, AnimatorLayerBlendingMode, AnimatorState, AnimatorStateMachine, AnimatorStateTransition, AssetPromise, AssetType, Background, BackgroundMode, BackgroundTextureFillMode, BaseMaterial, Basic2DBatcher, BasicRenderPipeline, BlendFactor, BlendMode, BlendOperation, BlendShape, BlendShapeFrame, BlendState, BlinnPhongMaterial, BoolUpdateFlag, BoxColliderShape, BoxShape, Buffer, BufferBindFlag, BufferMesh, BufferUsage, BufferUtil, Burst, Camera, CameraClearFlags, CapsuleColliderShape, CharacterController, CircleShape, CloneManager, Collider, ColliderShape, ColliderShapeUpAxis, CollisionDetectionMode, ColorSpace, ColorWriteMask, CompareFunction, Component, ConeEmitType, ConeShape, ContentRestorer, ControllerCollisionFlag, ControllerNonWalkableMode, CubeProbe, CullMode, CurveKey, DataType, DependentMode, DepthState, DepthTextureMode, DiffuseMode, DirectLight, DynamicCollider, DynamicColliderConstraints, Engine, EngineObject, Entity, EventDispatcher, FixedJoint, FogMode, Font, FontStyle, GLCapabilityType, HemisphereShape, HingeJoint, HitResult, IndexBufferBinding, IndexFormat, InputManager, InterpolationType, Joint, JointLimits, JointMotor, Keyframe, Keys, Layer, Light, Loader, Logger, Material, Mesh, MeshRenderer, MeshTopology, ModelMesh, OverflowMode, PBRBaseMaterial, PBRMaterial, PBRSpecularMaterial, ParticleCompositeCurve, ParticleCurve, ParticleCurveMode, ParticleGenerator, ParticleGradientMode, ParticleMaterial, ParticleRenderMode, ParticleRenderer, ParticleScaleMode, ParticleShapeArcMode, ParticleSimulationSpace, ParticleStopMode, PhysicsMaterial, PhysicsMaterialCombineMode, PhysicsScene, PipelineStage, PlaneColliderShape, Platform, PointLight, Pointer, PointerButton, PointerPhase, Primitive, PrimitiveMesh, Probe, RasterState, ReferResource, RenderBufferDepthFormat, RenderFace, RenderPass, RenderQueue, RenderQueueType, RenderState, RenderStateElementKey as RenderStateDataKey, RenderTarget, RenderTargetBlendState, Renderer, ResourceManager, Scene, SceneManager, Script, SetDataOptions, Shader, ShaderData, ShaderFactory, ShaderMacro, ShaderMacroCollection, ShaderPass, ShaderProperty, ShaderPropertyType, ShaderTagKey, ShadowCascadesMode, ShadowResolution, ShadowType, Skin, SkinnedMeshRenderer, Sky, SkyBoxMaterial, SkyProceduralMaterial, SphereColliderShape, SphereShape, SpotLight, SpringJoint, Sprite, SpriteAtlas, SpriteDrawMode, SpriteMask, SpriteMaskInteraction, SpriteMaskLayer, SpriteRenderer, SpriteTileMode, StateMachineScript, StaticCollider, StencilOperation, StencilState, SubMesh, SubShader, SunMode, SystemInfo, TextHorizontalAlignment, TextRenderer, TextUtils, TextVerticalAlignment, Texture, Texture2D, Texture2DArray, TextureCoordinate, TextureCube, TextureCubeFace, TextureDepthCompareFunction, TextureFilterMode, TextureFormat, TextureUsage, TextureWrapMode, Time, TrailMaterial, TrailRenderer, Transform, UnlitMaterial, Utils, VertexAttribute, VertexBufferBinding, VertexElement, VertexElementFormat, WrapMode, assignmentClone, deepClone, dependentComponents, ignoreClone, request, resourceLoader, shallowClone };
29898
+ export { AmbientLight, AnimationArrayCurve, AnimationBoolCurve, AnimationClip, AnimationClipCurveBinding, AnimationColorCurve, AnimationCurve, AnimationEvent, AnimationFloatArrayCurve, AnimationFloatCurve, AnimationQuaternionCurve, AnimationRectCurve, AnimationRefCurve, AnimationVector2Curve, AnimationVector3Curve, AnimationVector4Curve, Animator, AnimatorConditionMode, AnimatorController, AnimatorControllerLayer, AnimatorCullingMode, AnimatorLayerBlendingMode, AnimatorState, AnimatorStateMachine, AnimatorStateTransition, AssetPromise, AssetType, Background, BackgroundMode, BackgroundTextureFillMode, BaseMaterial, Basic2DBatcher, BasicRenderPipeline, BlendFactor, BlendMode, BlendOperation, BlendShape, BlendShapeFrame, BlendState, BlinnPhongMaterial, BoolUpdateFlag, BoxColliderShape, BoxShape, Buffer, BufferBindFlag, BufferMesh, BufferUsage, BufferUtil, Burst, Camera, CameraClearFlags, CapsuleColliderShape, CharacterController, CircleShape, CloneManager, Collider, ColliderShape, ColliderShapeUpAxis, CollisionDetectionMode, ColorOverLifetimeModule, ColorSpace, ColorWriteMask, CompareFunction, Component, ConeEmitType, ConeShape, ContentRestorer, ControllerCollisionFlag, ControllerNonWalkableMode, CubeProbe, CullMode, CurveKey, DataType, DependentMode, DepthState, DepthTextureMode, DiffuseMode, DirectLight, DynamicCollider, DynamicColliderConstraints, EmissionModule, Engine, EngineObject, Entity, EventDispatcher, FixedJoint, FogMode, Font, FontStyle, GLCapabilityType, GradientAlphaKey, GradientColorKey, HemisphereShape, HingeJoint, HitResult, IndexBufferBinding, IndexFormat, InputManager, InterpolationType, Joint, JointLimits, JointMotor, Keyframe, Keys, Layer, Light, Loader, Logger, MainModule, Material, Mesh, MeshRenderer, MeshTopology, ModelMesh, OverflowMode, PBRBaseMaterial, PBRMaterial, PBRSpecularMaterial, ParticleCompositeCurve, ParticleCompositeGradient, ParticleCurve, ParticleCurveMode, ParticleGenerator, ParticleGradient, ParticleGradientMode, ParticleMaterial, ParticleRenderMode, ParticleRenderer, ParticleScaleMode, ParticleShapeArcMode, ParticleSimulationSpace, ParticleStopMode, PhysicsMaterial, PhysicsMaterialCombineMode, PhysicsScene, PipelineStage, PlaneColliderShape, Platform, PointLight, Pointer, PointerButton, PointerPhase, Primitive, PrimitiveMesh, Probe, RasterState, ReferResource, RenderBufferDepthFormat, RenderFace, RenderPass, RenderQueue, RenderQueueType, RenderState, RenderStateElementKey as RenderStateDataKey, RenderTarget, RenderTargetBlendState, Renderer, ResourceManager, RotationOverLifetimeModule, Scene, SceneManager, Script, SetDataOptions, Shader, ShaderData, ShaderFactory, ShaderMacro, ShaderMacroCollection, ShaderPass, ShaderProperty, ShaderPropertyType, ShaderTagKey, ShadowCascadesMode, ShadowResolution, ShadowType, SizeOverLifetimeModule, Skin, SkinnedMeshRenderer, Sky, SkyBoxMaterial, SkyProceduralMaterial, SphereColliderShape, SphereShape, SpotLight, SpringJoint, Sprite, SpriteAtlas, SpriteDrawMode, SpriteMask, SpriteMaskInteraction, SpriteMaskLayer, SpriteRenderer, SpriteTileMode, StateMachineScript, StaticCollider, StencilOperation, StencilState, SubMesh, SubShader, SunMode, SystemInfo, TextHorizontalAlignment, TextRenderer, TextUtils, TextVerticalAlignment, Texture, Texture2D, Texture2DArray, TextureCoordinate, TextureCube, TextureCubeFace, TextureDepthCompareFunction, TextureFilterMode, TextureFormat, TextureSheetAnimationModule, TextureUsage, TextureWrapMode, Time, TrailMaterial, TrailRenderer, Transform, UnlitMaterial, Utils, VelocityOverLifetimeModule, VertexAttribute, VertexBufferBinding, VertexElement, VertexElementFormat, WrapMode, assignmentClone, deepClone, dependentComponents, ignoreClone, request, resourceLoader, shallowClone };
29900
29899
  //# sourceMappingURL=module.js.map