@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,37 @@
1
+ import { FrameOverTime } from "./FrameOverTime";
2
+ import { StartFrame } from "./StartFrame";
3
+ import { IClone } from "@galacean/engine-design";
4
+ import { ParticleAnimationRowMode, ParticleAnimationType } from "../enum";
5
+ /**
6
+ * This module allows you to add animations to your particle textures.
7
+ */
8
+ export declare class TextureSheetAnimationModule implements IClone {
9
+ /** Specifies the animation type.*/
10
+ animation: ParticleAnimationType;
11
+ /** Specifies how many times the animation loops during the lifetime of the particle. */
12
+ cyclesCount: number;
13
+ /** Specifies whether the TextureSheetAnimationModule is enabled or disabled. */
14
+ enable: boolean;
15
+ /** A curve to control which frame of the Texture sheet animation to play. */
16
+ frameOverTime: FrameOverTime;
17
+ /** Defines the tiling of the Texture in the x-axis. */
18
+ numTilesX: number;
19
+ /** Defines the tiling of the texture in the y-axis. */
20
+ numTilesY: number;
21
+ /** Explicitly select which row of the Texture sheet to use. */
22
+ rowIndex: number;
23
+ /** Select how particles choose which row of a Texture Sheet Animation to use. */
24
+ rowMode: ParticleAnimationRowMode;
25
+ /** Define a random starting frame for the Texture sheet animation. */
26
+ startFrame: StartFrame;
27
+ /**
28
+ * @override
29
+ * @inheritDoc
30
+ */
31
+ cloneTo(destTextureSheetAnimation: TextureSheetAnimationModule): void;
32
+ /**
33
+ * @override
34
+ * @inheritDoc
35
+ */
36
+ clone(): TextureSheetAnimationModule;
37
+ }
@@ -0,0 +1,110 @@
1
+ import { ParticleCurve } from "./ParticleCurve";
2
+ import { IClone } from "@galacean/engine-design";
3
+ import { Vector3 } from "@galacean/engine-math";
4
+ import { ParticleCurveMode } from "../enum";
5
+ /**
6
+ * Curve to control particle speed based on lifetime
7
+ */
8
+ export declare class VelocityGradient implements IClone {
9
+ /**
10
+ * A single constant value for the entire curve.
11
+ * @param constant - Constant value.
12
+ */
13
+ static createByConstant(constant: Vector3): VelocityGradient;
14
+ /**
15
+ * Use one curve when evaluating numbers along this Min-Max curve.
16
+ * @param gradientX - A single curve to evaluate against on X.
17
+ * @param gradientY - A single curve to evaluate against on Y.
18
+ * @param gradientZ - A single curve to evaluate against on Z.
19
+ */
20
+ static createByGradient(gradientX: ParticleCurve, gradientY: ParticleCurve, gradientZ: ParticleCurve): VelocityGradient;
21
+ /**
22
+ * Randomly select values based on the interval between the minimum and maximum constants.
23
+ * @param constantMin - The constant describing the minimum values to be evaluated.
24
+ * @param constantMax - The constant describing the maximum values to be evaluated.
25
+ */
26
+ static createByRandomTwoConstant(constantMin: Vector3, constantMax: Vector3): VelocityGradient;
27
+ /**
28
+ * Randomly select values based on the interval between the minimum and maximum curves.
29
+ * @param gradientXMin - The curve describing the minimum values to be evaluated on X.
30
+ * @param gradientXMax - The curve describing the maximum values to be evaluated on X.
31
+ * @param gradientYMin - The curve describing the minimum values to be evaluated on Y.
32
+ * @param gradientYMax - The curve describing the maximum values to be evaluated on Y.
33
+ * @param gradientZMin - The curve describing the minimum values to be evaluated on Z.
34
+ * @param gradientZMax - The curve describing the maximum values to be evaluated on Z.
35
+ */
36
+ static createByRandomTwoGradient(gradientXMin: ParticleCurve, gradientXMax: ParticleCurve, gradientYMin: ParticleCurve, gradientYMax: ParticleCurve, gradientZMin: ParticleCurve, gradientZMax: ParticleCurve): VelocityGradient;
37
+ private _mode;
38
+ private _constant;
39
+ private _constantMin;
40
+ private _constantMax;
41
+ private _gradientX;
42
+ private _gradientY;
43
+ private _gradientZ;
44
+ private _gradientXMin;
45
+ private _gradientYMin;
46
+ private _gradientZMin;
47
+ private _gradientXMax;
48
+ private _gradientYMax;
49
+ private _gradientZMax;
50
+ /**
51
+ * The mode that the min-max curve uses to evaluate values.
52
+ */
53
+ get mode(): ParticleCurveMode;
54
+ /**
55
+ * The constant value.
56
+ */
57
+ get constant(): Vector3;
58
+ /**
59
+ * The curve on X.
60
+ */
61
+ get gradientX(): ParticleCurve;
62
+ /**
63
+ * The curve on Y.
64
+ */
65
+ get gradientY(): ParticleCurve;
66
+ /**
67
+ * The curve on Z.
68
+ */
69
+ get gradientZ(): ParticleCurve;
70
+ /**
71
+ * The constant for the lower bound.
72
+ */
73
+ get constantMin(): Vector3;
74
+ /**
75
+ * The constant for the upper bound.
76
+ */
77
+ get constantMax(): Vector3;
78
+ /**
79
+ * The curve for the lower bound on X.
80
+ */
81
+ get gradientXMin(): ParticleCurve;
82
+ /**
83
+ * The curve for the upper bound on X.
84
+ */
85
+ get gradientXMax(): ParticleCurve;
86
+ /**
87
+ * The curve for the lower bound on Y.
88
+ */
89
+ get gradientYMin(): ParticleCurve;
90
+ /**
91
+ * The curve for the upper bound on Y.
92
+ */
93
+ get gradientYMax(): ParticleCurve;
94
+ /**
95
+ * The curve for the lower bound on Z.
96
+ */
97
+ get gradientZMin(): ParticleCurve;
98
+ /**
99
+ * The curve for the upper bound on Z.
100
+ */
101
+ get gradientZMax(): ParticleCurve;
102
+ /**
103
+ * @override
104
+ */
105
+ cloneTo(destGradientVelocity: VelocityGradient): void;
106
+ /**
107
+ * @override
108
+ */
109
+ clone(): VelocityGradient;
110
+ }
@@ -0,0 +1,22 @@
1
+ import { VelocityGradient } from "./VelocityGradient";
2
+ import { IClone } from "@galacean/engine-design";
3
+ import { ParticleSimulationSpace } from "../enum";
4
+ /**
5
+ * This module sets the velocity of particles during their lifetime.
6
+ */
7
+ export declare class VelocityOverLifetimeModule implements IClone {
8
+ /** Get Gradient Velocity。 */
9
+ velocity: VelocityGradient;
10
+ /** Specifies whether the VelocityOverLifetimeModule is enabled or disabled. */
11
+ enable: boolean;
12
+ /** Specifies if the velocities are in local space (rotated with the transform) or world space. */
13
+ space: ParticleSimulationSpace;
14
+ /**
15
+ * @override
16
+ */
17
+ cloneTo(destVelocityOverLifetime: VelocityOverLifetimeModule): void;
18
+ /**
19
+ * @override
20
+ */
21
+ clone(): VelocityOverLifetimeModule;
22
+ }
@@ -0,0 +1,15 @@
1
+ export * from "./shape";
2
+ export { Burst } from "./Burst";
3
+ export { EmissionModule } from "./EmissionModule";
4
+ export { ColorGradient } from "./ColorGradient";
5
+ export { ColorOverLifetimeModule } from "./ColorOverLifetimeModule";
6
+ export { ParticleCurve } from "./ParticleCurve";
7
+ export { VelocityGradient } from "./VelocityGradient";
8
+ export { VelocityOverLifetimeModule } from "./VelocityOverLifetimeModule";
9
+ export { RotationVelocityGradient } from "./RotationVelocityGradient";
10
+ export { RotationOverLifetimeModule } from "./RotationOverLifetimeModule";
11
+ export { SizeGradient } from "./SizeGradient";
12
+ export { SizeOverLifetimeModule } from "./SizeOverLifetimeModule";
13
+ export { StartFrame } from "./StartFrame";
14
+ export { FrameOverTime } from "./FrameOverTime";
15
+ export { TextureSheetAnimationModule } from "./TextureSheetAnimationModule";
@@ -0,0 +1,26 @@
1
+ import { IClone } from "@galacean/engine-design";
2
+ import { BoundingBox } from "@galacean/engine-math";
3
+ import { ParticleShapeType } from "../../enum/ParticleShapeType";
4
+ /**
5
+ * Configures the initial positions and directions of particles.
6
+ */
7
+ export declare class BaseShape implements IClone {
8
+ /** The type of shape to emit particles from. */
9
+ shapeType: ParticleShapeType;
10
+ /** Specifies whether the ShapeModule is enabled or disabled. */
11
+ enable: boolean;
12
+ /** Randomizes the starting direction of particles. */
13
+ randomDirectionAmount: number;
14
+ /**
15
+ * @override
16
+ * @inheritDoc
17
+ */
18
+ cloneTo(destShape: BaseShape): void;
19
+ /**
20
+ * @override
21
+ * @inheritDoc
22
+ */
23
+ clone(): BaseShape;
24
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
25
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
26
+ }
@@ -0,0 +1,20 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ import { BoundingBox, Vector3 } from "@galacean/engine-math";
3
+ /**
4
+ * Box emitter shape
5
+ */
6
+ export declare class BoxShape extends BaseShape {
7
+ /** Thickness of the box to emit particles from. */
8
+ boxThickness: Vector3;
9
+ constructor();
10
+ /**
11
+ * @inheritDoc
12
+ */
13
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
18
+ cloneTo(destShape: BoxShape): void;
19
+ clone(): BoxShape;
20
+ }
@@ -0,0 +1,27 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ import { BoundingBox, Rand, Vector2, Vector3 } from "@galacean/engine-math";
3
+ import { ParticleShapeMultiModeValue } from "../../enum";
4
+ /**
5
+ * Circle Particle Emitter
6
+ */
7
+ export declare class CircleShape extends BaseShape {
8
+ protected static _tempPositionPoint: Vector2;
9
+ /** Radius of the shape to emit particles from. */
10
+ radius: number;
11
+ /** Angle of the circle arc to emit particles from. */
12
+ arc: number;
13
+ /** The mode to generate particles around the arc. */
14
+ arcMode: ParticleShapeMultiModeValue;
15
+ constructor();
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
24
+ _generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
25
+ cloneTo(destShape: CircleShape): void;
26
+ clone(): CircleShape;
27
+ }
@@ -0,0 +1,35 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ import { BoundingBox, Rand, Vector2, Vector3 } from "@galacean/engine-math";
3
+ export declare enum ConeEmitType {
4
+ Base = 0,
5
+ BaseShell = 1,
6
+ Volume = 2,
7
+ VolumeShell = 3
8
+ }
9
+ /**
10
+ * Cone particle emitter
11
+ */
12
+ export declare class ConeShape extends BaseShape {
13
+ protected static _tempPositionPoint: Vector2;
14
+ protected static _tempDirectionPoint: Vector2;
15
+ /** Angle of the cone to emit particles from. */
16
+ angle: number;
17
+ /** Radius of the shape to emit particles from. */
18
+ radius: number;
19
+ /** Length of the cone to emit particles from. */
20
+ length: number;
21
+ /** Cone emitter subtype */
22
+ emitType: ConeEmitType;
23
+ constructor();
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
32
+ _generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
33
+ cloneTo(destShape: ConeShape): void;
34
+ clone(): ConeShape;
35
+ }
@@ -0,0 +1,23 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ import { BoundingBox, Rand, Vector3 } from "@galacean/engine-math";
3
+ /**
4
+ * Hemisphere emitter
5
+ */
6
+ export declare class HemisphereShape extends BaseShape {
7
+ /** Radius of the shape to emit particles from. */
8
+ radius: number;
9
+ /** Whether emit from shell */
10
+ emitFromShell: boolean;
11
+ constructor();
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
20
+ _generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
21
+ cloneTo(destShape: HemisphereShape): void;
22
+ clone(): HemisphereShape;
23
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { BaseShape } from "./BaseShape";
2
+ import { BoundingBox, Rand, Vector3 } from "@galacean/engine-math";
3
+ /**
4
+ * Sphere emitter
5
+ */
6
+ export declare class SphereShape extends BaseShape {
7
+ /** Radius of the shape to emit particles from. */
8
+ radius: number;
9
+ /** Whether emit from shell */
10
+ emitFromShell: boolean;
11
+ constructor();
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ protected _getShapeBoundBox(boundBox: BoundingBox): void;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ protected _getSpeedBoundBox(boundBox: BoundingBox): void;
20
+ _generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
21
+ cloneTo(destShape: SphereShape): void;
22
+ clone(): SphereShape;
23
+ }
@@ -0,0 +1,5 @@
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";
@@ -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
+ }