@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
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { ComponentConstructor, Entity } from "../Entity";
|
|
2
3
|
import { KeyframeValueType } from "./Keyframe";
|
|
3
4
|
import { AnimationCurve } from "./animationCurve";
|
|
5
|
+
import { AnimationCurveLayerOwner } from "./internal/AnimationCurveLayerOwner";
|
|
6
|
+
import { AnimationCurveOwner } from "./internal/animationCurveOwner/AnimationCurveOwner";
|
|
4
7
|
/**
|
|
5
8
|
* Associate AnimationCurve and the Entity
|
|
6
9
|
*/
|
|
@@ -25,6 +28,18 @@ export declare class AnimationClipCurveBinding {
|
|
|
25
28
|
*/
|
|
26
29
|
getProperty?: string;
|
|
27
30
|
/** The animation curve. */
|
|
28
|
-
curve: AnimationCurve<KeyframeValueType
|
|
31
|
+
curve: AnimationCurve<KeyframeValueType> | undefined;
|
|
29
32
|
private _tempCurveOwner;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
_createCurveOwner(entity: Entity, component: Component): AnimationCurveOwner<KeyframeValueType>;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
_createCurveLayerOwner(owner: AnimationCurveOwner<KeyframeValueType>): AnimationCurveLayerOwner;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
_getTempCurveOwner(entity: Entity, component: Component): AnimationCurveOwner<KeyframeValueType>;
|
|
30
45
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare class AnimationEvent {
|
|
5
5
|
/** The time when the event be triggered. */
|
|
6
|
-
time: number;
|
|
6
|
+
time: number | undefined;
|
|
7
7
|
/** The name of the method called in the script. */
|
|
8
8
|
functionName: string;
|
|
9
9
|
/** The parameter that is stored in the event and will be sent to the function. */
|
|
10
|
-
parameter:
|
|
10
|
+
parameter: object | undefined;
|
|
11
11
|
}
|
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
import { BoolUpdateFlag } from "../BoolUpdateFlag";
|
|
2
2
|
import { Component } from "../Component";
|
|
3
|
+
import { Entity } from "../Entity";
|
|
4
|
+
import type { ICloneHook } from "../clone/ICloneHook";
|
|
3
5
|
import { AnimatorController } from "./AnimatorController";
|
|
4
6
|
import { AnimatorControllerLayer } from "./AnimatorControllerLayer";
|
|
5
7
|
import { AnimatorControllerParameter, AnimatorControllerParameterValue } from "./AnimatorControllerParameter";
|
|
6
|
-
import {
|
|
8
|
+
import { AnimatorStateInstance } from "./AnimatorStateInstance";
|
|
7
9
|
import { AnimatorCullingMode } from "./enums/AnimatorCullingMode";
|
|
8
10
|
/**
|
|
9
11
|
* The controller of the animation system.
|
|
10
12
|
*/
|
|
11
|
-
export declare class Animator extends Component {
|
|
13
|
+
export declare class Animator extends Component implements ICloneHook<Animator> {
|
|
12
14
|
private static _passedTriggerParameterNames;
|
|
15
|
+
private static _tempScripts;
|
|
13
16
|
/** Culling mode of this Animator. */
|
|
14
17
|
cullingMode: AnimatorCullingMode;
|
|
15
18
|
/** The playback speed of the Animator, 1.0 is normal playback speed. */
|
|
16
19
|
speed: number;
|
|
20
|
+
/** Whether the Animator sends AnimationEvent callbacks. */
|
|
21
|
+
fireEvents: boolean;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_playFrameCount: number;
|
|
24
|
+
/** @internal */
|
|
25
|
+
_onUpdateIndex: number;
|
|
17
26
|
protected _animatorController: AnimatorController;
|
|
18
27
|
protected _controllerUpdateFlag: BoolUpdateFlag;
|
|
19
28
|
protected _updateMark: number;
|
|
20
29
|
private _animatorLayersData;
|
|
21
30
|
private _curveOwnerPool;
|
|
22
|
-
private _animationEventHandlerPool;
|
|
23
31
|
private _parametersValueMap;
|
|
24
32
|
private _tempAnimatorStateInfo;
|
|
25
33
|
private _controlledRenderers;
|
|
@@ -36,6 +44,10 @@ export declare class Animator extends Component {
|
|
|
36
44
|
* The parameters in the animator's controller.
|
|
37
45
|
*/
|
|
38
46
|
get parameters(): Readonly<AnimatorControllerParameter[]>;
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
constructor(entity: Entity);
|
|
39
51
|
/**
|
|
40
52
|
* Play a state by name.
|
|
41
53
|
* @param stateName - The state name
|
|
@@ -65,16 +77,21 @@ export declare class Animator extends Component {
|
|
|
65
77
|
*/
|
|
66
78
|
update(deltaTime: number): void;
|
|
67
79
|
/**
|
|
68
|
-
* Get the playing
|
|
80
|
+
* Get the state instance currently playing on the target layer.
|
|
69
81
|
* @param layerIndex - The layer index
|
|
82
|
+
* @returns The state instance, or null if nothing is playing
|
|
83
|
+
* @remarks The returned instance is tied to the current controller's layer data. After a controller structure change (layers added or removed), the instance is invalidated; re-call this method to get a fresh one.
|
|
70
84
|
*/
|
|
71
|
-
getCurrentAnimatorState(layerIndex: number):
|
|
85
|
+
getCurrentAnimatorState(layerIndex: number): AnimatorStateInstance | null;
|
|
72
86
|
/**
|
|
73
|
-
* Get the state
|
|
87
|
+
* Get the state instance for a named state on this Animator.
|
|
88
|
+
* Overrides on the returned instance only affect this Animator.
|
|
74
89
|
* @param stateName - The state name
|
|
75
|
-
* @param layerIndex - The layer index(default -1
|
|
90
|
+
* @param layerIndex - The layer index (default -1, searches all layers)
|
|
91
|
+
* @returns The state instance, or null if no state matches
|
|
92
|
+
* @remarks The returned instance is tied to the current controller's layer data. After a controller structure change (layers added or removed), the instance is invalidated; re-call this method to get a fresh one.
|
|
76
93
|
*/
|
|
77
|
-
findAnimatorState(stateName: string, layerIndex?: number):
|
|
94
|
+
findAnimatorState(stateName: string, layerIndex?: number): AnimatorStateInstance | null;
|
|
78
95
|
/**
|
|
79
96
|
* Get the layer by name.
|
|
80
97
|
* @param name - The layer's name.
|
|
@@ -90,7 +107,7 @@ export declare class Animator extends Component {
|
|
|
90
107
|
* @param name - The name of the parameter
|
|
91
108
|
* @param value - The value of the parameter
|
|
92
109
|
*/
|
|
93
|
-
getParameterValue(name: string): AnimatorControllerParameterValue;
|
|
110
|
+
getParameterValue(name: string): AnimatorControllerParameterValue | undefined;
|
|
94
111
|
/**
|
|
95
112
|
* Set the value of the given parameter.
|
|
96
113
|
* @param name - The name of the parameter
|
|
@@ -107,12 +124,34 @@ export declare class Animator extends Component {
|
|
|
107
124
|
* @param name - The name of the trigger parameter
|
|
108
125
|
*/
|
|
109
126
|
deactivateTriggerParameter(name: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
_onEnable(): void;
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
_onEnableInScene(): void;
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
_onDisableInScene(): void;
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
_reset(): void;
|
|
143
|
+
private _resetIfControllerUpdated;
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
* @inheritdoc
|
|
147
|
+
*/
|
|
148
|
+
_onClone(target: Animator): void;
|
|
110
149
|
protected _onDestroy(): void;
|
|
111
150
|
private _crossFade;
|
|
112
151
|
private _getAnimatorStateInfo;
|
|
113
152
|
private _getAnimatorStateData;
|
|
114
153
|
private _saveAnimatorStateData;
|
|
115
|
-
private
|
|
154
|
+
private _ensureEventHandlers;
|
|
116
155
|
private _clearCrossData;
|
|
117
156
|
private _addCrossOwner;
|
|
118
157
|
private _prepareCrossFading;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BoolUpdateFlag } from "../BoolUpdateFlag";
|
|
1
2
|
import { AnimatorControllerParameter, AnimatorControllerParameterValue } from "./AnimatorControllerParameter";
|
|
2
3
|
import { AnimatorControllerLayer } from "./AnimatorControllerLayer";
|
|
3
4
|
import { ReferResource } from "../asset/ReferResource";
|
|
@@ -6,7 +7,16 @@ import { Engine } from "../Engine";
|
|
|
6
7
|
* Store the data for Animator playback.
|
|
7
8
|
*/
|
|
8
9
|
export declare class AnimatorController extends ReferResource {
|
|
10
|
+
/** @internal */
|
|
11
|
+
_parameters: AnimatorControllerParameter[];
|
|
12
|
+
/** @internal */
|
|
13
|
+
_parametersMap: Record<string, AnimatorControllerParameter>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_layers: AnimatorControllerLayer[];
|
|
16
|
+
/** @internal */
|
|
17
|
+
_layersMap: Record<string, AnimatorControllerLayer>;
|
|
9
18
|
private _updateFlagManager;
|
|
19
|
+
private _onStatesInvalidate;
|
|
10
20
|
/**
|
|
11
21
|
* The layers in the controller.
|
|
12
22
|
*/
|
|
@@ -29,12 +39,12 @@ export declare class AnimatorController extends ReferResource {
|
|
|
29
39
|
* @param name - The name of the parameter
|
|
30
40
|
* @param defaultValue - The default value of the parameter
|
|
31
41
|
*/
|
|
32
|
-
addParameter(name: string, defaultValue?: AnimatorControllerParameterValue): AnimatorControllerParameter;
|
|
42
|
+
addParameter(name: string, defaultValue?: AnimatorControllerParameterValue): AnimatorControllerParameter | null;
|
|
33
43
|
/**
|
|
34
44
|
* Add a trigger parameter to the controller.
|
|
35
45
|
* @param name - The name of the parameter
|
|
36
46
|
*/
|
|
37
|
-
addTriggerParameter(name: string): AnimatorControllerParameter;
|
|
47
|
+
addTriggerParameter(name: string): AnimatorControllerParameter | null;
|
|
38
48
|
/**
|
|
39
49
|
* Remove a parameter from the controller by name, including trigger parameters.
|
|
40
50
|
* @param name - The name of the parameter
|
|
@@ -68,5 +78,13 @@ export declare class AnimatorController extends ReferResource {
|
|
|
68
78
|
* Clear layers.
|
|
69
79
|
*/
|
|
70
80
|
clearLayers(): void;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_registerChangeFlag(): BoolUpdateFlag;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
_setEngine(engine: Engine): void;
|
|
71
89
|
private _addParameter;
|
|
72
90
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
1
2
|
import { AnimatorStateMachine } from "./AnimatorStateMachine";
|
|
2
3
|
import { AnimatorLayerBlendingMode } from "./enums/AnimatorLayerBlendingMode";
|
|
3
4
|
import { AnimatorLayerMask } from "./AnimatorLayerMask";
|
|
@@ -10,12 +11,26 @@ export declare class AnimatorControllerLayer {
|
|
|
10
11
|
weight: number;
|
|
11
12
|
/** The blending mode used by the layer. It is not taken into account for the first layer. */
|
|
12
13
|
blendingMode: AnimatorLayerBlendingMode;
|
|
13
|
-
/** The state machine for the layer. */
|
|
14
|
-
stateMachine: AnimatorStateMachine;
|
|
15
14
|
/** The AnimatorLayerMask is used to mask out certain entities from being animated by an AnimatorLayer. */
|
|
16
15
|
mask: AnimatorLayerMask;
|
|
16
|
+
private _stateMachine;
|
|
17
|
+
private _engine;
|
|
18
|
+
private _onStatesInvalidate;
|
|
19
|
+
/**
|
|
20
|
+
* The state machine for the layer.
|
|
21
|
+
*/
|
|
22
|
+
get stateMachine(): AnimatorStateMachine;
|
|
23
|
+
set stateMachine(value: AnimatorStateMachine);
|
|
17
24
|
/**
|
|
18
25
|
* @param name - The layer's name
|
|
19
26
|
*/
|
|
20
27
|
constructor(name: string);
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
_setEngine(engine: Engine): void;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
_setStatesInvalidateCallback(onStatesInvalidate: (() => void) | null): void;
|
|
21
36
|
}
|
|
@@ -5,6 +5,10 @@ export type AnimatorControllerParameterValue = number | string | boolean;
|
|
|
5
5
|
export declare class AnimatorControllerParameter {
|
|
6
6
|
/** The default value of the parameter. */
|
|
7
7
|
defaultValue: AnimatorControllerParameterValue;
|
|
8
|
+
/** @internal */
|
|
9
|
+
_onNameChanged: ((oldName: string, newName: string) => void) | null;
|
|
10
|
+
/** @internal */
|
|
11
|
+
_isTrigger: boolean;
|
|
8
12
|
private _name;
|
|
9
13
|
/**
|
|
10
14
|
* The name of the parameter.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { UpdateFlagManager } from "../UpdateFlagManager";
|
|
1
3
|
import { AnimationClip } from "./AnimationClip";
|
|
4
|
+
import type { Animator } from "./Animator";
|
|
2
5
|
import { AnimatorStateTransition } from "./AnimatorStateTransition";
|
|
6
|
+
import { AnimatorStateTransitionCollection } from "./AnimatorStateTransitionCollection";
|
|
3
7
|
import { WrapMode } from "./enums/WrapMode";
|
|
4
8
|
import { StateMachineScript } from "./StateMachineScript";
|
|
5
9
|
/**
|
|
@@ -11,6 +15,10 @@ export declare class AnimatorState {
|
|
|
11
15
|
speed: number;
|
|
12
16
|
/** The wrap mode used in the state. */
|
|
13
17
|
wrapMode: WrapMode;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_updateFlagManager: UpdateFlagManager;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_transitionCollection: AnimatorStateTransitionCollection;
|
|
14
22
|
private _onStateEnterScripts;
|
|
15
23
|
private _onStateUpdateScripts;
|
|
16
24
|
private _onStateExitScripts;
|
|
@@ -25,8 +33,8 @@ export declare class AnimatorState {
|
|
|
25
33
|
/**
|
|
26
34
|
* The clip that is being played by this animator state.
|
|
27
35
|
*/
|
|
28
|
-
get clip(): AnimationClip;
|
|
29
|
-
set clip(clip: AnimationClip);
|
|
36
|
+
get clip(): AnimationClip | null | undefined;
|
|
37
|
+
set clip(clip: AnimationClip | null | undefined);
|
|
30
38
|
/**
|
|
31
39
|
* The normalized start time of the clip, the range is 0 to 1, default is 0.
|
|
32
40
|
*/
|
|
@@ -70,4 +78,40 @@ export declare class AnimatorState {
|
|
|
70
78
|
* Clears all transitions from the state.
|
|
71
79
|
*/
|
|
72
80
|
clearTransitions(): void;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
_callOnEnter(animator: Animator, layerIndex: number): void;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
_callOnUpdate(animator: Animator, layerIndex: number): void;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
_callOnExit(animator: Animator, layerIndex: number): void;
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
_getDuration(): number | null;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
_removeStateMachineScript(script: StateMachineScript): void;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
_onClipChanged(): void;
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
_getClipActualStartTime(): number;
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
_getClipActualEndTime(): number;
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
_setEngine(engine: Engine): void;
|
|
73
117
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AnimationClip } from "./AnimationClip";
|
|
2
|
+
import { AnimatorState } from "./AnimatorState";
|
|
3
|
+
import { AnimatorStatePlayData } from "./internal/AnimatorStatePlayData";
|
|
4
|
+
import { WrapMode } from "./enums/WrapMode";
|
|
5
|
+
/**
|
|
6
|
+
* Per-Animator view of an `AnimatorState`.
|
|
7
|
+
*
|
|
8
|
+
* Override fields (speed, wrapMode) are scoped to this Animator; unset fields
|
|
9
|
+
* fall through to the underlying state asset.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AnimatorStateInstance {
|
|
12
|
+
/** @internal */
|
|
13
|
+
readonly _state: AnimatorState;
|
|
14
|
+
/** @internal */
|
|
15
|
+
readonly _playData: AnimatorStatePlayData;
|
|
16
|
+
private _speed;
|
|
17
|
+
private _wrapMode;
|
|
18
|
+
/**
|
|
19
|
+
* The name of the underlying state.
|
|
20
|
+
*/
|
|
21
|
+
get name(): string;
|
|
22
|
+
/**
|
|
23
|
+
* The animation clip of the underlying state.
|
|
24
|
+
*/
|
|
25
|
+
get clip(): AnimationClip | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The normalized clip start time of the underlying state.
|
|
28
|
+
*/
|
|
29
|
+
get clipStartTime(): number;
|
|
30
|
+
/**
|
|
31
|
+
* The normalized clip end time of the underlying state.
|
|
32
|
+
*/
|
|
33
|
+
get clipEndTime(): number;
|
|
34
|
+
/**
|
|
35
|
+
* Playback speed for this Animator; overrides the underlying state when set.
|
|
36
|
+
*/
|
|
37
|
+
get speed(): number;
|
|
38
|
+
set speed(value: number);
|
|
39
|
+
/**
|
|
40
|
+
* Wrap mode for this Animator; overrides the underlying state when set.
|
|
41
|
+
*/
|
|
42
|
+
get wrapMode(): WrapMode;
|
|
43
|
+
set wrapMode(value: WrapMode);
|
|
44
|
+
/** @internal */
|
|
45
|
+
constructor(state: AnimatorState);
|
|
46
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
1
2
|
import { AnimatorState } from "./AnimatorState";
|
|
2
3
|
import { AnimatorStateTransition } from "./AnimatorStateTransition";
|
|
4
|
+
import { AnimatorStateTransitionCollection } from "./AnimatorStateTransitionCollection";
|
|
3
5
|
export interface AnimatorStateMap {
|
|
4
6
|
[key: string]: AnimatorState;
|
|
5
7
|
}
|
|
@@ -10,11 +12,16 @@ export declare class AnimatorStateMachine {
|
|
|
10
12
|
/** The list of states. */
|
|
11
13
|
readonly states: AnimatorState[];
|
|
12
14
|
private _engine;
|
|
15
|
+
private _onStatesInvalidate;
|
|
13
16
|
/**
|
|
14
17
|
* The state will be played automatically.
|
|
15
|
-
* @remarks When the Animator's AnimatorController changed or the Animator's onEnable be triggered.
|
|
18
|
+
* @remarks When the Animator's AnimatorController changed or the Animator's onEnable be triggered. Cleared to `null` if the state is removed via `removeState`.
|
|
16
19
|
*/
|
|
17
|
-
defaultState: AnimatorState;
|
|
20
|
+
defaultState: AnimatorState | null;
|
|
21
|
+
/** @internal */
|
|
22
|
+
_entryTransitionCollection: AnimatorStateTransitionCollection;
|
|
23
|
+
/** @internal */
|
|
24
|
+
_anyStateTransitionCollection: AnimatorStateTransitionCollection;
|
|
18
25
|
private _statesMap;
|
|
19
26
|
/**
|
|
20
27
|
* The list of entry transitions in the state machine.
|
|
@@ -83,4 +90,12 @@ export declare class AnimatorStateMachine {
|
|
|
83
90
|
* Clear all any state transitions.
|
|
84
91
|
*/
|
|
85
92
|
clearAnyStateTransitions(): void;
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
_setEngine(engine: Engine): void;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
_setStatesInvalidateCallback(onStatesInvalidate: (() => void) | null): void;
|
|
86
101
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnimatorCondition } from "./AnimatorCondition";
|
|
2
2
|
import { AnimatorControllerParameterValue } from "./AnimatorControllerParameter";
|
|
3
3
|
import { AnimatorState } from "./AnimatorState";
|
|
4
|
+
import { AnimatorStateTransitionCollection } from "./AnimatorStateTransitionCollection";
|
|
4
5
|
import { AnimatorConditionMode } from "./enums/AnimatorConditionMode";
|
|
5
6
|
/**
|
|
6
7
|
* Transitions define when and how the state machine switch from on state to another. AnimatorTransition always originate from a StateMachine or a StateMachine entry.
|
|
@@ -18,6 +19,10 @@ export declare class AnimatorStateTransition {
|
|
|
18
19
|
mute: boolean;
|
|
19
20
|
/** Determines whether the duration of the transition is reported in a fixed duration in seconds or as a normalized time. */
|
|
20
21
|
isFixedDuration: boolean;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_collection: AnimatorStateTransitionCollection | null;
|
|
24
|
+
/** @internal */
|
|
25
|
+
_isExit: boolean;
|
|
21
26
|
private _conditions;
|
|
22
27
|
private _solo;
|
|
23
28
|
private _hasExitTime;
|
|
@@ -56,4 +61,8 @@ export declare class AnimatorStateTransition {
|
|
|
56
61
|
* @param condition - The condition to remove
|
|
57
62
|
*/
|
|
58
63
|
removeCondition(condition: AnimatorCondition): void;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
_getFixedDuration(): number;
|
|
59
68
|
}
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { AnimatorState } from "./AnimatorState";
|
|
2
|
+
import { AnimatorStateTransition } from "./AnimatorStateTransition";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimatorStateTransitionCollection {
|
|
7
|
+
transitions: AnimatorStateTransition[];
|
|
8
|
+
noExitTimeCount: number;
|
|
9
|
+
needResetCurrentCheckIndex: boolean;
|
|
10
|
+
currentCheckIndex: number;
|
|
11
|
+
private _soloCount;
|
|
12
|
+
get isSoloMode(): boolean;
|
|
13
|
+
get count(): number;
|
|
14
|
+
get(index: number): AnimatorStateTransition;
|
|
15
|
+
add(transitionOrAnimatorState: AnimatorStateTransition | AnimatorState): AnimatorStateTransition;
|
|
16
|
+
remove(transition: AnimatorStateTransition): void;
|
|
17
|
+
clear(): void;
|
|
18
|
+
updateTransitionSolo(isModifiedSolo: boolean): void;
|
|
19
|
+
updateTransitionsIndex(transition: AnimatorStateTransition, newHasExitTime: boolean): void;
|
|
20
|
+
updateCurrentCheckIndex(isForward: boolean): void;
|
|
21
|
+
resetCurrentCheckIndex(isForward: boolean): void;
|
|
22
|
+
private _addTransition;
|
|
23
|
+
}
|
|
@@ -17,4 +17,4 @@ export declare class Keyframe<V extends KeyframeValueType, T = V extends number
|
|
|
17
17
|
/**
|
|
18
18
|
* Type of Keyframe value.
|
|
19
19
|
*/
|
|
20
|
-
export type KeyframeValueType = number | Vector2 | Vector3 | Vector4 | number[] | Float32Array | Quaternion | Color | Rect | string | boolean | ReferResource;
|
|
20
|
+
export type KeyframeValueType = number | Vector2 | Vector3 | Vector4 | number[] | Float32Array | Quaternion | Color | Rect | string | boolean | ReferResource | null;
|
|
@@ -5,6 +5,8 @@ import { EngineObject } from "../base/EngineObject";
|
|
|
5
5
|
* StateMachineScript is a component that can be added to a animator state. It's the base class every script on a state derives from.
|
|
6
6
|
*/
|
|
7
7
|
export declare class StateMachineScript extends EngineObject {
|
|
8
|
+
/** @internal */
|
|
9
|
+
_state: AnimatorState;
|
|
8
10
|
constructor();
|
|
9
11
|
/**
|
|
10
12
|
* onStateEnter is called when a transition starts and the state machine starts to evaluate this state.
|
|
@@ -1,7 +1,46 @@
|
|
|
1
|
+
import { AnimationCurveLayerOwner } from "../internal/AnimationCurveLayerOwner";
|
|
2
|
+
import { AnimationCurveOwner } from "../internal/animationCurveOwner/AnimationCurveOwner";
|
|
3
|
+
import { Keyframe } from "../Keyframe";
|
|
1
4
|
import { AnimationCurve } from "./AnimationCurve";
|
|
2
5
|
/**
|
|
3
6
|
* Store a collection of Keyframes that can be evaluated over time.
|
|
4
7
|
*/
|
|
5
8
|
export declare class AnimationArrayCurve extends AnimationCurve<number[]> {
|
|
9
|
+
/** @internal */
|
|
10
|
+
static _isCopyMode: boolean;
|
|
11
|
+
/** @internal */
|
|
12
|
+
static _supportInterpolationMode: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
static _initializeOwner(owner: AnimationCurveOwner<number[]>): void;
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
static _initializeLayerOwner(owner: AnimationCurveLayerOwner): void;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
static _lerpValue(srcValue: number[], destValue: number[], weight: number, out: number[]): number[];
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
static _subtractValue(src: number[], base: number[], out: number[]): number[];
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
static _getZeroValue(out: number[]): number[];
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
static _additiveValue(value: number[], weight: number, out: number[]): number[];
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
static _setValue(source: number[], out: number[]): number[];
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
static _hermiteInterpolationValue(frame: Keyframe<number[]>, nextFrame: Keyframe<number[]>, t: number, duration: number, out: number[]): number[];
|
|
6
45
|
constructor();
|
|
7
46
|
}
|
|
@@ -1,7 +1,46 @@
|
|
|
1
|
+
import { AnimationCurveLayerOwner } from "../internal/AnimationCurveLayerOwner";
|
|
2
|
+
import { AnimationCurveOwner } from "../internal/animationCurveOwner/AnimationCurveOwner";
|
|
3
|
+
import { Keyframe } from "../Keyframe";
|
|
1
4
|
import { AnimationCurve } from "./AnimationCurve";
|
|
2
5
|
/**
|
|
3
6
|
* Store a collection of Keyframes that can be evaluated over time.
|
|
4
7
|
*/
|
|
5
8
|
export declare class AnimationBoolCurve extends AnimationCurve<boolean> {
|
|
9
|
+
/** @internal */
|
|
10
|
+
static _isCopyMode: boolean;
|
|
11
|
+
/** @internal */
|
|
12
|
+
static _supportInterpolationMode: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
static _initializeOwner(owner: AnimationCurveOwner<boolean>): void;
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
static _initializeLayerOwner(owner: AnimationCurveLayerOwner): void;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
static _lerpValue(srcValue: boolean, destValue: boolean): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
static _subtractValue(src: boolean, base: boolean, out: boolean): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
static _getZeroValue(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
static _additiveValue(value: boolean, weight: number, source: boolean): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
static _setValue(value: boolean): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
static _hermiteInterpolationValue(frame: Keyframe<boolean>): boolean;
|
|
6
45
|
constructor();
|
|
7
46
|
}
|
|
@@ -1,8 +1,47 @@
|
|
|
1
1
|
import { Color } from "@galacean/engine-math";
|
|
2
|
+
import { AnimationCurveLayerOwner } from "../internal/AnimationCurveLayerOwner";
|
|
3
|
+
import { AnimationCurveOwner } from "../internal/animationCurveOwner/AnimationCurveOwner";
|
|
4
|
+
import { Keyframe } from "../Keyframe";
|
|
2
5
|
import { AnimationCurve } from "./AnimationCurve";
|
|
3
6
|
/**
|
|
4
7
|
* Store a collection of Keyframes that can be evaluated over time.
|
|
5
8
|
*/
|
|
6
9
|
export declare class AnimationColorCurve extends AnimationCurve<Color> {
|
|
10
|
+
/** @internal */
|
|
11
|
+
static _isCopyMode: boolean;
|
|
12
|
+
/** @internal */
|
|
13
|
+
static _supportInterpolationMode: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
static _initializeOwner(owner: AnimationCurveOwner<Color>): void;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
static _initializeLayerOwner(owner: AnimationCurveLayerOwner): void;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
static _lerpValue(srcValue: Color, destValue: Color, weight: number, out: Color): Color;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
static _subtractValue(src: Color, base: Color, out: Color): Color;
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
static _getZeroValue(out: Color): Color;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
static _additiveValue(value: Color, weight: number, out: Color): Color;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
static _setValue(source: Color, out: Color): Color;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
static _hermiteInterpolationValue(frame: Keyframe<Color>, nextFrame: Keyframe<Color>, t: number, dur: number, out: Color): Color;
|
|
7
46
|
constructor();
|
|
8
47
|
}
|
|
@@ -30,10 +30,18 @@ export declare abstract class AnimationCurve<V extends KeyframeValueType> {
|
|
|
30
30
|
* Evaluate the curve at time.
|
|
31
31
|
* @param time - The time within the curve you want to evaluate
|
|
32
32
|
*/
|
|
33
|
-
evaluate(time: number): V;
|
|
33
|
+
evaluate(time: number): V | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Removes a key.
|
|
36
36
|
* @param index - The index of the key to remove
|
|
37
37
|
*/
|
|
38
38
|
removeKey(index: number): void;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
_evaluate(time: number, evaluateData: IEvaluateData<V>): V | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
_evaluateAdditive(time: number, evaluateData: IEvaluateData<V>): V;
|
|
39
47
|
}
|