@galacean/engine-core 1.2.0-beta.6 → 1.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +18802 -16268
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +18802 -16268
- package/dist/module.js +18798 -16269
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/sprite/SpriteMask.d.ts +11 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +6 -3
- package/types/2d/text/TextRenderer.d.ts +10 -4
- package/types/Camera.d.ts +11 -3
- package/types/Deprecated.d.ts +101 -0
- package/types/Engine.d.ts +3 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +11 -5
- package/types/RenderPipeline/BatchUtils.d.ts +1 -0
- package/types/RenderPipeline/BatcherManager.d.ts +1 -12
- package/types/RenderPipeline/Chunk.d.ts +1 -0
- package/types/RenderPipeline/MaskManager.d.ts +1 -0
- package/types/RenderPipeline/PipelinePass.d.ts +1 -1
- package/types/RenderPipeline/PrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +1 -0
- package/types/RenderPipeline/RenderElement.d.ts +9 -6
- package/types/RenderPipeline/RenderQueue.d.ts +1 -30
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/SubRenderElement.d.ts +22 -0
- package/types/RenderPipeline/VertexArea.d.ts +1 -0
- package/types/RenderPipeline/batcher/MeshBuffer.d.ts +1 -0
- package/types/RenderPipeline/enums/RenderBufferStoreAction.d.ts +13 -0
- package/types/RenderPipeline/index.d.ts +1 -1
- package/types/Renderer.d.ts +4 -3
- package/types/Scene.d.ts +6 -0
- package/types/animation/Animator.d.ts +35 -6
- package/types/animation/AnimatorCondition.d.ts +13 -0
- package/types/animation/AnimatorController.d.ts +32 -2
- package/types/animation/AnimatorControllerParameter.d.ts +10 -0
- package/types/animation/AnimatorState.d.ts +15 -5
- package/types/animation/AnimatorStateMachine.d.ts +44 -0
- package/types/animation/AnimatorStateTransition.d.ts +51 -0
- package/types/animation/enums/AnimatorConditionMode.d.ts +9 -0
- package/types/animation/index.d.ts +1 -1
- package/types/asset/AssetType.d.ts +2 -0
- package/types/graphic/SubMesh.d.ts +3 -16
- package/types/graphic/SubPrimitive.d.ts +10 -0
- package/types/graphic/index.d.ts +1 -0
- package/types/index.d.ts +2 -1
- package/types/material/BaseMaterial.d.ts +1 -1
- package/types/mesh/SkinnedMeshRenderer.d.ts +1 -1
- package/types/particle/ParticleGenerator.d.ts +20 -0
- package/types/particle/ParticleRenderer.d.ts +3 -1
- package/types/particle/modules/EmissionModule.d.ts +6 -2
- package/types/particle/modules/MainModule.d.ts +49 -15
- package/types/particle/modules/ParticleCompositeCurve.d.ts +35 -10
- package/types/particle/modules/ParticleCurve.d.ts +16 -9
- package/types/particle/modules/ParticleGeneratorModule.d.ts +6 -2
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +27 -8
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +29 -8
- package/types/particle/modules/shape/BaseShape.d.ts +14 -4
- package/types/particle/modules/shape/BoxShape.d.ts +7 -2
- package/types/particle/modules/shape/CircleShape.d.ts +25 -8
- package/types/particle/modules/shape/ConeShape.d.ts +24 -8
- package/types/particle/modules/shape/HemisphereShape.d.ts +6 -2
- package/types/particle/modules/shape/SphereShape.d.ts +6 -2
- package/types/postProcess/PostProcessEffect.d.ts +13 -0
- package/types/postProcess/PostProcessManager.d.ts +1 -0
- package/types/postProcess/PostProcessPass.d.ts +55 -0
- package/types/postProcess/effects/BloomEffect.d.ts +94 -0
- package/types/postProcess/effects/TonemappingEffect.d.ts +35 -0
- package/types/postProcess/effects/index.d.ts +2 -0
- package/types/postProcess/index.d.ts +3 -0
- package/types/shader/enums/ShaderDataGroup.d.ts +4 -2
- package/types/shader/enums/ShaderPlatformTarget.d.ts +4 -0
- package/types/shader/enums/ShaderType.d.ts +1 -0
- package/types/shader/state/RenderState.d.ts +1 -0
- package/types/texture/enums/PixelFormat.d.ts +73 -0
- package/types/texture/enums/TextureFormat.d.ts +2 -0
- package/types/utils/ClearableObjectPool.d.ts +16 -0
- package/types/utils/ObjectPool.d.ts +16 -0
- package/types/utils/ReturnableObjectPool.d.ts +16 -0
- package/types/utils/index.d.ts +3 -0
- package/types/input/pointer/PointerEvent.d.ts +0 -4
- package/types/input/pointer/PointerEventType.d.ts +0 -7
- package/types/ui/Image.d.ts +0 -41
- package/types/ui/RedBlackTree.d.ts +0 -2
- package/types/ui/UICanvas.d.ts +0 -49
- package/types/ui/UIRenderer.d.ts +0 -20
- package/types/ui/UITransform.d.ts +0 -20
- package/types/ui/enums/BlockingObjects.d.ts +0 -6
- package/types/ui/enums/CanvasRenderMode.d.ts +0 -8
- package/types/ui/enums/ResolutionAdaptationStrategy.d.ts +0 -10
- package/types/ui/index.d.ts +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnimationClip } from "./AnimationClip";
|
|
2
|
-
import { AnimatorStateTransition } from "./
|
|
2
|
+
import { AnimatorStateTransition } from "./AnimatorStateTransition";
|
|
3
3
|
import { WrapMode } from "./enums/WrapMode";
|
|
4
4
|
import { StateMachineScript } from "./StateMachineScript";
|
|
5
5
|
/**
|
|
@@ -25,12 +25,12 @@ export declare class AnimatorState {
|
|
|
25
25
|
get clip(): AnimationClip;
|
|
26
26
|
set clip(clip: AnimationClip);
|
|
27
27
|
/**
|
|
28
|
-
* The start time of the clip, the range is 0 to 1, default is 0.
|
|
28
|
+
* The normalized start time of the clip, the range is 0 to 1, default is 0.
|
|
29
29
|
*/
|
|
30
30
|
get clipStartTime(): number;
|
|
31
31
|
set clipStartTime(time: number);
|
|
32
32
|
/**
|
|
33
|
-
* The end time of the clip, the range is 0 to 1, default is 1.
|
|
33
|
+
* The normalized end time of the clip, the range is 0 to 1, default is 1.
|
|
34
34
|
*/
|
|
35
35
|
get clipEndTime(): number;
|
|
36
36
|
set clipEndTime(time: number);
|
|
@@ -39,10 +39,20 @@ export declare class AnimatorState {
|
|
|
39
39
|
*/
|
|
40
40
|
constructor(name: string);
|
|
41
41
|
/**
|
|
42
|
-
* Add an outgoing transition
|
|
42
|
+
* Add an outgoing transition.
|
|
43
43
|
* @param transition - The transition
|
|
44
44
|
*/
|
|
45
|
-
addTransition(transition: AnimatorStateTransition):
|
|
45
|
+
addTransition(transition: AnimatorStateTransition): AnimatorStateTransition;
|
|
46
|
+
/**
|
|
47
|
+
* Add an outgoing transition to the destination state.
|
|
48
|
+
* @param animatorState - The destination state
|
|
49
|
+
*/
|
|
50
|
+
addTransition(animatorState: AnimatorState): AnimatorStateTransition;
|
|
51
|
+
/**
|
|
52
|
+
* Add an outgoing transition to exit of the stateMachine.
|
|
53
|
+
* @param exitTime - The time at which the transition can take effect. This is represented in normalized time.
|
|
54
|
+
*/
|
|
55
|
+
addExitTransition(exitTime?: number): AnimatorStateTransition;
|
|
46
56
|
/**
|
|
47
57
|
* Remove a transition from the state.
|
|
48
58
|
* @param transition - The transition
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnimatorState } from "./AnimatorState";
|
|
2
|
+
import { AnimatorStateTransition } from "./AnimatorStateTransition";
|
|
2
3
|
export interface AnimatorStateMap {
|
|
3
4
|
[key: string]: AnimatorState;
|
|
4
5
|
}
|
|
@@ -13,6 +14,17 @@ export declare class AnimatorStateMachine {
|
|
|
13
14
|
* @remarks When the Animator's AnimatorController changed or the Animator's onEnable be triggered.
|
|
14
15
|
*/
|
|
15
16
|
defaultState: AnimatorState;
|
|
17
|
+
private _entryTransitions;
|
|
18
|
+
private _anyStateTransitions;
|
|
19
|
+
private _statesMap;
|
|
20
|
+
/**
|
|
21
|
+
* The list of entry transitions in the state machine.
|
|
22
|
+
*/
|
|
23
|
+
get entryTransitions(): Readonly<AnimatorStateTransition[]>;
|
|
24
|
+
/**
|
|
25
|
+
* The list of AnyState transitions.
|
|
26
|
+
*/
|
|
27
|
+
get anyStateTransitions(): Readonly<AnimatorStateTransition[]>;
|
|
16
28
|
/**
|
|
17
29
|
* Add a state to the state machine.
|
|
18
30
|
* @param name - The name of the new state
|
|
@@ -34,4 +46,36 @@ export declare class AnimatorStateMachine {
|
|
|
34
46
|
* @returns Unique name.
|
|
35
47
|
*/
|
|
36
48
|
makeUniqueStateName(name: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Add an entry transition.
|
|
51
|
+
* @param transition - The transition
|
|
52
|
+
*/
|
|
53
|
+
addEntryStateTransition(transition: AnimatorStateTransition): AnimatorStateTransition;
|
|
54
|
+
/**
|
|
55
|
+
* Add an entry transition to the destination state.
|
|
56
|
+
* @param animatorState - The destination state
|
|
57
|
+
*/
|
|
58
|
+
addEntryStateTransition(animatorState: AnimatorState): AnimatorStateTransition;
|
|
59
|
+
/**
|
|
60
|
+
* Remove an entry transition.
|
|
61
|
+
* @param transition - The transition
|
|
62
|
+
*/
|
|
63
|
+
removeEntryStateTransition(transition: AnimatorStateTransition): void;
|
|
64
|
+
/**
|
|
65
|
+
* Add an any transition.
|
|
66
|
+
* @param transition - The transition
|
|
67
|
+
*/
|
|
68
|
+
addAnyStateTransition(transition: AnimatorStateTransition): AnimatorStateTransition;
|
|
69
|
+
/**
|
|
70
|
+
* Add an any transition to the destination state.
|
|
71
|
+
* @param animatorState - The destination state
|
|
72
|
+
*/
|
|
73
|
+
addAnyStateTransition(animatorState: AnimatorState): AnimatorStateTransition;
|
|
74
|
+
/**
|
|
75
|
+
* Remove an any transition.
|
|
76
|
+
* @param transition - The transition
|
|
77
|
+
*/
|
|
78
|
+
removeAnyStateTransition(transition: AnimatorStateTransition): void;
|
|
79
|
+
private _addTransition;
|
|
80
|
+
private _removeTransition;
|
|
37
81
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AnimatorControllerParameterValueType } from "./AnimatorControllerParameter";
|
|
2
|
+
import { AnimatorConditionMode } from "./enums/AnimatorConditionMode";
|
|
3
|
+
import { AnimatorCondition } from "./AnimatorCondition";
|
|
4
|
+
import { AnimatorState } from "./AnimatorState";
|
|
5
|
+
/**
|
|
6
|
+
* Transitions define when and how the state machine switch from on state to another. AnimatorTransition always originate from a StateMachine or a StateMachine entry.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AnimatorStateTransition {
|
|
9
|
+
/** The duration of the transition. This is represented in normalized time. */
|
|
10
|
+
duration: number;
|
|
11
|
+
/** The time at which the destination state will start. This is represented in normalized time. */
|
|
12
|
+
offset: number;
|
|
13
|
+
/** ExitTime represents the exact time at which the transition can take effect. This is represented in normalized time. */
|
|
14
|
+
exitTime: number;
|
|
15
|
+
/** The destination state of the transition. */
|
|
16
|
+
destinationState: AnimatorState;
|
|
17
|
+
/** Mutes the transition. The transition will never occur. */
|
|
18
|
+
mute: boolean;
|
|
19
|
+
private _conditions;
|
|
20
|
+
private _solo;
|
|
21
|
+
/**
|
|
22
|
+
* Is the transition destination the exit of the current state machine.
|
|
23
|
+
*/
|
|
24
|
+
get isExit(): Readonly<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Mutes all other transitions in the source state.
|
|
27
|
+
*/
|
|
28
|
+
get solo(): boolean;
|
|
29
|
+
set solo(value: boolean);
|
|
30
|
+
/**
|
|
31
|
+
* The conditions in the transition.
|
|
32
|
+
*/
|
|
33
|
+
get conditions(): Readonly<AnimatorCondition[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Add a condition to a transition.
|
|
36
|
+
* @param mode - The AnimatorCondition mode of the condition
|
|
37
|
+
* @param parameterName - The name of the parameter
|
|
38
|
+
* @param threshold - The threshold value of the condition
|
|
39
|
+
*/
|
|
40
|
+
addCondition(mode: AnimatorConditionMode, parameterName: string, threshold?: AnimatorControllerParameterValueType): AnimatorCondition;
|
|
41
|
+
/**
|
|
42
|
+
* Add a condition to a transition.
|
|
43
|
+
* @param animatorCondition - The condition to add
|
|
44
|
+
*/
|
|
45
|
+
addCondition(animatorCondition: AnimatorCondition): AnimatorCondition;
|
|
46
|
+
/**
|
|
47
|
+
* Remove a condition from the transition.
|
|
48
|
+
* @param condition - The condition to remove
|
|
49
|
+
*/
|
|
50
|
+
removeCondition(condition: AnimatorCondition): void;
|
|
51
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mode of the animator condition.
|
|
3
|
+
*/
|
|
1
4
|
export declare enum AnimatorConditionMode {
|
|
5
|
+
/** The condition is true when the parameter value is true. */
|
|
2
6
|
If = 0,
|
|
7
|
+
/** The condition is true when the parameter value is false. */
|
|
3
8
|
IfNot = 1,
|
|
9
|
+
/** The condition is true when the parameter value is greater than the threshold. */
|
|
4
10
|
Greater = 2,
|
|
11
|
+
/** The condition is true when the parameter value is less than the threshold. */
|
|
5
12
|
Less = 3,
|
|
13
|
+
/** The condition is true when the parameter value is equal to the threshold. */
|
|
6
14
|
Equals = 4,
|
|
15
|
+
/** The condition is true when the parameter value is not equal to the threshold. */
|
|
7
16
|
NotEquals = 5
|
|
8
17
|
}
|
|
@@ -11,7 +11,7 @@ export { AnimatorController } from "./AnimatorController";
|
|
|
11
11
|
export { AnimatorControllerLayer } from "./AnimatorControllerLayer";
|
|
12
12
|
export { AnimatorState } from "./AnimatorState";
|
|
13
13
|
export { AnimatorStateMachine } from "./AnimatorStateMachine";
|
|
14
|
-
export { AnimatorStateTransition } from "./
|
|
14
|
+
export { AnimatorStateTransition } from "./AnimatorStateTransition";
|
|
15
15
|
export { AnimatorConditionMode } from "./enums/AnimatorConditionMode";
|
|
16
16
|
export { AnimatorLayerBlendingMode } from "./enums/AnimatorLayerBlendingMode";
|
|
17
17
|
export { AnimatorCullingMode } from "./enums/AnimatorCullingMode";
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import { IPoolElement } from "../
|
|
2
|
-
import {
|
|
1
|
+
import { IPoolElement } from "../utils/ObjectPool";
|
|
2
|
+
import { SubPrimitive } from "./SubPrimitive";
|
|
3
3
|
/**
|
|
4
4
|
* Sub-mesh, mainly contains drawing information.
|
|
5
5
|
*/
|
|
6
|
-
export declare class SubMesh implements IPoolElement {
|
|
7
|
-
/** Start drawing offset. */
|
|
8
|
-
start: number;
|
|
9
|
-
/** Drawing count. */
|
|
10
|
-
count: number;
|
|
11
|
-
/** Drawing topology. */
|
|
12
|
-
topology: MeshTopology;
|
|
13
|
-
/**
|
|
14
|
-
* Create a sub-mesh.
|
|
15
|
-
* @param start - Start drawing offset
|
|
16
|
-
* @param count - Drawing count
|
|
17
|
-
* @param topology - Drawing topology
|
|
18
|
-
*/
|
|
19
|
-
constructor(start?: number, count?: number, topology?: MeshTopology);
|
|
6
|
+
export declare class SubMesh extends SubPrimitive implements IPoolElement {
|
|
20
7
|
dispose?(): void;
|
|
21
8
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { MeshTopology } from "./enums/MeshTopology";
|
|
2
|
+
/**
|
|
3
|
+
* Sub-primitive, mainly contains drawing information.
|
|
4
|
+
*/
|
|
2
5
|
export declare class SubPrimitive {
|
|
3
6
|
/** Start drawing offset. */
|
|
4
7
|
start: number;
|
|
@@ -6,4 +9,11 @@ export declare class SubPrimitive {
|
|
|
6
9
|
count: number;
|
|
7
10
|
/** Drawing topology. */
|
|
8
11
|
topology: MeshTopology;
|
|
12
|
+
/**
|
|
13
|
+
* Create a sub-primitive.
|
|
14
|
+
* @param start - Start drawing offset
|
|
15
|
+
* @param count - Drawing count
|
|
16
|
+
* @param topology - Drawing topology
|
|
17
|
+
*/
|
|
18
|
+
constructor(start?: number, count?: number, topology?: MeshTopology);
|
|
9
19
|
}
|
package/types/graphic/index.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export { Downsampling } from "./enums/Downsampling";
|
|
|
35
35
|
export { ColorSpace } from "./enums/ColorSpace";
|
|
36
36
|
export { BackgroundTextureFillMode } from "./enums/BackgroundTextureFillMode";
|
|
37
37
|
export { XRManager } from "./xr/XRManager";
|
|
38
|
+
export * from "./utils/index";
|
|
38
39
|
export * from "./input/index";
|
|
39
40
|
export * from "./lighting/index";
|
|
40
41
|
export * from "./shadow/index";
|
|
@@ -55,5 +56,5 @@ export * from "./clone/CloneManager";
|
|
|
55
56
|
export * from "./renderingHardwareInterface/index";
|
|
56
57
|
export * from "./physics/index";
|
|
57
58
|
export * from "./Utils";
|
|
58
|
-
export { Basic2DBatcher } from "./RenderPipeline/Basic2DBatcher";
|
|
59
59
|
export { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
|
|
60
|
+
export * from "./postProcess";
|
|
@@ -27,7 +27,7 @@ export declare class BaseMaterial extends Material {
|
|
|
27
27
|
get shader(): Shader;
|
|
28
28
|
set shader(value: Shader);
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Whether transparent of first shader pass render state.
|
|
31
31
|
*/
|
|
32
32
|
get isTransparent(): boolean;
|
|
33
33
|
set isTransparent(value: boolean);
|
|
@@ -32,7 +32,7 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
|
|
|
32
32
|
*/
|
|
33
33
|
get localBounds(): BoundingBox;
|
|
34
34
|
set localBounds(value: BoundingBox);
|
|
35
|
-
|
|
35
|
+
protected _updateRendererShaderData(context: RenderContext): void;
|
|
36
36
|
private _checkBlendShapeWeightLength;
|
|
37
37
|
private _onLocalBoundsChanged;
|
|
38
38
|
private _onSkinUpdated;
|
|
@@ -10,7 +10,16 @@ import { VelocityOverLifetimeModule } from "./modules/VelocityOverLifetimeModule
|
|
|
10
10
|
* Particle Generator.
|
|
11
11
|
*/
|
|
12
12
|
export declare class ParticleGenerator {
|
|
13
|
+
private static _tempVector20;
|
|
14
|
+
private static _tempVector21;
|
|
15
|
+
private static _tempVector22;
|
|
16
|
+
private static _tempVector30;
|
|
17
|
+
private static _tempVector31;
|
|
18
|
+
private static _tempMat;
|
|
19
|
+
private static _tempColor0;
|
|
20
|
+
private static _tempParticleRenderers;
|
|
13
21
|
private static readonly _particleIncreaseCount;
|
|
22
|
+
private static readonly _transformedBoundsIncreaseCount;
|
|
14
23
|
/** Use auto random seed. */
|
|
15
24
|
useAutoRandomSeed: boolean;
|
|
16
25
|
/** Main module. */
|
|
@@ -33,6 +42,10 @@ export declare class ParticleGenerator {
|
|
|
33
42
|
private _instanceVertexBufferBinding;
|
|
34
43
|
private _instanceVertices;
|
|
35
44
|
private _randomSeed;
|
|
45
|
+
private _transformedBoundsArray;
|
|
46
|
+
private _transformedBoundsCount;
|
|
47
|
+
private _firstActiveTransformedBoundingBox;
|
|
48
|
+
private _firstFreeTransformedBoundingBox;
|
|
36
49
|
/**
|
|
37
50
|
* Whether the particle generator is contain alive or is still creating particles.
|
|
38
51
|
*/
|
|
@@ -67,4 +80,11 @@ export declare class ParticleGenerator {
|
|
|
67
80
|
private _freeRetiredParticles;
|
|
68
81
|
private _addActiveParticlesToVertexBuffer;
|
|
69
82
|
private _addVertexBufferBindingsFilterDuplicate;
|
|
83
|
+
private _resizeTransformedBoundsArray;
|
|
84
|
+
private _retireTransformedBounds;
|
|
85
|
+
private _calculateGeneratorBounds;
|
|
86
|
+
private _mergeTransformedBounds;
|
|
87
|
+
private _calculateTransformedBounds;
|
|
88
|
+
private _addGravityToBounds;
|
|
89
|
+
private _getExtremeValueFromZero;
|
|
70
90
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3 } from "@galacean/engine-math";
|
|
1
|
+
import { BoundingBox, Vector3 } from "@galacean/engine-math";
|
|
2
2
|
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
3
|
import { Renderer } from "../Renderer";
|
|
4
4
|
import { ModelMesh } from "../mesh/ModelMesh";
|
|
@@ -40,6 +40,8 @@ export declare class ParticleRenderer extends Renderer {
|
|
|
40
40
|
*/
|
|
41
41
|
get mesh(): ModelMesh;
|
|
42
42
|
set mesh(value: ModelMesh);
|
|
43
|
+
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
44
|
+
protected _updateRendererShaderData(context: RenderContext): void;
|
|
43
45
|
protected _render(context: RenderContext): void;
|
|
44
46
|
protected _onDestroy(): void;
|
|
45
47
|
}
|
|
@@ -10,11 +10,15 @@ export declare class EmissionModule extends ParticleGeneratorModule {
|
|
|
10
10
|
rateOverTime: ParticleCompositeCurve;
|
|
11
11
|
/** The rate at which the emitter spawns new particles over distance. */
|
|
12
12
|
rateOverDistance: ParticleCompositeCurve;
|
|
13
|
-
|
|
14
|
-
shape: BaseShape;
|
|
13
|
+
_shape: BaseShape;
|
|
15
14
|
private _bursts;
|
|
16
15
|
private _currentBurstIndex;
|
|
17
16
|
private _burstRand;
|
|
17
|
+
/**
|
|
18
|
+
* The shape of the emitter.
|
|
19
|
+
*/
|
|
20
|
+
get shape(): BaseShape;
|
|
21
|
+
set shape(value: BaseShape);
|
|
18
22
|
/**
|
|
19
23
|
* Gets the burst array.
|
|
20
24
|
*/
|
|
@@ -21,18 +21,6 @@ export declare class MainModule implements ICustomClone {
|
|
|
21
21
|
isLoop: boolean;
|
|
22
22
|
/** Start delay in seconds. */
|
|
23
23
|
startDelay: ParticleCompositeCurve;
|
|
24
|
-
/** The initial lifetime of particles when emitted. */
|
|
25
|
-
startLifetime: ParticleCompositeCurve;
|
|
26
|
-
/** The initial speed of particles when the Particle Generator first spawns them. */
|
|
27
|
-
startSpeed: ParticleCompositeCurve;
|
|
28
|
-
/** A flag to enable specifying particle size individually for each axis. */
|
|
29
|
-
startSize3D: boolean;
|
|
30
|
-
/** The initial size of particles along the x-axis when the Particle Generator first spawns them. */
|
|
31
|
-
startSizeX: ParticleCompositeCurve;
|
|
32
|
-
/** The initial size of particles along the y-axis when the Particle Generator first spawns them. */
|
|
33
|
-
startSizeY: ParticleCompositeCurve;
|
|
34
|
-
/** The initial size of particles along the z-axis when the Particle Generator first spawns them. */
|
|
35
|
-
startSizeZ: ParticleCompositeCurve;
|
|
36
24
|
/** A flag to enable 3D particle rotation, when disabled, only `startRotationZ` is used. */
|
|
37
25
|
startRotation3D: boolean;
|
|
38
26
|
/** The initial rotation of particles around the x-axis when emitted.*/
|
|
@@ -46,9 +34,6 @@ export declare class MainModule implements ICustomClone {
|
|
|
46
34
|
/** The mode of start color */
|
|
47
35
|
startColor: ParticleCompositeGradient;
|
|
48
36
|
/** A scale that this Particle Generator applies to gravity, defined by Physics.gravity. */
|
|
49
|
-
gravityModifier: ParticleCompositeCurve;
|
|
50
|
-
/** This selects the space in which to simulate particles. It can be either world or local space. */
|
|
51
|
-
simulationSpace: ParticleSimulationSpace;
|
|
52
37
|
/** Override the default playback speed of the Particle Generator. */
|
|
53
38
|
simulationSpeed: number;
|
|
54
39
|
/** Control how the Particle Generator applies its Transform component to the particles it emits. */
|
|
@@ -56,8 +41,56 @@ export declare class MainModule implements ICustomClone {
|
|
|
56
41
|
/** If set to true, the Particle Generator automatically begins to play on startup. */
|
|
57
42
|
playOnEnabled: boolean;
|
|
58
43
|
readonly _gravityModifierRand: Rand;
|
|
44
|
+
private _startLifetime;
|
|
45
|
+
private _startSpeed;
|
|
46
|
+
private _startSize3D;
|
|
47
|
+
private _startSizeX;
|
|
48
|
+
private _startSizeY;
|
|
49
|
+
private _startSizeZ;
|
|
50
|
+
private _gravityModifier;
|
|
51
|
+
private _simulationSpace;
|
|
59
52
|
private _generator;
|
|
60
53
|
private _gravity;
|
|
54
|
+
/**
|
|
55
|
+
* The initial lifetime of particles when emitted.
|
|
56
|
+
*/
|
|
57
|
+
get startLifetime(): ParticleCompositeCurve;
|
|
58
|
+
set startLifetime(value: ParticleCompositeCurve);
|
|
59
|
+
/**
|
|
60
|
+
* The initial speed of particles when the Particle Generator first spawns them.
|
|
61
|
+
*/
|
|
62
|
+
get startSpeed(): ParticleCompositeCurve;
|
|
63
|
+
set startSpeed(value: ParticleCompositeCurve);
|
|
64
|
+
/**
|
|
65
|
+
* A flag to enable specifying particle size individually for each axis.
|
|
66
|
+
*/
|
|
67
|
+
get startSize3D(): boolean;
|
|
68
|
+
set startSize3D(value: boolean);
|
|
69
|
+
/**
|
|
70
|
+
* The initial size of particles along the x-axis when the Particle Generator first spawns them.
|
|
71
|
+
*/
|
|
72
|
+
get startSizeX(): ParticleCompositeCurve;
|
|
73
|
+
set startSizeX(value: ParticleCompositeCurve);
|
|
74
|
+
/**
|
|
75
|
+
* The initial size of particles along the y-axis when the Particle Generator first spawns them.
|
|
76
|
+
*/
|
|
77
|
+
get startSizeY(): ParticleCompositeCurve;
|
|
78
|
+
set startSizeY(value: ParticleCompositeCurve);
|
|
79
|
+
/**
|
|
80
|
+
* The initial size of particles along the z-axis when the Particle Generator first spawns them.
|
|
81
|
+
*/
|
|
82
|
+
get startSizeZ(): ParticleCompositeCurve;
|
|
83
|
+
set startSizeZ(value: ParticleCompositeCurve);
|
|
84
|
+
/**
|
|
85
|
+
* A scale that this Particle Generator applies to gravity, defined by Physics.gravity.
|
|
86
|
+
*/
|
|
87
|
+
get gravityModifier(): ParticleCompositeCurve;
|
|
88
|
+
set gravityModifier(value: ParticleCompositeCurve);
|
|
89
|
+
/**
|
|
90
|
+
* This selects the space in which to simulate particles. It can be either world or local space.
|
|
91
|
+
*/
|
|
92
|
+
get simulationSpace(): ParticleSimulationSpace;
|
|
93
|
+
set simulationSpace(value: ParticleSimulationSpace);
|
|
61
94
|
/**
|
|
62
95
|
* Max particles count.
|
|
63
96
|
*/
|
|
@@ -68,4 +101,5 @@ export declare class MainModule implements ICustomClone {
|
|
|
68
101
|
*/
|
|
69
102
|
get startSize(): ParticleCompositeCurve;
|
|
70
103
|
set startSize(value: ParticleCompositeCurve);
|
|
104
|
+
private _onCompositeCurveChange;
|
|
71
105
|
}
|
|
@@ -4,16 +4,38 @@ import { ParticleCurve } from "./ParticleCurve";
|
|
|
4
4
|
* Particle composite curve.
|
|
5
5
|
*/
|
|
6
6
|
export declare class ParticleCompositeCurve {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
private _updateManager;
|
|
8
|
+
private _mode;
|
|
9
|
+
private _constantMin;
|
|
10
|
+
private _constantMax;
|
|
11
|
+
private _curveMin;
|
|
12
|
+
private _curveMax;
|
|
13
|
+
private _updateDispatch;
|
|
14
|
+
/**
|
|
15
|
+
* The curve mode.
|
|
16
|
+
*/
|
|
17
|
+
get mode(): ParticleCurveMode;
|
|
18
|
+
set mode(value: ParticleCurveMode);
|
|
19
|
+
/**
|
|
20
|
+
* The min constant value used by the curve if mode is set to `TwoConstants`.
|
|
21
|
+
*/
|
|
22
|
+
get constantMin(): number;
|
|
23
|
+
set constantMin(value: number);
|
|
24
|
+
/**
|
|
25
|
+
* The max constant value used by the curve if mode is set to `TwoConstants`.
|
|
26
|
+
*/
|
|
27
|
+
get constantMax(): number;
|
|
28
|
+
set constantMax(value: number);
|
|
29
|
+
/**
|
|
30
|
+
* The min curve used by the curve if mode is set to `TwoCurves`.
|
|
31
|
+
*/
|
|
32
|
+
get curveMin(): ParticleCurve;
|
|
33
|
+
set curveMin(value: ParticleCurve);
|
|
34
|
+
/**
|
|
35
|
+
* The max curve used by the curve if mode is set to `TwoCurves`.
|
|
36
|
+
*/
|
|
37
|
+
get curveMax(): ParticleCurve;
|
|
38
|
+
set curveMax(value: ParticleCurve);
|
|
17
39
|
/**
|
|
18
40
|
* The constant value used by the curve if mode is set to `Constant`.
|
|
19
41
|
*/
|
|
@@ -53,4 +75,7 @@ export declare class ParticleCompositeCurve {
|
|
|
53
75
|
* @returns - The result curve value
|
|
54
76
|
*/
|
|
55
77
|
evaluate(time: number, lerpFactor: number): number;
|
|
78
|
+
private _getMaxKeyValue;
|
|
79
|
+
private _getMinKeyValue;
|
|
80
|
+
private _onCurveChange;
|
|
56
81
|
}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Particle curve.
|
|
3
3
|
*/
|
|
4
4
|
export declare class ParticleCurve {
|
|
5
|
+
private _updateManager;
|
|
5
6
|
private _keys;
|
|
6
7
|
private _typeArray;
|
|
7
8
|
private _typeArrayDirty;
|
|
9
|
+
private _updateDispatch;
|
|
8
10
|
/**
|
|
9
11
|
* The keys of the curve.
|
|
10
12
|
*/
|
|
@@ -41,16 +43,21 @@ export declare class ParticleCurve {
|
|
|
41
43
|
* The key of the curve.
|
|
42
44
|
*/
|
|
43
45
|
export declare class CurveKey {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
private _updateManager;
|
|
47
|
+
private _time;
|
|
48
|
+
private _value;
|
|
49
|
+
/**
|
|
50
|
+
* The key time.
|
|
51
|
+
*/
|
|
52
|
+
get time(): number;
|
|
53
|
+
set time(value: number);
|
|
54
|
+
/**
|
|
55
|
+
* The key value.
|
|
56
|
+
*/
|
|
57
|
+
get value(): number;
|
|
58
|
+
set value(value: number);
|
|
48
59
|
/**
|
|
49
60
|
* Create a new key.
|
|
50
61
|
*/
|
|
51
|
-
constructor(
|
|
52
|
-
/** The key time. */
|
|
53
|
-
time: number,
|
|
54
|
-
/** The key value. */
|
|
55
|
-
value: number);
|
|
62
|
+
constructor(time: number, value: number);
|
|
56
63
|
}
|
|
@@ -4,8 +4,12 @@ import { ParticleGenerator } from "../ParticleGenerator";
|
|
|
4
4
|
* Particle generator module.
|
|
5
5
|
*/
|
|
6
6
|
export declare abstract class ParticleGeneratorModule {
|
|
7
|
-
/** Specifies whether the module is enabled or not. */
|
|
8
|
-
enabled: boolean;
|
|
9
7
|
protected _generator: ParticleGenerator;
|
|
8
|
+
protected _enabled: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Specifies whether the module is enabled or not.
|
|
11
|
+
*/
|
|
12
|
+
get enabled(): boolean;
|
|
13
|
+
set enabled(value: boolean);
|
|
10
14
|
protected _enableMacro(shaderData: ShaderData, lastEnableMacro: ShaderMacro, enableMacro: ShaderMacro): ShaderMacro;
|
|
11
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ShaderMacro } from "../../shader/ShaderMacro";
|
|
2
2
|
import { ShaderProperty } from "../../shader/ShaderProperty";
|
|
3
|
+
import { ParticleGenerator } from "../ParticleGenerator";
|
|
3
4
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
4
5
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
5
6
|
/**
|
|
@@ -15,20 +16,38 @@ export declare class SizeOverLifetimeModule extends ParticleGeneratorModule {
|
|
|
15
16
|
static readonly _maxCurveXProperty: ShaderProperty;
|
|
16
17
|
static readonly _maxCurveYProperty: ShaderProperty;
|
|
17
18
|
static readonly _maxCurveZProperty: ShaderProperty;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/** Size curve over lifetime for y axis. */
|
|
23
|
-
sizeY: ParticleCompositeCurve;
|
|
24
|
-
/** Size curve over lifetime for z axis. */
|
|
25
|
-
sizeZ: ParticleCompositeCurve;
|
|
19
|
+
private _separateAxes;
|
|
20
|
+
private _sizeX;
|
|
21
|
+
private _sizeY;
|
|
22
|
+
private _sizeZ;
|
|
26
23
|
private _enableSeparateMacro;
|
|
27
24
|
private _isCurveMacro;
|
|
28
25
|
private _isRandomTwoMacro;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies whether the Size is separate on each axis.
|
|
28
|
+
*/
|
|
29
|
+
set separateAxes(value: boolean);
|
|
30
|
+
get separateAxes(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Size curve over lifetime for x axis.
|
|
33
|
+
*/
|
|
34
|
+
get sizeX(): ParticleCompositeCurve;
|
|
35
|
+
set sizeX(value: ParticleCompositeCurve);
|
|
36
|
+
/**
|
|
37
|
+
* Size curve over lifetime for y axis.
|
|
38
|
+
*/
|
|
39
|
+
get sizeY(): ParticleCompositeCurve;
|
|
40
|
+
set sizeY(value: ParticleCompositeCurve);
|
|
41
|
+
/**
|
|
42
|
+
* Size curve over lifetime for z axis.
|
|
43
|
+
*/
|
|
44
|
+
get sizeZ(): ParticleCompositeCurve;
|
|
45
|
+
set sizeZ(value: ParticleCompositeCurve);
|
|
29
46
|
/**
|
|
30
47
|
* Size curve over lifetime.
|
|
31
48
|
*/
|
|
32
49
|
get size(): ParticleCompositeCurve;
|
|
33
50
|
set size(value: ParticleCompositeCurve);
|
|
51
|
+
constructor(generator: ParticleGenerator);
|
|
52
|
+
private _onCompositeCurveChange;
|
|
34
53
|
}
|