@galacean/engine-core 2.0.0-alpha.6 → 2.0.0-alpha.60
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 +28967 -22183
- package/dist/main.js.map +1 -1
- package/dist/module.js +28951 -22175
- 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 +2 -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 +46 -12
- package/types/texture/Texture2D.d.ts +4 -1
- package/types/texture/Texture2DArray.d.ts +4 -1
- package/types/texture/TextureCube.d.ts +4 -1
- package/types/texture/TextureUtils.d.ts +15 -1
- package/types/texture/enums/TextureFormat.d.ts +1 -9
- 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
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { ICloneHook } from "../../clone/ICloneHook";
|
|
2
|
+
import type { ElementRangeMapping } from "../../graphic/ElementRangeMapping";
|
|
3
|
+
import { ParticleSubEmitterInheritProperty } from "../enums/ParticleSubEmitterInheritProperty";
|
|
4
|
+
import { ParticleSubEmitterType } from "../enums/ParticleSubEmitterType";
|
|
5
|
+
import type { ParticleRenderer } from "../ParticleRenderer";
|
|
6
|
+
import { BirthSubEmitterCommand } from "./BirthSubEmitterCommand";
|
|
7
|
+
import { DeathSubEmitterCommand } from "./DeathSubEmitterCommand";
|
|
8
|
+
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
9
|
+
import { SubEmitter } from "./SubEmitter";
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export type ParticleSubEmitterCommand = BirthSubEmitterCommand | DeathSubEmitterCommand;
|
|
14
|
+
/**
|
|
15
|
+
* Fires sub-emitters on parent particle birth or death.
|
|
16
|
+
* @remarks
|
|
17
|
+
* Birth uses the target's emission settings on each parent particle's simulated age.
|
|
18
|
+
* The target's `simulationSpeed` affects only spawned particles.
|
|
19
|
+
* Requires WebGL2. Birth does not support Rate over Distance.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SubEmittersModule extends ParticleGeneratorModule implements ICloneHook<SubEmittersModule> {
|
|
22
|
+
private static readonly _cycleVisited;
|
|
23
|
+
private static readonly _cycleStack;
|
|
24
|
+
private _subEmitters;
|
|
25
|
+
private readonly _probabilityRand;
|
|
26
|
+
private readonly _startDelayRand;
|
|
27
|
+
private readonly _birthStatePool;
|
|
28
|
+
private readonly _birthCommandPool;
|
|
29
|
+
private readonly _deathCommandPool;
|
|
30
|
+
private _birthCommandScratch;
|
|
31
|
+
private _birthRequests;
|
|
32
|
+
private _birthRequestCount;
|
|
33
|
+
private _birthStatesByParticle;
|
|
34
|
+
private _particleSequence;
|
|
35
|
+
get enabled(): boolean;
|
|
36
|
+
set enabled(value: boolean);
|
|
37
|
+
/**
|
|
38
|
+
* The configured sub-emitters.
|
|
39
|
+
*/
|
|
40
|
+
get subEmitters(): readonly SubEmitter[];
|
|
41
|
+
/**
|
|
42
|
+
* Add a sub-emitter slot.
|
|
43
|
+
* @param emitter - Target particle renderer
|
|
44
|
+
* @param type - Trigger event (`Birth` / `Death`)
|
|
45
|
+
* @param inheritProperties - Bitmask of properties inherited from the parent particle
|
|
46
|
+
* @param emitProbability - Per-parent-particle probability [0, 1]
|
|
47
|
+
* @param deathEmitCount - Number of sub particles emitted when the parent dies
|
|
48
|
+
* @returns The created sub-emitter slot.
|
|
49
|
+
*/
|
|
50
|
+
addSubEmitter(emitter: ParticleRenderer, type: ParticleSubEmitterType, inheritProperties?: ParticleSubEmitterInheritProperty, emitProbability?: number, deathEmitCount?: number): SubEmitter;
|
|
51
|
+
/**
|
|
52
|
+
* Remove the sub-emitter at the given index.
|
|
53
|
+
* @param index - Index of the sub-emitter to remove
|
|
54
|
+
*/
|
|
55
|
+
removeSubEmitterByIndex(index: number): void;
|
|
56
|
+
/**
|
|
57
|
+
* Remove all sub-emitter slots.
|
|
58
|
+
*/
|
|
59
|
+
clear(): void;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
_prepareDeathCommands(ringIndex: number, frameTime: number, trajectoryDuration: number): void;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
_beginBirthCommands(): void;
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
_prepareBirthCommandsForParticle(ringIndex: number, bornTime: number, lifetime: number, frameLastPlayTime: number, framePlayTime: number, frameSimulationStart: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
_retireParticle(ringIndex: number): void;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
_retireAllBirthStates(): void;
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
_remapBirthStates(newParticleCount: number, mappings: ReadonlyArray<ElementRangeMapping>): void;
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
_resetRandomSeed(seed: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
_hasSubEmitterOfType(type: ParticleSubEmitterType, scheduledOnly: boolean): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* @inheritdoc
|
|
94
|
+
*/
|
|
95
|
+
_onClone(target: SubEmittersModule): void;
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
_validateEmitter(emitter: ParticleRenderer): void;
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
_onSlotChanged(slot: SubEmitter): void;
|
|
104
|
+
private _resetBirthSubEmitterState;
|
|
105
|
+
private _recycleBirthState;
|
|
106
|
+
private _notifyTopologyChanged;
|
|
107
|
+
private _isTargetInSourceUpdateGraph;
|
|
108
|
+
private _validateEmitterScenes;
|
|
109
|
+
private _validateEmitterScene;
|
|
110
|
+
private static _wouldCreateCycle;
|
|
111
|
+
}
|
|
@@ -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,33 +1,101 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { ShaderMacro } from "../../shader";
|
|
3
|
+
import type { ShaderData } from "../../shader/ShaderData";
|
|
2
4
|
import { ShaderProperty } from "../../shader/ShaderProperty";
|
|
3
5
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
4
|
-
import { ParticleGenerator } from "../ParticleGenerator";
|
|
6
|
+
import type { ParticleGenerator } from "../ParticleGenerator";
|
|
5
7
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
6
8
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
7
9
|
/**
|
|
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 _centerOffsetProperty: 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 _orbitalMaxConstant;
|
|
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 _centerOffset;
|
|
30
95
|
private _space;
|
|
96
|
+
private readonly _onTransformFeedbackDirty;
|
|
97
|
+
get enabled(): boolean;
|
|
98
|
+
set enabled(value: boolean);
|
|
31
99
|
/**
|
|
32
100
|
* Velocity over lifetime for x axis.
|
|
33
101
|
*/
|
|
@@ -43,12 +111,65 @@ export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule
|
|
|
43
111
|
*/
|
|
44
112
|
get velocityZ(): ParticleCompositeCurve;
|
|
45
113
|
set velocityZ(value: ParticleCompositeCurve);
|
|
114
|
+
/**
|
|
115
|
+
* Orbital velocity (radians/second) around the x axis of the system.
|
|
116
|
+
* @remarks Requires WebGL2.
|
|
117
|
+
*/
|
|
118
|
+
get orbitalX(): ParticleCompositeCurve;
|
|
119
|
+
set orbitalX(value: ParticleCompositeCurve);
|
|
120
|
+
/**
|
|
121
|
+
* Orbital velocity (radians/second) around the y axis of the system.
|
|
122
|
+
* @remarks Requires WebGL2.
|
|
123
|
+
*/
|
|
124
|
+
get orbitalY(): ParticleCompositeCurve;
|
|
125
|
+
set orbitalY(value: ParticleCompositeCurve);
|
|
126
|
+
/**
|
|
127
|
+
* Orbital velocity (radians/second) around the z axis of the system.
|
|
128
|
+
* @remarks Requires WebGL2.
|
|
129
|
+
*/
|
|
130
|
+
get orbitalZ(): ParticleCompositeCurve;
|
|
131
|
+
set orbitalZ(value: ParticleCompositeCurve);
|
|
132
|
+
/**
|
|
133
|
+
* Radial velocity moving particles away from (or towards) the center.
|
|
134
|
+
* @remarks Requires WebGL2.
|
|
135
|
+
*/
|
|
136
|
+
get radial(): ParticleCompositeCurve;
|
|
137
|
+
set radial(value: ParticleCompositeCurve);
|
|
138
|
+
/**
|
|
139
|
+
* The center offset of orbital/radial motion from the particle system origin.
|
|
140
|
+
*/
|
|
141
|
+
get centerOffset(): Vector3;
|
|
142
|
+
set centerOffset(value: Vector3);
|
|
46
143
|
/**
|
|
47
144
|
* Velocity space.
|
|
48
145
|
*/
|
|
49
146
|
get space(): ParticleSimulationSpace;
|
|
50
147
|
set space(value: ParticleSimulationSpace);
|
|
51
|
-
get enabled(): boolean;
|
|
52
|
-
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 _createOrbitalRadialCurve;
|
|
174
|
+
private _onOrbitalRadialChange;
|
|
54
175
|
}
|
|
@@ -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
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import type { ICloneHook } from "../../../clone/ICloneHook";
|
|
1
3
|
import { ModelMesh } from "../../../mesh";
|
|
2
4
|
import { BaseShape } from "./BaseShape";
|
|
3
5
|
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
4
6
|
/**
|
|
5
7
|
* Particle shape that emits particles from a mesh.
|
|
6
8
|
*/
|
|
7
|
-
export declare class MeshShape extends BaseShape {
|
|
9
|
+
export declare class MeshShape extends BaseShape implements ICloneHook<MeshShape> {
|
|
8
10
|
readonly shapeType = ParticleShapeType.Mesh;
|
|
9
11
|
private _mesh;
|
|
10
12
|
private _positionBuffer;
|
|
@@ -14,8 +16,29 @@ export declare class MeshShape extends BaseShape {
|
|
|
14
16
|
/**
|
|
15
17
|
* Mesh to emit particles from.
|
|
16
18
|
*/
|
|
17
|
-
get mesh(): ModelMesh;
|
|
18
|
-
set mesh(value: ModelMesh);
|
|
19
|
+
get mesh(): ModelMesh | null;
|
|
20
|
+
set mesh(value: ModelMesh | null);
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_destroy(): void;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
_generateLocalPositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
_getLocalPositionRange(outMin: Vector3, outMax: Vector3): void;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
_getLocalDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
19
37
|
private _getAttributeBuffer;
|
|
20
38
|
private _onMeshChanged;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* @inheritdoc
|
|
42
|
+
*/
|
|
43
|
+
_onClone(target: MeshShape): void;
|
|
21
44
|
}
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { Rand, Vector2, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare class ShapeUtils {
|
|
6
|
+
static randomPointUnitArcCircle(arc: number, out: Vector2, rand: Rand): void;
|
|
7
|
+
static randomPointInsideUnitArcCircle(arc: number, out: Vector2, rand: Rand): void;
|
|
8
|
+
static randomPointUnitCircle(out: Vector2, rand: Rand): void;
|
|
9
|
+
static randomPointInsideUnitCircle(out: Vector2, rand: Rand): void;
|
|
10
|
+
static _randomPointUnitSphere(out: Vector3, rand: Rand): void;
|
|
11
|
+
static _randomPointInsideUnitSphere(out: Vector3, rand: Rand): void;
|
|
12
|
+
static _randomPointInsideHalfUnitBox(out: Vector3, rand: Rand): void;
|
|
13
|
+
}
|
|
@@ -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 SphereShape 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
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
2
3
|
import { Collider } from "./Collider";
|
|
3
4
|
import { ControllerNonWalkableMode } from "./enums/ControllerNonWalkableMode";
|
|
4
|
-
import {
|
|
5
|
+
import { BoxColliderShape, CapsuleColliderShape } from "./shape";
|
|
5
6
|
/**
|
|
6
7
|
* The character controllers.
|
|
7
8
|
*/
|
|
@@ -12,7 +13,7 @@ export declare class CharacterController extends Collider {
|
|
|
12
13
|
private _slopeLimit;
|
|
13
14
|
/**
|
|
14
15
|
* The step offset for the controller, the value must be greater than or equal to 0.
|
|
15
|
-
* @remarks Character can overcome obstacle less than the height(stepOffset +
|
|
16
|
+
* @remarks Character can overcome obstacle less than the height(stepOffset + contactOffset of the shape).
|
|
16
17
|
*/
|
|
17
18
|
get stepOffset(): number;
|
|
18
19
|
set stepOffset(value: number);
|
|
@@ -32,6 +33,10 @@ export declare class CharacterController extends Collider {
|
|
|
32
33
|
*/
|
|
33
34
|
get slopeLimit(): number;
|
|
34
35
|
set slopeLimit(value: number);
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
constructor(entity: Entity);
|
|
35
40
|
/**
|
|
36
41
|
* Moves the character using a "collide-and-slide" algorithm.
|
|
37
42
|
* @param disp - Displacement vector
|
|
@@ -44,7 +49,23 @@ export declare class CharacterController extends Collider {
|
|
|
44
49
|
* Add collider shape on this controller.
|
|
45
50
|
* @param shape - Collider shape
|
|
46
51
|
*/
|
|
47
|
-
addShape(shape:
|
|
52
|
+
addShape(shape: BoxColliderShape | CapsuleColliderShape): void;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
_onUpdate(): void;
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
_onLateUpdate(): void;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
_onEnableInScene(): void;
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_onDisableInScene(): void;
|
|
48
69
|
protected _syncNative(): void;
|
|
49
70
|
private _syncWorldPositionFromPhysicalSpace;
|
|
50
71
|
private _setUpDirection;
|