@galacean/engine-core 1.1.0-alpha.1 → 1.1.0-alpha.3

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 (148) hide show
  1. package/dist/main.js +334 -206
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +334 -206
  4. package/dist/module.js +334 -206
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/ComponentsManager.d.ts +0 -2
  8. package/types/DisorderedArray.d.ts +6 -1
  9. package/types/RenderPipeline/MeshRenderElement.d.ts +1 -3
  10. package/types/RenderPipeline/RenderElementX.d.ts +12 -0
  11. package/types/RenderPipeline/SpriteElement.d.ts +1 -3
  12. package/types/RenderPipeline/SpriteMaskElement.d.ts +1 -3
  13. package/types/RenderPipeline/TextRenderElement.d.ts +1 -3
  14. package/types/SafeLoopArray.d.ts +37 -0
  15. package/types/Script.d.ts +0 -1
  16. package/types/Ticker.d.ts +30 -0
  17. package/types/Transform.d.ts +1 -0
  18. package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
  19. package/types/asset/Loader.d.ts +1 -1
  20. package/types/asset/ResourceManager.d.ts +8 -0
  21. package/types/graphic/Primitive.d.ts +1 -0
  22. package/types/graphic/PrimitiveVertexBinding.d.ts +1 -0
  23. package/types/graphic/SubPrimitive.d.ts +9 -0
  24. package/types/index.d.ts +1 -1
  25. package/types/particle/ParticleBufferUtils.d.ts +1 -0
  26. package/types/particle/ParticleData.d.ts +1 -0
  27. package/types/particle/ParticleGenerator.d.ts +72 -0
  28. package/types/particle/ParticleMaterial.d.ts +28 -0
  29. package/types/particle/ParticleMesh.d.ts +289 -0
  30. package/types/particle/ParticleShaderDeclaration.d.ts +1 -0
  31. package/types/particle/ParticleShaderMacro.d.ts +1 -0
  32. package/types/particle/ParticleShaderProperty.d.ts +1 -0
  33. package/types/particle/ParticleSystem.d.ts +41 -0
  34. package/types/particle/ParticleVertexElements.d.ts +1 -0
  35. package/types/particle/ParticleVertexUtils.d.ts +1 -0
  36. package/types/particle/enum/ParticleAnimationRowMode.d.ts +9 -0
  37. package/types/particle/enum/ParticleAnimationType.d.ts +9 -0
  38. package/types/particle/enum/ParticleCurveMode.d.ts +13 -0
  39. package/types/particle/enum/ParticleGradientMode.d.ts +13 -0
  40. package/types/particle/enum/ParticleRenderMode.d.ts +17 -0
  41. package/types/particle/enum/ParticleScaleMode.d.ts +11 -0
  42. package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +9 -0
  43. package/types/particle/enum/ParticleShapeType.d.ts +15 -0
  44. package/types/particle/enum/ParticleSimulationSpace.d.ts +9 -0
  45. package/types/particle/enum/index.d.ts +9 -0
  46. package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
  47. package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
  48. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
  49. package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
  50. package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
  51. package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
  52. package/types/particle/enums/ParticleStopMode.d.ts +6 -0
  53. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
  54. package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
  55. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
  56. package/types/particle/module/Burst.d.ts +38 -0
  57. package/types/particle/module/ColorGradient.d.ts +75 -0
  58. package/types/particle/module/ColorOverLifetimeModule.d.ts +20 -0
  59. package/types/particle/module/EmissionModule.d.ts +63 -0
  60. package/types/particle/module/FrameOverTime.d.ts +73 -0
  61. package/types/particle/module/ParticleCurve.d.ts +37 -0
  62. package/types/particle/module/RotationOverLifetimeModule.d.ts +21 -0
  63. package/types/particle/module/RotationVelocityGradient.d.ts +184 -0
  64. package/types/particle/module/SizeGradient.d.ts +151 -0
  65. package/types/particle/module/SizeOverLifetimeModule.d.ts +21 -0
  66. package/types/particle/module/StartFrame.d.ts +46 -0
  67. package/types/particle/module/TextureSheetAnimationModule.d.ts +37 -0
  68. package/types/particle/module/VelocityGradient.d.ts +110 -0
  69. package/types/particle/module/VelocityOverLifetimeModule.d.ts +22 -0
  70. package/types/particle/module/index.d.ts +15 -0
  71. package/types/particle/module/shape/BaseShape.d.ts +26 -0
  72. package/types/particle/module/shape/BoxShape.d.ts +20 -0
  73. package/types/particle/module/shape/CircleShape.d.ts +27 -0
  74. package/types/particle/module/shape/ConeShape.d.ts +35 -0
  75. package/types/particle/module/shape/HemisphereShape.d.ts +23 -0
  76. package/types/particle/module/shape/ShapeUtils.d.ts +1 -0
  77. package/types/particle/module/shape/SphereShape.d.ts +23 -0
  78. package/types/particle/module/shape/index.d.ts +5 -0
  79. package/types/particle/modules/Burst.d.ts +14 -0
  80. package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
  81. package/types/particle/modules/EmissionModule.d.ts +45 -0
  82. package/types/particle/modules/MainModule.d.ts +68 -0
  83. package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
  84. package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
  85. package/types/particle/modules/ParticleCurve.d.ts +56 -0
  86. package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
  87. package/types/particle/modules/ParticleGradient.d.ts +94 -0
  88. package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
  89. package/types/particle/modules/ShapeModule.d.ts +9 -0
  90. package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
  91. package/types/particle/modules/TextureSheetAnimationModule.d.ts +42 -0
  92. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
  93. package/types/particle/modules/shape/BaseShape.d.ts +12 -0
  94. package/types/particle/modules/shape/BoxShape.d.ts +11 -0
  95. package/types/particle/modules/shape/CircleShape.d.ts +17 -0
  96. package/types/particle/modules/shape/ConeShape.d.ts +28 -0
  97. package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
  98. package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
  99. package/types/particle/modules/shape/SphereShape.d.ts +9 -0
  100. package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
  101. package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  102. package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
  103. package/types/particle/modules/shape/index.d.ts +6 -0
  104. package/types/particle/moudules/Burst.d.ts +25 -0
  105. package/types/particle/moudules/Emission.d.ts +47 -0
  106. package/types/particle/moudules/EmissionModule.d.ts +49 -0
  107. package/types/particle/moudules/MainModule.d.ts +59 -0
  108. package/types/particle/moudules/ParticleCurve.d.ts +27 -0
  109. package/types/particle/moudules/ParticleGradient.d.ts +28 -0
  110. package/types/particle/moudules/ShapeModule.d.ts +7 -0
  111. package/types/particle/moudules/shape/BaseShape.d.ts +28 -0
  112. package/types/particle/moudules/shape/BoxShape.d.ts +20 -0
  113. package/types/particle/moudules/shape/CircleShape.d.ts +27 -0
  114. package/types/particle/moudules/shape/ConeShape.d.ts +35 -0
  115. package/types/particle/moudules/shape/HemisphereShape.d.ts +23 -0
  116. package/types/particle/moudules/shape/ShapeUtils.d.ts +1 -0
  117. package/types/particle/moudules/shape/SphereShape.d.ts +23 -0
  118. package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  119. package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +15 -0
  120. package/types/particle/moudules/shape/index.d.ts +5 -0
  121. package/types/physics/PhysicsScene.d.ts +6 -2
  122. package/types/shaderlib/particle/index.d.ts +14 -0
  123. package/types/shadow/PipelinePass.d.ts +16 -0
  124. package/types/utils/BoolUpdateFlag.d.ts +12 -0
  125. package/types/utils/DisorderedArray.d.ts +18 -0
  126. package/types/utils/UpdateFlag.d.ts +20 -0
  127. package/types/utils/UpdateFlagManager.d.ts +1 -0
  128. package/types/utils/Utils.d.ts +31 -0
  129. package/types/xr/XRManager.d.ts +31 -0
  130. package/types/xr/component/XRPoseDriver.d.ts +10 -0
  131. package/types/xr/data/XRCamera.d.ts +6 -0
  132. package/types/xr/data/XRDevice.d.ts +9 -0
  133. package/types/xr/data/XRHandle.d.ts +10 -0
  134. package/types/xr/enum/EnumXRButton.d.ts +5 -0
  135. package/types/xr/enum/EnumXRDevicePhase.d.ts +4 -0
  136. package/types/xr/enum/EnumXRFeature.d.ts +9 -0
  137. package/types/xr/enum/EnumXRInputSource.d.ts +8 -0
  138. package/types/xr/enum/EnumXRMode.d.ts +7 -0
  139. package/types/xr/enum/EnumXRSubsystem.d.ts +4 -0
  140. package/types/xr/enum/EnumXRTrackingMode.d.ts +7 -0
  141. package/types/xr/feature/XRCameraManager.d.ts +21 -0
  142. package/types/xr/feature/XRFeature.d.ts +29 -0
  143. package/types/xr/feature/XRImageTrackManager.d.ts +10 -0
  144. package/types/xr/feature/XRInputManager.d.ts +16 -0
  145. package/types/xr/index.d.ts +18 -0
  146. package/types/xr/provider/XRProvider.d.ts +19 -0
  147. package/types/xr/subsystem/XRInputSubsystem.d.ts +5 -0
  148. package/types/xr/subsystem/XRSubsystem.d.ts +30 -0
@@ -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
+ }
@@ -0,0 +1,94 @@
1
+ import { Color } from "@galacean/engine-math";
2
+ /**
3
+ * Particle gradient.
4
+ */
5
+ export declare class ParticleGradient {
6
+ private _colorKeys;
7
+ private _alphaKeys;
8
+ private _colorTypeArray;
9
+ private _alphaTypeArray;
10
+ private _colorTypeArrayDirty;
11
+ private _alphaTypeArrayDirty;
12
+ /**
13
+ * The color keys of the gradient.
14
+ */
15
+ get colorKeys(): ReadonlyArray<GradientColorKey>;
16
+ /**
17
+ * The alpha keys of the gradient.
18
+ */
19
+ get alphaKeys(): ReadonlyArray<GradientAlphaKey>;
20
+ /**
21
+ * Create a new particle gradient.
22
+ * @param colorKeys - The color keys of the gradient
23
+ * @param alphaKeys - The alpha keys of the gradient
24
+ */
25
+ constructor(colorKeys?: GradientColorKey[], alphaKeys?: GradientAlphaKey[]);
26
+ /**
27
+ * Add a color key to the gradient.
28
+ * @param key - The key
29
+ */
30
+ addColorKey(key: GradientColorKey): void;
31
+ /**
32
+ * Add a color key to the gradient.
33
+ * @param time - The key time
34
+ * @param color - The key color
35
+ */
36
+ addColorKey(time: number, color: Color): void;
37
+ /**
38
+ * Add an alpha key to the gradient.
39
+ * @param key - The key
40
+ */
41
+ addAlphaKey(key: GradientAlphaKey): void;
42
+ /**
43
+ * Add an alpha key to the gradient.
44
+ * @param time - The key time
45
+ * @param alpha - The key alpha
46
+ */
47
+ addAlphaKey(time: number, alpha: number): void;
48
+ /**
49
+ * Remove a color key from the gradient.
50
+ * @param index - The remove color key index
51
+ */
52
+ removeColorKey(index: number): void;
53
+ /**
54
+ * Remove an alpha key from the gradient.
55
+ * @param index - The remove alpha key index
56
+ */
57
+ removeAlphaKey(index: number): void;
58
+ /**
59
+ * Set the keys of the gradient.
60
+ * @param colorKeys - The color keys
61
+ * @param alphaKeys - The alpha keys
62
+ */
63
+ setKeys(colorKeys: GradientColorKey[], alphaKeys: GradientAlphaKey[]): void;
64
+ private _addKey;
65
+ private _removeKey;
66
+ }
67
+ /**
68
+ * The color key of the particle gradient.
69
+ */
70
+ export declare class GradientColorKey {
71
+ /** The key time. */
72
+ time: number;
73
+ /** The key color. */
74
+ color: Color;
75
+ constructor(
76
+ /** The key time. */
77
+ time: number,
78
+ /** The key color. */
79
+ color: Color);
80
+ }
81
+ /**
82
+ * The alpha key of the particle gradient.
83
+ */
84
+ export declare class GradientAlphaKey {
85
+ /** The key time. */
86
+ time: number;
87
+ /** The key alpha. */
88
+ alpha: number;
89
+ constructor(
90
+ /** The key time. */
91
+ time: number,
92
+ /** The key alpha. */
93
+ alpha: number);
94
+ }
@@ -0,0 +1,34 @@
1
+ import { ShaderMacro } from "../../shader/ShaderMacro";
2
+ import { ShaderProperty } from "../../shader/ShaderProperty";
3
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
4
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
5
+ /**
6
+ * Rotate particles throughout their lifetime.
7
+ */
8
+ export declare class RotationOverLifetimeModule extends ParticleGeneratorModule {
9
+ static readonly _constantModeMacro: ShaderMacro;
10
+ static readonly _curveModeMacro: ShaderMacro;
11
+ static readonly _isSeparateMacro: ShaderMacro;
12
+ static readonly _isRandomTwoMacro: ShaderMacro;
13
+ static readonly _minConstantProperty: ShaderProperty;
14
+ static readonly _minCurveXProperty: ShaderProperty;
15
+ static readonly _minCurveYProperty: ShaderProperty;
16
+ static readonly _minCurveZProperty: ShaderProperty;
17
+ static readonly _maxConstantProperty: ShaderProperty;
18
+ static readonly _maxCurveXProperty: ShaderProperty;
19
+ static readonly _maxCurveYProperty: ShaderProperty;
20
+ static readonly _maxCurveZProperty: ShaderProperty;
21
+ /** Specifies whether the rotation is separate on each axis, when disabled only z axis is used. */
22
+ separateAxes: boolean;
23
+ /** Rotation over lifetime for z axis. */
24
+ rotationX: ParticleCompositeCurve;
25
+ /** Rotation over lifetime for z axis. */
26
+ rotationY: ParticleCompositeCurve;
27
+ /** Rotation over lifetime for z axis. */
28
+ rotationZ: ParticleCompositeCurve;
29
+ private _rotationMinConstant;
30
+ private _rotationMaxConstant;
31
+ private _enableSeparateMacro;
32
+ private _isCurveMacro;
33
+ private _isRandomTwoMacro;
34
+ }
@@ -0,0 +1,9 @@
1
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
2
+ import { BaseShape } from "./shape/BaseShape";
3
+ /**
4
+ * Shape module of `ParticleGenerator`.
5
+ */
6
+ export declare class ShapeModule extends ParticleGeneratorModule {
7
+ /** The shape of the emitter. */
8
+ shape: BaseShape;
9
+ }
@@ -0,0 +1,34 @@
1
+ import { ShaderMacro } from "../../shader/ShaderMacro";
2
+ import { ShaderProperty } from "../../shader/ShaderProperty";
3
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
4
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
5
+ /**
6
+ * Size over lifetime module.
7
+ */
8
+ export declare class SizeOverLifetimeModule extends ParticleGeneratorModule {
9
+ static readonly _curveModeMacro: ShaderMacro;
10
+ static readonly _isSeparateMacro: ShaderMacro;
11
+ static readonly _isRandomTwoMacro: ShaderMacro;
12
+ static readonly _minCurveXProperty: ShaderProperty;
13
+ static readonly _minCurveYProperty: ShaderProperty;
14
+ static readonly _minCurveZProperty: ShaderProperty;
15
+ static readonly _maxCurveXProperty: ShaderProperty;
16
+ static readonly _maxCurveYProperty: ShaderProperty;
17
+ static readonly _maxCurveZProperty: ShaderProperty;
18
+ /** Specifies whether the Size is separate on each axis. */
19
+ separateAxes: boolean;
20
+ /** Size curve over lifetime for x axis. */
21
+ sizeX: ParticleCompositeCurve;
22
+ /** Size curve over lifetime for y axis. */
23
+ sizeY: ParticleCompositeCurve;
24
+ /** Size curve over lifetime for z axis. */
25
+ sizeZ: ParticleCompositeCurve;
26
+ private _enableSeparateMacro;
27
+ private _isCurveMacro;
28
+ private _isRandomTwoMacro;
29
+ /**
30
+ * Size curve over lifetime.
31
+ */
32
+ get size(): ParticleCompositeCurve;
33
+ set size(value: ParticleCompositeCurve);
34
+ }
@@ -0,0 +1,42 @@
1
+ import { Vector2 } from "@galacean/engine-math";
2
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
3
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
4
+ /**
5
+ * Texture sheet animation module.
6
+ */
7
+ export declare class TextureSheetAnimationModule extends ParticleGeneratorModule {
8
+ private static readonly _frameCurveMacro;
9
+ private static readonly _frameRandomCurvesMacro;
10
+ private static readonly _cycleCountProperty;
11
+ private static readonly _tillingParamsProperty;
12
+ private static readonly _frameMinCurveProperty;
13
+ private static readonly _frameMaxCurveProperty;
14
+ /** Start frame of the texture sheet. */
15
+ readonly startFrame: ParticleCompositeCurve;
16
+ /** Frame over time curve of the texture sheet. */
17
+ readonly frameOverTime: ParticleCompositeCurve;
18
+ /** Texture sheet animation type. */
19
+ type: TextureSheetAnimationType;
20
+ /** Cycle count. */
21
+ cycleCount: number;
22
+ private _tiling;
23
+ private _textureSheetMacro;
24
+ /**
25
+ * Tiling of the texture sheet.
26
+ * */
27
+ get tiling(): Vector2;
28
+ set tiling(value: Vector2);
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ cloneTo(dest: TextureSheetAnimationModule): void;
33
+ }
34
+ /**
35
+ * Texture sheet animation type.
36
+ */
37
+ export declare enum TextureSheetAnimationType {
38
+ /** Animate over the whole texture sheet from left to right, top to bottom. */
39
+ WholeSheet = 0,
40
+ /** Animate a single row in the sheet from left to right. */
41
+ SingleRow = 1
42
+ }
@@ -0,0 +1,34 @@
1
+ import { ShaderMacro } from "../../shader";
2
+ import { ShaderProperty } from "../../shader/ShaderProperty";
3
+ import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
4
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
5
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
6
+ /**
7
+ * Velocity over lifetime module.
8
+ */
9
+ export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule {
10
+ static readonly _constantMacro: ShaderMacro;
11
+ static readonly _curveMacro: ShaderMacro;
12
+ static readonly _randomConstantMacro: ShaderMacro;
13
+ static readonly _randomCurveMacro: ShaderMacro;
14
+ static readonly _minConstantProperty: ShaderProperty;
15
+ static readonly _maxConstantProperty: ShaderProperty;
16
+ static readonly _minGradientXProperty: ShaderProperty;
17
+ static readonly _minGradientYProperty: ShaderProperty;
18
+ static readonly _minGradientZProperty: ShaderProperty;
19
+ static readonly _maxGradientXProperty: ShaderProperty;
20
+ static readonly _maxGradientYProperty: ShaderProperty;
21
+ static readonly _maxGradientZProperty: ShaderProperty;
22
+ static readonly _spaceProperty: ShaderProperty;
23
+ /** Velocity over lifetime for x axis. */
24
+ velocityX: ParticleCompositeCurve;
25
+ /** Velocity over lifetime for z axis. */
26
+ velocityY: ParticleCompositeCurve;
27
+ /** Velocity over lifetime for z axis. */
28
+ velocityZ: ParticleCompositeCurve;
29
+ /** Velocity space. */
30
+ space: ParticleSimulationSpace;
31
+ private _velocityMinConstant;
32
+ private _velocityMaxConstant;
33
+ private _velocityMacro;
34
+ }
@@ -0,0 +1,12 @@
1
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
2
+ /**
3
+ * Base class for all particle shapes.
4
+ */
5
+ export declare abstract class BaseShape {
6
+ /** The type of shape to emit particles from. */
7
+ shapeType: ParticleShapeType;
8
+ /** Specifies whether the ShapeModule is enabled or disabled. */
9
+ enable: boolean;
10
+ /** Randomizes the starting direction of particles. */
11
+ randomDirectionAmount: number;
12
+ }
@@ -0,0 +1,11 @@
1
+ import { Vector3 } from "@galacean/engine-math";
2
+ import { BaseShape } from "./BaseShape";
3
+ /**
4
+ * Particle shape that emits particles from a box.
5
+ */
6
+ export declare class BoxShape extends BaseShape {
7
+ private static _tempVector30;
8
+ /** The size of the box. */
9
+ size: Vector3;
10
+ constructor();
11
+ }
@@ -0,0 +1,17 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ import { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
3
+ /**
4
+ * Particle shape that emits particles from a circle.
5
+ */
6
+ export declare class CircleShape extends BaseShape {
7
+ private static _tempPositionPoint;
8
+ /** Radius of the shape to emit particles from. */
9
+ radius: number;
10
+ /** Angle of the circle arc to emit particles from. */
11
+ arc: number;
12
+ /** The mode to generate particles around the arc. */
13
+ arcMode: ParticleShapeArcMode;
14
+ /** The speed of complete 360 degree rotation. */
15
+ arcSpeed: number;
16
+ constructor();
17
+ }
@@ -0,0 +1,28 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ /**
3
+ * Cone shape.
4
+ */
5
+ export declare class ConeShape extends BaseShape {
6
+ private static _tempVector20;
7
+ private static _tempVector21;
8
+ private static _tempVector30;
9
+ private static _tempVector31;
10
+ /** Angle of the cone to emit particles from. */
11
+ angle: number;
12
+ /** Radius of the shape to emit particles from. */
13
+ radius: number;
14
+ /** Length of the cone to emit particles from. */
15
+ length: number;
16
+ /** Cone emitter type. */
17
+ emitType: ConeEmitType;
18
+ constructor();
19
+ }
20
+ /**
21
+ * Cone emitter type.
22
+ */
23
+ export declare enum ConeEmitType {
24
+ /** Emit particles from the base of the cone. */
25
+ Base = 0,
26
+ /** Emit particles from the volume of the cone. */
27
+ Volume = 1
28
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ /**
3
+ * Particle shape that emits particles from a hemisphere.
4
+ */
5
+ export declare class HemisphereShape extends BaseShape {
6
+ /** Radius of the shape to emit particles from. */
7
+ radius: number;
8
+ constructor();
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ /**
3
+ * Particle shape that emits particles from a sphere.
4
+ */
5
+ export declare class SphereShape extends BaseShape {
6
+ /** Radius of the shape to emit particles from. */
7
+ radius: number;
8
+ constructor();
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Particle shape multi mode value.
3
+ */
4
+ export declare enum ParticleShapeArcMode {
5
+ /** Generate points randomly. */
6
+ Random = 0,
7
+ /** Animate the emission point around the shape. */
8
+ Loop = 1
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The mode used to generate new points in a shape.
3
+ */
4
+ export declare enum ParticleShapeMultiModeValue {
5
+ /** Generate points randomly. (Default) */
6
+ Random = 0,
7
+ /** Animate the emission point around the shape. */
8
+ Loop = 1
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The emission shape.
3
+ */
4
+ export declare enum ParticleShapeType {
5
+ /** Emit from the volume of a box. */
6
+ Box = 0,
7
+ /** Emit from a circle. */
8
+ Circle = 1,
9
+ /** Emit from the base of a cone. */
10
+ Cone = 2,
11
+ /** Emit from a half-sphere. */
12
+ Hemisphere = 3,
13
+ /** Emit from a sphere. */
14
+ Sphere = 4
15
+ }
@@ -0,0 +1,6 @@
1
+ export { BoxShape } from "./BoxShape";
2
+ export { CircleShape } from "./CircleShape";
3
+ export { ConeShape, ConeEmitType } from "./ConeShape";
4
+ export { HemisphereShape } from "./HemisphereShape";
5
+ export { SphereShape } from "./SphereShape";
6
+ export { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
@@ -0,0 +1,25 @@
1
+ import { IClone } from "@galacean/engine-design";
2
+ import { ParticleCurve } from "./ParticleCurve";
3
+ /**
4
+ * A burst is a particle emission event, where a number of particles are all emitted at the same time
5
+ */
6
+ export declare class Burst implements IClone {
7
+ time: number;
8
+ count: ParticleCurve;
9
+ /**
10
+ * Create burst object.
11
+ * @param time - Time to emit the burst
12
+ * @param count - Count of particles to emit
13
+ */
14
+ constructor(time: number, count: ParticleCurve);
15
+ /**
16
+ * clone to
17
+ * @param destBurst - The dest
18
+ */
19
+ cloneTo(destBurst: Burst): void;
20
+ /**
21
+ * clone
22
+ * @return The copy
23
+ */
24
+ clone(): Burst;
25
+ }
@@ -0,0 +1,47 @@
1
+ import { IClone } from "@galacean/engine-design";
2
+ import { Burst } from "./Burst";
3
+ import { ParticleCurve } from "./ParticleCurve";
4
+ /**
5
+ * The EmissionModule of a Particle System.
6
+ */
7
+ export declare class EmissionModule implements IClone {
8
+ /** Specifies whether the EmissionModule is enabled or disabled. */
9
+ enable: boolean;
10
+ /** The rate of particle emission. */
11
+ rateOverTime: ParticleCurve;
12
+ /** The rate at which the emitter spawns new particles over distance. */
13
+ rateOverDistance: ParticleCurve;
14
+ private _bursts;
15
+ /**
16
+ * Gets the burst array.
17
+ */
18
+ get bursts(): ReadonlyArray<Burst>;
19
+ constructor();
20
+ /**
21
+ * Add a single burst.
22
+ * @param burst - The burst
23
+ */
24
+ addBurst(burst: Burst): void;
25
+ /**
26
+ * Remove a single burst from the array of bursts.
27
+ * @param burst - The burst data
28
+ */
29
+ removeBurst(burst: Burst): void;
30
+ /**
31
+ * Remove a single burst from the array of bursts.
32
+ * @param index - The burst data index
33
+ */
34
+ removeBurstByIndex(index: number): void;
35
+ /**
36
+ * Clear burst data.
37
+ */
38
+ clearBurst(): void;
39
+ /**
40
+ * @override
41
+ */
42
+ cloneTo(destEmission: EmissionModule): void;
43
+ /**
44
+ * @override
45
+ */
46
+ clone(): EmissionModule;
47
+ }
@@ -0,0 +1,49 @@
1
+ import { ParticleSystem } from "../ParticleSystem";
2
+ import { Burst } from "./Burst";
3
+ import { ParticleCurve } from "./ParticleCurve";
4
+ /**
5
+ * The EmissionModule of a Particle System.
6
+ */
7
+ export declare class EmissionModule {
8
+ /** Specifies whether the EmissionModule is enabled or disabled. */
9
+ enabled: boolean;
10
+ /** The rate of particle emission. */
11
+ rateOverTime: ParticleCurve;
12
+ /** The rate at which the emitter spawns new particles over distance. */
13
+ rateOverDistance: ParticleCurve;
14
+ private _bursts;
15
+ private _frameRateTime;
16
+ private _currentBurstIndex;
17
+ private _particleSystem;
18
+ /**
19
+ * Gets the burst array.
20
+ */
21
+ get bursts(): ReadonlyArray<Burst>;
22
+ constructor(particleSystem: ParticleSystem);
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
+ /**
43
+ * @override
44
+ */
45
+ cloneTo(destEmission: EmissionModule): void;
46
+ private _emitByRateOverTime;
47
+ private _emitByBurst;
48
+ private _emitBySubBurst;
49
+ }
@@ -0,0 +1,59 @@
1
+ import { ParticleSystem } from "../ParticleSystem";
2
+ import { ParticleScaleMode } from "../enums/ParticleScaleMode";
3
+ import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
4
+ import { ParticleCurve } from "./ParticleCurve";
5
+ import { ParticleGradient } from "./ParticleGradient";
6
+ export declare class MainModule {
7
+ /** The duration of the Particle System in seconds. */
8
+ duration: number;
9
+ /** Specifies whether the Particle System is looping. */
10
+ loop: boolean;
11
+ /** Start delay in seconds. */
12
+ startDelay: ParticleCurve;
13
+ /** The initial lifetime of particles when emitted. */
14
+ startLifetime: ParticleCurve;
15
+ /** The initial speed of particles when the Particle System first spawns them. */
16
+ startSpeed: ParticleCurve;
17
+ /** A flag to enable specifying particle size individually for each axis. */
18
+ startSize3D: boolean;
19
+ /** The initial size of particles when the Particle System first spawns them. */
20
+ startSize: ParticleCurve;
21
+ /** The initial size of particles along the x-axis when the Particle System first spawns them. */
22
+ startSizeX: ParticleCurve;
23
+ /** The initial size of particles along the y-axis when the Particle System first spawns them. */
24
+ startSizeY: ParticleCurve;
25
+ /** The initial size of particles along the z-axis when the Particle System first spawns them. */
26
+ startSizeZ: ParticleCurve;
27
+ /** A flag to enable 3D particle rotation. */
28
+ startRotation3D: boolean;
29
+ /** The initial rotation of particles when the Particle System first spawns them. */
30
+ startRotation: ParticleCurve;
31
+ /** The initial rotation of particles around the x-axis when emitted.*/
32
+ startRotationX: ParticleCurve;
33
+ /** The initial rotation of particles around the y-axis when emitted. */
34
+ startRotationY: ParticleCurve;
35
+ /** The initial rotation of particles around the z-axis when emitted. */
36
+ startRotationZ: ParticleCurve;
37
+ /** Makes some particles spin in the opposite direction. */
38
+ flipRotation: number;
39
+ /** The mode of start color */
40
+ startColor: ParticleGradient;
41
+ /** A scale that this Particle System applies to gravity, defined by Physics.gravity. */
42
+ gravityModifier: ParticleCurve;
43
+ /** This selects the space in which to simulate particles. It can be either world or local space. */
44
+ simulationSpace: ParticleSimulationSpace;
45
+ /** Override the default playback speed of the Particle System. */
46
+ simulationSpeed: number;
47
+ /** Control how the Particle System applies its Transform component to the particles it emits. */
48
+ scalingMode: ParticleScaleMode;
49
+ /** If set to true, the Particle System automatically begins to play on startup. */
50
+ playOnAwake: boolean;
51
+ private _bufferMaxParticles;
52
+ private _particleSystem;
53
+ /**
54
+ * Max particles count.
55
+ */
56
+ get maxParticles(): number;
57
+ set maxParticles(value: number);
58
+ constructor(particleSystem: ParticleSystem);
59
+ }