@galacean/engine-core 2.0.0-alpha.6 → 2.0.0-alpha.61
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 +29118 -22321
- package/dist/main.js.map +1 -1
- package/dist/module.js +29102 -22313
- package/dist/module.js.map +1 -1
- package/package.json +3 -5
- package/types/2d/assembler/ISpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/ISpriteRenderer.d.ts +3 -2
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
- 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 +30 -4
- package/types/2d/sprite/SpriteMask.d.ts +49 -1
- package/types/2d/sprite/SpriteRenderer.d.ts +35 -1
- 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 +11 -1
- package/types/2d/text/ITextRenderer.d.ts +3 -0
- package/types/2d/text/SubFont.d.ts +35 -1
- package/types/2d/text/TextRenderer.d.ts +54 -1
- package/types/2d/text/TextUtils.d.ts +89 -1
- package/types/Background.d.ts +19 -2
- package/types/BasicResources.d.ts +58 -0
- package/types/Camera.d.ts +79 -1
- package/types/Canvas.d.ts +36 -7
- package/types/Component.d.ts +35 -2
- package/types/ComponentsDependencies.d.ts +38 -1
- package/types/ComponentsManager.d.ts +20 -0
- package/types/Engine.d.ts +114 -7
- package/types/EngineEventType.d.ts +13 -0
- package/types/Entity.d.ts +112 -21
- package/types/Polyfill.d.ts +12 -1
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +4 -2
- package/types/RenderPipeline/BatcherManager.d.ts +23 -1
- package/types/RenderPipeline/Blitter.d.ts +1 -1
- package/types/RenderPipeline/CullingResults.d.ts +17 -1
- package/types/RenderPipeline/DepthOnlyPass.d.ts +15 -1
- package/types/RenderPipeline/InstanceBuffer.d.ts +28 -0
- 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 +26 -6
- 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 -0
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
- package/types/RenderPipeline/index.d.ts +4 -1
- package/types/Renderer.d.ts +82 -19
- package/types/Scene.d.ts +34 -7
- package/types/SceneManager.d.ts +18 -6
- package/types/Script.d.ts +41 -0
- package/types/Signal.d.ts +71 -0
- package/types/SystemInfo.d.ts +14 -2
- package/types/Transform.d.ts +26 -1
- package/types/UpdateFlag.d.ts +4 -1
- 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 +13 -2
- package/types/animation/AnimationClipCurveBinding.d.ts +17 -2
- package/types/animation/AnimationEvent.d.ts +2 -2
- package/types/animation/Animator.d.ts +49 -10
- package/types/animation/AnimatorController.d.ts +20 -2
- package/types/animation/AnimatorControllerLayer.d.ts +17 -2
- package/types/animation/AnimatorControllerParameter.d.ts +4 -0
- package/types/animation/AnimatorState.d.ts +46 -2
- package/types/animation/AnimatorStateInstance.d.ts +46 -0
- package/types/animation/AnimatorStateMachine.d.ts +17 -2
- package/types/animation/AnimatorStateTransition.d.ts +9 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
- package/types/animation/Keyframe.d.ts +1 -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 +9 -1
- 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 +20 -2
- 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/index.d.ts +1 -0
- 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/AssetPromise.d.ts +4 -4
- package/types/asset/AssetType.d.ts +7 -9
- package/types/asset/GraphicsResource.d.ts +10 -0
- package/types/asset/IReferable.d.ts +8 -0
- package/types/asset/JSONAsset.d.ts +1 -1
- package/types/asset/LoadItem.d.ts +1 -1
- package/types/asset/Loader.d.ts +2 -2
- package/types/asset/ReferResource.d.ts +28 -0
- package/types/asset/RenderingStatistics.d.ts +8 -0
- package/types/asset/ResourceManager.d.ts +117 -9
- package/types/audio/AudioClip.d.ts +8 -0
- package/types/audio/AudioManager.d.ts +18 -0
- package/types/audio/AudioSource.d.ts +20 -2
- package/types/base/Constant.d.ts +3 -19
- package/types/base/DataObject.d.ts +6 -0
- package/types/base/EngineObject.d.ts +4 -0
- package/types/base/Time.d.ts +13 -0
- package/types/base/index.d.ts +1 -0
- package/types/clone/CloneDecorators.d.ts +37 -0
- package/types/clone/CloneUtil.d.ts +30 -0
- package/types/clone/ComponentCloner.d.ts +4 -10
- package/types/clone/ICloneHook.d.ts +12 -0
- package/types/enums/CameraType.d.ts +9 -1
- package/types/env-probe/CubeProbe.d.ts +2 -0
- package/types/env-probe/Probe.d.ts +1 -1
- package/types/graphic/Buffer.d.ts +23 -3
- package/types/graphic/BufferUtil.d.ts +8 -0
- package/types/graphic/ElementRangeMapping.d.ts +9 -0
- package/types/graphic/IndexBufferBinding.d.ts +4 -0
- package/types/graphic/Mesh.d.ts +58 -1
- package/types/graphic/Primitive.d.ts +50 -1
- package/types/graphic/TransformFeedback.d.ts +46 -0
- package/types/graphic/TransformFeedbackPrimitive.d.ts +57 -0
- package/types/graphic/TransformFeedbackSimulator.d.ts +55 -0
- package/types/graphic/VertexBufferBinding.d.ts +4 -0
- package/types/graphic/VertexElement.d.ts +1 -0
- package/types/graphic/enums/BufferBindFlag.d.ts +5 -3
- package/types/index.d.ts +7 -4
- package/types/input/InputManager.d.ts +25 -6
- 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 +37 -1
- 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 -8
- package/types/lighting/DirectLight.d.ts +17 -0
- package/types/lighting/KHR_lights.d.ts +13 -1
- 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 +37 -1
- package/types/material/BaseMaterial.d.ts +15 -11
- package/types/material/Material.d.ts +6 -9
- package/types/mesh/BlendShape.d.ts +14 -1
- package/types/mesh/BlendShapeFrame.d.ts +11 -4
- package/types/mesh/BlendShapeManager.d.ts +100 -1
- package/types/mesh/BufferMesh.d.ts +2 -2
- package/types/mesh/MeshRenderer.d.ts +42 -0
- package/types/mesh/MeshTangentUtils.d.ts +9 -0
- package/types/mesh/ModelMesh.d.ts +28 -12
- package/types/mesh/PrimitiveMesh.d.ts +266 -104
- package/types/mesh/PrimitiveMeshOptions.d.ts +415 -0
- package/types/mesh/Skin.d.ts +12 -3
- package/types/mesh/SkinnedMeshRenderer.d.ts +27 -1
- package/types/mesh/enums/PrimitiveMeshCapMode.d.ts +21 -0
- package/types/mesh/index.d.ts +2 -0
- package/types/mesh/primitive/MeshPathUtils.d.ts +13 -0
- package/types/mesh/primitive/PolygonUtils.d.ts +44 -0
- package/types/mesh/primitive/PrimitiveMeshBuilder.d.ts +25 -0
- package/types/mesh/primitive/PrimitiveMeshRestorer.d.ts +15 -0
- package/types/mesh/primitive/SubdivisionUtils.d.ts +9 -0
- package/types/particle/ParticleBounds.d.ts +87 -0
- package/types/particle/ParticleBufferUtils.d.ts +33 -1
- package/types/particle/ParticleGenerator.d.ts +142 -24
- package/types/particle/ParticleMaterial.d.ts +3 -1
- package/types/particle/ParticleRenderer.d.ts +62 -6
- package/types/particle/ParticleSubEmitterSpawnState.d.ts +36 -0
- package/types/particle/ParticleSystemManager.d.ts +17 -0
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +48 -0
- package/types/particle/enums/ParticleInheritVelocityMode.d.ts +14 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +26 -1
- package/types/particle/enums/ParticleScaleMode.d.ts +5 -5
- package/types/particle/enums/ParticleSubEmitterInheritProperty.d.ts +17 -0
- package/types/particle/enums/ParticleSubEmitterType.d.ts +12 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
- package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +10 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +19 -1
- package/types/particle/index.d.ts +9 -0
- package/types/particle/modules/BirthSubEmitterCommand.d.ts +29 -0
- package/types/particle/modules/BirthSubEmitterState.d.ts +9 -0
- package/types/particle/modules/Burst.d.ts +23 -2
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +19 -0
- package/types/particle/modules/CustomDataModule.d.ts +90 -0
- package/types/particle/modules/DeathSubEmitterCommand.d.ts +19 -0
- package/types/particle/modules/EmissionModule.d.ts +51 -4
- package/types/particle/modules/EmissionState.d.ts +13 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
- package/types/particle/modules/InheritVelocityModule.d.ts +86 -0
- package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +163 -0
- package/types/particle/modules/MainModule.d.ts +56 -11
- package/types/particle/modules/NoiseModule.d.ts +114 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +46 -4
- package/types/particle/modules/ParticleCompositeGradient.d.ts +8 -2
- package/types/particle/modules/ParticleCurve.d.ts +31 -2
- package/types/particle/modules/ParticleGeneratorModule.d.ts +9 -3
- package/types/particle/modules/ParticleGradient.d.ts +22 -5
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +27 -3
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +25 -0
- package/types/particle/modules/SubEmitter.d.ts +32 -0
- package/types/particle/modules/SubEmittersModule.d.ts +111 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +124 -3
- package/types/particle/modules/shape/BaseShape.d.ts +65 -2
- package/types/particle/modules/shape/BoxShape.d.ts +13 -2
- package/types/particle/modules/shape/CircleShape.d.ts +13 -1
- package/types/particle/modules/shape/ConeShape.d.ts +13 -4
- package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
- package/types/particle/modules/shape/MeshShape.d.ts +26 -3
- 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 +24 -3
- package/types/physics/Collider.d.ts +47 -3
- package/types/physics/Collision.d.ts +3 -0
- package/types/physics/DynamicCollider.d.ts +33 -7
- package/types/physics/HitResult.d.ts +2 -2
- package/types/physics/PhysicsMaterial.d.ts +11 -2
- package/types/physics/PhysicsScene.d.ts +99 -7
- package/types/physics/StaticCollider.d.ts +5 -0
- 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 +22 -2
- package/types/physics/joint/JointLimits.d.ts +2 -1
- package/types/physics/joint/JointMotor.d.ts +2 -1
- package/types/physics/shape/ColliderShape.d.ts +44 -7
- package/types/physics/shape/MeshColliderShape.d.ts +13 -12
- package/types/postProcess/FinalPass.d.ts +20 -1
- package/types/postProcess/PostProcess.d.ts +11 -6
- package/types/postProcess/PostProcessEffect.d.ts +6 -1
- package/types/postProcess/PostProcessEffectParameter.d.ts +23 -3
- package/types/postProcess/PostProcessManager.d.ts +43 -0
- package/types/postProcess/PostProcessPass.d.ts +3 -2
- package/types/postProcess/PostProcessUberPass.d.ts +2 -1
- package/types/postProcess/effects/BloomEffect.d.ts +26 -1
- package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +74 -0
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +1 -0
- package/types/renderingHardwareInterface/IPlatformPrimitive.d.ts +6 -0
- package/types/renderingHardwareInterface/IPlatformShaderProgram.d.ts +4 -0
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +0 -1
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +0 -1
- package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +39 -0
- package/types/renderingHardwareInterface/index.d.ts +5 -0
- package/types/shader/BuiltinShaders.d.ts +27 -0
- package/types/shader/Shader.d.ts +52 -25
- package/types/shader/ShaderBlockProperty.d.ts +19 -0
- package/types/shader/ShaderData.d.ts +43 -4
- package/types/shader/ShaderFactory.d.ts +77 -0
- package/types/shader/ShaderMacro.d.ts +17 -2
- package/types/shader/ShaderMacroCollection.d.ts +57 -1
- package/types/shader/ShaderMacroProcessor.d.ts +54 -0
- package/types/shader/ShaderPass.d.ts +42 -13
- package/types/shader/ShaderProgram.d.ts +92 -1
- package/types/shader/ShaderProgramMap.d.ts +20 -0
- 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 -0
- package/types/shader/enums/ShaderLanguage.d.ts +1 -3
- package/types/shader/enums/ShaderPreprocessorDirective.d.ts +22 -0
- package/types/shader/index.d.ts +3 -1
- package/types/shader/state/BlendState.d.ts +16 -1
- package/types/shader/state/DepthState.d.ts +16 -1
- package/types/shader/state/RasterState.d.ts +19 -1
- package/types/shader/state/RenderState.d.ts +13 -2
- package/types/shader/state/RenderTargetBlendState.d.ts +2 -1
- package/types/shader/state/StencilState.d.ts +15 -1
- package/types/shadow/CascadedShadowCasterPass.d.ts +5 -3
- package/types/shadow/ShadowSliceData.d.ts +13 -1
- package/types/shadow/ShadowUtils.d.ts +41 -1
- package/types/sky/Sky.d.ts +13 -4
- package/types/sky/SkyBoxMaterial.d.ts +0 -7
- package/types/texture/RenderTarget.d.ts +28 -3
- package/types/texture/Texture.d.ts +48 -12
- package/types/texture/Texture2D.d.ts +5 -2
- package/types/texture/Texture2DArray.d.ts +5 -2
- package/types/texture/TextureCube.d.ts +5 -2
- package/types/texture/TextureUtils.d.ts +15 -1
- package/types/texture/enums/TextureFormat.d.ts +58 -56
- package/types/trail/TrailRenderer.d.ts +13 -8
- package/types/ui/IUICanvas.d.ts +16 -1
- package/types/utils/DisorderedArray.d.ts +3 -1
- package/types/xr/XRManager.d.ts +28 -0
- package/types/RenderPipeline/BatchUtils.d.ts +0 -1
- package/types/RenderPipeline/SubRenderElement.d.ts +0 -22
- package/types/clone/CloneManager.d.ts +0 -31
- package/types/clone/enums/CloneMode.d.ts +0 -13
- package/types/mesh/PrimitiveMeshRestorer.d.ts +0 -1
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +0 -1
- package/types/shader/ShaderPool.d.ts +0 -1
- package/types/shader/ShaderProgramPool.d.ts +0 -1
- package/types/shader/state/index.d.ts +0 -6
- package/types/shaderlib/ShaderFactory.d.ts +0 -20
- package/types/shaderlib/ShaderLib.d.ts +0 -73
- package/types/shaderlib/index.d.ts +0 -1
- package/types/shaderlib/particle/index.d.ts +0 -15
- package/types/shaderlib/pbr/index.d.ts +0 -11
- package/types/shaderlib/shadow/index.d.ts +0 -8
|
@@ -1 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ParticleInstanceVertexAttribute {
|
|
5
|
+
ShapePositionStartLifeTime = "a_ShapePositionStartLifeTime",
|
|
6
|
+
DirectionTime = "a_DirectionTime",
|
|
7
|
+
StartColor = "a_StartColor",
|
|
8
|
+
StartSizeSpeed = "a_StartSizeSpeed",
|
|
9
|
+
StartRotationRandom = "a_StartRotationRandom",
|
|
10
|
+
WorldPositionGravity = "a_WorldPositionGravity",
|
|
11
|
+
SimulationWorldRotation = "a_SimulationWorldRotation",
|
|
12
|
+
VelocityRandomTSA = "a_VelocityRandomTSA",
|
|
13
|
+
ForceRandomColor = "a_ForceRandomColor",
|
|
14
|
+
UVTilingFrameRandom = "a_UVTilingFrameRandom",
|
|
15
|
+
InheritVelocity = "a_InheritVelocity",
|
|
16
|
+
LimitVelocityRandom = "a_LimitVelocityRandom",
|
|
17
|
+
ParentSampleWorldPosition = "a_ParentSampleWorldPosition",
|
|
18
|
+
ParentTrajectoryVelocity = "a_ParentTrajectoryVelocity"
|
|
19
|
+
}
|
|
@@ -7,9 +7,14 @@ export { ParticleRenderMode } from "./enums/ParticleRenderMode";
|
|
|
7
7
|
export { ParticleScaleMode } from "./enums/ParticleScaleMode";
|
|
8
8
|
export { ParticleSimulationSpace } from "./enums/ParticleSimulationSpace";
|
|
9
9
|
export { ParticleStopMode } from "./enums/ParticleStopMode";
|
|
10
|
+
export { ParticleSubEmitterType } from "./enums/ParticleSubEmitterType";
|
|
11
|
+
export { ParticleSubEmitterInheritProperty } from "./enums/ParticleSubEmitterInheritProperty";
|
|
12
|
+
export { ParticleInheritVelocityMode } from "./enums/ParticleInheritVelocityMode";
|
|
10
13
|
export { Burst } from "./modules/Burst";
|
|
11
14
|
export { ColorOverLifetimeModule } from "./modules/ColorOverLifetimeModule";
|
|
15
|
+
export { CustomDataModule } from "./modules/CustomDataModule";
|
|
12
16
|
export { EmissionModule } from "./modules/EmissionModule";
|
|
17
|
+
export { InheritVelocityModule } from "./modules/InheritVelocityModule";
|
|
13
18
|
export { MainModule } from "./modules/MainModule";
|
|
14
19
|
export { ParticleCompositeCurve } from "./modules/ParticleCompositeCurve";
|
|
15
20
|
export { ParticleCompositeGradient } from "./modules/ParticleCompositeGradient";
|
|
@@ -19,4 +24,8 @@ export { RotationOverLifetimeModule } from "./modules/RotationOverLifetimeModule
|
|
|
19
24
|
export { SizeOverLifetimeModule } from "./modules/SizeOverLifetimeModule";
|
|
20
25
|
export { TextureSheetAnimationModule } from "./modules/TextureSheetAnimationModule";
|
|
21
26
|
export { VelocityOverLifetimeModule } from "./modules/VelocityOverLifetimeModule";
|
|
27
|
+
export { LimitVelocityOverLifetimeModule } from "./modules/LimitVelocityOverLifetimeModule";
|
|
28
|
+
export { NoiseModule } from "./modules/NoiseModule";
|
|
29
|
+
export { SubEmitter } from "./modules/SubEmitter";
|
|
30
|
+
export { SubEmittersModule } from "./modules/SubEmittersModule";
|
|
22
31
|
export * from "./modules/shape/index";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ParticleGenerator } from "../ParticleGenerator";
|
|
2
|
+
import type { ParticleSubEmitterInheritProperty } from "../enums/ParticleSubEmitterInheritProperty";
|
|
3
|
+
/**
|
|
4
|
+
* Stores one same-frame Birth emission command.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class BirthSubEmitterCommand {
|
|
8
|
+
readonly source: ParticleGenerator;
|
|
9
|
+
private readonly _pool;
|
|
10
|
+
readonly requests: number[];
|
|
11
|
+
readonly isBirth: true;
|
|
12
|
+
requestStart: number;
|
|
13
|
+
requestCount: number;
|
|
14
|
+
ringIndex: number;
|
|
15
|
+
inheritProperties: ParticleSubEmitterInheritProperty;
|
|
16
|
+
startDelay: number;
|
|
17
|
+
lifetime: number;
|
|
18
|
+
private _frameStartParentAge;
|
|
19
|
+
private _frameDuration;
|
|
20
|
+
private _frameSimulationStart;
|
|
21
|
+
constructor(source: ParticleGenerator, _pool: BirthSubEmitterCommand[], requests: number[]);
|
|
22
|
+
reset(startDelay: number, inheritProperties: ParticleSubEmitterInheritProperty, ringIndex: number, bornTime: number, lifetime: number, frameLastPlayTime: number, framePlayTime: number, frameSimulationStart: number): void;
|
|
23
|
+
addRequest(time: number, count: number): void;
|
|
24
|
+
sortRequests(): void;
|
|
25
|
+
getTrajectoryTimeOffset(emissionTime: number): number;
|
|
26
|
+
getFrameTime(emissionTime: number): number;
|
|
27
|
+
getTrajectoryDuration(): number;
|
|
28
|
+
release(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EmissionState } from "./EmissionState";
|
|
2
|
+
/**
|
|
3
|
+
* Stores the Birth emission timeline owned by one parent particle and sub-emitter slot.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class BirthSubEmitterState extends EmissionState {
|
|
7
|
+
startDelay: number;
|
|
8
|
+
reset(seed: number, startDelay: number, initialEmissionTime: number): void;
|
|
9
|
+
}
|
|
@@ -1,14 +1,35 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
1
2
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
2
3
|
/**
|
|
3
4
|
* A burst is a particle emission event, where a number of particles are all emitted at the same time
|
|
4
5
|
*/
|
|
5
|
-
export declare class Burst {
|
|
6
|
+
export declare class Burst extends DataObject {
|
|
6
7
|
time: number;
|
|
7
8
|
count: ParticleCompositeCurve;
|
|
9
|
+
private _cycles;
|
|
10
|
+
private _repeatInterval;
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Number of times to repeat the burst.
|
|
13
|
+
*/
|
|
14
|
+
get cycles(): number;
|
|
15
|
+
set cycles(value: number);
|
|
16
|
+
/**
|
|
17
|
+
* Time interval between each repeated burst.
|
|
18
|
+
*/
|
|
19
|
+
get repeatInterval(): number;
|
|
20
|
+
set repeatInterval(value: number);
|
|
21
|
+
/**
|
|
22
|
+
* Create a single-shot burst.
|
|
10
23
|
* @param time - Time to emit the burst
|
|
11
24
|
* @param count - Count of particles to emit
|
|
12
25
|
*/
|
|
13
26
|
constructor(time: number, count: ParticleCompositeCurve);
|
|
27
|
+
/**
|
|
28
|
+
* Create a repeated burst.
|
|
29
|
+
* @param time - Time to emit the burst
|
|
30
|
+
* @param count - Count of particles to emit
|
|
31
|
+
* @param cycles - Number of times to repeat the burst
|
|
32
|
+
* @param repeatInterval - Time interval between each repeated burst
|
|
33
|
+
*/
|
|
34
|
+
constructor(time: number, count: ParticleCompositeCurve, cycles: number, repeatInterval: number);
|
|
14
35
|
}
|
|
@@ -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";
|
|
@@ -6,15 +8,32 @@ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
|
6
8
|
* Color over lifetime module.
|
|
7
9
|
*/
|
|
8
10
|
export declare class ColorOverLifetimeModule extends ParticleGeneratorModule {
|
|
11
|
+
/** @internal */
|
|
9
12
|
static readonly _gradientMacro: ShaderMacro;
|
|
13
|
+
/** @internal */
|
|
10
14
|
static readonly _randomGradientsMacro: ShaderMacro;
|
|
15
|
+
/** @internal */
|
|
11
16
|
static readonly _minGradientColor: ShaderProperty;
|
|
17
|
+
/** @internal */
|
|
12
18
|
static readonly _minGradientAlpha: ShaderProperty;
|
|
19
|
+
/** @internal */
|
|
13
20
|
static readonly _maxGradientColor: ShaderProperty;
|
|
21
|
+
/** @internal */
|
|
14
22
|
static readonly _maxGradientAlpha: ShaderProperty;
|
|
23
|
+
/** @internal */
|
|
15
24
|
static readonly _gradientKeysCount: ShaderProperty;
|
|
16
25
|
/** Color gradient over lifetime. */
|
|
17
26
|
color: ParticleCompositeGradient;
|
|
27
|
+
/** @internal */
|
|
28
|
+
_colorGradientRand: Rand;
|
|
18
29
|
private _gradientKeysCount;
|
|
19
30
|
private _colorMacro;
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
_resetRandomSeed(seed: number): void;
|
|
20
39
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ShaderData } from "../../shader/ShaderData";
|
|
2
|
+
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
3
|
+
import { ParticleCompositeGradient } from "./ParticleCompositeGradient";
|
|
4
|
+
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
5
|
+
/**
|
|
6
|
+
* Custom data module — exposes any number of named per-particle data channels
|
|
7
|
+
* (scalars or colors) readable from a custom particle shader by their generated
|
|
8
|
+
* `renderer_<name>...` uniforms.
|
|
9
|
+
*
|
|
10
|
+
* Each stream is one uniform shared across the drawcall, not a per-particle
|
|
11
|
+
* attribute (unlike Unity's `SetCustomParticleData`); shader-side
|
|
12
|
+
* differentiation must mix in `a_Random*` / `normalizedAge` / etc.
|
|
13
|
+
*
|
|
14
|
+
* Register streams BEFORE attaching the entity to the scene — `ParticleRenderer._onEnable`
|
|
15
|
+
* uploads on the first frame and won't see entries added afterward.
|
|
16
|
+
*/
|
|
17
|
+
export declare class CustomDataModule extends ParticleGeneratorModule {
|
|
18
|
+
private static readonly _streamNamePattern;
|
|
19
|
+
private static readonly _zeroCurveArray;
|
|
20
|
+
private static readonly _zeroGradientColorArray;
|
|
21
|
+
private static readonly _zeroGradientAlphaArray;
|
|
22
|
+
private static readonly _zeroColor;
|
|
23
|
+
private static readonly _zeroVector4;
|
|
24
|
+
private _curves;
|
|
25
|
+
private _gradients;
|
|
26
|
+
private _curveStreams;
|
|
27
|
+
private _gradientStreams;
|
|
28
|
+
/**
|
|
29
|
+
* Curves keyed by name.
|
|
30
|
+
*/
|
|
31
|
+
get curves(): ReadonlyMap<string, ParticleCompositeCurve>;
|
|
32
|
+
/**
|
|
33
|
+
* Gradients keyed by name.
|
|
34
|
+
*/
|
|
35
|
+
get gradients(): ReadonlyMap<string, ParticleCompositeGradient>;
|
|
36
|
+
/**
|
|
37
|
+
* Add a scalar curve. Shader-side uniforms by `curve.mode`:
|
|
38
|
+
*
|
|
39
|
+
* | Mode | Uniforms |
|
|
40
|
+
* |--------------|-----------------------------------------|
|
|
41
|
+
* | Constant | `float renderer_<name>MaxConst` |
|
|
42
|
+
* | TwoConstants | + `float renderer_<name>MinConst` |
|
|
43
|
+
* | Curve | `vec2 renderer_<name>MaxGradient[4]` |
|
|
44
|
+
* | TwoCurves | + `vec2 renderer_<name>MinGradient[4]` |
|
|
45
|
+
*
|
|
46
|
+
* @param name - Must contain only letters, digits, or underscores, and not already be in use.
|
|
47
|
+
* @param curve - Stored by reference.
|
|
48
|
+
*/
|
|
49
|
+
addCurve(name: string, curve: ParticleCompositeCurve): void;
|
|
50
|
+
/**
|
|
51
|
+
* Add a color gradient. Shader-side uniforms by `gradient.mode`:
|
|
52
|
+
*
|
|
53
|
+
* | Mode | Uniforms |
|
|
54
|
+
* |--------------|-----------------------------------------------------------------------------------------------------------------------|
|
|
55
|
+
* | Constant | `vec4 renderer_<name>MaxConst` |
|
|
56
|
+
* | TwoConstants | + `vec4 renderer_<name>MinConst` |
|
|
57
|
+
* | Gradient | `vec4 renderer_<name>MaxGradientColor[4]`, `vec2 renderer_<name>MaxGradientAlpha[4]`, `vec4 renderer_<name>KeysCount` |
|
|
58
|
+
* | TwoGradients | + `vec4 renderer_<name>MinGradientColor[4]`, `vec2 renderer_<name>MinGradientAlpha[4]` |
|
|
59
|
+
*
|
|
60
|
+
* `KeysCount` packs `(colorMin, alphaMin, colorMax, alphaMax)` last-keyframe times for shader-side normalization;
|
|
61
|
+
* in single-Gradient mode the min lanes mirror the max lanes.
|
|
62
|
+
*
|
|
63
|
+
* @param name - Same validation as {@link addCurve}.
|
|
64
|
+
* @param gradient - Stored by reference.
|
|
65
|
+
*/
|
|
66
|
+
addGradient(name: string, gradient: ParticleCompositeGradient): void;
|
|
67
|
+
/**
|
|
68
|
+
* Remove a curve. Shader uniforms read 0 after removal.
|
|
69
|
+
* @param name - The name passed to {@link addCurve}
|
|
70
|
+
*/
|
|
71
|
+
removeCurve(name: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Remove a gradient. Shader uniforms read 0 after removal.
|
|
74
|
+
* @param name - The name passed to {@link addGradient}
|
|
75
|
+
*/
|
|
76
|
+
removeGradient(name: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Remove all custom data streams.
|
|
79
|
+
*/
|
|
80
|
+
clear(): void;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
85
|
+
private _uploadCurveStream;
|
|
86
|
+
private _uploadGradientStream;
|
|
87
|
+
private _zeroCurveUniforms;
|
|
88
|
+
private _zeroGradientUniforms;
|
|
89
|
+
private _validateName;
|
|
90
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ParticleGenerator } from "../ParticleGenerator";
|
|
2
|
+
import type { ParticleSubEmitterInheritProperty } from "../enums/ParticleSubEmitterInheritProperty";
|
|
3
|
+
/**
|
|
4
|
+
* Stores one same-frame Death emission event.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class DeathSubEmitterCommand {
|
|
8
|
+
readonly source: ParticleGenerator;
|
|
9
|
+
private readonly _pool;
|
|
10
|
+
readonly isBirth: false;
|
|
11
|
+
ringIndex: number;
|
|
12
|
+
count: number;
|
|
13
|
+
inheritProperties: ParticleSubEmitterInheritProperty;
|
|
14
|
+
frameTime: number;
|
|
15
|
+
trajectoryDuration: number;
|
|
16
|
+
constructor(source: ParticleGenerator, _pool: DeathSubEmitterCommand[]);
|
|
17
|
+
reset(ringIndex: number, count: number, inheritProperties: ParticleSubEmitterInheritProperty, frameTime: number, trajectoryDuration: number): void;
|
|
18
|
+
release(): void;
|
|
19
|
+
}
|
|
@@ -1,19 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderMacro } from "../../shader";
|
|
3
|
+
import type { ShaderData } from "../../shader";
|
|
4
|
+
import type { BirthSubEmitterCommand } from "./BirthSubEmitterCommand";
|
|
5
|
+
import type { Burst } from "./Burst";
|
|
6
|
+
import { EmissionState } from "./EmissionState";
|
|
2
7
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
3
8
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
4
|
-
import { BaseShape } from "./shape/BaseShape";
|
|
9
|
+
import type { BaseShape } from "./shape/BaseShape";
|
|
5
10
|
/**
|
|
6
11
|
* The EmissionModule of a Particle Generator.
|
|
7
12
|
*/
|
|
8
13
|
export declare class EmissionModule extends ParticleGeneratorModule {
|
|
14
|
+
/** @internal */
|
|
15
|
+
static readonly _emissionShapeMacro: ShaderMacro;
|
|
16
|
+
private static readonly _tempEmitPosition;
|
|
9
17
|
/** The rate of particle emission. */
|
|
10
18
|
rateOverTime: ParticleCompositeCurve;
|
|
11
19
|
/** The rate at which the emitter spawns new particles over distance. */
|
|
12
20
|
rateOverDistance: ParticleCompositeCurve;
|
|
21
|
+
/** @internal */
|
|
13
22
|
_shape: BaseShape;
|
|
23
|
+
/** @internal */
|
|
24
|
+
_shapeRand: Rand;
|
|
25
|
+
private _shapeMacro;
|
|
26
|
+
private readonly _emissionState;
|
|
27
|
+
private _distanceAccumulator;
|
|
28
|
+
private _lastEmitPosition;
|
|
29
|
+
private _hasLastEmitPosition;
|
|
14
30
|
private _bursts;
|
|
15
|
-
private _currentBurstIndex;
|
|
16
|
-
private _burstRand;
|
|
17
31
|
/**
|
|
18
32
|
* @inheritdoc
|
|
19
33
|
*/
|
|
@@ -47,7 +61,40 @@ export declare class EmissionModule extends ParticleGeneratorModule {
|
|
|
47
61
|
* Clear burst data.
|
|
48
62
|
*/
|
|
49
63
|
clearBurst(): void;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
_emit(lastPlayTime: number, playTime: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* Collects Birth requests whose times are known on the CPU. Rate over Distance requires GPU-side particle allocation
|
|
70
|
+
* and is not part of this path.
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
_prepareBirthTimedRequests(lastPlayTime: number, playTime: number, state: EmissionState, command: BirthSubEmitterCommand): void;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
_resetRandomSeed(seed: number): void;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
_resyncCursors(playTime: number): void;
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
_shiftTimeOrigin(maxOffset: number): number;
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
_destroy(): void;
|
|
94
|
+
private _emitByRateOverDistance;
|
|
50
95
|
private _emitByRateOverTime;
|
|
96
|
+
private _evaluateRate;
|
|
51
97
|
private _emitByBurst;
|
|
52
98
|
private _emitBySubBurst;
|
|
99
|
+
private _emitOrAddRequest;
|
|
53
100
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare class EmissionState {
|
|
5
|
+
frameRateTime: number;
|
|
6
|
+
private _seed;
|
|
7
|
+
private _rateRand;
|
|
8
|
+
private _burstRand;
|
|
9
|
+
resetRandomSeed(seed: number): void;
|
|
10
|
+
randomRate(): number;
|
|
11
|
+
randomBurst(): number;
|
|
12
|
+
resyncTimeCursors(playTime: number): void;
|
|
13
|
+
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import type { ShaderData } from "../../shader";
|
|
3
|
+
import type { ParticleGenerator } from "../ParticleGenerator";
|
|
4
|
+
import { ParticleInheritVelocityMode } from "../enums/ParticleInheritVelocityMode";
|
|
5
|
+
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
6
|
+
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
7
|
+
/**
|
|
8
|
+
* Controls how emitter velocity is applied to particles.
|
|
9
|
+
*/
|
|
10
|
+
export declare class InheritVelocityModule extends ParticleGeneratorModule {
|
|
11
|
+
private static readonly _currentMacro;
|
|
12
|
+
private static readonly _initialCurveMacro;
|
|
13
|
+
private static readonly _constantModeMacro;
|
|
14
|
+
private static readonly _curveModeMacro;
|
|
15
|
+
private static readonly _randomModeMacro;
|
|
16
|
+
private static readonly _velocityProperty;
|
|
17
|
+
private static readonly _minConstantProperty;
|
|
18
|
+
private static readonly _maxConstantProperty;
|
|
19
|
+
private static readonly _minCurveProperty;
|
|
20
|
+
private static readonly _maxCurveProperty;
|
|
21
|
+
/** @internal */
|
|
22
|
+
readonly _curveRand: Rand;
|
|
23
|
+
private _mode;
|
|
24
|
+
private _curve;
|
|
25
|
+
private readonly _emitterVelocity;
|
|
26
|
+
private readonly _previousWorldPosition;
|
|
27
|
+
private _hasPreviousWorldPosition;
|
|
28
|
+
private _applicationMacro;
|
|
29
|
+
private _curveMacro;
|
|
30
|
+
private _randomMacro;
|
|
31
|
+
/**
|
|
32
|
+
* @inheritdoc
|
|
33
|
+
*/
|
|
34
|
+
get enabled(): boolean;
|
|
35
|
+
set enabled(value: boolean);
|
|
36
|
+
/**
|
|
37
|
+
* Whether to capture the emitter velocity at birth or follow it while the particle is alive.
|
|
38
|
+
*/
|
|
39
|
+
get mode(): ParticleInheritVelocityMode;
|
|
40
|
+
set mode(value: ParticleInheritVelocityMode);
|
|
41
|
+
/**
|
|
42
|
+
* Scale applied to the inherited velocity over each particle's lifetime.
|
|
43
|
+
*/
|
|
44
|
+
get curve(): ParticleCompositeCurve;
|
|
45
|
+
set curve(value: ParticleCompositeCurve);
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
constructor(generator: ParticleGenerator);
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
_updateEmitterVelocity(elapsedTime: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
_resyncEmitterVelocity(): void;
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
_getInitialVelocity(out: Vector3): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
_getTrajectoryInitialFactor(): number;
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
_getCurrentBoundsVelocity(out: Vector3): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
_updateShaderData(shaderData: ShaderData, hasSubEmitterParticles: boolean): void;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
_needTransformFeedback(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
_usesInitialCurve(isSubEmitterSpawned: boolean): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
_resetRandomSeed(seed: number): void;
|
|
86
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData, ShaderMacro } from "../../shader";
|
|
3
|
+
import { ShaderProperty } from "../../shader/ShaderProperty";
|
|
4
|
+
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
5
|
+
import { ParticleGenerator } from "../ParticleGenerator";
|
|
6
|
+
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
7
|
+
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
8
|
+
/**
|
|
9
|
+
* Limit velocity over lifetime module.
|
|
10
|
+
*/
|
|
11
|
+
export declare class LimitVelocityOverLifetimeModule extends ParticleGeneratorModule {
|
|
12
|
+
/** @internal */
|
|
13
|
+
static readonly _enabledMacro: ShaderMacro;
|
|
14
|
+
/** @internal */
|
|
15
|
+
static readonly _separateAxesMacro: ShaderMacro;
|
|
16
|
+
/** @internal */
|
|
17
|
+
static readonly _speedConstantModeMacro: ShaderMacro;
|
|
18
|
+
/** @internal */
|
|
19
|
+
static readonly _speedCurveModeMacro: ShaderMacro;
|
|
20
|
+
/** @internal */
|
|
21
|
+
static readonly _speedIsRandomMacro: ShaderMacro;
|
|
22
|
+
/** @internal */
|
|
23
|
+
static readonly _dragCurveModeMacro: ShaderMacro;
|
|
24
|
+
/** @internal */
|
|
25
|
+
static readonly _dragIsRandomMacro: ShaderMacro;
|
|
26
|
+
/** @internal */
|
|
27
|
+
static readonly _multiplyDragBySizeMacro: ShaderMacro;
|
|
28
|
+
/** @internal */
|
|
29
|
+
static readonly _multiplyDragByVelocityMacro: ShaderMacro;
|
|
30
|
+
/** @internal */
|
|
31
|
+
static readonly _speedMaxConstProperty: ShaderProperty;
|
|
32
|
+
/** @internal */
|
|
33
|
+
static readonly _speedMinConstProperty: ShaderProperty;
|
|
34
|
+
/** @internal */
|
|
35
|
+
static readonly _speedMaxCurveProperty: ShaderProperty;
|
|
36
|
+
/** @internal */
|
|
37
|
+
static readonly _speedMinCurveProperty: ShaderProperty;
|
|
38
|
+
/** @internal */
|
|
39
|
+
static readonly _speedMaxConstVecProperty: ShaderProperty;
|
|
40
|
+
/** @internal */
|
|
41
|
+
static readonly _speedMinConstVecProperty: ShaderProperty;
|
|
42
|
+
/** @internal */
|
|
43
|
+
static readonly _speedXMaxCurveProperty: ShaderProperty;
|
|
44
|
+
/** @internal */
|
|
45
|
+
static readonly _speedXMinCurveProperty: ShaderProperty;
|
|
46
|
+
/** @internal */
|
|
47
|
+
static readonly _speedYMaxCurveProperty: ShaderProperty;
|
|
48
|
+
/** @internal */
|
|
49
|
+
static readonly _speedYMinCurveProperty: ShaderProperty;
|
|
50
|
+
/** @internal */
|
|
51
|
+
static readonly _speedZMaxCurveProperty: ShaderProperty;
|
|
52
|
+
/** @internal */
|
|
53
|
+
static readonly _speedZMinCurveProperty: ShaderProperty;
|
|
54
|
+
/** @internal */
|
|
55
|
+
static readonly _dampenProperty: ShaderProperty;
|
|
56
|
+
/** @internal */
|
|
57
|
+
static readonly _dragConstantProperty: ShaderProperty;
|
|
58
|
+
/** @internal */
|
|
59
|
+
static readonly _dragMaxCurveProperty: ShaderProperty;
|
|
60
|
+
/** @internal */
|
|
61
|
+
static readonly _dragMinCurveProperty: ShaderProperty;
|
|
62
|
+
/** @internal */
|
|
63
|
+
static readonly _spaceProperty: ShaderProperty;
|
|
64
|
+
/** @internal */
|
|
65
|
+
_speedRand: Rand;
|
|
66
|
+
private _speedMinConstantVec;
|
|
67
|
+
private _speedMaxConstantVec;
|
|
68
|
+
private _dragConstantVec;
|
|
69
|
+
private _enabledModuleMacro;
|
|
70
|
+
private _separateAxesCachedMacro;
|
|
71
|
+
private _speedModeMacro;
|
|
72
|
+
private _speedRandomMacro;
|
|
73
|
+
private _dragCurveCachedMacro;
|
|
74
|
+
private _dragRandomCachedMacro;
|
|
75
|
+
private _dragSizeMacro;
|
|
76
|
+
private _dragVelocityMacro;
|
|
77
|
+
private _separateAxes;
|
|
78
|
+
private _speedX;
|
|
79
|
+
private _speedY;
|
|
80
|
+
private _speedZ;
|
|
81
|
+
private _dampen;
|
|
82
|
+
private _drag;
|
|
83
|
+
private _multiplyDragByParticleSize;
|
|
84
|
+
private _multiplyDragByParticleVelocity;
|
|
85
|
+
private _space;
|
|
86
|
+
/**
|
|
87
|
+
* Whether to limit velocity on each axis separately.
|
|
88
|
+
*/
|
|
89
|
+
get separateAxes(): boolean;
|
|
90
|
+
set separateAxes(value: boolean);
|
|
91
|
+
/**
|
|
92
|
+
* Speed limit when separateAxes is false.
|
|
93
|
+
*/
|
|
94
|
+
get speed(): ParticleCompositeCurve;
|
|
95
|
+
set speed(value: ParticleCompositeCurve);
|
|
96
|
+
/**
|
|
97
|
+
* Speed limit for the x-axis (or overall limit when separateAxes is false).
|
|
98
|
+
*/
|
|
99
|
+
get speedX(): ParticleCompositeCurve;
|
|
100
|
+
set speedX(value: ParticleCompositeCurve);
|
|
101
|
+
/**
|
|
102
|
+
* Speed limit for the y-axis.
|
|
103
|
+
*/
|
|
104
|
+
get speedY(): ParticleCompositeCurve;
|
|
105
|
+
set speedY(value: ParticleCompositeCurve);
|
|
106
|
+
/**
|
|
107
|
+
* Speed limit for the z-axis.
|
|
108
|
+
*/
|
|
109
|
+
get speedZ(): ParticleCompositeCurve;
|
|
110
|
+
set speedZ(value: ParticleCompositeCurve);
|
|
111
|
+
/**
|
|
112
|
+
* Controls how much the velocity is dampened when it exceeds the limit.
|
|
113
|
+
* @remarks Value is clamped to [0, 1]. 0 means no damping, 1 means full damping.
|
|
114
|
+
*/
|
|
115
|
+
get dampen(): number;
|
|
116
|
+
set dampen(value: number);
|
|
117
|
+
/**
|
|
118
|
+
* Controls the amount of drag applied to particle velocities.
|
|
119
|
+
*/
|
|
120
|
+
get drag(): ParticleCompositeCurve;
|
|
121
|
+
set drag(value: ParticleCompositeCurve);
|
|
122
|
+
/**
|
|
123
|
+
* Adjust the amount of drag based on particle sizes.
|
|
124
|
+
*/
|
|
125
|
+
get multiplyDragByParticleSize(): boolean;
|
|
126
|
+
set multiplyDragByParticleSize(value: boolean);
|
|
127
|
+
/**
|
|
128
|
+
* Adjust the amount of drag based on particle speeds.
|
|
129
|
+
*/
|
|
130
|
+
get multiplyDragByParticleVelocity(): boolean;
|
|
131
|
+
set multiplyDragByParticleVelocity(value: boolean);
|
|
132
|
+
/**
|
|
133
|
+
* Specifies if the velocity limits are in local space or world space.
|
|
134
|
+
* @remarks Only takes effect when 'separateAxes' is enabled.
|
|
135
|
+
*/
|
|
136
|
+
get space(): ParticleSimulationSpace;
|
|
137
|
+
set space(value: ParticleSimulationSpace);
|
|
138
|
+
/**
|
|
139
|
+
* Specifies whether the module is enabled.
|
|
140
|
+
*/
|
|
141
|
+
get enabled(): boolean;
|
|
142
|
+
set enabled(value: boolean);
|
|
143
|
+
constructor(generator: ParticleGenerator);
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
_isDragRandomMode(): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
151
|
+
_isSpeedRandomMode(): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
156
|
+
/**
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
_resetRandomSeed(seed: number): void;
|
|
160
|
+
private _uploadScalarSpeed;
|
|
161
|
+
private _uploadSeparateAxisSpeeds;
|
|
162
|
+
private _uploadDrag;
|
|
163
|
+
}
|