@galacean/engine-core 2.0.0-alpha.5 → 2.0.0-alpha.51
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 +23869 -20445
- package/dist/main.js.map +1 -1
- package/dist/module.js +23857 -20437
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- 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 +52 -0
- package/types/Camera.d.ts +73 -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 +17 -0
- package/types/Engine.d.ts +110 -4
- 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 -1
- 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 +18 -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 +81 -18
- 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 +69 -0
- package/types/SystemInfo.d.ts +13 -0
- 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/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/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 +67 -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 +38 -1
- package/types/material/BaseMaterial.d.ts +15 -11
- package/types/material/Material.d.ts +5 -9
- package/types/mesh/BlendShape.d.ts +14 -1
- package/types/mesh/BlendShapeFrame.d.ts +11 -4
- package/types/mesh/BlendShapeManager.d.ts +101 -1
- package/types/mesh/BufferMesh.d.ts +2 -2
- package/types/mesh/MeshRenderer.d.ts +42 -0
- package/types/mesh/ModelMesh.d.ts +23 -4
- package/types/mesh/PrimitiveMesh.d.ts +38 -4
- package/types/mesh/PrimitiveMeshRestorer.d.ts +107 -0
- package/types/mesh/Skin.d.ts +12 -3
- package/types/mesh/SkinnedMeshRenderer.d.ts +27 -1
- package/types/particle/ParticleBufferUtils.d.ts +26 -1
- package/types/particle/ParticleGenerator.d.ts +147 -2
- package/types/particle/ParticleMaterial.d.ts +3 -1
- package/types/particle/ParticleRenderer.d.ts +61 -1
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +52 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +25 -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 +9 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
- package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +8 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +17 -1
- package/types/particle/index.d.ts +7 -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/EmissionModule.d.ts +36 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
- package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +164 -0
- package/types/particle/modules/MainModule.d.ts +45 -6
- package/types/particle/modules/NoiseModule.d.ts +114 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +42 -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 +31 -0
- package/types/particle/modules/SubEmittersModule.d.ts +57 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +120 -0
- 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 +21 -0
- package/types/physics/Collider.d.ts +47 -2
- package/types/physics/Collision.d.ts +3 -0
- package/types/physics/DynamicCollider.d.ts +28 -1
- package/types/physics/HitResult.d.ts +2 -2
- package/types/physics/PhysicsMaterial.d.ts +3 -0
- package/types/physics/PhysicsScene.d.ts +56 -6
- 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 +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 +26 -3
- package/types/physics/shape/MeshColliderShape.d.ts +11 -5
- package/types/postProcess/FinalPass.d.ts +19 -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/IPlatformBuffer.d.ts +1 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +40 -0
- package/types/renderingHardwareInterface/index.d.ts +2 -0
- package/types/shader/Shader.d.ts +38 -22
- package/types/shader/ShaderBlockProperty.d.ts +19 -0
- package/types/shader/ShaderData.d.ts +43 -4
- package/types/shader/ShaderFactory.d.ts +78 -0
- package/types/shader/ShaderMacro.d.ts +17 -2
- package/types/shader/ShaderMacroCollection.d.ts +57 -1
- package/types/shader/ShaderMacroProcessor.d.ts +72 -0
- package/types/shader/ShaderPass.d.ts +46 -13
- package/types/shader/ShaderProgram.d.ts +91 -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/ShaderPreprocessorDirective.d.ts +16 -0
- package/types/shader/index.d.ts +1 -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 -0
- package/types/shadow/ShadowSliceData.d.ts +13 -1
- package/types/shadow/ShadowUtils.d.ts +43 -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 +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 +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/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,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,31 @@
|
|
|
1
|
+
import { DataObject } from "../../base/DataObject";
|
|
2
|
+
import { 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) the sub-emitter fires for any given event. */
|
|
14
|
+
emitProbability: number;
|
|
15
|
+
/** Number of sub particles emitted per parent event. */
|
|
16
|
+
emitCount: number;
|
|
17
|
+
/** @internal */
|
|
18
|
+
_module: SubEmittersModule | null;
|
|
19
|
+
private _emitter;
|
|
20
|
+
private _type;
|
|
21
|
+
/**
|
|
22
|
+
* Target particle renderer the sub particles emit into.
|
|
23
|
+
*/
|
|
24
|
+
get emitter(): ParticleRenderer | null;
|
|
25
|
+
set emitter(value: ParticleRenderer);
|
|
26
|
+
/**
|
|
27
|
+
* Which parent-particle event drives this slot.
|
|
28
|
+
*/
|
|
29
|
+
get type(): ParticleSubEmitterType;
|
|
30
|
+
set type(value: ParticleSubEmitterType);
|
|
31
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Color, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { ParticleSubEmitterInheritProperty } from "../enums/ParticleSubEmitterInheritProperty";
|
|
3
|
+
import { ParticleSubEmitterType } from "../enums/ParticleSubEmitterType";
|
|
4
|
+
import { ParticleRenderer } from "../ParticleRenderer";
|
|
5
|
+
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
6
|
+
import { SubEmitter } from "./SubEmitter";
|
|
7
|
+
/**
|
|
8
|
+
* Fires sub-emitters on parent particle lifecycle events (Birth / Death).
|
|
9
|
+
* @remarks Requires WebGL2; the module stays inactive on WebGL1.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SubEmittersModule extends ParticleGeneratorModule {
|
|
12
|
+
private static _cycleVisited;
|
|
13
|
+
private static _cycleStack;
|
|
14
|
+
private static _wouldCreateCycle;
|
|
15
|
+
private _subEmitters;
|
|
16
|
+
/**
|
|
17
|
+
* The configured sub-emitters.
|
|
18
|
+
*/
|
|
19
|
+
get subEmitters(): readonly SubEmitter[];
|
|
20
|
+
private _probabilityRand;
|
|
21
|
+
/**
|
|
22
|
+
* Add a sub-emitter slot.
|
|
23
|
+
* @param emitter - Target particle renderer
|
|
24
|
+
* @param type - Trigger event (`Birth` / `Death`)
|
|
25
|
+
* @param inheritProperties - Bitmask of properties inherited from the parent particle
|
|
26
|
+
* @param emitProbability - Per-event fire probability [0, 1]
|
|
27
|
+
* @param emitCount - Number of sub particles emitted per parent event
|
|
28
|
+
*/
|
|
29
|
+
addSubEmitter(emitter: ParticleRenderer, type: ParticleSubEmitterType, inheritProperties?: ParticleSubEmitterInheritProperty, emitProbability?: number, emitCount?: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* Remove the sub-emitter at the given index.
|
|
32
|
+
* @param index - Index of the sub-emitter to remove
|
|
33
|
+
*/
|
|
34
|
+
removeSubEmitterByIndex(index: number): void;
|
|
35
|
+
/**
|
|
36
|
+
* Remove all sub-emitter slots.
|
|
37
|
+
*/
|
|
38
|
+
clear(): void;
|
|
39
|
+
get enabled(): boolean;
|
|
40
|
+
set enabled(value: boolean);
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
_dispatchEvent(type: ParticleSubEmitterType, worldPosition: Vector3, parentColor: Color, parentSize: Vector3, parentRotation: Vector3, worldDirection?: Vector3): void;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
_resetRandomSeed(seed: number): void;
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
_hasSubEmitterOfType(type: ParticleSubEmitterType): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
_validateEmitter(emitter: ParticleRenderer): void;
|
|
57
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Vector2 } from "@galacean/engine-math";
|
|
1
|
+
import { Rand, Vector2, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { ShaderData } from "../../shader/ShaderData";
|
|
2
3
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
3
4
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
4
5
|
import { ParticleGenerator } from "../ParticleGenerator";
|
|
@@ -18,6 +19,10 @@ export declare class TextureSheetAnimationModule extends ParticleGeneratorModule
|
|
|
18
19
|
type: TextureSheetAnimationType;
|
|
19
20
|
/** Cycle count. */
|
|
20
21
|
cycleCount: number;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_tillingInfo: Vector3;
|
|
24
|
+
/** @internal */
|
|
25
|
+
_frameOverTimeRand: Rand;
|
|
21
26
|
private _tiling;
|
|
22
27
|
private _frameCurveMacro;
|
|
23
28
|
/**
|
|
@@ -26,6 +31,14 @@ export declare class TextureSheetAnimationModule extends ParticleGeneratorModule
|
|
|
26
31
|
get tiling(): Vector2;
|
|
27
32
|
set tiling(value: Vector2);
|
|
28
33
|
constructor(generator: ParticleGenerator);
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
_resetRandomSeed(randomSeed: number): void;
|
|
29
42
|
private _onTilingChanged;
|
|
30
43
|
}
|
|
31
44
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { ShaderMacro } from "../../shader";
|
|
3
|
+
import { ShaderData } from "../../shader/ShaderData";
|
|
2
4
|
import { ShaderProperty } from "../../shader/ShaderProperty";
|
|
3
5
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
4
6
|
import { ParticleGenerator } from "../ParticleGenerator";
|
|
@@ -8,26 +10,90 @@ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
|
8
10
|
* Velocity over lifetime module.
|
|
9
11
|
*/
|
|
10
12
|
export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule {
|
|
13
|
+
/** @internal */
|
|
11
14
|
static readonly _constantModeMacro: ShaderMacro;
|
|
15
|
+
/** @internal */
|
|
12
16
|
static readonly _curveModeMacro: ShaderMacro;
|
|
17
|
+
/** @internal */
|
|
13
18
|
static readonly _isRandomMacro: ShaderMacro;
|
|
19
|
+
/** @internal */
|
|
14
20
|
static readonly _minConstantProperty: ShaderProperty;
|
|
21
|
+
/** @internal */
|
|
15
22
|
static readonly _maxConstantProperty: ShaderProperty;
|
|
23
|
+
/** @internal */
|
|
16
24
|
static readonly _minGradientXProperty: ShaderProperty;
|
|
25
|
+
/** @internal */
|
|
17
26
|
static readonly _minGradientYProperty: ShaderProperty;
|
|
27
|
+
/** @internal */
|
|
18
28
|
static readonly _minGradientZProperty: ShaderProperty;
|
|
29
|
+
/** @internal */
|
|
19
30
|
static readonly _maxGradientXProperty: ShaderProperty;
|
|
31
|
+
/** @internal */
|
|
20
32
|
static readonly _maxGradientYProperty: ShaderProperty;
|
|
33
|
+
/** @internal */
|
|
21
34
|
static readonly _maxGradientZProperty: ShaderProperty;
|
|
35
|
+
/** @internal */
|
|
22
36
|
static readonly _spaceProperty: ShaderProperty;
|
|
37
|
+
/** @internal */
|
|
38
|
+
static readonly _orbitalConstantModeMacro: ShaderMacro;
|
|
39
|
+
/** @internal */
|
|
40
|
+
static readonly _orbitalCurveModeMacro: ShaderMacro;
|
|
41
|
+
/** @internal */
|
|
42
|
+
static readonly _orbitalRandomModeMacro: ShaderMacro;
|
|
43
|
+
/** @internal */
|
|
44
|
+
static readonly _radialConstantModeMacro: ShaderMacro;
|
|
45
|
+
/** @internal */
|
|
46
|
+
static readonly _radialCurveModeMacro: ShaderMacro;
|
|
47
|
+
/** @internal */
|
|
48
|
+
static readonly _radialRandomModeMacro: ShaderMacro;
|
|
49
|
+
/** @internal */
|
|
50
|
+
static readonly _orbitalMinConstantProperty: ShaderProperty;
|
|
51
|
+
/** @internal */
|
|
52
|
+
static readonly _orbitalMaxConstantProperty: ShaderProperty;
|
|
53
|
+
/** @internal */
|
|
54
|
+
static readonly _orbitalMinCurveXProperty: ShaderProperty;
|
|
55
|
+
/** @internal */
|
|
56
|
+
static readonly _orbitalMinCurveYProperty: ShaderProperty;
|
|
57
|
+
/** @internal */
|
|
58
|
+
static readonly _orbitalMinCurveZProperty: ShaderProperty;
|
|
59
|
+
/** @internal */
|
|
60
|
+
static readonly _orbitalMaxCurveXProperty: ShaderProperty;
|
|
61
|
+
/** @internal */
|
|
62
|
+
static readonly _orbitalMaxCurveYProperty: ShaderProperty;
|
|
63
|
+
/** @internal */
|
|
64
|
+
static readonly _orbitalMaxCurveZProperty: ShaderProperty;
|
|
65
|
+
/** @internal */
|
|
66
|
+
static readonly _radialMinConstantProperty: ShaderProperty;
|
|
67
|
+
/** @internal */
|
|
68
|
+
static readonly _radialMaxConstantProperty: ShaderProperty;
|
|
69
|
+
/** @internal */
|
|
70
|
+
static readonly _radialMinCurveProperty: ShaderProperty;
|
|
71
|
+
/** @internal */
|
|
72
|
+
static readonly _radialMaxCurveProperty: ShaderProperty;
|
|
73
|
+
/** @internal */
|
|
74
|
+
static readonly _offsetProperty: ShaderProperty;
|
|
75
|
+
/** @internal */
|
|
76
|
+
_velocityRand: Rand;
|
|
23
77
|
private _velocityMinConstant;
|
|
24
78
|
private _velocityMaxConstant;
|
|
25
79
|
private _velocityMacro;
|
|
26
80
|
private _randomModeMacro;
|
|
81
|
+
private _orbitalMinConstant;
|
|
82
|
+
private _orbitalConstant;
|
|
83
|
+
private _orbitalMacro;
|
|
84
|
+
private _orbitalRandomModeMacro;
|
|
85
|
+
private _radialMacro;
|
|
86
|
+
private _radialRandomModeMacro;
|
|
27
87
|
private _velocityX;
|
|
28
88
|
private _velocityY;
|
|
29
89
|
private _velocityZ;
|
|
90
|
+
private _orbitalX;
|
|
91
|
+
private _orbitalY;
|
|
92
|
+
private _orbitalZ;
|
|
93
|
+
private _radial;
|
|
94
|
+
private _offset;
|
|
30
95
|
private _space;
|
|
96
|
+
private readonly _onTransformFeedbackDirty;
|
|
31
97
|
/**
|
|
32
98
|
* Velocity over lifetime for x axis.
|
|
33
99
|
*/
|
|
@@ -43,6 +109,35 @@ export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule
|
|
|
43
109
|
*/
|
|
44
110
|
get velocityZ(): ParticleCompositeCurve;
|
|
45
111
|
set velocityZ(value: ParticleCompositeCurve);
|
|
112
|
+
/**
|
|
113
|
+
* Orbital velocity (radians/second) around the x axis of the system.
|
|
114
|
+
* @remarks Requires WebGL2.
|
|
115
|
+
*/
|
|
116
|
+
get orbitalX(): ParticleCompositeCurve;
|
|
117
|
+
set orbitalX(value: ParticleCompositeCurve);
|
|
118
|
+
/**
|
|
119
|
+
* Orbital velocity (radians/second) around the y axis of the system.
|
|
120
|
+
* @remarks Requires WebGL2.
|
|
121
|
+
*/
|
|
122
|
+
get orbitalY(): ParticleCompositeCurve;
|
|
123
|
+
set orbitalY(value: ParticleCompositeCurve);
|
|
124
|
+
/**
|
|
125
|
+
* Orbital velocity (radians/second) around the z axis of the system.
|
|
126
|
+
* @remarks Requires WebGL2.
|
|
127
|
+
*/
|
|
128
|
+
get orbitalZ(): ParticleCompositeCurve;
|
|
129
|
+
set orbitalZ(value: ParticleCompositeCurve);
|
|
130
|
+
/**
|
|
131
|
+
* Radial velocity moving particles away from (or towards) the center.
|
|
132
|
+
* @remarks Requires WebGL2.
|
|
133
|
+
*/
|
|
134
|
+
get radial(): ParticleCompositeCurve;
|
|
135
|
+
set radial(value: ParticleCompositeCurve);
|
|
136
|
+
/**
|
|
137
|
+
* The center offset of orbital/radial motion from the particle system origin.
|
|
138
|
+
*/
|
|
139
|
+
get centerOffset(): Vector3;
|
|
140
|
+
set centerOffset(value: Vector3);
|
|
46
141
|
/**
|
|
47
142
|
* Velocity space.
|
|
48
143
|
*/
|
|
@@ -51,4 +146,29 @@ export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule
|
|
|
51
146
|
get enabled(): boolean;
|
|
52
147
|
set enabled(value: boolean);
|
|
53
148
|
constructor(generator: ParticleGenerator);
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
_updateShaderData(shaderData: ShaderData): void;
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
_resetRandomSeed(seed: number): void;
|
|
157
|
+
/**
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
160
|
+
_needTransformFeedback(): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
_isOrbitalActive(): boolean;
|
|
165
|
+
/**
|
|
166
|
+
* @internal
|
|
167
|
+
*/
|
|
168
|
+
_isRadialActive(): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
*/
|
|
172
|
+
_isRandomMode(): boolean;
|
|
173
|
+
private _onOrbitalRadialChange;
|
|
54
174
|
}
|
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BoundingBox, Rand, Vector2, Vector3 } from "@galacean/engine-math";
|
|
2
2
|
import { UpdateFlagManager } from "../../../UpdateFlagManager";
|
|
3
|
+
import { DataObject } from "../../../base/DataObject";
|
|
4
|
+
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
3
5
|
/**
|
|
4
6
|
* Base class for all particle shapes.
|
|
5
7
|
*/
|
|
6
|
-
export declare abstract class BaseShape {
|
|
8
|
+
export declare abstract class BaseShape extends DataObject {
|
|
9
|
+
/** @internal */
|
|
10
|
+
static _tempVector20: Vector2;
|
|
11
|
+
/** @internal */
|
|
12
|
+
static _tempVector21: Vector2;
|
|
13
|
+
/** @internal */
|
|
14
|
+
static _tempVector30: Vector3;
|
|
15
|
+
/** @internal */
|
|
16
|
+
static _tempVector31: Vector3;
|
|
17
|
+
private static _tempQuaternion;
|
|
7
18
|
/** The type of shape to emit particles from. */
|
|
8
19
|
abstract readonly shapeType: ParticleShapeType;
|
|
9
20
|
protected _updateManager: UpdateFlagManager;
|
|
10
21
|
private _enabled;
|
|
11
22
|
private _randomDirectionAmount;
|
|
23
|
+
private _position;
|
|
24
|
+
private _rotation;
|
|
25
|
+
private _scale;
|
|
26
|
+
private _matrix;
|
|
27
|
+
private _transformDirty;
|
|
28
|
+
private _hasShapeTransform;
|
|
12
29
|
/**
|
|
13
30
|
* Specifies whether the ShapeModule is enabled or disabled.
|
|
14
31
|
*/
|
|
@@ -19,4 +36,50 @@ export declare abstract class BaseShape {
|
|
|
19
36
|
*/
|
|
20
37
|
get randomDirectionAmount(): number;
|
|
21
38
|
set randomDirectionAmount(value: number);
|
|
39
|
+
/**
|
|
40
|
+
* Apply a local position offset to the shape.
|
|
41
|
+
*/
|
|
42
|
+
get position(): Vector3;
|
|
43
|
+
set position(value: Vector3);
|
|
44
|
+
/**
|
|
45
|
+
* Apply a local rotation to the shape, specified as euler angles in degrees.
|
|
46
|
+
*/
|
|
47
|
+
get rotation(): Vector3;
|
|
48
|
+
set rotation(value: Vector3);
|
|
49
|
+
/**
|
|
50
|
+
* Apply a local scale to the shape.
|
|
51
|
+
*/
|
|
52
|
+
get scale(): Vector3;
|
|
53
|
+
set scale(value: Vector3);
|
|
54
|
+
constructor();
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
_registerOnValueChanged(listener: () => void): void;
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
_unRegisterOnValueChanged(listener: () => void): void;
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
_destroy(): void;
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
_generatePositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
_getPositionRange(bounds: BoundingBox): void;
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
_getDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
79
|
+
protected abstract _generateLocalPositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
80
|
+
protected abstract _getLocalPositionRange(outMin: Vector3, outMax: Vector3): void;
|
|
81
|
+
protected abstract _getLocalDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
82
|
+
protected _onTransformChanged: () => void;
|
|
83
|
+
private _getMatrix;
|
|
84
|
+
private _transformDirectionRange;
|
|
22
85
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Vector3 } from "@galacean/engine-math";
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
2
2
|
import { BaseShape } from "./BaseShape";
|
|
3
3
|
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
4
4
|
/**
|
|
5
5
|
* Particle shape that emits particles from a box.
|
|
6
6
|
*/
|
|
7
7
|
export declare class BoxShape extends BaseShape {
|
|
8
|
-
private static _tempVector30;
|
|
9
8
|
readonly shapeType = ParticleShapeType.Box;
|
|
10
9
|
private _size;
|
|
11
10
|
/**
|
|
@@ -14,4 +13,16 @@ export declare class BoxShape extends BaseShape {
|
|
|
14
13
|
get size(): Vector3;
|
|
15
14
|
set size(value: Vector3);
|
|
16
15
|
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
_generateLocalPositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
_getLocalDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
_getLocalPositionRange(outMin: Vector3, outMax: Vector3): void;
|
|
17
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { BaseShape } from "./BaseShape";
|
|
2
3
|
import { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
|
|
3
4
|
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
@@ -5,7 +6,6 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
5
6
|
* Particle shape that emits particles from a circle.
|
|
6
7
|
*/
|
|
7
8
|
export declare class CircleShape extends BaseShape {
|
|
8
|
-
private static _tempPositionPoint;
|
|
9
9
|
readonly shapeType = ParticleShapeType.Circle;
|
|
10
10
|
private _radius;
|
|
11
11
|
private _arc;
|
|
@@ -31,5 +31,17 @@ export declare class CircleShape extends BaseShape {
|
|
|
31
31
|
*/
|
|
32
32
|
get arcSpeed(): number;
|
|
33
33
|
set arcSpeed(value: number);
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
_generateLocalPositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
_getLocalDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
_getLocalPositionRange(outMin: Vector3, outMax: Vector3): void;
|
|
34
46
|
private _getUnitArcRange;
|
|
35
47
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { BaseShape } from "./BaseShape";
|
|
2
3
|
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
3
4
|
/**
|
|
4
5
|
* Cone shape.
|
|
5
6
|
*/
|
|
6
7
|
export declare class ConeShape extends BaseShape {
|
|
7
|
-
private static _tempVector20;
|
|
8
|
-
private static _tempVector21;
|
|
9
|
-
private static _tempVector30;
|
|
10
|
-
private static _tempVector31;
|
|
11
8
|
readonly shapeType = ParticleShapeType.Cone;
|
|
12
9
|
private _angle;
|
|
13
10
|
private _radius;
|
|
@@ -33,6 +30,18 @@ export declare class ConeShape extends BaseShape {
|
|
|
33
30
|
*/
|
|
34
31
|
get emitType(): ConeEmitType;
|
|
35
32
|
set emitType(value: ConeEmitType);
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
_generateLocalPositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
_getLocalDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
_getLocalPositionRange(outMin: Vector3, outMax: Vector3): void;
|
|
36
45
|
}
|
|
37
46
|
/**
|
|
38
47
|
* Cone emitter type.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { BaseShape } from "./BaseShape";
|
|
2
3
|
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
3
4
|
/**
|
|
@@ -11,4 +12,16 @@ export declare class HemisphereShape extends BaseShape {
|
|
|
11
12
|
*/
|
|
12
13
|
get radius(): number;
|
|
13
14
|
set radius(value: number);
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
_generateLocalPositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
_getLocalDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
_getLocalPositionRange(outMin: Vector3, outMax: Vector3): void;
|
|
14
27
|
}
|