@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,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
3
|
+
import type { ICloneHook } from "../../clone/ICloneHook";
|
|
4
|
+
import type { ShaderData } from "../../shader/ShaderData";
|
|
5
|
+
import type { ParticleGenerator } from "../ParticleGenerator";
|
|
3
6
|
import { ParticleScaleMode } from "../enums/ParticleScaleMode";
|
|
4
7
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
5
8
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
6
9
|
import { ParticleCompositeGradient } from "./ParticleCompositeGradient";
|
|
7
|
-
export declare class MainModule implements
|
|
8
|
-
private
|
|
9
|
-
private static _vector3One;
|
|
10
|
+
export declare class MainModule extends DataObject implements ICloneHook<MainModule> {
|
|
11
|
+
private static readonly _vector3One;
|
|
10
12
|
private static readonly _positionScale;
|
|
11
13
|
private static readonly _sizeScale;
|
|
12
14
|
private static readonly _worldPosition;
|
|
@@ -15,32 +17,46 @@ export declare class MainModule implements ICustomClone {
|
|
|
15
17
|
private static readonly _simulationSpace;
|
|
16
18
|
private static readonly _startRotation3D;
|
|
17
19
|
private static readonly _scaleMode;
|
|
18
|
-
/** The duration of the Particle Generator in seconds. */
|
|
19
|
-
duration: number;
|
|
20
20
|
/** Specifies whether the Particle Generator loops. */
|
|
21
21
|
isLoop: boolean;
|
|
22
22
|
/** Start delay in seconds. */
|
|
23
23
|
startDelay: ParticleCompositeCurve;
|
|
24
24
|
/** A flag to enable 3D particle rotation, when disabled, only `startRotationZ` is used. */
|
|
25
25
|
startRotation3D: boolean;
|
|
26
|
-
/** The initial rotation of particles around the x-axis when emitted
|
|
26
|
+
/** The initial rotation of particles around the x-axis when emitted, in degrees. */
|
|
27
27
|
startRotationX: ParticleCompositeCurve;
|
|
28
|
-
/** The initial rotation of particles around the y-axis when emitted. */
|
|
28
|
+
/** The initial rotation of particles around the y-axis when emitted, in degrees. */
|
|
29
29
|
startRotationY: ParticleCompositeCurve;
|
|
30
|
-
/** The initial rotation of particles around the z-axis when emitted. */
|
|
30
|
+
/** The initial rotation of particles around the z-axis when emitted, in degrees. */
|
|
31
31
|
startRotationZ: ParticleCompositeCurve;
|
|
32
32
|
/** Makes some particles spin in the opposite direction. */
|
|
33
33
|
flipRotation: number;
|
|
34
34
|
/** The mode of start color */
|
|
35
35
|
startColor: ParticleCompositeGradient;
|
|
36
|
-
/** A scale that this Particle Generator applies to gravity, defined by Physics.gravity. */
|
|
37
36
|
/** Override the default playback speed of the Particle Generator. */
|
|
38
37
|
simulationSpeed: number;
|
|
39
38
|
/** Control how the Particle Generator applies its Transform component to the particles it emits. */
|
|
40
39
|
scalingMode: ParticleScaleMode;
|
|
41
40
|
/** If set to true, the Particle Generator automatically begins to play on startup. */
|
|
42
41
|
playOnEnabled: boolean;
|
|
42
|
+
/** @internal */
|
|
43
|
+
_maxParticleBuffer: number;
|
|
44
|
+
/** @internal */
|
|
45
|
+
readonly _startDelayRand: Rand;
|
|
46
|
+
/** @internal */
|
|
47
|
+
readonly _startSpeedRand: Rand;
|
|
48
|
+
/** @internal */
|
|
49
|
+
readonly _startLifeTimeRand: Rand;
|
|
50
|
+
/** @internal */
|
|
51
|
+
readonly _startColorRand: Rand;
|
|
52
|
+
/** @internal */
|
|
53
|
+
readonly _startSizeRand: Rand;
|
|
54
|
+
/** @internal */
|
|
55
|
+
readonly _startRotationRand: Rand;
|
|
56
|
+
/** @internal */
|
|
43
57
|
readonly _gravityModifierRand: Rand;
|
|
58
|
+
private readonly _worldRotationValue;
|
|
59
|
+
private _duration;
|
|
44
60
|
private _startLifetime;
|
|
45
61
|
private _startSpeed;
|
|
46
62
|
private _startSize3D;
|
|
@@ -50,6 +66,14 @@ export declare class MainModule implements ICustomClone {
|
|
|
50
66
|
private _gravityModifier;
|
|
51
67
|
private _simulationSpace;
|
|
52
68
|
private _generator;
|
|
69
|
+
/**
|
|
70
|
+
* The emission cycle duration in seconds. Must be positive and finite.
|
|
71
|
+
*
|
|
72
|
+
* @throws
|
|
73
|
+
* Throw a RangeError if the value is not positive and finite. The previous value is preserved.
|
|
74
|
+
*/
|
|
75
|
+
get duration(): number;
|
|
76
|
+
set duration(value: number);
|
|
53
77
|
/**
|
|
54
78
|
* The initial lifetime of particles when emitted.
|
|
55
79
|
*/
|
|
@@ -100,5 +124,26 @@ export declare class MainModule implements ICustomClone {
|
|
|
100
124
|
*/
|
|
101
125
|
get startSize(): ParticleCompositeCurve;
|
|
102
126
|
set startSize(value: ParticleCompositeCurve);
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
constructor(generator: ParticleGenerator);
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
_resetRandomSeed(randomSeed: number): void;
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
_getPositionScale(): Vector3;
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
* @inheritdoc
|
|
146
|
+
*/
|
|
147
|
+
_onClone(target: MainModule): void;
|
|
103
148
|
private _onCompositeCurveChange;
|
|
104
149
|
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData, ShaderMacro, ShaderProperty } from "../../shader";
|
|
3
|
+
import { ParticleGenerator } from "../ParticleGenerator";
|
|
4
|
+
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
5
|
+
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
6
|
+
/**
|
|
7
|
+
* Noise module for particle system.
|
|
8
|
+
* Adds simplex noise-based turbulence displacement to particles.
|
|
9
|
+
*/
|
|
10
|
+
export declare class NoiseModule extends ParticleGeneratorModule {
|
|
11
|
+
/** @internal */
|
|
12
|
+
static readonly _enabledMacro: ShaderMacro;
|
|
13
|
+
/** @internal */
|
|
14
|
+
static readonly _strengthCurveMacro: ShaderMacro;
|
|
15
|
+
/** @internal */
|
|
16
|
+
static readonly _strengthIsRandomTwoMacro: ShaderMacro;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static readonly _separateAxesMacro: ShaderMacro;
|
|
19
|
+
/** @internal */
|
|
20
|
+
static readonly _noiseProperty: ShaderProperty;
|
|
21
|
+
/** @internal */
|
|
22
|
+
static readonly _noiseOctaveProperty: ShaderProperty;
|
|
23
|
+
/** @internal */
|
|
24
|
+
static readonly _strengthMinConstProperty: ShaderProperty;
|
|
25
|
+
/** @internal */
|
|
26
|
+
static readonly _strengthMaxCurveXProperty: ShaderProperty;
|
|
27
|
+
/** @internal */
|
|
28
|
+
static readonly _strengthMaxCurveYProperty: ShaderProperty;
|
|
29
|
+
/** @internal */
|
|
30
|
+
static readonly _strengthMaxCurveZProperty: ShaderProperty;
|
|
31
|
+
/** @internal */
|
|
32
|
+
static readonly _strengthMinCurveXProperty: ShaderProperty;
|
|
33
|
+
/** @internal */
|
|
34
|
+
static readonly _strengthMinCurveYProperty: ShaderProperty;
|
|
35
|
+
/** @internal */
|
|
36
|
+
static readonly _strengthMinCurveZProperty: ShaderProperty;
|
|
37
|
+
private _enabledModuleMacro;
|
|
38
|
+
private _strengthCurveModeMacro;
|
|
39
|
+
private _strengthIsRandomTwoModeMacro;
|
|
40
|
+
private _separateAxesModeMacro;
|
|
41
|
+
/** @internal */
|
|
42
|
+
_noiseRand: Rand;
|
|
43
|
+
private _noiseParams;
|
|
44
|
+
private _noiseOctaveParams;
|
|
45
|
+
private _strengthMinConst;
|
|
46
|
+
private _strengthX;
|
|
47
|
+
private _strengthY;
|
|
48
|
+
private _strengthZ;
|
|
49
|
+
private _scrollSpeed;
|
|
50
|
+
private _separateAxes;
|
|
51
|
+
private _frequency;
|
|
52
|
+
private _octaveCount;
|
|
53
|
+
private _octaveIntensityMultiplier;
|
|
54
|
+
private _octaveFrequencyMultiplier;
|
|
55
|
+
/**
|
|
56
|
+
* Specifies whether the strength is separate on each axis, when disabled, only `strength` is used.
|
|
57
|
+
*/
|
|
58
|
+
get separateAxes(): boolean;
|
|
59
|
+
set separateAxes(value: boolean);
|
|
60
|
+
/**
|
|
61
|
+
* Noise strength. When `separateAxes` is disabled, applies to all axes.
|
|
62
|
+
* When `separateAxes` is enabled, applies only to x axis.
|
|
63
|
+
*/
|
|
64
|
+
get strengthX(): ParticleCompositeCurve;
|
|
65
|
+
set strengthX(value: ParticleCompositeCurve);
|
|
66
|
+
/**
|
|
67
|
+
* Noise strength for y axis, used when `separateAxes` is enabled.
|
|
68
|
+
*/
|
|
69
|
+
get strengthY(): ParticleCompositeCurve;
|
|
70
|
+
set strengthY(value: ParticleCompositeCurve);
|
|
71
|
+
/**
|
|
72
|
+
* Noise strength for z axis, used when `separateAxes` is enabled.
|
|
73
|
+
*/
|
|
74
|
+
get strengthZ(): ParticleCompositeCurve;
|
|
75
|
+
set strengthZ(value: ParticleCompositeCurve);
|
|
76
|
+
/**
|
|
77
|
+
* Noise spatial frequency.
|
|
78
|
+
*/
|
|
79
|
+
get frequency(): number;
|
|
80
|
+
set frequency(value: number);
|
|
81
|
+
/**
|
|
82
|
+
* Noise field scroll speed over time.
|
|
83
|
+
*/
|
|
84
|
+
get scrollSpeed(): number;
|
|
85
|
+
set scrollSpeed(value: number);
|
|
86
|
+
/**
|
|
87
|
+
* Number of noise octave layers (1-3).
|
|
88
|
+
*/
|
|
89
|
+
get octaveCount(): number;
|
|
90
|
+
set octaveCount(value: number);
|
|
91
|
+
/**
|
|
92
|
+
* Intensity multiplier for each successive octave, only effective when `octaveCount` > 1.
|
|
93
|
+
* Each layer's contribution is scaled by this factor relative to the previous layer, range [0, 1].
|
|
94
|
+
*/
|
|
95
|
+
get octaveIntensityMultiplier(): number;
|
|
96
|
+
set octaveIntensityMultiplier(value: number);
|
|
97
|
+
/**
|
|
98
|
+
* Frequency multiplier for each successive octave, only effective when `octaveCount` > 1.
|
|
99
|
+
* Each layer samples at this multiple of the previous layer's frequency, range [1, 4].
|
|
100
|
+
*/
|
|
101
|
+
get octaveFrequencyMultiplier(): number;
|
|
102
|
+
set octaveFrequencyMultiplier(value: number);
|
|
103
|
+
get enabled(): boolean;
|
|
104
|
+
set enabled(value: boolean);
|
|
105
|
+
constructor(generator: ParticleGenerator);
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
_resetRandomSeed(seed: number): void;
|
|
114
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { Vector2 } from "@galacean/engine-math";
|
|
1
3
|
import { ParticleCurveMode } from "../enums/ParticleCurveMode";
|
|
2
4
|
import { ParticleCurve } from "./ParticleCurve";
|
|
3
5
|
/**
|
|
4
6
|
* Particle composite curve.
|
|
5
7
|
*/
|
|
6
|
-
export declare class ParticleCompositeCurve {
|
|
8
|
+
export declare class ParticleCompositeCurve extends DataObject {
|
|
9
|
+
private static _minMaxRange;
|
|
7
10
|
private _updateManager;
|
|
8
11
|
private _mode;
|
|
9
12
|
private _constantMin;
|
|
@@ -74,8 +77,47 @@ export declare class ParticleCompositeCurve {
|
|
|
74
77
|
* @param lerpFactor - Lerp factor between two constants or curves, Valid when `mode` is set to `TwoConstants` or `TwoCurves`
|
|
75
78
|
* @returns - The result curve value
|
|
76
79
|
*/
|
|
77
|
-
evaluate(time: number, lerpFactor: number): number;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
evaluate(time: number | undefined, lerpFactor: number | undefined): number;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_evaluateCumulative(normalizedAge: number, lerpFactor: number | undefined): number;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
_getMax(): number;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
_getMinMax(out: Vector2): void;
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
_getMaxMagnitude(): number;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
_isZero(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
_isCurveMode(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
_isRandomMode(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
_isRandomCurveMode(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
_registerOnValueChanged(listener: () => void): void;
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
_unRegisterOnValueChanged(listener: () => void): void;
|
|
121
|
+
private _getKeyMinMax;
|
|
80
122
|
private _onCurveChange;
|
|
81
123
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
1
2
|
import { Color } from "@galacean/engine-math";
|
|
2
3
|
import { ParticleGradientMode } from "../enums/ParticleGradientMode";
|
|
3
4
|
import { ParticleGradient } from "./ParticleGradient";
|
|
4
5
|
/**
|
|
5
6
|
* Particle composite gradient.
|
|
6
7
|
*/
|
|
7
|
-
export declare class ParticleCompositeGradient {
|
|
8
|
+
export declare class ParticleCompositeGradient extends DataObject {
|
|
9
|
+
private static _tempColor;
|
|
8
10
|
/** The gradient mode. */
|
|
9
11
|
mode: ParticleGradientMode;
|
|
10
12
|
constantMin: Color;
|
|
@@ -23,6 +25,10 @@ export declare class ParticleCompositeGradient {
|
|
|
23
25
|
*/
|
|
24
26
|
get gradient(): ParticleGradient;
|
|
25
27
|
set gradient(value: ParticleGradient);
|
|
28
|
+
/**
|
|
29
|
+
* Create a particle gradient in constant mode with the default color.
|
|
30
|
+
*/
|
|
31
|
+
constructor();
|
|
26
32
|
/**
|
|
27
33
|
* Create a particle gradient that generates a constant color.
|
|
28
34
|
* @param constant - The constant color
|
|
@@ -51,5 +57,5 @@ export declare class ParticleCompositeGradient {
|
|
|
51
57
|
* @param lerpFactor - Lerp factor between two constants or gradients, Valid when `mode` is set to `TwoConstants` or `TwoGradients`
|
|
52
58
|
* @param out - The result color
|
|
53
59
|
*/
|
|
54
|
-
evaluate(time: number, lerpFactor: number, out: Color): void;
|
|
60
|
+
evaluate(time: number | undefined, lerpFactor: number | undefined, out: Color): void;
|
|
55
61
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
1
2
|
/**
|
|
2
3
|
* Particle curve.
|
|
3
4
|
*/
|
|
4
|
-
export declare class ParticleCurve {
|
|
5
|
+
export declare class ParticleCurve extends DataObject {
|
|
5
6
|
private _updateManager;
|
|
6
7
|
private _keys;
|
|
7
8
|
private _typeArray;
|
|
@@ -37,12 +38,32 @@ export declare class ParticleCurve {
|
|
|
37
38
|
* @param keys - The keys
|
|
38
39
|
*/
|
|
39
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;
|
|
40
61
|
private _addKey;
|
|
41
62
|
}
|
|
42
63
|
/**
|
|
43
64
|
* The key of the curve.
|
|
44
65
|
*/
|
|
45
|
-
export declare class CurveKey {
|
|
66
|
+
export declare class CurveKey extends DataObject {
|
|
46
67
|
private _updateManager;
|
|
47
68
|
private _time;
|
|
48
69
|
private _value;
|
|
@@ -60,4 +81,12 @@ export declare class CurveKey {
|
|
|
60
81
|
* Create a new key.
|
|
61
82
|
*/
|
|
62
83
|
constructor(time: number, value: number);
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
_registerOnValueChanged(listener: () => void): void;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
_unRegisterOnValueChanged(listener: () => void): void;
|
|
63
92
|
}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
1
2
|
import { ShaderData, ShaderMacro } from "../../shader";
|
|
2
3
|
import { ParticleGenerator } from "../ParticleGenerator";
|
|
3
4
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
4
5
|
/**
|
|
5
6
|
* Particle generator module.
|
|
6
7
|
*/
|
|
7
|
-
export declare abstract class ParticleGeneratorModule {
|
|
8
|
-
|
|
8
|
+
export declare abstract class ParticleGeneratorModule extends DataObject {
|
|
9
|
+
/** @internal */
|
|
10
|
+
_generator: ParticleGenerator;
|
|
9
11
|
protected _enabled: boolean;
|
|
10
12
|
/**
|
|
11
13
|
* Specifies whether the module is enabled or not.
|
|
12
14
|
*/
|
|
13
15
|
get enabled(): boolean;
|
|
14
16
|
set enabled(value: boolean);
|
|
15
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
constructor(generator: ParticleGenerator);
|
|
21
|
+
protected _enableMacro(shaderData: ShaderData, lastEnableMacro: ShaderMacro | null, enableMacro: ShaderMacro | null): ShaderMacro | null;
|
|
16
22
|
protected _onCompositeCurveChange(lastValue: ParticleCompositeCurve, value: ParticleCompositeCurve): void;
|
|
17
23
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
1
2
|
import { Color } from "@galacean/engine-math";
|
|
2
3
|
/**
|
|
3
4
|
* Particle gradient.
|
|
4
5
|
*/
|
|
5
|
-
export declare class ParticleGradient {
|
|
6
|
+
export declare class ParticleGradient extends DataObject {
|
|
6
7
|
private _colorKeys;
|
|
7
8
|
private _alphaKeys;
|
|
8
9
|
private _colorTypeArray;
|
|
@@ -22,7 +23,7 @@ export declare class ParticleGradient {
|
|
|
22
23
|
* @param colorKeys - The color keys of the gradient
|
|
23
24
|
* @param alphaKeys - The alpha keys of the gradient
|
|
24
25
|
*/
|
|
25
|
-
constructor(colorKeys?: GradientColorKey[], alphaKeys?: GradientAlphaKey[]);
|
|
26
|
+
constructor(colorKeys?: GradientColorKey[] | null, alphaKeys?: GradientAlphaKey[] | null);
|
|
26
27
|
/**
|
|
27
28
|
* Add a color key to the gradient.
|
|
28
29
|
* @param key - The key
|
|
@@ -61,6 +62,18 @@ export declare class ParticleGradient {
|
|
|
61
62
|
* @param alphaKeys - The alpha keys
|
|
62
63
|
*/
|
|
63
64
|
setKeys(colorKeys: GradientColorKey[], alphaKeys: GradientAlphaKey[]): void;
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_getColorTypeArray(): Float32Array;
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
_getAlphaTypeArray(): Float32Array;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
_evaluate(time: number, out: Color): void;
|
|
64
77
|
private _addKey;
|
|
65
78
|
private _removeKey;
|
|
66
79
|
private _setColorTypeArrayDirty;
|
|
@@ -69,7 +82,9 @@ export declare class ParticleGradient {
|
|
|
69
82
|
/**
|
|
70
83
|
* The color key of the particle gradient.
|
|
71
84
|
*/
|
|
72
|
-
export declare class GradientColorKey {
|
|
85
|
+
export declare class GradientColorKey extends DataObject {
|
|
86
|
+
/** @internal */
|
|
87
|
+
_onValueChanged: (() => void) | null;
|
|
73
88
|
private _time;
|
|
74
89
|
private _color;
|
|
75
90
|
/**
|
|
@@ -87,12 +102,14 @@ export declare class GradientColorKey {
|
|
|
87
102
|
* @param time - The time of the gradient colorKey
|
|
88
103
|
* @param color - The alpha component of the gradient colorKey
|
|
89
104
|
*/
|
|
90
|
-
constructor(time: number, color: Color);
|
|
105
|
+
constructor(time: number, color: Color | undefined);
|
|
91
106
|
}
|
|
92
107
|
/**
|
|
93
108
|
* The alpha key of the particle gradient.
|
|
94
109
|
*/
|
|
95
|
-
export declare class GradientAlphaKey {
|
|
110
|
+
export declare class GradientAlphaKey extends DataObject {
|
|
111
|
+
/** @internal */
|
|
112
|
+
_onValueChanged: (() => void) | null;
|
|
96
113
|
private _time;
|
|
97
114
|
private _alpha;
|
|
98
115
|
/**
|
|
@@ -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 { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
@@ -6,29 +8,51 @@ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
|
6
8
|
* Rotate particles throughout their lifetime.
|
|
7
9
|
*/
|
|
8
10
|
export declare class RotationOverLifetimeModule extends ParticleGeneratorModule {
|
|
11
|
+
/** @internal */
|
|
9
12
|
static readonly _constantModeMacro: ShaderMacro;
|
|
13
|
+
/** @internal */
|
|
10
14
|
static readonly _curveModeMacro: ShaderMacro;
|
|
15
|
+
/** @internal */
|
|
11
16
|
static readonly _isSeparateMacro: ShaderMacro;
|
|
17
|
+
/** @internal */
|
|
12
18
|
static readonly _isRandomTwoMacro: ShaderMacro;
|
|
19
|
+
/** @internal */
|
|
13
20
|
static readonly _minConstantProperty: ShaderProperty;
|
|
21
|
+
/** @internal */
|
|
14
22
|
static readonly _minCurveXProperty: ShaderProperty;
|
|
23
|
+
/** @internal */
|
|
15
24
|
static readonly _minCurveYProperty: ShaderProperty;
|
|
25
|
+
/** @internal */
|
|
16
26
|
static readonly _minCurveZProperty: ShaderProperty;
|
|
27
|
+
/** @internal */
|
|
17
28
|
static readonly _maxConstantProperty: ShaderProperty;
|
|
29
|
+
/** @internal */
|
|
18
30
|
static readonly _maxCurveXProperty: ShaderProperty;
|
|
31
|
+
/** @internal */
|
|
19
32
|
static readonly _maxCurveYProperty: ShaderProperty;
|
|
33
|
+
/** @internal */
|
|
20
34
|
static readonly _maxCurveZProperty: ShaderProperty;
|
|
21
35
|
/** Specifies whether the rotation is separate on each axis, when disabled, only `rotationZ` is used. */
|
|
22
36
|
separateAxes: boolean;
|
|
23
|
-
/** Rotation over lifetime for
|
|
37
|
+
/** Rotation over lifetime for x axis, in degrees. */
|
|
24
38
|
rotationX: ParticleCompositeCurve;
|
|
25
|
-
/** Rotation over lifetime for
|
|
39
|
+
/** Rotation over lifetime for y axis, in degrees. */
|
|
26
40
|
rotationY: ParticleCompositeCurve;
|
|
27
|
-
/** Rotation over lifetime for z axis. */
|
|
41
|
+
/** Rotation over lifetime for z axis, in degrees. */
|
|
28
42
|
rotationZ: ParticleCompositeCurve;
|
|
43
|
+
/** @internal */
|
|
44
|
+
_rotationRand: Rand;
|
|
29
45
|
private _rotationMinConstant;
|
|
30
46
|
private _rotationMaxConstant;
|
|
31
47
|
private _enableSeparateMacro;
|
|
32
48
|
private _modeMacro;
|
|
33
49
|
private _isRandomTwoMacro;
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
_resetRandomSeed(seed: number): void;
|
|
34
58
|
}
|
|
@@ -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 { ParticleGenerator } from "../ParticleGenerator";
|
|
@@ -7,15 +9,26 @@ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
|
7
9
|
* Size over lifetime module.
|
|
8
10
|
*/
|
|
9
11
|
export declare class SizeOverLifetimeModule extends ParticleGeneratorModule {
|
|
12
|
+
/** @internal */
|
|
10
13
|
static readonly _curveModeMacro: ShaderMacro;
|
|
14
|
+
/** @internal */
|
|
11
15
|
static readonly _isSeparateMacro: ShaderMacro;
|
|
16
|
+
/** @internal */
|
|
12
17
|
static readonly _isRandomTwoMacro: ShaderMacro;
|
|
18
|
+
/** @internal */
|
|
13
19
|
static readonly _minCurveXProperty: ShaderProperty;
|
|
20
|
+
/** @internal */
|
|
14
21
|
static readonly _minCurveYProperty: ShaderProperty;
|
|
22
|
+
/** @internal */
|
|
15
23
|
static readonly _minCurveZProperty: ShaderProperty;
|
|
24
|
+
/** @internal */
|
|
16
25
|
static readonly _maxCurveXProperty: ShaderProperty;
|
|
26
|
+
/** @internal */
|
|
17
27
|
static readonly _maxCurveYProperty: ShaderProperty;
|
|
28
|
+
/** @internal */
|
|
18
29
|
static readonly _maxCurveZProperty: ShaderProperty;
|
|
30
|
+
/** @internal */
|
|
31
|
+
_sizeRand: Rand;
|
|
19
32
|
private _separateAxes;
|
|
20
33
|
private _sizeX;
|
|
21
34
|
private _sizeY;
|
|
@@ -49,4 +62,16 @@ export declare class SizeOverLifetimeModule extends ParticleGeneratorModule {
|
|
|
49
62
|
get size(): ParticleCompositeCurve;
|
|
50
63
|
set size(value: ParticleCompositeCurve);
|
|
51
64
|
constructor(generator: ParticleGenerator);
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
_isRandomCurveMode(): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
_resetRandomSeed(seed: number): void;
|
|
52
77
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import type { ParticleRenderer } from "../ParticleRenderer";
|
|
3
|
+
import { ParticleSubEmitterInheritProperty } from "../enums/ParticleSubEmitterInheritProperty";
|
|
4
|
+
import { ParticleSubEmitterType } from "../enums/ParticleSubEmitterType";
|
|
5
|
+
import type { SubEmittersModule } from "./SubEmittersModule";
|
|
6
|
+
/**
|
|
7
|
+
* One slot in `SubEmittersModule.subEmitters`. Configures which sub-emitter
|
|
8
|
+
* fires, on which parent event, with what inheritance, probability, and count.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SubEmitter extends DataObject {
|
|
11
|
+
/** Bitmask of properties inherited from the parent particle. */
|
|
12
|
+
inheritProperties: ParticleSubEmitterInheritProperty;
|
|
13
|
+
/** Probability (0..1) that the sub-emitter runs for a parent particle. */
|
|
14
|
+
emitProbability: number;
|
|
15
|
+
/** Number of sub particles emitted when this slot is triggered at Death. */
|
|
16
|
+
deathEmitCount: number;
|
|
17
|
+
/** @internal */
|
|
18
|
+
_module: SubEmittersModule | null;
|
|
19
|
+
private _emitter;
|
|
20
|
+
private _type;
|
|
21
|
+
/**
|
|
22
|
+
* Target particle renderer the sub particles emit into.
|
|
23
|
+
* Both particle renderers must belong to the same scene.
|
|
24
|
+
*/
|
|
25
|
+
get emitter(): ParticleRenderer | null;
|
|
26
|
+
set emitter(value: ParticleRenderer);
|
|
27
|
+
/**
|
|
28
|
+
* Which parent-particle event drives this slot.
|
|
29
|
+
*/
|
|
30
|
+
get type(): ParticleSubEmitterType;
|
|
31
|
+
set type(value: ParticleSubEmitterType);
|
|
32
|
+
}
|