@galacean/engine-core 2.0.0-alpha.43 → 2.0.0-alpha.45
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 +3 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -3
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/FontAtlas.d.ts +23 -1
- package/types/2d/atlas/SpriteAtlas.d.ts +8 -0
- package/types/2d/sprite/Sprite.d.ts +27 -1
- package/types/2d/sprite/SpriteMask.d.ts +43 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +29 -0
- package/types/2d/text/CharInfo.d.ts +20 -1
- package/types/2d/text/CharRenderInfo.d.ts +15 -1
- package/types/2d/text/Font.d.ts +10 -0
- package/types/2d/text/SubFont.d.ts +35 -1
- package/types/2d/text/TextRenderer.d.ts +53 -0
- package/types/2d/text/TextUtils.d.ts +89 -1
- package/types/Background.d.ts +17 -0
- package/types/BasicResources.d.ts +52 -0
- package/types/Camera.d.ts +71 -1
- package/types/Canvas.d.ts +13 -0
- package/types/Component.d.ts +33 -0
- package/types/ComponentsDependencies.d.ts +34 -1
- package/types/ComponentsManager.d.ts +17 -0
- package/types/Engine.d.ts +106 -2
- package/types/Entity.d.ts +88 -0
- package/types/Polyfill.d.ts +12 -1
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +3 -0
- package/types/RenderPipeline/BatcherManager.d.ts +23 -1
- package/types/RenderPipeline/CullingResults.d.ts +17 -1
- package/types/RenderPipeline/DepthOnlyPass.d.ts +18 -1
- package/types/RenderPipeline/InstanceBuffer.d.ts +28 -1
- package/types/RenderPipeline/MaskManager.d.ts +36 -1
- package/types/RenderPipeline/OpaqueTexturePass.d.ts +16 -1
- package/types/RenderPipeline/PipelineUtils.d.ts +11 -1
- package/types/RenderPipeline/PrimitiveChunk.d.ts +27 -1
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +16 -1
- package/types/RenderPipeline/RenderContext.d.ts +46 -1
- package/types/RenderPipeline/RenderElement.d.ts +9 -0
- package/types/RenderPipeline/RenderQueue.d.ts +23 -1
- package/types/RenderPipeline/RenderTargetPool.d.ts +17 -1
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +14 -1
- package/types/RenderPipeline/VertexArea.d.ts +10 -1
- package/types/RenderPipeline/VertexMergeBatcher.d.ts +11 -1
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
- package/types/RenderPipeline/index.d.ts +2 -0
- package/types/Renderer.d.ts +58 -0
- package/types/Scene.d.ts +28 -0
- package/types/SceneManager.d.ts +13 -0
- package/types/Script.d.ts +40 -0
- package/types/SystemInfo.d.ts +10 -0
- package/types/Transform.d.ts +13 -0
- package/types/UpdateFlag.d.ts +3 -0
- package/types/UpdateFlagManager.d.ts +41 -1
- package/types/Utils.d.ts +20 -0
- package/types/VirtualCamera.d.ts +16 -1
- package/types/animation/AnimationClip.d.ts +5 -0
- package/types/animation/AnimationClipCurveBinding.d.ts +16 -1
- package/types/animation/Animator.d.ts +25 -0
- package/types/animation/AnimatorController.d.ts +17 -0
- package/types/animation/AnimatorControllerLayer.d.ts +9 -0
- package/types/animation/AnimatorControllerParameter.d.ts +4 -0
- package/types/animation/AnimatorState.d.ts +44 -0
- package/types/animation/AnimatorStateInstance.d.ts +8 -0
- package/types/animation/AnimatorStateMachine.d.ts +14 -0
- package/types/animation/AnimatorStateTransition.d.ts +9 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
- package/types/animation/StateMachineScript.d.ts +2 -0
- package/types/animation/animationCurve/AnimationArrayCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationBoolCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationColorCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +38 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +41 -0
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +18 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +18 -0
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector2Curve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector3Curve.d.ts +43 -0
- package/types/animation/animationCurve/AnimationVector4Curve.d.ts +39 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +18 -1
- package/types/animation/enums/AnimatorStatePlayState.d.ts +8 -1
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +15 -1
- package/types/animation/internal/AnimationEventHandler.d.ts +8 -1
- package/types/animation/internal/AnimatorLayerData.d.ts +28 -1
- package/types/animation/internal/AnimatorStateData.d.ts +14 -1
- package/types/animation/internal/AnimatorStatePlayData.d.ts +27 -1
- package/types/animation/internal/AnimatorTempValue.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +39 -0
- package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +10 -1
- package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +23 -1
- package/types/asset/GraphicsResource.d.ts +10 -0
- package/types/asset/IReferable.d.ts +8 -0
- package/types/asset/ReferResource.d.ts +28 -0
- package/types/asset/RenderingStatistics.d.ts +8 -0
- package/types/asset/ResourceManager.d.ts +94 -4
- package/types/audio/AudioClip.d.ts +8 -0
- package/types/audio/AudioManager.d.ts +14 -0
- package/types/audio/AudioSource.d.ts +17 -0
- package/types/base/EngineObject.d.ts +4 -0
- package/types/base/Time.d.ts +13 -0
- package/types/clone/CloneDecorators.d.ts +20 -0
- package/types/clone/CloneUtil.d.ts +30 -1
- package/types/clone/ComponentCloner.d.ts +11 -1
- package/types/enums/CameraType.d.ts +9 -1
- package/types/env-probe/CubeProbe.d.ts +2 -0
- package/types/graphic/Buffer.d.ts +10 -0
- package/types/graphic/BufferUtil.d.ts +5 -0
- package/types/graphic/IndexBufferBinding.d.ts +4 -0
- package/types/graphic/Mesh.d.ts +54 -0
- package/types/graphic/Primitive.d.ts +50 -1
- package/types/graphic/TransformFeedback.d.ts +46 -1
- package/types/graphic/TransformFeedbackPrimitive.d.ts +67 -1
- package/types/graphic/TransformFeedbackSimulator.d.ts +55 -1
- package/types/graphic/VertexBufferBinding.d.ts +4 -0
- package/types/input/InputManager.d.ts +19 -0
- package/types/input/enums/PointerButton.d.ts +8 -0
- package/types/input/keyboard/KeyboardManager.d.ts +41 -1
- package/types/input/pointer/Pointer.d.ts +36 -0
- package/types/input/pointer/PointerEventData.d.ts +4 -0
- package/types/input/pointer/PointerManager.d.ts +58 -0
- package/types/input/pointer/emitter/IHitResult.d.ts +11 -1
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +20 -1
- package/types/input/wheel/WheelManager.d.ts +34 -1
- package/types/lighting/AmbientLight.d.ts +9 -0
- package/types/lighting/DirectLight.d.ts +17 -0
- package/types/lighting/Light.d.ts +2 -0
- package/types/lighting/LightManager.d.ts +57 -0
- package/types/lighting/PointLight.d.ts +17 -0
- package/types/lighting/SpotLight.d.ts +17 -0
- package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +4 -0
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +38 -1
- package/types/material/BaseMaterial.d.ts +4 -0
- package/types/material/Material.d.ts +2 -0
- package/types/mesh/BlendShape.d.ts +13 -0
- package/types/mesh/BlendShapeFrame.d.ts +7 -0
- package/types/mesh/BlendShapeManager.d.ts +101 -1
- package/types/mesh/MeshRenderer.d.ts +37 -0
- package/types/mesh/ModelMesh.d.ts +18 -0
- package/types/mesh/PrimitiveMesh.d.ts +31 -3
- package/types/mesh/PrimitiveMeshRestorer.d.ts +107 -0
- package/types/mesh/Skin.d.ts +10 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +21 -0
- package/types/particle/ParticleBufferUtils.d.ts +26 -1
- package/types/particle/ParticleGenerator.d.ts +102 -0
- package/types/particle/ParticleRenderer.d.ts +55 -0
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +52 -1
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +25 -1
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
- package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +8 -1
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +17 -1
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +12 -0
- package/types/particle/modules/CustomDataModule.d.ts +5 -0
- package/types/particle/modules/EmissionModule.d.ts +28 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
- package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +20 -1
- package/types/particle/modules/MainModule.d.ts +33 -1
- package/types/particle/modules/NoiseModule.d.ts +12 -1
- package/types/particle/modules/ParticleCompositeCurve.d.ts +37 -0
- package/types/particle/modules/ParticleCurve.d.ts +28 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +7 -0
- package/types/particle/modules/ParticleGradient.d.ts +16 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +12 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +16 -0
- package/types/particle/modules/SubEmitter.d.ts +3 -0
- package/types/particle/modules/SubEmittersModule.d.ts +17 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +28 -1
- package/types/particle/modules/shape/BaseShape.d.ts +33 -1
- package/types/particle/modules/shape/BoxShape.d.ts +13 -1
- package/types/particle/modules/shape/CircleShape.d.ts +13 -0
- package/types/particle/modules/shape/ConeShape.d.ts +13 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
- package/types/particle/modules/shape/MeshShape.d.ts +17 -0
- package/types/particle/modules/shape/ShapeUtils.d.ts +13 -1
- package/types/particle/modules/shape/SphereShape.d.ts +13 -0
- package/types/physics/CharacterController.d.ts +21 -0
- package/types/physics/Collider.d.ts +39 -0
- package/types/physics/Collision.d.ts +3 -0
- package/types/physics/DynamicCollider.d.ts +14 -0
- package/types/physics/PhysicsMaterial.d.ts +3 -0
- package/types/physics/PhysicsScene.d.ts +51 -0
- package/types/physics/StaticCollider.d.ts +5 -0
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +8 -1
- package/types/physics/enums/HingeJointFlag.d.ts +14 -1
- package/types/physics/joint/HingeJoint.d.ts +4 -0
- package/types/physics/joint/Joint.d.ts +20 -0
- package/types/physics/joint/JointLimits.d.ts +3 -0
- package/types/physics/joint/JointMotor.d.ts +3 -0
- package/types/physics/shape/ColliderShape.d.ts +17 -0
- package/types/physics/shape/MeshColliderShape.d.ts +4 -0
- package/types/postProcess/FinalPass.d.ts +19 -1
- package/types/postProcess/PostProcess.d.ts +2 -0
- package/types/postProcess/PostProcessEffect.d.ts +4 -0
- package/types/postProcess/PostProcessEffectParameter.d.ts +4 -0
- package/types/postProcess/PostProcessManager.d.ts +43 -0
- package/types/postProcess/effects/BloomEffect.d.ts +25 -0
- package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -1
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +40 -1
- package/types/shader/Shader.d.ts +22 -0
- package/types/shader/ShaderBlockProperty.d.ts +19 -1
- package/types/shader/ShaderData.d.ts +29 -0
- package/types/shader/ShaderFactory.d.ts +23 -0
- package/types/shader/ShaderMacro.d.ts +15 -0
- package/types/shader/ShaderMacroCollection.d.ts +57 -1
- package/types/shader/ShaderMacroProcessor.d.ts +72 -1
- package/types/shader/ShaderPass.d.ts +38 -0
- package/types/shader/ShaderProgram.d.ts +91 -1
- package/types/shader/ShaderProgramMap.d.ts +20 -1
- package/types/shader/ShaderProperty.d.ts +17 -0
- package/types/shader/ShaderTagKey.d.ts +2 -0
- package/types/shader/ShaderUniform.d.ts +49 -1
- package/types/shader/ShaderUniformBlock.d.ts +9 -1
- package/types/shader/enums/ConstantBufferBindingPoint.d.ts +7 -1
- package/types/shader/state/BlendState.d.ts +14 -0
- package/types/shader/state/DepthState.d.ts +14 -0
- package/types/shader/state/RasterState.d.ts +17 -0
- package/types/shader/state/RenderState.d.ts +11 -0
- package/types/shader/state/StencilState.d.ts +13 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +5 -0
- package/types/shadow/ShadowSliceData.d.ts +13 -1
- package/types/shadow/ShadowUtils.d.ts +43 -1
- package/types/sky/Sky.d.ts +9 -0
- package/types/texture/RenderTarget.d.ts +21 -0
- package/types/texture/Texture.d.ts +21 -0
- package/types/texture/Texture2D.d.ts +4 -0
- package/types/texture/Texture2DArray.d.ts +4 -0
- package/types/texture/TextureCube.d.ts +4 -0
- package/types/texture/TextureUtils.d.ts +16 -1
- package/types/trail/TrailRenderer.d.ts +5 -0
- package/types/ui/IUICanvas.d.ts +16 -1
- package/types/utils/DisorderedArray.d.ts +2 -0
- package/types/xr/XRManager.d.ts +28 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { DataObject } from "../base/DataObject";
|
|
2
|
+
import { BoundingBox, Color, Vector3 } from "@galacean/engine-math";
|
|
2
3
|
import type { ICloneHook } from "../clone/ICloneHook";
|
|
4
|
+
import { Primitive } from "../graphic/Primitive";
|
|
5
|
+
import { SubMesh } from "../graphic/SubMesh";
|
|
6
|
+
import { VertexBufferBinding } from "../graphic/VertexBufferBinding";
|
|
7
|
+
import { ShaderData } from "../shader";
|
|
8
|
+
import { ParticleRenderer } from "./ParticleRenderer";
|
|
9
|
+
import { ParticleTransformFeedbackSimulator } from "./ParticleTransformFeedbackSimulator";
|
|
3
10
|
import { ParticleStopMode } from "./enums/ParticleStopMode";
|
|
4
11
|
import { ColorOverLifetimeModule } from "./modules/ColorOverLifetimeModule";
|
|
5
12
|
import { CustomDataModule } from "./modules/CustomDataModule";
|
|
@@ -57,6 +64,32 @@ export declare class ParticleGenerator extends DataObject implements ICloneHook<
|
|
|
57
64
|
readonly subEmitters: SubEmittersModule;
|
|
58
65
|
/** Custom data module. */
|
|
59
66
|
readonly customData: CustomDataModule;
|
|
67
|
+
/** @internal */
|
|
68
|
+
_currentParticleCount: number;
|
|
69
|
+
/** @internal */
|
|
70
|
+
_playTime: number;
|
|
71
|
+
/** @internal */
|
|
72
|
+
_firstNewElement: number;
|
|
73
|
+
/** @internal */
|
|
74
|
+
_firstActiveElement: number;
|
|
75
|
+
/** @internal */
|
|
76
|
+
_firstFreeElement: number;
|
|
77
|
+
/** @internal */
|
|
78
|
+
_firstRetiredElement: number;
|
|
79
|
+
/** @internal */
|
|
80
|
+
_primitive: Primitive;
|
|
81
|
+
/** @internal */
|
|
82
|
+
_vertexBufferBindings: VertexBufferBinding[];
|
|
83
|
+
/** @internal */
|
|
84
|
+
_subPrimitive: SubMesh;
|
|
85
|
+
/** @internal */
|
|
86
|
+
readonly _renderer: ParticleRenderer;
|
|
87
|
+
/** @internal */
|
|
88
|
+
_feedbackSimulator: ParticleTransformFeedbackSimulator;
|
|
89
|
+
/** @internal */
|
|
90
|
+
_useTransformFeedback: boolean;
|
|
91
|
+
/** @internal */
|
|
92
|
+
private _feedbackBindingIndex;
|
|
60
93
|
private _feedbackReadback;
|
|
61
94
|
private _isPlaying;
|
|
62
95
|
private _instanceBufferResized;
|
|
@@ -89,6 +122,10 @@ export declare class ParticleGenerator extends DataObject implements ICloneHook<
|
|
|
89
122
|
*/
|
|
90
123
|
get randomSeed(): number;
|
|
91
124
|
set randomSeed(value: number);
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
constructor(renderer: ParticleRenderer);
|
|
92
129
|
/**
|
|
93
130
|
* Start emitting particles.
|
|
94
131
|
* @param withChildren - Whether to start the particle generator of the child entity
|
|
@@ -105,12 +142,77 @@ export declare class ParticleGenerator extends DataObject implements ICloneHook<
|
|
|
105
142
|
* @param count - Number of particles to emit
|
|
106
143
|
*/
|
|
107
144
|
emit(count: number): void;
|
|
145
|
+
/**
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
_emit(playTime: number, count: number, emitWorldPositionOverride?: Vector3): number;
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
_update(elapsedTime: number): void;
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
* Run Transform Feedback simulation pass.
|
|
156
|
+
*/
|
|
157
|
+
_updateFeedback(shaderData: ShaderData, deltaTime: number): void;
|
|
158
|
+
/**
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
_reorganizeGeometryBuffers(): void;
|
|
162
|
+
/**
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
_resizeInstanceBuffer(isIncrease: boolean, increaseCount?: number): void;
|
|
166
|
+
/**
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
170
|
+
/**
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
_resetGlobalRandSeed(seed: number): void;
|
|
174
|
+
/**
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
_setTransformFeedback(): void;
|
|
178
|
+
/**
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
_getAliveParticleCount(): number;
|
|
182
|
+
/**
|
|
183
|
+
* @internal
|
|
184
|
+
*/
|
|
185
|
+
_getNotRetiredParticleCount(): number;
|
|
108
186
|
/**
|
|
109
187
|
* @inheritdoc
|
|
110
188
|
*/
|
|
111
189
|
_onClone(target: ParticleGenerator): void;
|
|
190
|
+
/**
|
|
191
|
+
* @internal
|
|
192
|
+
*/
|
|
193
|
+
_destroy(): void;
|
|
194
|
+
/**
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
_updateBoundsSimulationLocal(bounds: BoundingBox): void;
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
_updateBoundsSimulationWorld(bounds: BoundingBox): void;
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
_freeBoundsArray(): void;
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
_generateTransformedBounds(): void;
|
|
112
210
|
private _addNewParticle;
|
|
113
211
|
private _onParticleBirth;
|
|
212
|
+
/**
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
_emitFromSubEmitter(count: number, worldPosition: Vector3, inheritColor: Color, inheritSize: Vector3, inheritRotation: Vector3, worldDirection?: Vector3): void;
|
|
114
216
|
private _addFeedbackParticle;
|
|
115
217
|
private _clearActiveParticles;
|
|
116
218
|
private _retireActiveParticles;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BoundingBox, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
2
3
|
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
4
|
import { Renderer } from "../Renderer";
|
|
5
|
+
import { TransformModifyFlags } from "../Transform";
|
|
4
6
|
import { ModelMesh } from "../mesh/ModelMesh";
|
|
5
7
|
import { ParticleGenerator } from "./ParticleGenerator";
|
|
6
8
|
import { ParticleRenderMode } from "./enums/ParticleRenderMode";
|
|
@@ -25,6 +27,10 @@ export declare class ParticleRenderer extends Renderer {
|
|
|
25
27
|
lengthScale: number;
|
|
26
28
|
/** The pivot of particle. */
|
|
27
29
|
pivot: Vector3;
|
|
30
|
+
/** @internal */
|
|
31
|
+
_generatorBounds: BoundingBox;
|
|
32
|
+
/** @internal */
|
|
33
|
+
_transformedBounds: BoundingBox;
|
|
28
34
|
private _mesh;
|
|
29
35
|
private _renderMode;
|
|
30
36
|
private _currentRenderModeMacro;
|
|
@@ -40,6 +46,26 @@ export declare class ParticleRenderer extends Renderer {
|
|
|
40
46
|
*/
|
|
41
47
|
get mesh(): ModelMesh;
|
|
42
48
|
set mesh(value: ModelMesh);
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
constructor(entity: Entity);
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
_onEnable(): void;
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
_onDisable(): void;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
_prepareRender(context: RenderContext): void;
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_updateTransformShaderData(context: RenderContext, onlyMVP: boolean): void;
|
|
43
69
|
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
44
70
|
protected _update(context: RenderContext): void;
|
|
45
71
|
protected _render(context: RenderContext): void;
|
|
@@ -48,4 +74,33 @@ export declare class ParticleRenderer extends Renderer {
|
|
|
48
74
|
* @inheritdoc
|
|
49
75
|
*/
|
|
50
76
|
_onClone(target: ParticleRenderer): void;
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
_isContainDirtyFlag(type: number): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_setDirtyFlagFalse(type: number): void;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
_onWorldVolumeChanged(): void;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
_onGeneratorParamsChanged(): void;
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
_onTransformChanged(type: TransformModifyFlags): void;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
export declare enum ParticleUpdateFlags {
|
|
102
|
+
/** On World Transform Changed */
|
|
103
|
+
TransformVolume = 2,
|
|
104
|
+
/** On Generator Bounds Related Params Changed */
|
|
105
|
+
GeneratorVolume = 4
|
|
51
106
|
}
|
|
@@ -1 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { VertexBufferBinding } from "../graphic/VertexBufferBinding";
|
|
4
|
+
import { ShaderData } from "../shader/ShaderData";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* Particle-specific Transform Feedback simulation.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ParticleTransformFeedbackSimulator {
|
|
10
|
+
private static readonly _deltaTimeProperty;
|
|
11
|
+
/** @internal */
|
|
12
|
+
_instanceBinding: VertexBufferBinding;
|
|
13
|
+
private _simulator;
|
|
14
|
+
private _particleInitData;
|
|
15
|
+
private _oldReadBuffer;
|
|
16
|
+
private _oldWriteBuffer;
|
|
17
|
+
/**
|
|
18
|
+
* The current read buffer binding for the render pass.
|
|
19
|
+
*/
|
|
20
|
+
get readBinding(): VertexBufferBinding;
|
|
21
|
+
constructor(engine: Engine);
|
|
22
|
+
/**
|
|
23
|
+
* Resize feedback buffers.
|
|
24
|
+
* Saves pre-resize buffers internally for subsequent `copyOldBufferData` / `destroyOldBuffers` calls.
|
|
25
|
+
* @param particleCount - Number of particles to allocate
|
|
26
|
+
* @param instanceBinding - New instance vertex buffer binding
|
|
27
|
+
*/
|
|
28
|
+
resize(particleCount: number, instanceBinding: VertexBufferBinding): void;
|
|
29
|
+
/**
|
|
30
|
+
* Write initial position and velocity for a newly emitted particle.
|
|
31
|
+
*/
|
|
32
|
+
writeParticleData(index: number, position: Vector3, vx: number, vy: number, vz: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* Copy data from pre-resize buffers to current buffers.
|
|
35
|
+
* Must be called after `resize` which saves the old buffers.
|
|
36
|
+
*/
|
|
37
|
+
copyOldBufferData(srcByteOffset: number, dstByteOffset: number, byteLength: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* Destroy pre-resize buffers saved during `resize`.
|
|
40
|
+
*/
|
|
41
|
+
destroyOldBuffers(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Run one simulation step.
|
|
44
|
+
* @param shaderData - Shader data with current macros and uniforms
|
|
45
|
+
* @param particleCount - Total particle slot count
|
|
46
|
+
* @param firstActive - First active particle index in ring buffer
|
|
47
|
+
* @param firstFree - First free particle index in ring buffer
|
|
48
|
+
* @param deltaTime - Frame delta time
|
|
49
|
+
*/
|
|
50
|
+
update(shaderData: ShaderData, particleCount: number, firstActive: number, firstFree: number, deltaTime: number): void;
|
|
51
|
+
destroy(): void;
|
|
52
|
+
}
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ParticleRandomSubSeeds {
|
|
5
|
+
Burst = 592910910,
|
|
6
|
+
StartDelay = 322376503,
|
|
7
|
+
StartColor = 306581307,
|
|
8
|
+
StartSize = 1793934638,
|
|
9
|
+
StartRotation = 3737431713,
|
|
10
|
+
randomizeRotationDirection = 2527743459,
|
|
11
|
+
StartLifetime = 2368504881,
|
|
12
|
+
StartSpeed = 4085612399,
|
|
13
|
+
VelocityOverLifetime = 3774601268,
|
|
14
|
+
ColorOverLifetime = 326370691,
|
|
15
|
+
SizeOverLifetime = 1494990940,
|
|
16
|
+
RotationOverLifetime = 1089181156,
|
|
17
|
+
TextureSheetAnimation = 197469413,
|
|
18
|
+
Shape = 2941263940,
|
|
19
|
+
GravityModifier = 2759560269,
|
|
20
|
+
ForceOverLifetime = 3875246972,
|
|
21
|
+
LimitVelocityOverLifetime = 3047300990,
|
|
22
|
+
Noise = 4105357473,
|
|
23
|
+
SubEmitter = 2622110509,
|
|
24
|
+
EmissionRate = 2625893077
|
|
25
|
+
}
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ParticleInstanceVertexAttribute {
|
|
5
|
+
ShapePositionStartLifeTime = "a_ShapePositionStartLifeTime",
|
|
6
|
+
DirectionTime = "a_DirectionTime",
|
|
7
|
+
StartColor = "a_StartColor",
|
|
8
|
+
StartSize = "a_StartSize",
|
|
9
|
+
StartRotation0 = "a_StartRotation0",
|
|
10
|
+
StartSpeed = "a_StartSpeed",
|
|
11
|
+
Random0 = "a_Random0",
|
|
12
|
+
Random1 = "a_Random1",
|
|
13
|
+
SimulationWorldPosition = "a_SimulationWorldPosition",
|
|
14
|
+
SimulationWorldRotation = "a_SimulationWorldRotation",
|
|
15
|
+
SimulationUV = "a_SimulationUV",
|
|
16
|
+
Random2 = "a_Random2"
|
|
17
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData } from "../../shader/ShaderData";
|
|
1
3
|
import { ShaderMacro } from "../../shader/ShaderMacro";
|
|
2
4
|
import { ShaderProperty } from "../../shader/ShaderProperty";
|
|
3
5
|
import { ParticleCompositeGradient } from "./ParticleCompositeGradient";
|
|
@@ -15,6 +17,16 @@ export declare class ColorOverLifetimeModule extends ParticleGeneratorModule {
|
|
|
15
17
|
static readonly _gradientKeysCount: ShaderProperty;
|
|
16
18
|
/** Color gradient over lifetime. */
|
|
17
19
|
color: ParticleCompositeGradient;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_colorGradientRand: Rand;
|
|
18
22
|
private _gradientKeysCount;
|
|
19
23
|
private _colorMacro;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
_resetRandomSeed(seed: number): void;
|
|
20
32
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShaderData } from "../../shader/ShaderData";
|
|
1
2
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
2
3
|
import { ParticleCompositeGradient } from "./ParticleCompositeGradient";
|
|
3
4
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
@@ -77,6 +78,10 @@ export declare class CustomDataModule extends ParticleGeneratorModule {
|
|
|
77
78
|
* Remove all custom data streams.
|
|
78
79
|
*/
|
|
79
80
|
clear(): void;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
80
85
|
private _uploadCurveStream;
|
|
81
86
|
private _uploadGradientStream;
|
|
82
87
|
private _zeroCurveUniforms;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData, ShaderMacro } from "../../shader";
|
|
1
3
|
import { Burst } from "./Burst";
|
|
2
4
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
3
5
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
@@ -6,13 +8,21 @@ import { BaseShape } from "./shape/BaseShape";
|
|
|
6
8
|
* The EmissionModule of a Particle Generator.
|
|
7
9
|
*/
|
|
8
10
|
export declare class EmissionModule extends ParticleGeneratorModule {
|
|
11
|
+
/** @internal */
|
|
12
|
+
static readonly _emissionShapeMacro: ShaderMacro;
|
|
9
13
|
private static _tempEmitPosition;
|
|
10
14
|
/** The rate of particle emission. */
|
|
11
15
|
rateOverTime: ParticleCompositeCurve;
|
|
12
16
|
/** The rate at which the emitter spawns new particles over distance. */
|
|
13
17
|
rateOverDistance: ParticleCompositeCurve;
|
|
14
18
|
_shape: BaseShape;
|
|
19
|
+
/** @internal */
|
|
20
|
+
_shapeRand: Rand;
|
|
15
21
|
private _shapeMacro;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_rateRand: Rand;
|
|
24
|
+
/** @internal */
|
|
25
|
+
_frameRateTime: number;
|
|
16
26
|
private _distanceAccumulator;
|
|
17
27
|
private _lastEmitPosition;
|
|
18
28
|
private _hasLastEmitPosition;
|
|
@@ -52,6 +62,24 @@ export declare class EmissionModule extends ParticleGeneratorModule {
|
|
|
52
62
|
* Clear burst data.
|
|
53
63
|
*/
|
|
54
64
|
clearBurst(): void;
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_emit(lastPlayTime: number, playTime: number): void;
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
_resetRandomSeed(seed: number): void;
|
|
77
|
+
/** @internal */
|
|
78
|
+
_resyncCursors(playTime: number): void;
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
_destroy(): void;
|
|
55
83
|
private _emitByRateOverTime;
|
|
56
84
|
private _emitByRateOverDistance;
|
|
57
85
|
private _evaluateRate;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData, ShaderMacro, ShaderProperty } from "../../shader";
|
|
2
3
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
3
4
|
import { ParticleGenerator } from "../ParticleGenerator";
|
|
4
5
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
@@ -19,6 +20,8 @@ export declare class ForceOverLifetimeModule extends ParticleGeneratorModule {
|
|
|
19
20
|
static readonly _maxGradientYProperty: ShaderProperty;
|
|
20
21
|
static readonly _maxGradientZProperty: ShaderProperty;
|
|
21
22
|
static readonly _spaceProperty: ShaderProperty;
|
|
23
|
+
/** @internal */
|
|
24
|
+
_forceRand: Rand;
|
|
22
25
|
private _forceMinConstant;
|
|
23
26
|
private _forceMaxConstant;
|
|
24
27
|
private _forceMacro;
|
|
@@ -48,4 +51,16 @@ export declare class ForceOverLifetimeModule extends ParticleGeneratorModule {
|
|
|
48
51
|
get space(): ParticleSimulationSpace;
|
|
49
52
|
set space(value: ParticleSimulationSpace);
|
|
50
53
|
constructor(generator: ParticleGenerator);
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
_resetRandomSeed(seed: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
_isRandomMode(): boolean;
|
|
51
66
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData, ShaderMacro } from "../../shader";
|
|
2
3
|
import { ShaderProperty } from "../../shader/ShaderProperty";
|
|
3
4
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
4
5
|
import { ParticleGenerator } from "../ParticleGenerator";
|
|
@@ -34,6 +35,8 @@ export declare class LimitVelocityOverLifetimeModule extends ParticleGeneratorMo
|
|
|
34
35
|
static readonly _dragMaxCurveProperty: ShaderProperty;
|
|
35
36
|
static readonly _dragMinCurveProperty: ShaderProperty;
|
|
36
37
|
static readonly _spaceProperty: ShaderProperty;
|
|
38
|
+
/** @internal */
|
|
39
|
+
_speedRand: Rand;
|
|
37
40
|
private _speedMinConstantVec;
|
|
38
41
|
private _speedMaxConstantVec;
|
|
39
42
|
private _dragConstantVec;
|
|
@@ -113,6 +116,22 @@ export declare class LimitVelocityOverLifetimeModule extends ParticleGeneratorMo
|
|
|
113
116
|
get enabled(): boolean;
|
|
114
117
|
set enabled(value: boolean);
|
|
115
118
|
constructor(generator: ParticleGenerator);
|
|
119
|
+
/**
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
_isDragRandomMode(): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
_isSpeedRandomMode(): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
_resetRandomSeed(seed: number): void;
|
|
116
135
|
private _uploadScalarSpeed;
|
|
117
136
|
private _uploadSeparateAxisSpeeds;
|
|
118
137
|
private _uploadDrag;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
-
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
import type { ICloneHook } from "../../clone/ICloneHook";
|
|
4
|
+
import { ShaderData } from "../../shader/ShaderData";
|
|
5
|
+
import { ParticleGenerator } from "../ParticleGenerator";
|
|
4
6
|
import { ParticleScaleMode } from "../enums/ParticleScaleMode";
|
|
5
7
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
6
8
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
@@ -41,6 +43,20 @@ export declare class MainModule extends DataObject implements ICloneHook<MainMod
|
|
|
41
43
|
scalingMode: ParticleScaleMode;
|
|
42
44
|
/** If set to true, the Particle Generator automatically begins to play on startup. */
|
|
43
45
|
playOnEnabled: boolean;
|
|
46
|
+
/** @internal */
|
|
47
|
+
_maxParticleBuffer: number;
|
|
48
|
+
/** @internal */
|
|
49
|
+
readonly _startDelayRand: Rand;
|
|
50
|
+
/** @internal */
|
|
51
|
+
readonly _startSpeedRand: Rand;
|
|
52
|
+
/** @internal */
|
|
53
|
+
readonly _startLifeTimeRand: Rand;
|
|
54
|
+
/** @internal */
|
|
55
|
+
readonly _startColorRand: Rand;
|
|
56
|
+
/** @internal */
|
|
57
|
+
readonly _startSizeRand: Rand;
|
|
58
|
+
/** @internal */
|
|
59
|
+
readonly _startRotationRand: Rand;
|
|
44
60
|
readonly _gravityModifierRand: Rand;
|
|
45
61
|
private _startLifetime;
|
|
46
62
|
private _startSpeed;
|
|
@@ -101,6 +117,22 @@ export declare class MainModule extends DataObject implements ICloneHook<MainMod
|
|
|
101
117
|
*/
|
|
102
118
|
get startSize(): ParticleCompositeCurve;
|
|
103
119
|
set startSize(value: ParticleCompositeCurve);
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
constructor(generator: ParticleGenerator);
|
|
124
|
+
/**
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
_resetRandomSeed(randomSeed: number): void;
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
_getPositionScale(): Vector3;
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
135
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
104
136
|
/**
|
|
105
137
|
* @inheritdoc
|
|
106
138
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData, ShaderMacro, ShaderProperty } from "../../shader";
|
|
2
3
|
import { ParticleGenerator } from "../ParticleGenerator";
|
|
3
4
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
4
5
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
@@ -24,6 +25,8 @@ export declare class NoiseModule extends ParticleGeneratorModule {
|
|
|
24
25
|
private _strengthCurveModeMacro;
|
|
25
26
|
private _strengthIsRandomTwoModeMacro;
|
|
26
27
|
private _separateAxesModeMacro;
|
|
28
|
+
/** @internal */
|
|
29
|
+
_noiseRand: Rand;
|
|
27
30
|
private _noiseParams;
|
|
28
31
|
private _noiseOctaveParams;
|
|
29
32
|
private _strengthMinConst;
|
|
@@ -87,4 +90,12 @@ export declare class NoiseModule extends ParticleGeneratorModule {
|
|
|
87
90
|
get enabled(): boolean;
|
|
88
91
|
set enabled(value: boolean);
|
|
89
92
|
constructor(generator: ParticleGenerator);
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
_resetRandomSeed(seed: number): void;
|
|
90
101
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { Vector2 } from "@galacean/engine-math";
|
|
2
3
|
import { ParticleCurveMode } from "../enums/ParticleCurveMode";
|
|
3
4
|
import { ParticleCurve } from "./ParticleCurve";
|
|
4
5
|
/**
|
|
@@ -77,6 +78,42 @@ export declare class ParticleCompositeCurve extends DataObject {
|
|
|
77
78
|
* @returns - The result curve value
|
|
78
79
|
*/
|
|
79
80
|
evaluate(time: number, lerpFactor: number): number;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_evaluateCumulative(normalizedAge: number, lerpFactor: number): number;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
_getMax(): number;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
_getMinMax(out: Vector2): void;
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
_isZero(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
_isCurveMode(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
_isRandomMode(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
_isRandomCurveMode(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
_registerOnValueChanged(listener: () => void): void;
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
_unRegisterOnValueChanged(listener: () => void): void;
|
|
80
117
|
private _getKeyMinMax;
|
|
81
118
|
private _onCurveChange;
|
|
82
119
|
}
|
|
@@ -38,6 +38,26 @@ export declare class ParticleCurve extends DataObject {
|
|
|
38
38
|
* @param keys - The keys
|
|
39
39
|
*/
|
|
40
40
|
setKeys(keys: CurveKey[]): void;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
_evaluate(normalizedAge: number): number;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
_evaluateCumulative(normalizedAge: number): number;
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
_getTypeArray(): Float32Array;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
_registerOnValueChanged(listener: () => void): void;
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
_unRegisterOnValueChanged(listener: () => void): void;
|
|
41
61
|
private _addKey;
|
|
42
62
|
}
|
|
43
63
|
/**
|
|
@@ -61,4 +81,12 @@ export declare class CurveKey extends DataObject {
|
|
|
61
81
|
* Create a new key.
|
|
62
82
|
*/
|
|
63
83
|
constructor(time: number, value: number);
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
_registerOnValueChanged(listener: () => void): void;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
_unRegisterOnValueChanged(listener: () => void): void;
|
|
64
92
|
}
|