@galacean/engine-core 1.6.8 → 1.6.9
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 +37541 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +37259 -0
- package/dist/module.js.map +1 -0
- package/package.json +3 -3
- package/types/2d/assembler/ISpriteAssembler.d.ts +11 -0
- package/types/2d/assembler/ISpriteRenderer.d.ts +16 -0
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +13 -0
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +15 -0
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +17 -0
- package/types/2d/atlas/FontAtlas.d.ts +1 -0
- package/types/2d/atlas/SpriteAtlas.d.ts +32 -0
- package/types/2d/atlas/types.d.ts +69 -0
- package/types/2d/enums/FontStyle.d.ts +11 -0
- package/types/2d/enums/SpriteDrawMode.d.ts +11 -0
- package/types/2d/enums/SpriteMaskInteraction.d.ts +11 -0
- package/types/2d/enums/SpriteModifyFlags.d.ts +23 -0
- package/types/2d/enums/SpriteTileMode.d.ts +11 -0
- package/types/2d/enums/TextAlignment.d.ts +22 -0
- package/types/2d/enums/TextOverflow.d.ts +9 -0
- package/types/2d/index.d.ts +16 -0
- package/types/2d/sprite/Sprite.d.ts +106 -0
- package/types/2d/sprite/SpriteMask.d.ts +70 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +95 -0
- package/types/2d/sprite/index.d.ts +3 -0
- package/types/2d/text/CharInfo.d.ts +1 -0
- package/types/2d/text/CharRenderInfo.d.ts +1 -0
- package/types/2d/text/Font.d.ts +21 -0
- package/types/2d/text/ITextRenderer.d.ts +8 -0
- package/types/2d/text/SubFont.d.ts +1 -0
- package/types/2d/text/TextRenderer.d.ts +122 -0
- package/types/2d/text/TextUtils.d.ts +1 -0
- package/types/2d/text/index.d.ts +5 -0
- package/types/Background.d.ts +53 -0
- package/types/BasicResources.d.ts +2 -0
- package/types/BoolUpdateFlag.d.ts +12 -0
- package/types/Camera.d.ts +321 -0
- package/types/Canvas.d.ts +19 -0
- package/types/Component.d.ts +27 -0
- package/types/ComponentsDependencies.d.ts +22 -0
- package/types/ComponentsManager.d.ts +52 -0
- package/types/Engine.d.ts +150 -0
- package/types/EngineSettings.d.ts +5 -0
- package/types/Entity.d.ts +170 -0
- package/types/Layer.d.ts +73 -0
- package/types/Platform.d.ts +15 -0
- package/types/Polyfill.d.ts +1 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +55 -0
- package/types/RenderPipeline/BatchUtils.d.ts +1 -0
- package/types/RenderPipeline/BatcherManager.d.ts +1 -0
- package/types/RenderPipeline/Blitter.d.ts +28 -0
- package/types/RenderPipeline/CullingResults.d.ts +1 -0
- package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
- package/types/RenderPipeline/MaskManager.d.ts +1 -0
- package/types/RenderPipeline/OpaqueTexturePass.d.ts +1 -0
- package/types/RenderPipeline/PipelinePass.d.ts +16 -0
- package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
- package/types/RenderPipeline/PrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +1 -0
- package/types/RenderPipeline/RenderContext.d.ts +1 -0
- package/types/RenderPipeline/RenderElement.d.ts +12 -0
- package/types/RenderPipeline/RenderQueue.d.ts +1 -0
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/SubRenderElement.d.ts +22 -0
- package/types/RenderPipeline/VertexArea.d.ts +1 -0
- package/types/RenderPipeline/enums/PipelineStage.d.ts +11 -0
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +1 -0
- package/types/RenderPipeline/index.d.ts +5 -0
- package/types/Renderer.d.ts +135 -0
- package/types/Scene.d.ts +183 -0
- package/types/SceneManager.d.ts +51 -0
- package/types/Script.d.ts +144 -0
- package/types/SystemInfo.d.ts +27 -0
- package/types/Transform.d.ts +304 -0
- package/types/UpdateFlag.d.ts +20 -0
- package/types/UpdateFlagManager.d.ts +1 -0
- package/types/Utils.d.ts +37 -0
- package/types/VirtualCamera.d.ts +1 -0
- package/types/animation/AnimationClip.d.ts +87 -0
- package/types/animation/AnimationClipCurveBinding.d.ts +30 -0
- package/types/animation/AnimationEvent.d.ts +11 -0
- package/types/animation/Animator.d.ts +154 -0
- package/types/animation/AnimatorCondition.d.ts +13 -0
- package/types/animation/AnimatorController.d.ts +72 -0
- package/types/animation/AnimatorControllerLayer.d.ts +21 -0
- package/types/animation/AnimatorControllerParameter.d.ts +14 -0
- package/types/animation/AnimatorLayerMask.d.ts +45 -0
- package/types/animation/AnimatorState.d.ts +69 -0
- package/types/animation/AnimatorStateMachine.d.ts +85 -0
- package/types/animation/AnimatorStateTransition.d.ts +59 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +1 -0
- package/types/animation/Keyframe.d.ts +20 -0
- package/types/animation/LayerPathMask.d.ts +16 -0
- package/types/animation/StateMachineScript.d.ts +32 -0
- package/types/animation/animationCurve/AnimationArrayCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationBoolCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationColorCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +11 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationVector2Curve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationVector3Curve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationVector4Curve.d.ts +8 -0
- package/types/animation/animationCurve/index.d.ts +13 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +1 -0
- package/types/animation/enums/AnimatorConditionMode.d.ts +17 -0
- package/types/animation/enums/AnimatorCullingMode.d.ts +9 -0
- package/types/animation/enums/AnimatorLayerBlendingMode.d.ts +4 -0
- package/types/animation/enums/AnimatorStatePlayState.d.ts +1 -0
- package/types/animation/enums/InterpolationType.d.ts +13 -0
- package/types/animation/enums/LayerState.d.ts +15 -0
- package/types/animation/enums/PlayState.d.ts +13 -0
- package/types/animation/enums/WrapMode.d.ts +9 -0
- package/types/animation/index.d.ts +25 -0
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
- package/types/animation/internal/AnimationEventHandler.d.ts +1 -0
- package/types/animation/internal/AnimatorLayerData.d.ts +1 -0
- package/types/animation/internal/AnimatorStateData.d.ts +1 -0
- package/types/animation/internal/AnimatorStatePlayData.d.ts +1 -0
- package/types/animation/internal/AnimatorTempValue.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +5 -0
- package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/asset/AssetPromise.d.ts +88 -0
- package/types/asset/AssetType.d.ts +66 -0
- package/types/asset/ContentRestorer.d.ts +17 -0
- package/types/asset/GraphicsResource.d.ts +9 -0
- package/types/asset/IReferable.d.ts +2 -0
- package/types/asset/LoadItem.d.ts +40 -0
- package/types/asset/Loader.d.ts +37 -0
- package/types/asset/ReferResource.d.ts +23 -0
- package/types/asset/ResourceManager.d.ts +121 -0
- package/types/asset/request.d.ts +36 -0
- package/types/audio/AudioClip.d.ts +24 -0
- package/types/audio/AudioManager.d.ts +1 -0
- package/types/audio/AudioSource.d.ts +72 -0
- package/types/audio/index.d.ts +3 -0
- package/types/base/Constant.d.ts +116 -0
- package/types/base/EngineObject.d.ts +25 -0
- package/types/base/EventDispatcher.d.ts +66 -0
- package/types/base/Logger.d.ts +11 -0
- package/types/base/StaticInterfaceImplement.d.ts +5 -0
- package/types/base/Time.d.ts +44 -0
- package/types/base/index.d.ts +5 -0
- package/types/clone/CloneManager.d.ts +31 -0
- package/types/clone/ComponentCloner.d.ts +17 -0
- package/types/clone/enums/CloneMode.d.ts +13 -0
- package/types/enums/ActiveChangeFlag.d.ts +6 -0
- package/types/enums/AntiAliasing.d.ts +7 -0
- package/types/enums/BackgroundMode.d.ts +9 -0
- package/types/enums/BackgroundTextureFillMode.d.ts +8 -0
- package/types/enums/CameraClearFlags.d.ts +13 -0
- package/types/enums/CameraModifyFlags.d.ts +17 -0
- package/types/enums/CameraType.d.ts +1 -0
- package/types/enums/DepthTextureMode.d.ts +7 -0
- package/types/enums/Downsampling.d.ts +11 -0
- package/types/enums/EntityModifyFlags.d.ts +9 -0
- package/types/enums/FogMode.d.ts +13 -0
- package/types/enums/MSAASamples.d.ts +13 -0
- package/types/enums/ReplacementFailureStrategy.d.ts +9 -0
- package/types/enums/SpriteMaskLayer.d.ts +73 -0
- package/types/env-probe/CubeProbe.d.ts +27 -0
- package/types/env-probe/Probe.d.ts +52 -0
- package/types/env-probe/index.d.ts +2 -0
- package/types/graphic/Buffer.d.ts +114 -0
- package/types/graphic/BufferUtil.d.ts +12 -0
- package/types/graphic/IndexBufferBinding.d.ts +21 -0
- package/types/graphic/Mesh.d.ts +58 -0
- package/types/graphic/Primitive.d.ts +1 -0
- package/types/graphic/SubMesh.d.ts +8 -0
- package/types/graphic/SubPrimitive.d.ts +19 -0
- package/types/graphic/VertexBufferBinding.d.ts +20 -0
- package/types/graphic/VertexElement.d.ts +48 -0
- package/types/graphic/enums/BufferBindFlag.d.ts +9 -0
- package/types/graphic/enums/BufferUsage.d.ts +11 -0
- package/types/graphic/enums/IndexFormat.d.ts +11 -0
- package/types/graphic/enums/MeshTopology.d.ts +19 -0
- package/types/graphic/enums/SetDataOptions.d.ts +9 -0
- package/types/graphic/enums/VertexElementFormat.d.ts +37 -0
- package/types/graphic/index.d.ts +15 -0
- package/types/index.d.ts +68 -0
- package/types/input/InputManager.d.ts +65 -0
- package/types/input/enums/Keys.d.ts +398 -0
- package/types/input/enums/PointerButton.d.ts +33 -0
- package/types/input/enums/PointerPhase.d.ts +15 -0
- package/types/input/index.d.ts +8 -0
- package/types/input/interface/IInput.d.ts +10 -0
- package/types/input/keyboard/KeyboardManager.d.ts +1 -0
- package/types/input/pointer/Pointer.d.ts +31 -0
- package/types/input/pointer/PointerEventData.d.ts +12 -0
- package/types/input/pointer/PointerManager.d.ts +9 -0
- package/types/input/pointer/emitter/IHitResult.d.ts +1 -0
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +1 -0
- package/types/input/pointer/emitter/PointerEventEmitter.d.ts +30 -0
- package/types/input/wheel/WheelManager.d.ts +1 -0
- package/types/lighting/AmbientLight.d.ts +70 -0
- package/types/lighting/DirectLight.d.ts +32 -0
- package/types/lighting/KHR_lights.d.ts +4 -0
- package/types/lighting/Light.d.ts +45 -0
- package/types/lighting/LightManager.d.ts +12 -0
- package/types/lighting/PointLight.d.ts +26 -0
- package/types/lighting/SpotLight.d.ts +45 -0
- package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +79 -0
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +1 -0
- package/types/lighting/ambientOcclusion/index.d.ts +2 -0
- package/types/lighting/enums/AmbientOcclusionQuality.d.ts +11 -0
- package/types/lighting/enums/DiffuseMode.d.ts +13 -0
- package/types/lighting/index.d.ts +7 -0
- package/types/material/BaseMaterial.d.ts +88 -0
- package/types/material/BlinnPhongMaterial.d.ts +68 -0
- package/types/material/Material.d.ts +52 -0
- package/types/material/PBRMaterial.d.ts +311 -0
- package/types/material/UnlitMaterial.d.ts +33 -0
- package/types/material/enums/BlendMode.d.ts +9 -0
- package/types/material/enums/Refraction.d.ts +9 -0
- package/types/material/enums/RenderFace.d.ts +11 -0
- package/types/material/enums/TextureCoordinate.d.ts +13 -0
- package/types/material/index.d.ts +9 -0
- package/types/material/utils/PrefilteredDFG.d.ts +7 -0
- package/types/mesh/BlendShape.d.ts +39 -0
- package/types/mesh/BlendShapeFrame.d.ts +44 -0
- package/types/mesh/BlendShapeManager.d.ts +1 -0
- package/types/mesh/BufferMesh.d.ts +59 -0
- package/types/mesh/MeshRenderer.d.ts +25 -0
- package/types/mesh/ModelMesh.d.ts +254 -0
- package/types/mesh/PrimitiveMesh.d.ts +112 -0
- package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
- package/types/mesh/Skin.d.ts +35 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +50 -0
- package/types/mesh/enums/VertexAttribute.d.ts +33 -0
- package/types/mesh/index.d.ts +9 -0
- package/types/particle/ParticleBufferUtils.d.ts +1 -0
- package/types/particle/ParticleGenerator.d.ts +94 -0
- package/types/particle/ParticleMaterial.d.ts +38 -0
- package/types/particle/ParticleRenderer.d.ts +47 -0
- package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
- package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
- package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
- package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
- package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
- package/types/particle/enums/ParticleStopMode.d.ts +6 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
- package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
- package/types/particle/index.d.ts +22 -0
- package/types/particle/modules/Burst.d.ts +14 -0
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
- package/types/particle/modules/EmissionModule.d.ts +48 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +51 -0
- package/types/particle/modules/MainModule.d.ts +104 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +81 -0
- package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
- package/types/particle/modules/ParticleCurve.d.ts +63 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +17 -0
- package/types/particle/modules/ParticleGradient.d.ts +114 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +52 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +39 -0
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +54 -0
- package/types/particle/modules/shape/BaseShape.d.ts +22 -0
- package/types/particle/modules/shape/BoxShape.d.ts +17 -0
- package/types/particle/modules/shape/CircleShape.d.ts +35 -0
- package/types/particle/modules/shape/ConeShape.d.ts +45 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +14 -0
- package/types/particle/modules/shape/MeshShape.d.ts +21 -0
- package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/modules/shape/SphereShape.d.ts +14 -0
- package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +17 -0
- package/types/particle/modules/shape/index.d.ts +8 -0
- package/types/physics/CharacterController.d.ts +51 -0
- package/types/physics/Collider.d.ts +43 -0
- package/types/physics/Collision.d.ts +22 -0
- package/types/physics/ContactPoint.d.ts +14 -0
- package/types/physics/DynamicCollider.d.ts +192 -0
- package/types/physics/HitResult.d.ts +18 -0
- package/types/physics/PhysicsMaterial.d.ts +42 -0
- package/types/physics/PhysicsScene.d.ts +276 -0
- package/types/physics/StaticCollider.d.ts +7 -0
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +1 -0
- package/types/physics/enums/ColliderShapeUpAxis.d.ts +11 -0
- package/types/physics/enums/ControllerCollisionFlag.d.ts +11 -0
- package/types/physics/enums/ControllerNonWalkableMode.d.ts +9 -0
- package/types/physics/enums/HingeJointFlag.d.ts +1 -0
- package/types/physics/enums/PhysicsMaterialCombineMode.d.ts +13 -0
- package/types/physics/enums/index.d.ts +4 -0
- package/types/physics/index.d.ts +12 -0
- package/types/physics/joint/FixedJoint.d.ts +4 -0
- package/types/physics/joint/HingeJoint.d.ts +61 -0
- package/types/physics/joint/Joint.d.ts +81 -0
- package/types/physics/joint/JointLimits.d.ts +39 -0
- package/types/physics/joint/JointMotor.d.ts +32 -0
- package/types/physics/joint/SpringJoint.d.ts +38 -0
- package/types/physics/joint/index.d.ts +6 -0
- package/types/physics/shape/BoxColliderShape.d.ts +16 -0
- package/types/physics/shape/CapsuleColliderShape.d.ts +27 -0
- package/types/physics/shape/ColliderShape.d.ts +61 -0
- package/types/physics/shape/PlaneColliderShape.d.ts +9 -0
- package/types/physics/shape/SphereColliderShape.d.ts +14 -0
- package/types/physics/shape/index.d.ts +5 -0
- package/types/postProcess/FinalPass.d.ts +1 -0
- package/types/postProcess/PostProcess.d.ts +64 -0
- package/types/postProcess/PostProcessEffect.d.ts +26 -0
- package/types/postProcess/PostProcessEffectParameter.d.ts +119 -0
- package/types/postProcess/PostProcessManager.d.ts +38 -0
- package/types/postProcess/PostProcessPass.d.ts +50 -0
- package/types/postProcess/PostProcessUberPass.d.ts +25 -0
- package/types/postProcess/effects/BloomEffect.d.ts +50 -0
- package/types/postProcess/effects/TonemappingEffect.d.ts +25 -0
- package/types/postProcess/effects/index.d.ts +2 -0
- package/types/postProcess/index.d.ts +8 -0
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +7 -0
- package/types/renderingHardwareInterface/IPlatformRenderTarget.d.ts +20 -0
- package/types/renderingHardwareInterface/IPlatformTexture.d.ts +36 -0
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +37 -0
- package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +40 -0
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +41 -0
- package/types/renderingHardwareInterface/index.d.ts +6 -0
- package/types/shader/Shader.d.ts +119 -0
- package/types/shader/ShaderData.d.ts +350 -0
- package/types/shader/ShaderMacro.d.ts +26 -0
- package/types/shader/ShaderMacroCollection.d.ts +1 -0
- package/types/shader/ShaderPart.d.ts +46 -0
- package/types/shader/ShaderPass.d.ts +25 -0
- package/types/shader/ShaderPool.d.ts +1 -0
- package/types/shader/ShaderProgram.d.ts +1 -0
- package/types/shader/ShaderProgramPool.d.ts +1 -0
- package/types/shader/ShaderProperty.d.ts +20 -0
- package/types/shader/ShaderTagKey.d.ts +16 -0
- package/types/shader/ShaderUniform.d.ts +1 -0
- package/types/shader/ShaderUniformBlock.d.ts +1 -0
- package/types/shader/SubShader.d.ts +18 -0
- package/types/shader/enums/BlendFactor.d.ts +32 -0
- package/types/shader/enums/BlendOperation.d.ts +16 -0
- package/types/shader/enums/ColorWriteMask.d.ts +18 -0
- package/types/shader/enums/CompareFunction.d.ts +22 -0
- package/types/shader/enums/CullMode.d.ts +12 -0
- package/types/shader/enums/RenderQueueType.d.ts +11 -0
- package/types/shader/enums/RenderStateElementKey.d.ts +60 -0
- package/types/shader/enums/ShaderDataGroup.d.ts +15 -0
- package/types/shader/enums/ShaderLanguage.d.ts +9 -0
- package/types/shader/enums/ShaderPropertyType.d.ts +27 -0
- package/types/shader/enums/StencilOperation.d.ts +22 -0
- package/types/shader/index.d.ts +19 -0
- package/types/shader/state/BlendState.d.ts +16 -0
- package/types/shader/state/DepthState.d.ts +14 -0
- package/types/shader/state/RasterState.d.ts +13 -0
- package/types/shader/state/RenderState.d.ts +21 -0
- package/types/shader/state/RenderTargetBlendState.d.ts +24 -0
- package/types/shader/state/StencilState.d.ts +34 -0
- package/types/shader/state/index.d.ts +6 -0
- package/types/shaderlib/ShaderFactory.d.ts +20 -0
- package/types/shaderlib/ShaderLib.d.ts +73 -0
- package/types/shaderlib/index.d.ts +1 -0
- package/types/shaderlib/particle/index.d.ts +15 -0
- package/types/shaderlib/pbr/index.d.ts +11 -0
- package/types/shaderlib/shadow/index.d.ts +8 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +45 -0
- package/types/shadow/ShadowSliceData.d.ts +1 -0
- package/types/shadow/ShadowUtils.d.ts +1 -0
- package/types/shadow/enum/ShadowCascadesMode.d.ts +11 -0
- package/types/shadow/enum/ShadowResolution.d.ts +13 -0
- package/types/shadow/enum/ShadowType.d.ts +13 -0
- package/types/shadow/index.d.ts +3 -0
- package/types/sky/Sky.d.ts +22 -0
- package/types/sky/SkyBoxMaterial.d.ts +43 -0
- package/types/sky/SkyProceduralMaterial.d.ts +72 -0
- package/types/sky/index.d.ts +3 -0
- package/types/texture/RenderTarget.d.ts +91 -0
- package/types/texture/Texture.d.ts +87 -0
- package/types/texture/Texture2D.d.ts +71 -0
- package/types/texture/Texture2DArray.d.ts +82 -0
- package/types/texture/TextureCube.d.ts +71 -0
- package/types/texture/TextureUtils.d.ts +1 -0
- package/types/texture/enums/RenderBufferDepthFormat.d.ts +23 -0
- package/types/texture/enums/TextureCubeFace.d.ts +17 -0
- package/types/texture/enums/TextureDepthCompareFunction.d.ts +21 -0
- package/types/texture/enums/TextureFilterMode.d.ts +11 -0
- package/types/texture/enums/TextureFormat.d.ts +87 -0
- package/types/texture/enums/TextureUsage.d.ts +9 -0
- package/types/texture/enums/TextureWrapMode.d.ts +11 -0
- package/types/texture/index.d.ts +13 -0
- package/types/trail/TrailMaterial.d.ts +5 -0
- package/types/trail/TrailRenderer.d.ts +35 -0
- package/types/trail/index.d.ts +2 -0
- package/types/ui/IUICanvas.d.ts +1 -0
- package/types/ui/UIUtils.d.ts +12 -0
- package/types/utils/ClearableObjectPool.d.ts +16 -0
- package/types/utils/DisorderedArray.d.ts +70 -0
- package/types/utils/ObjectPool.d.ts +16 -0
- package/types/utils/ReturnableObjectPool.d.ts +16 -0
- package/types/utils/SafeLoopArray.d.ts +46 -0
- package/types/utils/index.d.ts +4 -0
- package/types/xr/XRManager.d.ts +5 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { Matrix, Quaternion, Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { BoolUpdateFlag } from "./BoolUpdateFlag";
|
|
3
|
+
import { Component } from "./Component";
|
|
4
|
+
/**
|
|
5
|
+
* Used to implement transformation related functions.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Transform extends Component {
|
|
8
|
+
private static _tempQuat0;
|
|
9
|
+
private static _tempVec30;
|
|
10
|
+
private static _tempVec31;
|
|
11
|
+
private static _tempVec32;
|
|
12
|
+
private static _tempMat30;
|
|
13
|
+
private static _tempMat31;
|
|
14
|
+
private static _tempMat32;
|
|
15
|
+
private static _tempMat41;
|
|
16
|
+
private static _tempMat42;
|
|
17
|
+
private _position;
|
|
18
|
+
private _rotation;
|
|
19
|
+
private _rotationQuaternion;
|
|
20
|
+
private _scale;
|
|
21
|
+
private _localUniformScaling;
|
|
22
|
+
private _worldPosition;
|
|
23
|
+
private _worldRotation;
|
|
24
|
+
private _worldRotationQuaternion;
|
|
25
|
+
private _worldUniformScaling;
|
|
26
|
+
private _lossyWorldScale;
|
|
27
|
+
private _localMatrix;
|
|
28
|
+
private _worldMatrix;
|
|
29
|
+
private _worldForward;
|
|
30
|
+
private _worldRight;
|
|
31
|
+
private _worldUp;
|
|
32
|
+
protected _isParentDirty: boolean;
|
|
33
|
+
private _parentTransformCache;
|
|
34
|
+
private _dirtyFlag;
|
|
35
|
+
/**
|
|
36
|
+
* Local position.
|
|
37
|
+
*/
|
|
38
|
+
get position(): Vector3;
|
|
39
|
+
set position(value: Vector3);
|
|
40
|
+
/**
|
|
41
|
+
* World position.
|
|
42
|
+
*/
|
|
43
|
+
get worldPosition(): Vector3;
|
|
44
|
+
set worldPosition(value: Vector3);
|
|
45
|
+
/**
|
|
46
|
+
* Local rotation, defining the rotation value in degrees.
|
|
47
|
+
* Rotations are performed around the Y axis, the X axis, and the Z axis, in that order.
|
|
48
|
+
*/
|
|
49
|
+
get rotation(): Vector3;
|
|
50
|
+
set rotation(value: Vector3);
|
|
51
|
+
/**
|
|
52
|
+
* World rotation, defining the rotation value in degrees.
|
|
53
|
+
* Rotations are performed around the Y axis, the X axis, and the Z axis, in that order.
|
|
54
|
+
*/
|
|
55
|
+
get worldRotation(): Vector3;
|
|
56
|
+
set worldRotation(value: Vector3);
|
|
57
|
+
/**
|
|
58
|
+
* Local rotation, defining the rotation by using a unit quaternion.
|
|
59
|
+
*/
|
|
60
|
+
get rotationQuaternion(): Quaternion;
|
|
61
|
+
set rotationQuaternion(value: Quaternion);
|
|
62
|
+
/**
|
|
63
|
+
* World rotation, defining the rotation by using a unit quaternion.
|
|
64
|
+
*/
|
|
65
|
+
get worldRotationQuaternion(): Quaternion;
|
|
66
|
+
set worldRotationQuaternion(value: Quaternion);
|
|
67
|
+
/**
|
|
68
|
+
* Local scaling.
|
|
69
|
+
*/
|
|
70
|
+
get scale(): Vector3;
|
|
71
|
+
set scale(value: Vector3);
|
|
72
|
+
/**
|
|
73
|
+
* Local lossy scaling.
|
|
74
|
+
* @remarks The value obtained may not be correct under certain conditions(for example, the parent node has non-uniform world scaling,
|
|
75
|
+
* and the child node has a rotation), the scaling will be tilted.
|
|
76
|
+
*/
|
|
77
|
+
get lossyWorldScale(): Vector3;
|
|
78
|
+
/**
|
|
79
|
+
* Local matrix.
|
|
80
|
+
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
81
|
+
*/
|
|
82
|
+
get localMatrix(): Matrix;
|
|
83
|
+
set localMatrix(value: Matrix);
|
|
84
|
+
/**
|
|
85
|
+
* World matrix.
|
|
86
|
+
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
87
|
+
*/
|
|
88
|
+
get worldMatrix(): Matrix;
|
|
89
|
+
set worldMatrix(value: Matrix);
|
|
90
|
+
/**
|
|
91
|
+
* Set local position by X, Y, Z value.
|
|
92
|
+
* @param x - X coordinate
|
|
93
|
+
* @param y - Y coordinate
|
|
94
|
+
* @param z - Z coordinate
|
|
95
|
+
*/
|
|
96
|
+
setPosition(x: number, y: number, z: number): void;
|
|
97
|
+
/**
|
|
98
|
+
* Set local rotation by the X, Y, Z components of the euler angle, unit in degrees.
|
|
99
|
+
* Rotations are performed around the Y axis, the X axis, and the Z axis, in that order.
|
|
100
|
+
* @param x - The angle of rotation around the X axis
|
|
101
|
+
* @param y - The angle of rotation around the Y axis
|
|
102
|
+
* @param z - The angle of rotation around the Z axis
|
|
103
|
+
*/
|
|
104
|
+
setRotation(x: number, y: number, z: number): void;
|
|
105
|
+
/**
|
|
106
|
+
* Set local rotation by the X, Y, Z, and W components of the quaternion.
|
|
107
|
+
* @param x - X component of quaternion
|
|
108
|
+
* @param y - Y component of quaternion
|
|
109
|
+
* @param z - Z component of quaternion
|
|
110
|
+
* @param w - W component of quaternion
|
|
111
|
+
*/
|
|
112
|
+
setRotationQuaternion(x: number, y: number, z: number, w: number): void;
|
|
113
|
+
/**
|
|
114
|
+
* Set local scaling by scaling values along X, Y, Z axis.
|
|
115
|
+
* @param x - Scaling along X axis
|
|
116
|
+
* @param y - Scaling along Y axis
|
|
117
|
+
* @param z - Scaling along Z axis
|
|
118
|
+
*/
|
|
119
|
+
setScale(x: number, y: number, z: number): void;
|
|
120
|
+
/**
|
|
121
|
+
* Set world position by X, Y, Z value.
|
|
122
|
+
* @param x - X coordinate
|
|
123
|
+
* @param y - Y coordinate
|
|
124
|
+
* @param z - Z coordinate
|
|
125
|
+
*/
|
|
126
|
+
setWorldPosition(x: number, y: number, z: number): void;
|
|
127
|
+
/**
|
|
128
|
+
* Set world rotation by the X, Y, Z components of the euler angle, unit in degrees, Yaw/Pitch/Roll sequence.
|
|
129
|
+
* @param x - The angle of rotation around the X axis
|
|
130
|
+
* @param y - The angle of rotation around the Y axis
|
|
131
|
+
* @param z - The angle of rotation around the Z axis
|
|
132
|
+
*/
|
|
133
|
+
setWorldRotation(x: number, y: number, z: number): void;
|
|
134
|
+
/**
|
|
135
|
+
* Set local rotation by the X, Y, Z, and W components of the quaternion.
|
|
136
|
+
* @param x - X component of quaternion
|
|
137
|
+
* @param y - Y component of quaternion
|
|
138
|
+
* @param z - Z component of quaternion
|
|
139
|
+
* @param w - W component of quaternion
|
|
140
|
+
*/
|
|
141
|
+
setWorldRotationQuaternion(x: number, y: number, z: number, w: number): void;
|
|
142
|
+
/**
|
|
143
|
+
* The forward direction in world space.
|
|
144
|
+
*/
|
|
145
|
+
get worldForward(): Vector3;
|
|
146
|
+
/**
|
|
147
|
+
* The right direction in world space.
|
|
148
|
+
*/
|
|
149
|
+
get worldRight(): Vector3;
|
|
150
|
+
/**
|
|
151
|
+
* The up direction in world space.
|
|
152
|
+
*/
|
|
153
|
+
get worldUp(): Vector3;
|
|
154
|
+
/**
|
|
155
|
+
* Translate in the direction and distance of the translation.
|
|
156
|
+
* @param translation - Direction and distance of translation
|
|
157
|
+
* @param relativeToLocal = `true` - Is relative to the local coordinate system
|
|
158
|
+
*/
|
|
159
|
+
translate(translation: Vector3, relativeToLocal?: boolean): void;
|
|
160
|
+
/**
|
|
161
|
+
* Translate some distance by x along the x axis, y along the y axis, and z along the z axis.
|
|
162
|
+
* @param x - Distance along the x axis
|
|
163
|
+
* @param y - Distance along the y axis
|
|
164
|
+
* @param z - Distance along the z axis
|
|
165
|
+
* @param relativeToLocal = `true` - Is relative to the local coordinate system
|
|
166
|
+
*/
|
|
167
|
+
translate(x: number, y: number, z: number, relativeToLocal?: boolean): void;
|
|
168
|
+
/**
|
|
169
|
+
* Rotate around the passed Vector3.
|
|
170
|
+
* @param rotation - Euler angle in degrees
|
|
171
|
+
* @param relativeToLocal = `true` - Is relative to the local coordinate system
|
|
172
|
+
*/
|
|
173
|
+
rotate(rotation: Vector3, relativeToLocal?: boolean): void;
|
|
174
|
+
/**
|
|
175
|
+
* Rotate around the passed Vector3.
|
|
176
|
+
* @param x - Rotation along x axis, in degrees
|
|
177
|
+
* @param y - Rotation along y axis, in degrees
|
|
178
|
+
* @param z - Rotation along z axis, in degrees
|
|
179
|
+
* @param relativeToLocal = `true` - Is relative to the local coordinate system
|
|
180
|
+
*/
|
|
181
|
+
rotate(x: number, y: number, z: number, relativeToLocal?: boolean): void;
|
|
182
|
+
/**
|
|
183
|
+
* Rotate around the specified axis according to the specified angle.
|
|
184
|
+
* @param axis - Rotate axis
|
|
185
|
+
* @param angle - Rotate angle in degrees
|
|
186
|
+
* @param relativeToLocal = `true` - Relative to local space
|
|
187
|
+
*/
|
|
188
|
+
rotateByAxis(axis: Vector3, angle: number, relativeToLocal?: boolean): void;
|
|
189
|
+
/**
|
|
190
|
+
* Rotate and ensure that the world front vector points to the target world position.
|
|
191
|
+
* @param targetPosition - Target world position
|
|
192
|
+
* @param worldUp - Up direction in world space, default is Vector3(0, 1, 0)
|
|
193
|
+
*/
|
|
194
|
+
lookAt(targetPosition: Vector3, worldUp?: Vector3): void;
|
|
195
|
+
protected _onLocalMatrixChanging(): void;
|
|
196
|
+
protected _onWorldMatrixChanging(): void;
|
|
197
|
+
protected _isContainDirtyFlags(targetDirtyFlags: number): boolean;
|
|
198
|
+
protected _isContainDirtyFlag(type: number): boolean;
|
|
199
|
+
protected _setDirtyFlagTrue(type: number): void;
|
|
200
|
+
protected _setDirtyFlagFalse(type: number): void;
|
|
201
|
+
protected _worldAssociatedChange(type: number): void;
|
|
202
|
+
protected _getParentTransform(): Transform | null;
|
|
203
|
+
protected _onPositionChanged(): void;
|
|
204
|
+
protected _onWorldPositionChanged(): void;
|
|
205
|
+
/**
|
|
206
|
+
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
207
|
+
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
|
208
|
+
* In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix or worldRotationQuaternion) to be false.
|
|
209
|
+
*/
|
|
210
|
+
private _updateWorldPositionFlag;
|
|
211
|
+
/**
|
|
212
|
+
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
213
|
+
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
|
214
|
+
* Get worldRotationQuaternion: Will trigger the world rotation (in quaternion) update of itself and all parent entities.
|
|
215
|
+
* Get worldRotation: Will trigger the world rotation(in euler and quaternion) update of itself and world rotation(in quaternion) update of all parent entities.
|
|
216
|
+
* Get worldScale: Will trigger the scaling update of itself and all parent entities.
|
|
217
|
+
* In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix or worldRotationQuaternion) to be false.
|
|
218
|
+
*/
|
|
219
|
+
private _updateWorldRotationFlag;
|
|
220
|
+
/**
|
|
221
|
+
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
222
|
+
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
|
223
|
+
* Get worldRotationQuaternion: Will trigger the world rotation (in quaternion) update of itself and all parent entities.
|
|
224
|
+
* Get worldRotation: Will trigger the world rotation(in euler and quaternion) update of itself and world rotation(in quaternion) update of all parent entities.
|
|
225
|
+
* Get worldScale: Will trigger the scaling update of itself and all parent entities.
|
|
226
|
+
* In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix or worldRotationQuaternion) to be false.
|
|
227
|
+
* @param flags - Dirty flag
|
|
228
|
+
*/
|
|
229
|
+
private _updateWorldPositionAndRotationFlag;
|
|
230
|
+
/**
|
|
231
|
+
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
232
|
+
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
|
233
|
+
* Get worldScale: Will trigger the scaling update of itself and all parent entities.
|
|
234
|
+
* In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix) to be false.
|
|
235
|
+
* @param flags - Dirty flag
|
|
236
|
+
*/
|
|
237
|
+
private _updateWorldScaleFlag;
|
|
238
|
+
/**
|
|
239
|
+
* Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
|
|
240
|
+
* Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
|
|
241
|
+
* Get worldScale: Will trigger the scaling update of itself and all parent entities.
|
|
242
|
+
* In summary, any update of related variables will cause the dirty mark of one of the full process (worldMatrix) to be false.
|
|
243
|
+
* @param flags - Dirty flag
|
|
244
|
+
*/
|
|
245
|
+
private _updateWorldPositionAndScaleFlag;
|
|
246
|
+
/**
|
|
247
|
+
* Update all world transform property dirty flag, the principle is the same as above.
|
|
248
|
+
* @param flags - Dirty flag
|
|
249
|
+
*/
|
|
250
|
+
private _updateAllWorldFlag;
|
|
251
|
+
private _getScaleMatrix;
|
|
252
|
+
private _rotateByQuat;
|
|
253
|
+
private _translate;
|
|
254
|
+
private _rotateXYZ;
|
|
255
|
+
private _onRotationChanged;
|
|
256
|
+
private _onWorldRotationChanged;
|
|
257
|
+
private _onRotationQuaternionChanged;
|
|
258
|
+
private _onWorldRotationQuaternionChanged;
|
|
259
|
+
private _onScaleChanged;
|
|
260
|
+
private _getWorldUniformScaling;
|
|
261
|
+
/**
|
|
262
|
+
* @deprecated
|
|
263
|
+
* Listen for changes in the world pose of this `Entity`.
|
|
264
|
+
* @returns Change flag
|
|
265
|
+
*/
|
|
266
|
+
registerWorldChangeFlag(): BoolUpdateFlag;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Dirty flag of transform.
|
|
270
|
+
*/
|
|
271
|
+
export declare enum TransformModifyFlags {
|
|
272
|
+
LocalEuler = 1,
|
|
273
|
+
LocalQuat = 2,
|
|
274
|
+
WorldPosition = 4,
|
|
275
|
+
WorldEuler = 8,
|
|
276
|
+
WorldQuat = 16,
|
|
277
|
+
WorldScale = 32,
|
|
278
|
+
LocalMatrix = 64,
|
|
279
|
+
WorldMatrix = 128,
|
|
280
|
+
/** This is an internal flag used to assist in determining the dispatch
|
|
281
|
+
* of world scaling dirty flags in the case of non-uniform scaling.
|
|
282
|
+
*/
|
|
283
|
+
IsWorldUniformScaling = 256,
|
|
284
|
+
/** WorldMatrix | WorldPosition */
|
|
285
|
+
WmWp = 132,
|
|
286
|
+
/** WorldMatrix | WorldEuler | WorldQuat */
|
|
287
|
+
WmWeWq = 152,
|
|
288
|
+
/** WorldMatrix | WorldEuler | WorldQuat | WorldScale*/
|
|
289
|
+
WmWeWqWs = 184,
|
|
290
|
+
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat */
|
|
291
|
+
WmWpWeWq = 156,
|
|
292
|
+
/** WorldMatrix | WorldScale */
|
|
293
|
+
WmWs = 160,
|
|
294
|
+
/** WorldMatrix | WorldScale | WorldUniformScaling */
|
|
295
|
+
WmWsWus = 416,
|
|
296
|
+
/** WorldMatrix | WorldPosition | WorldScale */
|
|
297
|
+
WmWpWs = 164,
|
|
298
|
+
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale */
|
|
299
|
+
WmWpWeWqWs = 188,
|
|
300
|
+
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale | WorldUniformScaling */
|
|
301
|
+
WmWpWeWqWsWus = 444,
|
|
302
|
+
/** LocalQuat | LocalMatrix | WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale | WorldUniformScaling */
|
|
303
|
+
LqLmWmWpWeWqWsWus = 510
|
|
304
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used to update tags.
|
|
3
|
+
*/
|
|
4
|
+
export declare abstract class UpdateFlag {
|
|
5
|
+
/**
|
|
6
|
+
* Dispatch.
|
|
7
|
+
* @param bit - Bit
|
|
8
|
+
* @param param - Parameter
|
|
9
|
+
*/
|
|
10
|
+
abstract dispatch(bit?: number, param?: Object): void;
|
|
11
|
+
/**
|
|
12
|
+
* Clear.
|
|
13
|
+
*/
|
|
14
|
+
clearFromManagers(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Destroy.
|
|
17
|
+
*/
|
|
18
|
+
destroy(): void;
|
|
19
|
+
private _removeFromManagers;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/Utils.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare class Utils {
|
|
2
|
+
/**
|
|
3
|
+
* Fast remove an element from array.
|
|
4
|
+
* @param array - Array
|
|
5
|
+
* @param item - Element
|
|
6
|
+
*/
|
|
7
|
+
static removeFromArray(array: any[], item: any): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Decodes a given Uint8Array into a string.
|
|
10
|
+
*/
|
|
11
|
+
static decodeText(array: Uint8Array): string;
|
|
12
|
+
/**
|
|
13
|
+
* Judge whether the url is absolute url.
|
|
14
|
+
* @param url - The url to be judged.
|
|
15
|
+
* @returns Whether the url is absolute url.
|
|
16
|
+
*/
|
|
17
|
+
static isAbsoluteUrl(url: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Judge whether the url is base64 url.
|
|
20
|
+
* @param url - The url to be judged.
|
|
21
|
+
* @returns Whether the url is base64 url.
|
|
22
|
+
*/
|
|
23
|
+
static isBase64Url(url: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get the values of an object.
|
|
26
|
+
*/
|
|
27
|
+
static objectValues(obj: any): any[];
|
|
28
|
+
/**
|
|
29
|
+
* Convert a relative URL to an absolute URL based on a given base URL.
|
|
30
|
+
* @param baseUrl - The base url.
|
|
31
|
+
* @param relativeUrl - The relative url.
|
|
32
|
+
* @returns The resolved url.
|
|
33
|
+
*/
|
|
34
|
+
static resolveAbsoluteUrl(baseUrl: string, relativeUrl: string): string;
|
|
35
|
+
private static _stringToPath;
|
|
36
|
+
private static _insertionSort;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EngineObject } from "../base/EngineObject";
|
|
2
|
+
import { Component } from "../Component";
|
|
3
|
+
import { ComponentConstructor } from "../Entity";
|
|
4
|
+
import { AnimationClipCurveBinding } from "./AnimationClipCurveBinding";
|
|
5
|
+
import { AnimationCurve } from "./animationCurve/AnimationCurve";
|
|
6
|
+
import { AnimationEvent } from "./AnimationEvent";
|
|
7
|
+
import { KeyframeValueType } from "./Keyframe";
|
|
8
|
+
/**
|
|
9
|
+
* Stores keyframe based animations.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AnimationClip extends EngineObject {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
private _length;
|
|
14
|
+
private _events;
|
|
15
|
+
/**
|
|
16
|
+
* Animation events for this animation clip.
|
|
17
|
+
*/
|
|
18
|
+
get events(): Readonly<AnimationEvent[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Animation curve bindings for this animation clip.
|
|
21
|
+
*/
|
|
22
|
+
get curveBindings(): Readonly<AnimationClipCurveBinding[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Animation length in seconds.
|
|
25
|
+
*/
|
|
26
|
+
get length(): number;
|
|
27
|
+
/**
|
|
28
|
+
* @param name - The AnimationClip's name
|
|
29
|
+
*/
|
|
30
|
+
constructor(name: string);
|
|
31
|
+
/**
|
|
32
|
+
* Adds an animation event to the clip.
|
|
33
|
+
* @param functionName - The name of the method called in the script
|
|
34
|
+
* @param time - The time when the event be triggered
|
|
35
|
+
* @param parameter - The parameter that is stored in the event and will be sent to the function
|
|
36
|
+
*/
|
|
37
|
+
addEvent(functionName: string, time: number, parameter: Object): void;
|
|
38
|
+
/**
|
|
39
|
+
* Adds an animation event to the clip.
|
|
40
|
+
* @param event - The animation event
|
|
41
|
+
*/
|
|
42
|
+
addEvent(event: AnimationEvent): void;
|
|
43
|
+
/**
|
|
44
|
+
* Clears all events from the clip.
|
|
45
|
+
*/
|
|
46
|
+
clearEvents(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Add curve binding for the clip.
|
|
49
|
+
* @param entityPath - Path to the game object this curve applies to. The entityPath is formatted similar to a pathname, e.g. "/root/spine/leftArm"
|
|
50
|
+
* @param componentType - The class type of the component that is animated
|
|
51
|
+
* @param propertyPath - The path to the property being animated, support "a.b" and "a.b[x]" description mode
|
|
52
|
+
* @param curve - The animation curve
|
|
53
|
+
*/
|
|
54
|
+
addCurveBinding<T extends Component>(entityPath: string, componentType: ComponentConstructor<T>, propertyPath: string, curve: AnimationCurve<KeyframeValueType>): void;
|
|
55
|
+
/**
|
|
56
|
+
* Add curve binding for the clip.
|
|
57
|
+
* @param entityPath - Path to the game object this curve applies to. The entityPath is formatted similar to a pathname, e.g. "/root/spine/leftArm"
|
|
58
|
+
* @param componentType - The class type of the component that is animated
|
|
59
|
+
* @param setPropertyPath - The path to set the property being animated, support "a.b", "a.b[x]" and "a.b('c', 0, $value)" description mode
|
|
60
|
+
* @param getPropertyPath - The path to get the value when being animated, support "a.b", "a.b[x]" and "a.b('c', 0, $value)" description mode
|
|
61
|
+
* @param curve - The animation curve
|
|
62
|
+
*/
|
|
63
|
+
addCurveBinding<T extends Component>(entityPath: string, componentType: ComponentConstructor<T>, setPropertyPath: string, getPropertyPath: string, curve: AnimationCurve<KeyframeValueType>): void;
|
|
64
|
+
/**
|
|
65
|
+
* Add curve binding for the clip.
|
|
66
|
+
* @param entityPath - Path to the game object this curve applies to. The entityPath is formatted similar to a pathname, e.g. "/root/spine/leftArm"
|
|
67
|
+
* @param componentType - The type index of the component that is animated
|
|
68
|
+
* @param componentIndex - The class type of the component that is animated
|
|
69
|
+
* @param propertyPath - The path to the property being animated, support "a.b" and "a.b[x]" description mode
|
|
70
|
+
* @param curve - The animation curve
|
|
71
|
+
*/
|
|
72
|
+
addCurveBinding<T extends Component>(entityPath: string, componentType: ComponentConstructor<T>, componentIndex: number, propertyPath: string, curve: AnimationCurve<KeyframeValueType>): void;
|
|
73
|
+
/**
|
|
74
|
+
* Add curve binding for the clip.
|
|
75
|
+
* @param entityPath - Path to the game object this curve applies to. The entityPath is formatted similar to a pathname, e.g. "/root/spine/leftArm"
|
|
76
|
+
* @param componentType - The class type of the component that is animated
|
|
77
|
+
* @param componentIndex - The class type of the component that is animated
|
|
78
|
+
* @param setPropertyPath - The path to set the property being animated, support "a.b", "a.b[x]" and "a.b('c', 0, $value)" description mode
|
|
79
|
+
* @param getPropertyPath - The path to get the value when being animated, support "a.b", "a.b[x]" and "a.b('c', 0, $value)" description mode
|
|
80
|
+
* @param curve - The animation curve
|
|
81
|
+
*/
|
|
82
|
+
addCurveBinding<T extends Component>(entityPath: string, componentType: ComponentConstructor<T>, componentIndex: number, setPropertyPath: string, getPropertyPath: string, curve: AnimationCurve<KeyframeValueType>): void;
|
|
83
|
+
/**
|
|
84
|
+
* Clears all curve bindings from the clip.
|
|
85
|
+
*/
|
|
86
|
+
clearCurveBindings(): void;
|
|
87
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentConstructor } from "../Entity";
|
|
2
|
+
import { KeyframeValueType } from "./Keyframe";
|
|
3
|
+
import { AnimationCurve } from "./animationCurve";
|
|
4
|
+
/**
|
|
5
|
+
* Associate AnimationCurve and the Entity
|
|
6
|
+
*/
|
|
7
|
+
export declare class AnimationClipCurveBinding {
|
|
8
|
+
/**
|
|
9
|
+
* Path to the entity this curve applies to. The relativePath is formatted similar to a pathname,
|
|
10
|
+
* e.g. "root/spine/leftArm". If relativePath is empty it refers to the entity the animation clip is attached to.
|
|
11
|
+
*/
|
|
12
|
+
relativePath: string;
|
|
13
|
+
/** The class type of the component that is animated. */
|
|
14
|
+
type: ComponentConstructor;
|
|
15
|
+
/** The index of the component that is animated. */
|
|
16
|
+
typeIndex: number;
|
|
17
|
+
/**
|
|
18
|
+
* The name or path to the property being animated.
|
|
19
|
+
* @remarks support property:"a.b", array: "a.b[0]", method: "a.b('c', 0, $value)"
|
|
20
|
+
*/
|
|
21
|
+
property: string;
|
|
22
|
+
/**
|
|
23
|
+
* The name or path to get the value when being animated.
|
|
24
|
+
* @remarks support property:"a.b", array: "a.b[0]", method: "a.b('c', 0)"
|
|
25
|
+
*/
|
|
26
|
+
getProperty?: string;
|
|
27
|
+
/** The animation curve. */
|
|
28
|
+
curve: AnimationCurve<KeyframeValueType>;
|
|
29
|
+
private _tempCurveOwner;
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnimationEvent lets you call a script function similar to SendMessage as part of playing back an animation.
|
|
3
|
+
*/
|
|
4
|
+
export declare class AnimationEvent {
|
|
5
|
+
/** The time when the event be triggered. */
|
|
6
|
+
time: number;
|
|
7
|
+
/** The name of the method called in the script. */
|
|
8
|
+
functionName: string;
|
|
9
|
+
/** The parameter that is stored in the event and will be sent to the function. */
|
|
10
|
+
parameter: Object;
|
|
11
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { BoolUpdateFlag } from "../BoolUpdateFlag";
|
|
2
|
+
import { Component } from "../Component";
|
|
3
|
+
import { AnimatorController } from "./AnimatorController";
|
|
4
|
+
import { AnimatorControllerLayer } from "./AnimatorControllerLayer";
|
|
5
|
+
import { AnimatorControllerParameter, AnimatorControllerParameterValue } from "./AnimatorControllerParameter";
|
|
6
|
+
import { AnimatorState } from "./AnimatorState";
|
|
7
|
+
import { AnimatorCullingMode } from "./enums/AnimatorCullingMode";
|
|
8
|
+
/**
|
|
9
|
+
* The controller of the animation system.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Animator extends Component {
|
|
12
|
+
private static _passedTriggerParameterNames;
|
|
13
|
+
/** Culling mode of this Animator. */
|
|
14
|
+
cullingMode: AnimatorCullingMode;
|
|
15
|
+
/** The playback speed of the Animator, 1.0 is normal playback speed. */
|
|
16
|
+
speed: number;
|
|
17
|
+
protected _animatorController: AnimatorController;
|
|
18
|
+
protected _controllerUpdateFlag: BoolUpdateFlag;
|
|
19
|
+
protected _updateMark: number;
|
|
20
|
+
private _animatorLayersData;
|
|
21
|
+
private _curveOwnerPool;
|
|
22
|
+
private _animationEventHandlerPool;
|
|
23
|
+
private _parametersValueMap;
|
|
24
|
+
private _tempAnimatorStateInfo;
|
|
25
|
+
private _controlledRenderers;
|
|
26
|
+
/**
|
|
27
|
+
* All layers from the AnimatorController which belongs this Animator.
|
|
28
|
+
*/
|
|
29
|
+
get animatorController(): AnimatorController;
|
|
30
|
+
set animatorController(animatorController: AnimatorController);
|
|
31
|
+
/**
|
|
32
|
+
* The layers in the animator's controller.
|
|
33
|
+
*/
|
|
34
|
+
get layers(): Readonly<AnimatorControllerLayer[]>;
|
|
35
|
+
/**
|
|
36
|
+
* The parameters in the animator's controller.
|
|
37
|
+
*/
|
|
38
|
+
get parameters(): Readonly<AnimatorControllerParameter[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Play a state by name.
|
|
41
|
+
* @param stateName - The state name
|
|
42
|
+
* @param layerIndex - The layer index(default -1). If layer is -1, play the first state with the given state name
|
|
43
|
+
* @param normalizedTimeOffset - The normalized time offset (between 0 and 1, default 0) to start the state's animation from
|
|
44
|
+
*/
|
|
45
|
+
play(stateName: string, layerIndex?: number, normalizedTimeOffset?: number): void;
|
|
46
|
+
/**
|
|
47
|
+
* Create a cross fade from the current state to another state with a normalized duration.
|
|
48
|
+
* @param stateName - The state name
|
|
49
|
+
* @param normalizedDuration - The normalized duration of the transition, relative to the destination state's duration (range: 0 to 1)
|
|
50
|
+
* @param layerIndex - The layer index(default -1). If layer is -1, play the first state with the given state name
|
|
51
|
+
* @param normalizedTimeOffset - The normalized time offset (between 0 and 1, default 0) to start the destination state's animation from
|
|
52
|
+
*/
|
|
53
|
+
crossFade(stateName: string, normalizedDuration: number, layerIndex?: number, normalizedTimeOffset?: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* Create a cross fade from the current state to another state with a fixed duration.
|
|
56
|
+
* @param stateName - The state name
|
|
57
|
+
* @param fixedDuration - The duration of the transition in seconds
|
|
58
|
+
* @param layerIndex - The layer index(default -1). If layer is -1, play the first state with the given state name
|
|
59
|
+
* @param normalizedTimeOffset - The normalized time offset (between 0 and 1, default 0) to start the destination state's animation from
|
|
60
|
+
*/
|
|
61
|
+
crossFadeInFixedDuration(stateName: string, fixedDuration: number, layerIndex?: number, normalizedTimeOffset?: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* Evaluates the animator component based on deltaTime.
|
|
64
|
+
* @param deltaTime - The deltaTime when the animation update
|
|
65
|
+
*/
|
|
66
|
+
update(deltaTime: number): void;
|
|
67
|
+
/**
|
|
68
|
+
* Get the playing state from the target layerIndex.
|
|
69
|
+
* @param layerIndex - The layer index
|
|
70
|
+
*/
|
|
71
|
+
getCurrentAnimatorState(layerIndex: number): AnimatorState;
|
|
72
|
+
/**
|
|
73
|
+
* Get the state by name.
|
|
74
|
+
* @param stateName - The state name
|
|
75
|
+
* @param layerIndex - The layer index(default -1). If layer is -1, find the first state with the given state name
|
|
76
|
+
*/
|
|
77
|
+
findAnimatorState(stateName: string, layerIndex?: number): AnimatorState;
|
|
78
|
+
/**
|
|
79
|
+
* Get the layer by name.
|
|
80
|
+
* @param name - The layer's name.
|
|
81
|
+
*/
|
|
82
|
+
findLayerByName(name: string): AnimatorControllerLayer;
|
|
83
|
+
/**
|
|
84
|
+
* Get the parameter by name from animatorController.
|
|
85
|
+
* @param name - The name of the parameter
|
|
86
|
+
*/
|
|
87
|
+
getParameter(name: string): AnimatorControllerParameter;
|
|
88
|
+
/**
|
|
89
|
+
* Get the value of the given parameter.
|
|
90
|
+
* @param name - The name of the parameter
|
|
91
|
+
* @param value - The value of the parameter
|
|
92
|
+
*/
|
|
93
|
+
getParameterValue(name: string): AnimatorControllerParameterValue;
|
|
94
|
+
/**
|
|
95
|
+
* Set the value of the given parameter.
|
|
96
|
+
* @param name - The name of the parameter
|
|
97
|
+
* @param value - The value of the parameter
|
|
98
|
+
*/
|
|
99
|
+
setParameterValue(name: string, value: AnimatorControllerParameterValue): void;
|
|
100
|
+
/**
|
|
101
|
+
* Activate the trigger parameter by name.
|
|
102
|
+
* @param name - The name of the trigger parameter
|
|
103
|
+
*/
|
|
104
|
+
activateTriggerParameter(name: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Reset the trigger parameter to deactivate it by name.
|
|
107
|
+
* @param name - The name of the trigger parameter
|
|
108
|
+
*/
|
|
109
|
+
deactivateTriggerParameter(name: string): void;
|
|
110
|
+
protected _onDestroy(): void;
|
|
111
|
+
private _crossFade;
|
|
112
|
+
private _getAnimatorStateInfo;
|
|
113
|
+
private _getAnimatorStateData;
|
|
114
|
+
private _saveAnimatorStateData;
|
|
115
|
+
private _saveAnimatorEventHandlers;
|
|
116
|
+
private _clearCrossData;
|
|
117
|
+
private _addCrossOwner;
|
|
118
|
+
private _prepareCrossFading;
|
|
119
|
+
private _prepareStandbyCrossFading;
|
|
120
|
+
private _prepareFixedPoseCrossFading;
|
|
121
|
+
private _prepareSrcCrossData;
|
|
122
|
+
private _prepareDestCrossData;
|
|
123
|
+
private _getAnimatorLayerData;
|
|
124
|
+
private _updateState;
|
|
125
|
+
private _updatePlayingState;
|
|
126
|
+
private _evaluatePlayingState;
|
|
127
|
+
private _updateCrossFadeState;
|
|
128
|
+
private _evaluateCrossFadeState;
|
|
129
|
+
private _updateCrossFadeFromPoseState;
|
|
130
|
+
private _evaluateCrossFadeFromPoseState;
|
|
131
|
+
private _updateFinishedState;
|
|
132
|
+
private _evaluateFinishedState;
|
|
133
|
+
private _updateCrossFadeData;
|
|
134
|
+
private _preparePlayOwner;
|
|
135
|
+
private _applyStateTransitions;
|
|
136
|
+
private _checkNoExitTimeTransition;
|
|
137
|
+
private _checkSubTransition;
|
|
138
|
+
private _checkBackwardsSubTransition;
|
|
139
|
+
private _applyTransitionsByCondition;
|
|
140
|
+
private _preparePlay;
|
|
141
|
+
private _applyTransition;
|
|
142
|
+
private _checkConditions;
|
|
143
|
+
private _prepareCrossFadeByTransition;
|
|
144
|
+
private _fireAnimationEvents;
|
|
145
|
+
private _fireSubAnimationEvents;
|
|
146
|
+
private _fireBackwardSubAnimationEvents;
|
|
147
|
+
private _callAnimatorScriptOnEnter;
|
|
148
|
+
private _callAnimatorScriptOnUpdate;
|
|
149
|
+
private _callAnimatorScriptOnExit;
|
|
150
|
+
private _checkAnyAndEntryState;
|
|
151
|
+
private _checkRevertOwner;
|
|
152
|
+
private _fireAnimationEventsAndCallScripts;
|
|
153
|
+
private _deactivateTriggeredParameters;
|
|
154
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AnimatorControllerParameterValue } from "./AnimatorControllerParameter";
|
|
2
|
+
import { AnimatorConditionMode } from "./enums/AnimatorConditionMode";
|
|
3
|
+
/**
|
|
4
|
+
* Condition that is used to determine if a transition must be taken.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimatorCondition {
|
|
7
|
+
/** The mode of the condition. */
|
|
8
|
+
mode: AnimatorConditionMode;
|
|
9
|
+
/** The name of the parameter used in the condition. */
|
|
10
|
+
parameterName: string;
|
|
11
|
+
/** The AnimatorParameter's threshold value for the condition to be true. */
|
|
12
|
+
threshold?: AnimatorControllerParameterValue;
|
|
13
|
+
}
|