@galacean/engine-core 0.0.0-experimental-0.9-plus.8 → 0.0.0-experimental-double11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/main.js +15851 -13975
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +15851 -13975
  4. package/dist/module.js +15837 -13971
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/atlas/SpriteAtlas.d.ts +2 -6
  8. package/types/2d/enums/SpriteDirtyFlag.d.ts +13 -0
  9. package/types/2d/enums/SpriteDrawMode.d.ts +4 -2
  10. package/types/2d/index.d.ts +1 -0
  11. package/types/2d/sprite/Sprite.d.ts +5 -2
  12. package/types/2d/sprite/SpriteMask.d.ts +0 -11
  13. package/types/2d/sprite/SpriteRenderer.d.ts +15 -11
  14. package/types/2d/text/Font.d.ts +2 -7
  15. package/types/2d/text/TextRenderer.d.ts +0 -11
  16. package/types/2d/text/index.d.ts +1 -0
  17. package/types/Camera.d.ts +27 -8
  18. package/types/Component.d.ts +0 -8
  19. package/types/ComponentsDependencies.d.ts +17 -9
  20. package/types/ComponentsManager.d.ts +3 -2
  21. package/types/DisorderedArray.d.ts +4 -3
  22. package/types/Engine.d.ts +35 -43
  23. package/types/Entity.d.ts +2 -2
  24. package/types/ListenerUpdateFlag.d.ts +12 -0
  25. package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
  26. package/types/RenderPipeline/BasicRenderPipeline.d.ts +8 -6
  27. package/types/RenderPipeline/PipelinePass.d.ts +16 -0
  28. package/types/RenderPipeline/RenderElement.d.ts +8 -8
  29. package/types/RenderPipeline/RenderPass.d.ts +1 -1
  30. package/types/RenderPipeline/RenderQueue.d.ts +3 -5
  31. package/types/RenderPipeline/SpriteMaskBatcher.d.ts +4 -3
  32. package/types/Renderer.d.ts +3 -12
  33. package/types/Scene.d.ts +0 -1
  34. package/types/Script.d.ts +18 -15
  35. package/types/Transform.d.ts +10 -12
  36. package/types/Utils.d.ts +28 -0
  37. package/types/animation/AnimationClip.d.ts +2 -1
  38. package/types/animation/Animator.d.ts +7 -4
  39. package/types/animation/AnimatorStateTransition.d.ts +12 -0
  40. package/types/animation/AnimatorTransitionBase.d.ts +10 -0
  41. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
  42. package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
  43. package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
  44. package/types/animation/enums/LayerState.d.ts +3 -1
  45. package/types/animation/enums/StateMachineState.d.ts +13 -0
  46. package/types/animation/index.d.ts +0 -4
  47. package/types/animation/internal/AnimatorPlayableObject.d.ts +23 -0
  48. package/types/animation/internal/CrossCurveData.d.ts +1 -0
  49. package/types/animation/internal/animationCurveOwner/Assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
  50. package/types/animation/internal/animationCurveOwner/Assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
  51. package/types/animation/internal/animationCurveOwner/Assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
  52. package/types/animation/internal/animationCurveOwner/Assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
  53. package/types/animation/internal/animationCurveOwner/Assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
  54. package/types/animation/internal/animationCurveOwner/Assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
  55. package/types/asset/AssetType.d.ts +16 -16
  56. package/types/asset/LoadItem.d.ts +16 -9
  57. package/types/asset/ResourceManager.d.ts +17 -9
  58. package/types/asset/request.d.ts +7 -3
  59. package/types/base/Constant.d.ts +2 -1
  60. package/types/base/EngineObject.d.ts +1 -0
  61. package/types/base/EventDispatcher.d.ts +2 -15
  62. package/types/base/Time.d.ts +25 -24
  63. package/types/base/index.d.ts +0 -2
  64. package/types/enums/DepthTextureMode.d.ts +7 -0
  65. package/types/env-probe/CubeProbe.d.ts +0 -7
  66. package/types/env-probe/Probe.d.ts +0 -6
  67. package/types/fog/EXP2Fog.d.ts +15 -0
  68. package/types/fog/Fog.d.ts +14 -0
  69. package/types/fog/LinearFog.d.ts +22 -0
  70. package/types/fog/index.d.ts +3 -0
  71. package/types/graphic/Buffer.d.ts +5 -12
  72. package/types/graphic/Mesh.d.ts +5 -16
  73. package/types/graphic/Primitive.d.ts +1 -0
  74. package/types/graphic/SubPrimitive.d.ts +9 -0
  75. package/types/index.d.ts +8 -7
  76. package/types/input/InputManager.d.ts +1 -1
  77. package/types/input/interface/IInput.d.ts +1 -1
  78. package/types/lighting/AmbientLight.d.ts +4 -1
  79. package/types/lighting/DirectLight.d.ts +0 -1
  80. package/types/lighting/Light.d.ts +0 -1
  81. package/types/lighting/LightManager.d.ts +1 -0
  82. package/types/lighting/SpotLight.d.ts +0 -1
  83. package/types/material/BaseMaterial.d.ts +8 -10
  84. package/types/material/BlinnPhongMaterial.d.ts +0 -3
  85. package/types/material/Material.d.ts +3 -6
  86. package/types/material/PBRMaterial.d.ts +1 -1
  87. package/types/material/PBRSpecularMaterial.d.ts +1 -1
  88. package/types/material/UnlitMaterial.d.ts +1 -1
  89. package/types/mesh/BlendShape.d.ts +1 -1
  90. package/types/mesh/BlendShapeFrame.d.ts +28 -6
  91. package/types/mesh/MeshRenderer.d.ts +1 -11
  92. package/types/mesh/ModelMesh.d.ts +5 -5
  93. package/types/mesh/PrimitiveMesh.d.ts +4 -2
  94. package/types/mesh/SkinnedMeshRenderer.d.ts +0 -15
  95. package/types/particle/ParticleBufferUtils.d.ts +1 -0
  96. package/types/particle/ParticleGenerator.d.ts +72 -0
  97. package/types/particle/ParticleMaterial.d.ts +28 -0
  98. package/types/particle/ParticleRenderer.d.ts +2 -2
  99. package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
  100. package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
  101. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
  102. package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
  103. package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
  104. package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
  105. package/types/particle/enums/ParticleStopMode.d.ts +6 -0
  106. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
  107. package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
  108. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
  109. package/types/particle/modules/Burst.d.ts +14 -0
  110. package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
  111. package/types/particle/modules/EmissionModule.d.ts +45 -0
  112. package/types/particle/modules/MainModule.d.ts +68 -0
  113. package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
  114. package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
  115. package/types/particle/modules/ParticleCurve.d.ts +56 -0
  116. package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
  117. package/types/particle/modules/ParticleGradient.d.ts +94 -0
  118. package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
  119. package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
  120. package/types/particle/modules/TextureSheetAnimationModule.d.ts +42 -0
  121. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
  122. package/types/particle/modules/shape/BaseShape.d.ts +12 -0
  123. package/types/particle/modules/shape/BoxShape.d.ts +11 -0
  124. package/types/particle/modules/shape/CircleShape.d.ts +17 -0
  125. package/types/particle/modules/shape/ConeShape.d.ts +28 -0
  126. package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
  127. package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
  128. package/types/particle/modules/shape/SphereShape.d.ts +9 -0
  129. package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
  130. package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
  131. package/types/particle/modules/shape/index.d.ts +6 -0
  132. package/types/physics/CharacterController.d.ts +0 -2
  133. package/types/physics/Collider.d.ts +3 -2
  134. package/types/physics/PhysicsManager.d.ts +5 -22
  135. package/types/physics/PhysicsScene.d.ts +6 -2
  136. package/types/physics/joint/HingeJoint.d.ts +2 -2
  137. package/types/physics/joint/Joint.d.ts +3 -4
  138. package/types/physics/joint/SpringJoint.d.ts +3 -2
  139. package/types/physics/shape/BoxColliderShape.d.ts +2 -0
  140. package/types/physics/shape/CapsuleColliderShape.d.ts +2 -0
  141. package/types/physics/shape/ColliderShape.d.ts +4 -1
  142. package/types/physics/shape/PlaneColliderShape.d.ts +1 -0
  143. package/types/physics/shape/SphereColliderShape.d.ts +2 -0
  144. package/types/renderingHardwareInterface/index.d.ts +1 -0
  145. package/types/shader/Shader.d.ts +32 -23
  146. package/types/shader/ShaderData.d.ts +24 -24
  147. package/types/shader/ShaderMacro.d.ts +16 -0
  148. package/types/shader/ShaderPass.d.ts +9 -2
  149. package/types/shader/ShaderProperty.d.ts +7 -0
  150. package/types/shader/enums/RenderStateElementKey.d.ts +58 -0
  151. package/types/shader/index.d.ts +5 -1
  152. package/types/shaderlib/particle/index.d.ts +14 -0
  153. package/types/shadow/CascadedShadowCasterPass.d.ts +0 -1
  154. package/types/shadow/enum/ShadowMode.d.ts +13 -0
  155. package/types/sky/SkyBoxMaterial.d.ts +27 -9
  156. package/types/sky/index.d.ts +1 -0
  157. package/types/texture/RenderTarget.d.ts +2 -6
  158. package/types/texture/Texture.d.ts +8 -6
  159. package/types/texture/Texture2D.d.ts +3 -1
  160. package/types/texture/index.d.ts +1 -0
  161. package/types/trail/TrailRenderer.d.ts +0 -5
  162. package/types/SafeLoopArray.d.ts +0 -37
  163. /package/types/{animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts → RenderPipeline/CullingResults.d.ts} +0 -0
  164. /package/types/{animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts → RenderPipeline/DepthOnlyPass.d.ts} +0 -0
  165. /package/types/{animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts → RenderPipeline/PipelineUtils.d.ts} +0 -0
  166. /package/types/animation/{internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts → AnimatorStatePlayData.d.ts} +0 -0
  167. /package/types/animation/internal/{animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts → AnimatorStateInfo.d.ts} +0 -0
  168. /package/types/animation/internal/{animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts → AnimatorStateMachineData.d.ts} +0 -0
@@ -63,8 +63,8 @@ export declare class PrimitiveMesh {
63
63
  * @param engine - Engine
64
64
  * @param radius - The radius of cap
65
65
  * @param height - The height of torso
66
- * @param radialSegments - Cylinder radial segments
67
- * @param heightSegments - Cylinder height segments
66
+ * @param radialSegments - Cone radial segments
67
+ * @param heightSegments - Cone height segments
68
68
  * @param noLongerAccessible - No longer access the vertices of the mesh after creation
69
69
  * @returns Cone model mesh
70
70
  */
@@ -80,6 +80,8 @@ export declare class PrimitiveMesh {
80
80
  * @returns Capsule model mesh
81
81
  */
82
82
  static createCapsule(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
83
+ static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean): void;
84
+ static _setCapsuleData(capsuleMesh: ModelMesh, radius: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean): void;
83
85
  private static _initialize;
84
86
  private static _generateIndices;
85
87
  private static _createCapsuleCap;
@@ -1,17 +1,14 @@
1
1
  import { BoundingBox } from "@galacean/engine-math";
2
2
  import { Entity } from "../Entity";
3
- import { RenderContext } from "../RenderPipeline/RenderContext";
4
3
  import { MeshRenderer } from "./MeshRenderer";
5
4
  import { Skin } from "./Skin";
6
5
  /**
7
6
  * SkinnedMeshRenderer.
8
7
  */
9
8
  export declare class SkinnedMeshRenderer extends MeshRenderer {
10
- private static _tempMatrix;
11
9
  private static _jointCountProperty;
12
10
  private static _jointSamplerProperty;
13
11
  private static _jointMatrixProperty;
14
- private _supportSkinning;
15
12
  private _hasInitSkin;
16
13
  private _jointDataCreateCache;
17
14
  private _skin;
@@ -43,18 +40,6 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
43
40
  */
44
41
  get rootBone(): Entity;
45
42
  set rootBone(value: Entity);
46
- /**
47
- * @override
48
- */
49
- protected _updateShaderData(context: RenderContext): void;
50
- /**
51
- * @override
52
- */
53
- protected _registerEntityTransformListener(): void;
54
- /**
55
- * @override
56
- */
57
- protected _updateBounds(worldBounds: BoundingBox): void;
58
43
  private _initSkin;
59
44
  private _computeApproximateBindMatrix;
60
45
  private _findByEntityName;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,72 @@
1
+ import { ParticleRenderer } from "./ParticleRenderer";
2
+ import { ParticleStopMode } from "./enums/ParticleStopMode";
3
+ import { ColorOverLifetimeModule } from "./modules/ColorOverLifetimeModule";
4
+ import { EmissionModule } from "./modules/EmissionModule";
5
+ import { MainModule } from "./modules/MainModule";
6
+ import { RotationOverLifetimeModule } from "./modules/RotationOverLifetimeModule";
7
+ import { SizeOverLifetimeModule } from "./modules/SizeOverLifetimeModule";
8
+ import { TextureSheetAnimationModule } from "./modules/TextureSheetAnimationModule";
9
+ import { VelocityOverLifetimeModule } from "./modules/VelocityOverLifetimeModule";
10
+ /**
11
+ * Particle Generator.
12
+ */
13
+ export declare class ParticleGenerator {
14
+ private static readonly _particleIncreaseCount;
15
+ /** Use auto random seed. */
16
+ useAutoRandomSeed: boolean;
17
+ /** Main module. */
18
+ readonly main: MainModule;
19
+ /** Emission module. */
20
+ readonly emission: EmissionModule;
21
+ /** Velocity over lifetime module. */
22
+ readonly velocityOverLifetime: VelocityOverLifetimeModule;
23
+ /** Size over lifetime module. */
24
+ readonly sizeOverLifetime: SizeOverLifetimeModule;
25
+ /** Rotation over lifetime module. */
26
+ readonly rotationOverLifetime: RotationOverLifetimeModule;
27
+ /** Color over lifetime module. */
28
+ readonly colorOverLifetime: ColorOverLifetimeModule;
29
+ /** Texture sheet animation module. */
30
+ readonly textureSheetAnimation: TextureSheetAnimationModule;
31
+ private _isPlaying;
32
+ private _instanceBufferResized;
33
+ private _waitProcessRetiredElementCount;
34
+ private _instanceVertexBufferBinding;
35
+ private _instanceVertices;
36
+ private _randomSeed;
37
+ /**
38
+ * Whether the particle generator is contain alive or is still creating particles.
39
+ */
40
+ get isAlive(): boolean;
41
+ /**
42
+ * Random seed.
43
+ *
44
+ * @remarks
45
+ * If `useAutoRandomSeed` is true, this value will be random changed when play.
46
+ * If you set this value custom, `useAutoRandomSeed` will be false.
47
+ */
48
+ get randomSeed(): number;
49
+ set randomSeed(value: number);
50
+ constructor(renderer: ParticleRenderer);
51
+ /**
52
+ * Start emitting particles.
53
+ * @param withChildren - Whether to start the particle generator of the child entity
54
+ */
55
+ play(withChildren?: boolean): void;
56
+ /**
57
+ * Stop emitting particles.
58
+ * @param withChildren - Whether to stop the particle generator of the child entity
59
+ * @param stopMode - Stop mode
60
+ */
61
+ stop(withChildren?: boolean, stopMode?: ParticleStopMode): void;
62
+ /**
63
+ * Manually emit certain number of particles immediately.
64
+ * @param count - Number of particles to emit
65
+ */
66
+ emit(count: number): void;
67
+ private _addNewParticle;
68
+ private _retireActiveParticles;
69
+ private _freeRetiredParticles;
70
+ private _addActiveParticlesToVertexBuffer;
71
+ private _addVertexBufferBindingsFilterDuplicate;
72
+ }
@@ -0,0 +1,28 @@
1
+ import { Color } from "@galacean/engine-math";
2
+ import { Engine } from "../Engine";
3
+ import { BaseMaterial } from "../material/BaseMaterial";
4
+ import { Texture2D } from "../texture/Texture2D";
5
+ /**
6
+ * Particle Material.
7
+ */
8
+ export declare class ParticleMaterial extends BaseMaterial {
9
+ /**
10
+ * Base color.
11
+ */
12
+ get baseColor(): Color;
13
+ set baseColor(value: Color);
14
+ /**
15
+ * Base texture.
16
+ */
17
+ get baseTexture(): Texture2D;
18
+ set baseTexture(value: Texture2D);
19
+ /**
20
+ * Create a unlit material instance.
21
+ * @param engine - Engine to which the material belongs
22
+ */
23
+ constructor(engine: Engine);
24
+ /**
25
+ * @inheritdoc
26
+ */
27
+ clone(): ParticleMaterial;
28
+ }
@@ -1,6 +1,6 @@
1
- import { Vector3, Color } from "@galacean/engine-math";
2
- import { Texture } from "../texture";
1
+ import { Color, Vector3 } from "@galacean/engine-math";
3
2
  import { MeshRenderer } from "../mesh/MeshRenderer";
3
+ import { Texture } from "../texture";
4
4
  /**
5
5
  * Blend mode enums of the particle renderer's material.
6
6
  */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Particle curve mode.
3
+ */
4
+ export declare enum ParticleCurveMode {
5
+ Constant = 0,
6
+ TwoConstants = 1,
7
+ Curve = 2,
8
+ TwoCurves = 3
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Particle gradient mode.
3
+ */
4
+ export declare enum ParticleGradientMode {
5
+ Constant = 0,
6
+ TwoConstants = 1,
7
+ Gradient = 2,
8
+ TwoGradients = 3
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The rendering mode for particle renderer.
3
+ */
4
+ export declare enum ParticleRenderMode {
5
+ /** Render particles as billboards facing the active camera. */
6
+ Billboard = 0,
7
+ /** Stretch particles in the direction of motion. */
8
+ StretchBillboard = 1,
9
+ /** Render particles as billboards always facing up along the y-Axis. */
10
+ HorizontalBillboard = 2,
11
+ /** Render particles as billboards always facing the player, but not pitching along the x-Axis. */
12
+ VerticalBillboard = 3,
13
+ /** Render particles as meshes. */
14
+ Mesh = 4,
15
+ /** Do not render particles. */
16
+ None = 5
17
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Control how Particle Generator apply transform scale.
3
+ */
4
+ export declare enum ParticleScaleMode {
5
+ /** Scale the Particle Generator using the entire transform hierarchy. */
6
+ Hierarchy = 0,
7
+ /** Scale the Particle Generator using only its own transform scale. (Ignores parent scale). */
8
+ Local = 1,
9
+ /** Only apply transform scale to the shape component, which controls where particles are spawned, but does not affect their size or movement. */
10
+ World = 2
11
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The space to simulate particles in.
3
+ */
4
+ export declare enum ParticleSimulationSpace {
5
+ /** Simulate particles in local space. */
6
+ Local = 0,
7
+ /** Simulate particles in world space. */
8
+ World = 1
9
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum ParticleStopMode {
2
+ /** Stop emitting new particles and clear existing particles immediately. */
3
+ StopEmittingAndClear = 0,
4
+ /** Stop emitting new particles, but keep existing particles until they expire. */
5
+ StopEmitting = 1
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum MeshParticleVertexAttribute {
2
+ MeshPosition = "a_MeshPosition",
3
+ MeshColor = "a_MeshColor",
4
+ MeshTextureCoordinate = "a_MeshTextureCoordinate"
5
+ }
@@ -0,0 +1,14 @@
1
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
2
+ /**
3
+ * A burst is a particle emission event, where a number of particles are all emitted at the same time
4
+ */
5
+ export declare class Burst {
6
+ time: number;
7
+ count: ParticleCompositeCurve;
8
+ /**
9
+ * Create burst object.
10
+ * @param time - Time to emit the burst
11
+ * @param count - Count of particles to emit
12
+ */
13
+ constructor(time: number, count: ParticleCompositeCurve);
14
+ }
@@ -0,0 +1,20 @@
1
+ import { ShaderMacro } from "../../shader/ShaderMacro";
2
+ import { ShaderProperty } from "../../shader/ShaderProperty";
3
+ import { ParticleCompositeGradient } from "./ParticleCompositeGradient";
4
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
5
+ /**
6
+ * Color over lifetime module.
7
+ */
8
+ export declare class ColorOverLifetimeModule extends ParticleGeneratorModule {
9
+ static readonly _gradientMacro: ShaderMacro;
10
+ static readonly _randomGradientsMacro: ShaderMacro;
11
+ static readonly _minGradientColor: ShaderProperty;
12
+ static readonly _minGradientAlpha: ShaderProperty;
13
+ static readonly _maxGradientColor: ShaderProperty;
14
+ static readonly _maxGradientAlpha: ShaderProperty;
15
+ static readonly _gradientKeysCount: ShaderProperty;
16
+ /** Color gradient over lifetime. */
17
+ color: ParticleCompositeGradient;
18
+ private _gradientKeysCount;
19
+ private _colorMacro;
20
+ }
@@ -0,0 +1,45 @@
1
+ import { Burst } from "./Burst";
2
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
3
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
4
+ import { BaseShape } from "./shape/BaseShape";
5
+ /**
6
+ * The EmissionModule of a Particle Generator.
7
+ */
8
+ export declare class EmissionModule extends ParticleGeneratorModule {
9
+ /** The rate of particle emission. */
10
+ rateOverTime: ParticleCompositeCurve;
11
+ /** The rate at which the emitter spawns new particles over distance. */
12
+ rateOverDistance: ParticleCompositeCurve;
13
+ /** The shape of the emitter. */
14
+ shape: BaseShape;
15
+ private _bursts;
16
+ private _frameRateTime;
17
+ private _currentBurstIndex;
18
+ private _burstRand;
19
+ /**
20
+ * Gets the burst array.
21
+ */
22
+ get bursts(): ReadonlyArray<Burst>;
23
+ /**
24
+ * Add a single burst.
25
+ * @param burst - The burst
26
+ */
27
+ addBurst(burst: Burst): void;
28
+ /**
29
+ * Remove a single burst from the array of bursts.
30
+ * @param burst - The burst data
31
+ */
32
+ removeBurst(burst: Burst): void;
33
+ /**
34
+ * Remove a single burst from the array of bursts.
35
+ * @param index - The burst data index
36
+ */
37
+ removeBurstByIndex(index: number): void;
38
+ /**
39
+ * Clear burst data.
40
+ */
41
+ clearBurst(): void;
42
+ private _emitByRateOverTime;
43
+ private _emitByBurst;
44
+ private _emitBySubBurst;
45
+ }
@@ -0,0 +1,68 @@
1
+ import { ICustomClone } from "../../clone/ComponentCloner";
2
+ import { ParticleScaleMode } from "../enums/ParticleScaleMode";
3
+ import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
4
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
5
+ import { ParticleCompositeGradient } from "./ParticleCompositeGradient";
6
+ export declare class MainModule implements ICustomClone {
7
+ private static _tempVector40;
8
+ private static _vector3One;
9
+ private static readonly _positionScale;
10
+ private static readonly _sizeScale;
11
+ private static readonly _worldPosition;
12
+ private static readonly _worldRotation;
13
+ private static readonly _gravity;
14
+ private static readonly _simulationSpace;
15
+ private static readonly _startRotation3D;
16
+ private static readonly _scaleMode;
17
+ /** The duration of the Particle Generator in seconds. */
18
+ duration: number;
19
+ /** Specifies whether the Particle Generator loops. */
20
+ isLoop: boolean;
21
+ /** Start delay in seconds. */
22
+ startDelay: ParticleCompositeCurve;
23
+ /** The initial lifetime of particles when emitted. */
24
+ startLifetime: ParticleCompositeCurve;
25
+ /** The initial speed of particles when the Particle Generator first spawns them. */
26
+ startSpeed: ParticleCompositeCurve;
27
+ /** A flag to enable specifying particle size individually for each axis. */
28
+ startSize3D: boolean;
29
+ /** The initial size of particles when the Particle Generator first spawns them. */
30
+ startSize: ParticleCompositeCurve;
31
+ /** The initial size of particles along the x-axis when the Particle Generator first spawns them. */
32
+ startSizeX: ParticleCompositeCurve;
33
+ /** The initial size of particles along the y-axis when the Particle Generator first spawns them. */
34
+ startSizeY: ParticleCompositeCurve;
35
+ /** The initial size of particles along the z-axis when the Particle Generator first spawns them. */
36
+ startSizeZ: ParticleCompositeCurve;
37
+ /** A flag to enable 3D particle rotation. */
38
+ startRotation3D: boolean;
39
+ /** The initial rotation of particles when the Particle Generator first spawns them. */
40
+ startRotation: ParticleCompositeCurve;
41
+ /** The initial rotation of particles around the x-axis when emitted.*/
42
+ startRotationX: ParticleCompositeCurve;
43
+ /** The initial rotation of particles around the y-axis when emitted. */
44
+ startRotationY: ParticleCompositeCurve;
45
+ startRotationZ: ParticleCompositeCurve;
46
+ /** Makes some particles spin in the opposite direction. */
47
+ flipRotation: number;
48
+ /** The mode of start color */
49
+ startColor: ParticleCompositeGradient;
50
+ /** A scale that this Particle Generator applies to gravity, defined by Physics.gravity. */
51
+ gravityModifier: ParticleCompositeCurve;
52
+ /** This selects the space in which to simulate particles. It can be either world or local space. */
53
+ simulationSpace: ParticleSimulationSpace;
54
+ /** Override the default playback speed of the Particle Generator. */
55
+ simulationSpeed: number;
56
+ /** Control how the Particle Generator applies its Transform component to the particles it emits. */
57
+ scalingMode: ParticleScaleMode;
58
+ /** If set to true, the Particle Generator automatically begins to play on startup. */
59
+ playOnEnabled: boolean;
60
+ private _maxParticles;
61
+ private _generator;
62
+ private _gravity;
63
+ /**
64
+ * Max particles count.
65
+ */
66
+ get maxParticles(): number;
67
+ set maxParticles(value: number);
68
+ }
@@ -0,0 +1,56 @@
1
+ import { ParticleCurveMode } from "../enums/ParticleCurveMode";
2
+ import { ParticleCurve } from "./ParticleCurve";
3
+ /**
4
+ * Particle composite curve.
5
+ */
6
+ export declare class ParticleCompositeCurve {
7
+ /** The curve mode. */
8
+ mode: ParticleCurveMode;
9
+ /** The min constant value used by the curve if mode is set to `TwoConstants`.*/
10
+ constantMin: number;
11
+ /** The max constant value used by the curve if mode is set to `TwoConstants`.*/
12
+ constantMax: number;
13
+ /** The min curve used by the curve if mode is set to `TwoCurves`. */
14
+ curveMin: ParticleCurve;
15
+ /** The max curve used by the curve if mode is set to `TwoCurves`. */
16
+ curveMax: ParticleCurve;
17
+ /**
18
+ * The constant value used by the curve if mode is set to `Constant`.
19
+ */
20
+ get constant(): number;
21
+ set constant(value: number);
22
+ /**
23
+ * The curve used by the curve if mode is set to `Curve`.
24
+ */
25
+ get curve(): ParticleCurve;
26
+ set curve(value: ParticleCurve);
27
+ /**
28
+ * Create a particle curve that generates a constant value.
29
+ * @param constant - The constant value
30
+ */
31
+ constructor(constant: number);
32
+ /**
33
+ * Create a particle curve that can generate values between a minimum constant and a maximum constant.
34
+ * @param constantMin - The min constant value
35
+ * @param constantMax - The max constant value
36
+ */
37
+ constructor(constantMin: number, constantMax: number);
38
+ /**
39
+ * Create a particle composite curve by a curve.
40
+ * @param curve - The curve
41
+ */
42
+ constructor(curve: ParticleCurve);
43
+ /**
44
+ * Create a particle composite curve by min and max curves.
45
+ * @param curveMin - The min curve
46
+ * @param curveMax - The max curve
47
+ */
48
+ constructor(curveMin: ParticleCurve, curveMax: ParticleCurve);
49
+ /**
50
+ * Query the value at the specified time.
51
+ * @param time - Normalized time at which to evaluate the curve, Valid when `mode` is set to `Curve` or `TwoCurves`
52
+ * @param lerpFactor - Lerp factor between two constants or curves, Valid when `mode` is set to `TwoConstants` or `TwoCurves`
53
+ * @returns - The result curve value
54
+ */
55
+ evaluate(time: number, lerpFactor: number): number;
56
+ }
@@ -0,0 +1,55 @@
1
+ import { Color } from "@galacean/engine-math";
2
+ import { ParticleGradientMode } from "../enums/ParticleGradientMode";
3
+ import { ParticleGradient } from "./ParticleGradient";
4
+ /**
5
+ * Particle composite gradient.
6
+ */
7
+ export declare class ParticleCompositeGradient {
8
+ /** The gradient mode. */
9
+ mode: ParticleGradientMode;
10
+ constantMin: Color;
11
+ constantMax: Color;
12
+ /** The min gradient used by the gradient if mode is set to `Gradient`. */
13
+ gradientMin: ParticleGradient;
14
+ /** The max gradient used by the gradient if mode is set to `Gradient`. */
15
+ gradientMax: ParticleGradient;
16
+ /**
17
+ * The constant color used by the gradient if mode is set to `Constant`.
18
+ */
19
+ get constant(): Color;
20
+ set constant(value: Color);
21
+ /**
22
+ * The gradient used by the gradient if mode is set to `Gradient`.
23
+ */
24
+ get gradient(): ParticleGradient;
25
+ set gradient(value: ParticleGradient);
26
+ /**
27
+ * Create a particle gradient that generates a constant color.
28
+ * @param constant - The constant color
29
+ */
30
+ constructor(constant: Color);
31
+ /**
32
+ * Create a particle gradient that can generate color between a minimum constant and a maximum constant.
33
+ * @param constantMin - The min constant color
34
+ * @param constantMax - The max constant color
35
+ */
36
+ constructor(constantMin: Color, constantMax: Color);
37
+ /**
38
+ * Create a particle gradient that generates a color from a gradient.
39
+ * @param gradient - The gradient
40
+ */
41
+ constructor(gradient: ParticleGradient);
42
+ /**
43
+ * Create a particle gradient that can generate color from a minimum gradient and a maximum gradient.
44
+ * @param gradientMin - The min gradient
45
+ *
46
+ */
47
+ constructor(gradientMin: ParticleGradient, gradientMax: ParticleGradient);
48
+ /**
49
+ * Query the color at the specified time.
50
+ * @param time - Normalized time at which to evaluate the gradient, Valid when `mode` is set to `Gradient` or `TwoGradients`
51
+ * @param lerpFactor - Lerp factor between two constants or gradients, Valid when `mode` is set to `TwoConstants` or `TwoGradients`
52
+ * @param out - The result color
53
+ */
54
+ evaluate(time: number, lerpFactor: number, out: Color): void;
55
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Particle curve.
3
+ */
4
+ export declare class ParticleCurve {
5
+ private _keys;
6
+ private _typeArray;
7
+ private _typeArrayDirty;
8
+ /**
9
+ * The keys of the curve.
10
+ */
11
+ get keys(): ReadonlyArray<CurveKey>;
12
+ /**
13
+ * Create a new particle curve.
14
+ * @param keys - The keys of the curve
15
+ */
16
+ constructor(...keys: CurveKey[]);
17
+ /**
18
+ * Add an key to the curve.
19
+ * @param key - The key
20
+ */
21
+ addKey(key: CurveKey): void;
22
+ /**
23
+ * Add an key to the curve.
24
+ * @param time - The key time
25
+ * @param value - The key value
26
+ */
27
+ addKey(time: number, value: number): void;
28
+ /**
29
+ * Remove a key from the curve.
30
+ * @param index - The remove key index
31
+ */
32
+ removeKey(index: number): void;
33
+ /**
34
+ * Set the keys of the curve.
35
+ * @param keys - The keys
36
+ */
37
+ setKeys(keys: CurveKey[]): void;
38
+ private _addKey;
39
+ }
40
+ /**
41
+ * The key of the curve.
42
+ */
43
+ export declare class CurveKey {
44
+ /** The key time. */
45
+ time: number;
46
+ /** The key value. */
47
+ value: number;
48
+ /**
49
+ * Create a new key.
50
+ */
51
+ constructor(
52
+ /** The key time. */
53
+ time: number,
54
+ /** The key value. */
55
+ value: number);
56
+ }
@@ -0,0 +1,12 @@
1
+ import { ShaderData, ShaderMacro } from "../../shader";
2
+ import { ParticleGenerator } from "../ParticleGenerator";
3
+ /**
4
+ * Particle generator module.
5
+ */
6
+ export declare abstract class ParticleGeneratorModule {
7
+ /** Specifies whether the module is enabled or not. */
8
+ enabled: boolean;
9
+ protected _generator: ParticleGenerator;
10
+ constructor(generator: ParticleGenerator);
11
+ protected _enableMacro(shaderData: ShaderData, lastEnableMacro: ShaderMacro, enableMacro: ShaderMacro): ShaderMacro;
12
+ }