@galacean/engine-core 1.1.0-beta.9 → 1.1.2

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 (130) hide show
  1. package/dist/main.js +7783 -7029
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +7783 -7029
  4. package/dist/module.js +7784 -7031
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/atlas/types.d.ts +5 -0
  8. package/types/2d/enums/SpriteModifyFlags.d.ts +2 -1
  9. package/types/2d/text/TextRenderer.d.ts +1 -0
  10. package/types/Camera.d.ts +1 -1
  11. package/types/Canvas.d.ts +15 -5
  12. package/types/Deprecated.d.ts +101 -0
  13. package/types/animation/AnimatorLayerMask.d.ts +45 -0
  14. package/types/animation/LayerPathMask.d.ts +16 -0
  15. package/types/animation/animationCurve/AnimationStringCurve.d.ts +7 -0
  16. package/types/asset/AssetPromise.d.ts +1 -0
  17. package/types/asset/ResourceManager.d.ts +0 -1
  18. package/types/enums/Downsampling.d.ts +11 -0
  19. package/types/enums/MSAASamples.d.ts +13 -0
  20. package/types/index.d.ts +1 -1
  21. package/types/mesh/PrimitiveMesh.d.ts +22 -0
  22. package/types/mesh/SkinnedMeshRenderer.d.ts +1 -1
  23. package/types/particle/modules/EmissionModule.d.ts +0 -1
  24. package/types/particle/modules/MainModule.d.ts +0 -1
  25. package/types/particle/modules/ParticleGradient.d.ts +38 -18
  26. package/types/physics/HitResult.d.ts +3 -0
  27. package/types/shader/Shader.d.ts +1 -1
  28. package/types/texture/enums/PixelFormat.d.ts +73 -0
  29. package/types/xr/XRManager.d.ts +3 -29
  30. package/types/RenderPipeline/MeshRenderData.d.ts +0 -17
  31. package/types/RenderPipeline/MeshRenderElement.d.ts +0 -19
  32. package/types/RenderPipeline/RenderElementX.d.ts +0 -12
  33. package/types/RenderPipeline/SpriteElement.d.ts +0 -15
  34. package/types/RenderPipeline/SpriteMaskElement.d.ts +0 -12
  35. package/types/RenderPipeline/TextRenderElement.d.ts +0 -8
  36. package/types/SafeLoopArray.d.ts +0 -37
  37. package/types/Ticker.d.ts +0 -30
  38. package/types/asset/IRefObject.d.ts +0 -2
  39. package/types/asset/RefObject.d.ts +0 -27
  40. package/types/base/Event.d.ts +0 -24
  41. package/types/base/Util.d.ts +0 -14
  42. package/types/particle/ParticleData.d.ts +0 -1
  43. package/types/particle/ParticleMesh.d.ts +0 -289
  44. package/types/particle/ParticleShaderDeclaration.d.ts +0 -1
  45. package/types/particle/ParticleShaderMacro.d.ts +0 -1
  46. package/types/particle/ParticleShaderProperty.d.ts +0 -1
  47. package/types/particle/ParticleSystem.d.ts +0 -41
  48. package/types/particle/ParticleVertexElements.d.ts +0 -1
  49. package/types/particle/ParticleVertexUtils.d.ts +0 -1
  50. package/types/particle/enum/ParticleAnimationRowMode.d.ts +0 -9
  51. package/types/particle/enum/ParticleAnimationType.d.ts +0 -9
  52. package/types/particle/enum/ParticleCurveMode.d.ts +0 -13
  53. package/types/particle/enum/ParticleGradientMode.d.ts +0 -13
  54. package/types/particle/enum/ParticleRenderMode.d.ts +0 -17
  55. package/types/particle/enum/ParticleScaleMode.d.ts +0 -11
  56. package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +0 -9
  57. package/types/particle/enum/ParticleShapeType.d.ts +0 -15
  58. package/types/particle/enum/ParticleSimulationSpace.d.ts +0 -9
  59. package/types/particle/enum/index.d.ts +0 -9
  60. package/types/particle/module/Burst.d.ts +0 -38
  61. package/types/particle/module/ColorGradient.d.ts +0 -75
  62. package/types/particle/module/ColorOverLifetimeModule.d.ts +0 -20
  63. package/types/particle/module/EmissionModule.d.ts +0 -63
  64. package/types/particle/module/FrameOverTime.d.ts +0 -73
  65. package/types/particle/module/ParticleCurve.d.ts +0 -37
  66. package/types/particle/module/RotationOverLifetimeModule.d.ts +0 -21
  67. package/types/particle/module/RotationVelocityGradient.d.ts +0 -184
  68. package/types/particle/module/SizeGradient.d.ts +0 -151
  69. package/types/particle/module/SizeOverLifetimeModule.d.ts +0 -21
  70. package/types/particle/module/StartFrame.d.ts +0 -46
  71. package/types/particle/module/TextureSheetAnimationModule.d.ts +0 -37
  72. package/types/particle/module/VelocityGradient.d.ts +0 -110
  73. package/types/particle/module/VelocityOverLifetimeModule.d.ts +0 -22
  74. package/types/particle/module/index.d.ts +0 -15
  75. package/types/particle/module/shape/BaseShape.d.ts +0 -26
  76. package/types/particle/module/shape/BoxShape.d.ts +0 -20
  77. package/types/particle/module/shape/CircleShape.d.ts +0 -27
  78. package/types/particle/module/shape/ConeShape.d.ts +0 -35
  79. package/types/particle/module/shape/HemisphereShape.d.ts +0 -23
  80. package/types/particle/module/shape/ShapeUtils.d.ts +0 -1
  81. package/types/particle/module/shape/SphereShape.d.ts +0 -23
  82. package/types/particle/module/shape/index.d.ts +0 -5
  83. package/types/particle/modules/ShapeModule.d.ts +0 -9
  84. package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
  85. package/types/particle/moudules/Burst.d.ts +0 -25
  86. package/types/particle/moudules/Emission.d.ts +0 -47
  87. package/types/particle/moudules/EmissionModule.d.ts +0 -49
  88. package/types/particle/moudules/MainModule.d.ts +0 -59
  89. package/types/particle/moudules/ParticleCurve.d.ts +0 -27
  90. package/types/particle/moudules/ParticleGradient.d.ts +0 -28
  91. package/types/particle/moudules/ShapeModule.d.ts +0 -7
  92. package/types/particle/moudules/shape/BaseShape.d.ts +0 -28
  93. package/types/particle/moudules/shape/BoxShape.d.ts +0 -20
  94. package/types/particle/moudules/shape/CircleShape.d.ts +0 -27
  95. package/types/particle/moudules/shape/ConeShape.d.ts +0 -35
  96. package/types/particle/moudules/shape/HemisphereShape.d.ts +0 -23
  97. package/types/particle/moudules/shape/ShapeUtils.d.ts +0 -1
  98. package/types/particle/moudules/shape/SphereShape.d.ts +0 -23
  99. package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
  100. package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +0 -15
  101. package/types/particle/moudules/shape/index.d.ts +0 -5
  102. package/types/physics/PhysicsManager.d.ts +0 -78
  103. package/types/shadow/PipelinePass.d.ts +0 -16
  104. package/types/utils/BoolUpdateFlag.d.ts +0 -12
  105. package/types/utils/DisorderedArray.d.ts +0 -18
  106. package/types/utils/UpdateFlag.d.ts +0 -20
  107. package/types/utils/UpdateFlagManager.d.ts +0 -1
  108. package/types/utils/Utils.d.ts +0 -31
  109. package/types/xr/component/XRPoseDriver.d.ts +0 -10
  110. package/types/xr/data/XRCamera.d.ts +0 -6
  111. package/types/xr/data/XRDevice.d.ts +0 -9
  112. package/types/xr/data/XRHandle.d.ts +0 -10
  113. package/types/xr/enum/EnumXRButton.d.ts +0 -5
  114. package/types/xr/enum/EnumXRDevicePhase.d.ts +0 -4
  115. package/types/xr/enum/EnumXRFeature.d.ts +0 -9
  116. package/types/xr/enum/EnumXRInputSource.d.ts +0 -8
  117. package/types/xr/enum/EnumXRMode.d.ts +0 -7
  118. package/types/xr/enum/EnumXRSubsystem.d.ts +0 -4
  119. package/types/xr/enum/EnumXRTrackingMode.d.ts +0 -7
  120. package/types/xr/feature/XRCameraManager.d.ts +0 -21
  121. package/types/xr/feature/XRFeature.d.ts +0 -29
  122. package/types/xr/feature/XRImageTrackManager.d.ts +0 -10
  123. package/types/xr/feature/XRInputManager.d.ts +0 -16
  124. package/types/xr/index.d.ts +0 -18
  125. package/types/xr/provider/XRProvider.d.ts +0 -19
  126. package/types/xr/subsystem/XRInputSubsystem.d.ts +0 -5
  127. package/types/xr/subsystem/XRSubsystem.d.ts +0 -30
  128. /package/types/{2d/data/RenderData2D.d.ts → BasicResources.d.ts} +0 -0
  129. /package/types/{animation/internal/AnimationCurveOwnerLayerData.d.ts → RenderPipeline/OpaqueTexturePass.d.ts} +0 -0
  130. /package/types/{graphic/PrimitiveVertexBinding.d.ts → enums/CameraType.d.ts} +0 -0
@@ -1,15 +0,0 @@
1
- import { RenderData2D } from "../2d/data/RenderData2D";
2
- import { Material } from "../material/Material";
3
- import { Renderer } from "../Renderer";
4
- import { ShaderPass } from "../shader";
5
- import { RenderState } from "../shader/state/RenderState";
6
- import { Texture2D } from "../texture";
7
- import { IPoolElement } from "./IPoolElement";
8
- import { RenderElement } from "./RenderElement";
9
- export declare class SpriteElement extends RenderElement implements IPoolElement {
10
- renderData: RenderData2D;
11
- texture: Texture2D;
12
- constructor();
13
- setValue(component: Renderer, renderDate: RenderData2D, material: Material, texture: Texture2D, renderState: RenderState, shaderPass: ShaderPass): void;
14
- dispose(): void;
15
- }
@@ -1,12 +0,0 @@
1
- import { RenderData2D } from "../2d/data/RenderData2D";
2
- import { Material } from "../material/Material";
3
- import { Renderer } from "../Renderer";
4
- import { IPoolElement } from "./IPoolElement";
5
- import { RenderElement } from "./RenderElement";
6
- export declare class SpriteMaskElement extends RenderElement implements IPoolElement {
7
- renderData: RenderData2D;
8
- isAdd: boolean;
9
- constructor();
10
- setValue(component: Renderer, renderData: RenderData2D, material: Material): void;
11
- dispose(): void;
12
- }
@@ -1,8 +0,0 @@
1
- import { IPoolElement } from "./IPoolElement";
2
- import { RenderElement } from "./RenderElement";
3
- import { SpriteElement } from "./SpriteElement";
4
- export declare class TextRenderElement extends RenderElement implements IPoolElement {
5
- charElements: SpriteElement[];
6
- constructor();
7
- dispose(): void;
8
- }
@@ -1,37 +0,0 @@
1
- export declare class SafeLoopArray<T> {
2
- private _array;
3
- private _loopArray;
4
- private _loopArrayDirty;
5
- /**
6
- * Get the length of the array.
7
- */
8
- get length(): number;
9
- /**
10
- * Push item to the array.
11
- * @param item - The item which want to be pushed
12
- */
13
- push(item: T): void;
14
- /**
15
- * Splice the array.
16
- * @param index - The index of the array
17
- * @param deleteCount - The count of the array which want to be deleted
18
- * @param item - The item which want to be added
19
- */
20
- splice(index: number, deleteCount: number, item?: T): void;
21
- /**
22
- * The index of the item.
23
- * @param item - The item which want to get the index
24
- * @returns Index of the item
25
- */
26
- indexOf(item: T): number;
27
- /**
28
- * Get the array.
29
- * @returns The array
30
- */
31
- getArray(): ReadonlyArray<T>;
32
- /**
33
- * Get the array use for loop.
34
- * @returns The array use for loop
35
- */
36
- getLoopArray(): ReadonlyArray<T>;
37
- }
package/types/Ticker.d.ts DELETED
@@ -1,30 +0,0 @@
1
- export declare class Ticker {
2
- private _vSyncCount;
3
- private _vSyncCounter;
4
- private _requestId;
5
- private _animationLoop;
6
- private _requestAnimationFrame;
7
- private _cancelAnimationFrame;
8
- /**
9
- * The number of vertical synchronization means the number of vertical blanking for one frame.
10
- * @remarks 0 means that the vertical synchronization is turned off.
11
- */
12
- get vSyncCount(): number;
13
- set vSyncCount(value: number);
14
- get requestAnimationFrame(): (...params: any[]) => any;
15
- set requestAnimationFrame(func: (...params: any[]) => any);
16
- get cancelAnimationFrame(): (...params: any[]) => any;
17
- set cancelAnimationFrame(func: (...params: any[]) => any);
18
- get animationLoop(): (...params: any[]) => any;
19
- set animationLoop(func: (...params: any[]) => any);
20
- /**
21
- * Pause the engine.
22
- */
23
- pause(): void;
24
- /**
25
- * Resume the engine.
26
- */
27
- resume(): void;
28
- private _onAnimationFrame;
29
- constructor();
30
- }
@@ -1,2 +0,0 @@
1
- export interface IRefObject {
2
- }
@@ -1,27 +0,0 @@
1
- import { EngineObject } from "../base/EngineObject";
2
- import { Engine } from "../Engine";
3
- import { IRefObject } from "./IRefObject";
4
- /**
5
- * The base class of assets, with reference counting capability.
6
- */
7
- export declare abstract class RefObject extends EngineObject implements IRefObject {
8
- /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */
9
- isGCIgnored: boolean;
10
- private _refCount;
11
- /**
12
- * Counted by valid references.
13
- */
14
- get refCount(): number;
15
- protected constructor(engine: Engine);
16
- /**
17
- * Destroy self.
18
- * @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
19
- * @returns Whether the release was successful.
20
- */
21
- destroy(force?: boolean): boolean;
22
- /**
23
- * Called when the resource is destroyed.
24
- * Subclasses can override this function.
25
- */
26
- protected abstract _onDestroy(): void;
27
- }
@@ -1,24 +0,0 @@
1
- import { EventDispatcher } from "./EventDispatcher";
2
- export type Listener = ((e: Event) => any) & {
3
- once?: boolean;
4
- };
5
- /** Event Object. * @class */
6
- export declare class Event {
7
- get propagationStopped(): boolean;
8
- get target(): EventDispatcher;
9
- set target(t: EventDispatcher);
10
- get timeStamp(): number;
11
- get currentTarget(): EventDispatcher;
12
- set currentTarget(t: EventDispatcher);
13
- get bubbles(): boolean;
14
- get type(): string | number;
15
- data: any;
16
- private _timeStamp;
17
- private _target;
18
- private _currentTarget;
19
- private _bubbles;
20
- private _propagationStopped;
21
- private _type;
22
- constructor(type: string | number, target?: EventDispatcher, data?: any, bubbles?: boolean);
23
- stopPropagation(): void;
24
- }
@@ -1,14 +0,0 @@
1
- export declare const Util: {
2
- isArray: (value: any) => boolean;
3
- isArrayLike(x: any): boolean;
4
- clone<T>(obj: T): T;
5
- downloadBlob(blob: Blob, fileName?: string): void;
6
- };
7
- export declare const isArrayLike: <T>(x: any) => x is ArrayLike<T>;
8
- /**
9
- * Fastly remove an element from array.
10
- * @param array - Array
11
- * @param item - Element
12
- */
13
- export declare function removeFromArray(array: any[], item: any): boolean;
14
- export declare function ObjectValues(obj: any): any[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,289 +0,0 @@
1
- import { BoundingBox, Color, Vector2, Vector3 } from "@galacean/engine-math";
2
- import { ParticleRenderer } from "./ParticleRenderer";
3
- import { BufferMesh } from "../mesh";
4
- import { Buffer, VertexElement } from "../graphic";
5
- import { ColorOverLifetimeModule, EmissionModule, ParticleCurve, RotationOverLifetimeModule, SizeOverLifetimeModule, TextureSheetAnimationModule, VelocityOverLifetimeModule } from "./module";
6
- import { BaseShape } from "./module/shape/BaseShape";
7
- import { ParticleCurveMode, ParticleScaleMode, ParticleSimulationSpace } from "./enum";
8
- /**
9
- * Particle Mesh
10
- */
11
- export declare class ParticleMesh extends BufferMesh {
12
- protected static VERTEX_STRIDE: number;
13
- protected static VERTEX_ELEMENTS: VertexElement[];
14
- protected static halfKSqrtOf2: number;
15
- protected static g: number;
16
- protected static _maxElapsedTime: number;
17
- protected static _tempVector30: Vector3;
18
- protected static _tempVector31: Vector3;
19
- protected static _tempVector32: Vector3;
20
- protected static _tempVector33: Vector3;
21
- protected static _tempVector34: Vector3;
22
- protected static _tempVector35: Vector3;
23
- protected static _tempVector36: Vector3;
24
- protected static _tempVector37: Vector3;
25
- protected static _tempPosition: Vector3;
26
- protected static _tempDirection: Vector3;
27
- protected _simulateUpdate: boolean;
28
- protected _drawCounter: number;
29
- protected _isEmitting: boolean;
30
- protected _isPlaying: boolean;
31
- protected _isPaused: boolean;
32
- protected _playStartDelay: number;
33
- protected _frameRateTime: number;
34
- protected _emissionTime: number;
35
- protected _totalDelayTime: number;
36
- protected _emissionDistance: number;
37
- protected _emissionLastPosition: Vector3;
38
- protected _uvLength: Vector2;
39
- protected _renderer: ParticleRenderer;
40
- protected _indexBuffer: Buffer;
41
- protected _vertexBuffer: Buffer;
42
- protected _vertices: Float32Array;
43
- protected _simulationUV_Index: number;
44
- protected _startLifeTimeIndex: number;
45
- protected _timeIndex: number;
46
- protected _burstsIndex: number;
47
- protected _firstActiveElement: number;
48
- protected _firstNewElement: number;
49
- protected _firstFreeElement: number;
50
- protected _firstRetiredElement: number;
51
- protected _vertexStride: number;
52
- protected _indexStride: number;
53
- protected _floatCountPerVertex: number;
54
- protected _bufferMaxParticles: number;
55
- protected _emission: EmissionModule;
56
- protected _shape: BaseShape;
57
- protected _velocityOverLifetime: VelocityOverLifetimeModule;
58
- protected _colorOverLifetime: ColorOverLifetimeModule;
59
- protected _sizeOverLifetime: SizeOverLifetimeModule;
60
- protected _rotationOverLifetime: RotationOverLifetimeModule;
61
- protected _textureSheetAnimation: TextureSheetAnimationModule;
62
- protected _startLifetimeType: ParticleCurveMode;
63
- protected _startLifetimeConstant: number;
64
- protected _startLifeTimeGradient: ParticleCurve;
65
- protected _startLifetimeConstantMin: number;
66
- protected _startLifetimeConstantMax: number;
67
- protected _startLifeTimeGradientMin: ParticleCurve;
68
- protected _startLifeTimeGradientMax: ParticleCurve;
69
- protected _maxStartLifetime: number;
70
- /** The mode of drag */
71
- dragType: ParticleCurveMode;
72
- /** Apply drag to particles within the volume of the Force Field. */
73
- dragConstant: number;
74
- /** Min apply drag to particles within the volume of the Force Field. */
75
- dragSpeedConstantMin: number;
76
- /** Max apply drag to particles within the volume of the Force Field. */
77
- dragSpeedConstantMax: number;
78
- /** Random seed.(should set before play()) */
79
- randomSeed: Uint32Array;
80
- /** Whether to use random seed */
81
- autoRandomSeed: boolean;
82
- /** Whether to use performance mode, which will delay particle release.*/
83
- isPerformanceMode: boolean;
84
- /** The duration of the Particle System in seconds. */
85
- duration: number;
86
- /** Specifies whether the Particle System is looping. */
87
- looping: boolean;
88
- /** A scale that this Particle System applies to gravity, defined by Physics.gravity. */
89
- gravityModifier: number;
90
- /** Control how the Particle System applies its Transform component to the particles it emits. */
91
- scalingMode: ParticleScaleMode;
92
- /** This selects the space in which to simulate particles. It can be either world or local space. */
93
- simulationSpace: ParticleSimulationSpace;
94
- /** Override the default playback speed of the Particle System. */
95
- simulationSpeed: number;
96
- /** If set to true, the Particle System automatically begins to play on startup. */
97
- playOnAwake: boolean;
98
- /** Makes some particles spin in the opposite direction. */
99
- flipRotation: number;
100
- /** Start delay mode. */
101
- startDelayType: ParticleCurveMode;
102
- /** Start delay in seconds. */
103
- startDelay: number;
104
- /** Start delay in min seconds. */
105
- startDelayMin: number;
106
- /** Start delay in max seconds. */
107
- startDelayMax: number;
108
- /** The mode of start particles speed */
109
- startSpeedType: ParticleCurveMode;
110
- /** The initial speed of particles when the Particle System first spawns them. */
111
- startSpeedConstant: number;
112
- /** The min initial speed of particles when the Particle System first spawns them. */
113
- startSpeedConstantMin: number;
114
- /** The max initial speed of particles when the Particle System first spawns them. */
115
- startSpeedConstantMax: number;
116
- /** A flag to enable 3D particle rotation. */
117
- startRotation3D: boolean;
118
- /** The mode of start rotation */
119
- startRotationType: ParticleCurveMode;
120
- /** The initial rotation of particles when the Particle System first spawns them. */
121
- startRotationConstant: number;
122
- /** The initial rotation of particles when the Particle System first spawns them. */
123
- startRotationConstantSeparate: Vector3;
124
- /** The min initial rotation of particles when the Particle System first spawns them. */
125
- startRotationConstantMin: number;
126
- /** The max initial rotation of particles when the Particle System first spawns them. */
127
- startRotationConstantMax: number;
128
- /** The min initial rotation of particles when the Particle System first spawns them. */
129
- startRotationConstantMinSeparate: Vector3;
130
- /** The max initial rotation of particles when the Particle System first spawns them. */
131
- startRotationConstantMaxSeparate: Vector3;
132
- /** A flag to enable specifying particle size individually for each axis. */
133
- startSize3D: boolean;
134
- /** The mode of start size */
135
- startSizeType: ParticleCurveMode;
136
- /** The initial size of particles when the Particle System first spawns them. */
137
- startSizeConstant: number;
138
- /** The initial size of particles when the Particle System first spawns them. */
139
- startSizeConstantSeparate: Vector3;
140
- /** The min initial size of particles when the Particle System first spawns them. */
141
- startSizeConstantMin: number;
142
- /** The max initial size of particles when the Particle System first spawns them. */
143
- startSizeConstantMax: number;
144
- /** The min initial size of particles when the Particle System first spawns them. */
145
- startSizeConstantMinSeparate: Vector3;
146
- /** The max initial size of particles when the Particle System first spawns them. */
147
- startSizeConstantMaxSeparate: Vector3;
148
- /** The mode of start color */
149
- startColorType: ParticleCurveMode;
150
- /** The initial color of particles when the Particle System first spawns them. */
151
- startColorConstant: Color;
152
- /** The min initial color of particles when the Particle System first spawns them. */
153
- startColorConstantMin: Color;
154
- /** The max initial color of particles when the Particle System first spawns them. */
155
- startColorConstantMax: Color;
156
- /**
157
- * The mode of total lifetime.
158
- */
159
- get startLifetimeType(): ParticleCurveMode;
160
- set startLifetimeType(value: ParticleCurveMode);
161
- /**
162
- * The total lifetime in seconds that each new particle has.
163
- */
164
- get startLifetimeConstant(): number;
165
- set startLifetimeConstant(value: number);
166
- /**
167
- * The total lifetime in seconds that each new particle has.
168
- */
169
- get startLifeTimeGradient(): ParticleCurve;
170
- set startLifeTimeGradient(value: ParticleCurve);
171
- /**
172
- * The lower total lifetime in seconds that each new particle has.
173
- */
174
- get startLifetimeConstantMin(): number;
175
- set startLifetimeConstantMin(value: number);
176
- /**
177
- * The upper total lifetime in seconds that each new particle has.
178
- */
179
- get startLifetimeConstantMax(): number;
180
- set startLifetimeConstantMax(value: number);
181
- /**
182
- * The lower total lifetime in seconds that each new particle has.
183
- */
184
- get startLifeTimeGradientMin(): ParticleCurve;
185
- set startLifeTimeGradientMin(value: ParticleCurve);
186
- /**
187
- * The upper total lifetime in seconds that each new particle has.
188
- */
189
- get startLifeTimeGradientMax(): ParticleCurve;
190
- set startLifeTimeGradientMax(value: ParticleCurve);
191
- /**
192
- * The ShapeModule of a Particle System.
193
- */
194
- get shape(): BaseShape;
195
- set shape(value: BaseShape);
196
- /**
197
- * The maximum number of particles to emit.
198
- */
199
- get maxParticles(): number;
200
- set maxParticles(value: number);
201
- /**
202
- * the sum of all alive particles within the particle system.
203
- */
204
- get aliveParticleCount(): number;
205
- /**
206
- * The emission time of the Particle System in seconds.
207
- */
208
- get emissionTime(): number;
209
- /**
210
- * The EmissionModule of a Particle System.
211
- */
212
- get emission(): EmissionModule;
213
- /**
214
- * Determines whether the Particle System is alive
215
- */
216
- get isAlive(): boolean;
217
- /**
218
- * Determines whether the Particle System is emitting particles.
219
- */
220
- get isEmitting(): boolean;
221
- /**
222
- * Determines whether the Particle System is playing.
223
- */
224
- get isPlaying(): boolean;
225
- /**
226
- * Determines whether the Particle System is paused.
227
- */
228
- get isPaused(): boolean;
229
- /**
230
- * The VelocityOverLifetimeModule of a Particle System.
231
- */
232
- get velocityOverLifetime(): VelocityOverLifetimeModule;
233
- set velocityOverLifetime(value: VelocityOverLifetimeModule);
234
- /**
235
- * The ColorOverLifetimeModule of a Particle System.
236
- */
237
- get colorOverLifetime(): ColorOverLifetimeModule;
238
- set colorOverLifetime(value: ColorOverLifetimeModule);
239
- /**
240
- * The SizeOverLifetimeModule of a Particle System.
241
- */
242
- get sizeOverLifetime(): SizeOverLifetimeModule;
243
- set sizeOverLifetime(value: SizeOverLifetimeModule);
244
- /**
245
- * The RotationOverLifetimeModule of a Particle System.
246
- */
247
- get rotationOverLifetime(): RotationOverLifetimeModule;
248
- set rotationOverLifetime(value: RotationOverLifetimeModule);
249
- /**
250
- * The TextureSheetAnimationModule of a Particle System.
251
- */
252
- get textureSheetAnimation(): TextureSheetAnimationModule;
253
- set textureSheetAnimation(value: TextureSheetAnimationModule);
254
- /**
255
- * Self-defined bounding box
256
- */
257
- get customBounds(): BoundingBox;
258
- set customBounds(value: BoundingBox);
259
- constructor(renderer: ParticleRenderer);
260
- /**
261
- * Starts the Particle System.
262
- */
263
- play(): void;
264
- /**
265
- * Pauses the system so no new particles are emitted and the existing particles are not updated.
266
- */
267
- pause(): void;
268
- /**
269
- * Fast-forwards the Particle System by simulating particles over the given period of time, then pauses it.
270
- * @param time - Time period in seconds to advance the ParticleSystem simulation by.
271
- * @param restart - Restart and start from the beginning.
272
- */
273
- simulate(time: number, restart?: boolean): void;
274
- /**
275
- * Stops playing the Particle System using the supplied stop behaviour.
276
- */
277
- stop(): void;
278
- protected _updateEmission(elapsedTime: number): void;
279
- protected _updateParticles(elapsedTime: number): void;
280
- protected _advanceTime(elapsedTime: number, emitTime: number): void;
281
- protected _advanceDistance(emitTime: number): void;
282
- protected _burst(fromTime: number, toTime: number): number;
283
- protected _retireActiveParticles(): void;
284
- protected _freeRetiredParticles(): void;
285
- protected _emit(time: number): boolean;
286
- protected _addParticle(position: Vector3, direction: Vector3, time: number): boolean;
287
- protected _addNewParticlesToVertexBuffer(): void;
288
- protected _updateParticlesSimulationRestart(time: number): void;
289
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,41 +0,0 @@
1
- import { ParticleRenderer } from "./ParticleRenderer";
2
- import { EmissionModule } from "./modules/EmissionModule";
3
- import { MainModule } from "./modules/MainModule";
4
- import { ShapeModule } from "./modules/ShapeModule";
5
- /**
6
- * Particle System.
7
- */
8
- export declare class ParticleGenerator {
9
- /** Use auto random seed. */
10
- useAutoRandomSeed: boolean;
11
- /** Main module. */
12
- readonly main: MainModule;
13
- /** Emission module. */
14
- readonly emission: EmissionModule;
15
- /** Shape module. */
16
- readonly shape: ShapeModule;
17
- private _waitProcessRetiredElementCount;
18
- private _instanceVertexBufferBinding;
19
- private _instanceVertices;
20
- private readonly _engine;
21
- private readonly _renderer;
22
- private readonly _particleIncreaseCount;
23
- /**
24
- * Random seed.
25
- * @remarks If `useAutoRandomSeed` is true, this value will be random changed when play.
26
- */
27
- get randomSeed(): number;
28
- set randomSeed(value: number);
29
- constructor(renderer: ParticleRenderer);
30
- /**
31
- * Emit a certain number of particles.
32
- * @param count - Number of particles to emit
33
- */
34
- emit(count: number): void;
35
- private _addNewParticle;
36
- private _retireActiveParticles;
37
- private _freeRetiredParticles;
38
- private _addNewParticlesToVertexBuffer;
39
- private _createParticleData;
40
- private _addVertexBufferBindingsFilterDuplicate;
41
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- /**
2
- * The mode used for selecting rows of an animation in the Texture Sheet Animation Module.
3
- */
4
- export declare enum ParticleAnimationRowMode {
5
- /** Use a random row for each particle. */
6
- Random = 0,
7
- /** Use the mesh index as the row, so that meshes can be mapped to specific animation frames. */
8
- MeshIndex = 1
9
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Controls how texture sheet animations play.
3
- */
4
- export declare enum ParticleAnimationType {
5
- /** Animate over the whole texture sheet from left to right, top to bottom. */
6
- WholeSheet = 0,
7
- /** Animate a single row in the sheet from left to right. */
8
- SingleRow = 1
9
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * The particle curve mode.
3
- */
4
- export declare enum ParticleCurveMode {
5
- /** Use a single constant for the MinMaxCurve. */
6
- Constant = 0,
7
- /** Use a single curve for the MinMaxCurve. */
8
- Curve = 1,
9
- /** Use a random value between 2 constants for the MinMaxCurve. */
10
- TwoConstants = 2,
11
- /** Use a random value between 2 curves for the MinMaxCurve. */
12
- TwoCurves = 3
13
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * The particle gradient mode.
3
- */
4
- export declare enum ParticleGradientMode {
5
- /** Use a single color for the MinMaxGradient. */
6
- Color = 0,
7
- /** Use a single color gradient for the MinMaxGradient. */
8
- Gradient = 1,
9
- /** Use a random value between 2 colors for the MinMaxGradient. */
10
- TwoColors = 2,
11
- /** Use a random value between 2 color gradients for the MinMaxGradient. */
12
- TwoGradients = 3
13
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * The rendering mode for particle systems.
3
- */
4
- export declare enum ParticleRenderMode {
5
- /** Render particles as billboards facing the active camera. (Default) */
6
- Billboard = 0,
7
- /** Stretch particles in the direction of motion. */
8
- Stretch = 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
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Control how particle systems apply transform scale.
3
- */
4
- export declare enum ParticleScaleMode {
5
- /** Scale the Particle System using the entire transform hierarchy. */
6
- Hierarchy = 0,
7
- /** Scale the Particle System 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
- }
@@ -1,9 +0,0 @@
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
- }
@@ -1,15 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
1
- export { ParticleScaleMode } from "./ParticleScaleMode";
2
- export { ParticleSimulationSpace } from "./ParticleSimulationSpace";
3
- export { ParticleCurveMode } from "./ParticleCurveMode";
4
- export { ParticleAnimationType } from "./ParticleAnimationType";
5
- export { ParticleAnimationRowMode } from "./ParticleAnimationRowMode";
6
- export { ParticleShapeMultiModeValue } from "./ParticleShapeMultiModeValue";
7
- export { ParticleRenderMode } from "./ParticleRenderMode";
8
- export { ParticleShapeType } from "./ParticleShapeType";
9
- export { ParticleGradientMode } from "./ParticleGradientMode";