@galacean/engine-core 1.6.8 → 1.6.10
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,61 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Joint } from "./Joint";
|
|
3
|
+
import { JointLimits } from "./JointLimits";
|
|
4
|
+
import { JointMotor } from "./JointMotor";
|
|
5
|
+
import { Entity } from "../../Entity";
|
|
6
|
+
/**
|
|
7
|
+
* A joint which behaves in a similar way to a hinge or axle.
|
|
8
|
+
*/
|
|
9
|
+
export declare class HingeJoint extends Joint {
|
|
10
|
+
private _axis;
|
|
11
|
+
private _hingeFlags;
|
|
12
|
+
private _useSpring;
|
|
13
|
+
private _jointMotor;
|
|
14
|
+
private _limits;
|
|
15
|
+
private _angle;
|
|
16
|
+
private _velocity;
|
|
17
|
+
/**
|
|
18
|
+
* The Direction of the axis around which the hingeJoint.
|
|
19
|
+
*/
|
|
20
|
+
get axis(): Vector3;
|
|
21
|
+
set axis(value: Vector3);
|
|
22
|
+
/**
|
|
23
|
+
* The current angle in degrees of the joint relative to its rest position.
|
|
24
|
+
*/
|
|
25
|
+
get angle(): number;
|
|
26
|
+
/**
|
|
27
|
+
* The angular velocity of the joint in degrees per second.
|
|
28
|
+
*/
|
|
29
|
+
get velocity(): Readonly<number>;
|
|
30
|
+
/**
|
|
31
|
+
* Enables the joint's limits. Disabled by default.
|
|
32
|
+
*/
|
|
33
|
+
get useLimits(): boolean;
|
|
34
|
+
set useLimits(value: boolean);
|
|
35
|
+
/**
|
|
36
|
+
* Enables the joint's motor. Disabled by default.
|
|
37
|
+
*/
|
|
38
|
+
get useMotor(): boolean;
|
|
39
|
+
set useMotor(value: boolean);
|
|
40
|
+
/**
|
|
41
|
+
* Enables the joint's spring. Disabled by default.
|
|
42
|
+
*/
|
|
43
|
+
get useSpring(): boolean;
|
|
44
|
+
set useSpring(value: boolean);
|
|
45
|
+
/**
|
|
46
|
+
* The motor will apply a force up to a maximum force to achieve the target velocity in degrees per second.
|
|
47
|
+
*/
|
|
48
|
+
get motor(): JointMotor;
|
|
49
|
+
set motor(value: JointMotor);
|
|
50
|
+
/**
|
|
51
|
+
* Limit of angular rotation (in degrees) on the hinge joint.
|
|
52
|
+
*/
|
|
53
|
+
get limits(): JointLimits;
|
|
54
|
+
set limits(value: JointLimits);
|
|
55
|
+
constructor(entity: Entity);
|
|
56
|
+
protected _createJoint(): void;
|
|
57
|
+
protected _syncNative(): void;
|
|
58
|
+
private _onMotorChanged;
|
|
59
|
+
private _onLimitsChanged;
|
|
60
|
+
private _onAxisChanged;
|
|
61
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { IJoint } from "@galacean/engine-design";
|
|
2
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
+
import { Component } from "../../Component";
|
|
4
|
+
import { Entity } from "../../Entity";
|
|
5
|
+
import { Collider } from "../Collider";
|
|
6
|
+
/**
|
|
7
|
+
* A base class providing common functionality for joints.
|
|
8
|
+
* @decorator `@dependentComponents(Collider, DependentMode.CheckOnly)`
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class Joint extends Component {
|
|
11
|
+
private static _tempVector3;
|
|
12
|
+
private static _tempQuat;
|
|
13
|
+
private static _tempMatrix;
|
|
14
|
+
protected _colliderInfo: JointColliderInfo;
|
|
15
|
+
protected _connectedColliderInfo: JointColliderInfo;
|
|
16
|
+
protected _nativeJoint: IJoint;
|
|
17
|
+
private _force;
|
|
18
|
+
private _torque;
|
|
19
|
+
private _automaticConnectedAnchor;
|
|
20
|
+
/**
|
|
21
|
+
* The connected collider.
|
|
22
|
+
*/
|
|
23
|
+
get connectedCollider(): Collider;
|
|
24
|
+
set connectedCollider(value: Collider);
|
|
25
|
+
/**
|
|
26
|
+
* The anchor position.
|
|
27
|
+
*/
|
|
28
|
+
get anchor(): Vector3;
|
|
29
|
+
set anchor(value: Vector3);
|
|
30
|
+
/**
|
|
31
|
+
* The connected anchor position.
|
|
32
|
+
* @remarks If connectedCollider is set, this anchor is relative offset, or the anchor is world position.
|
|
33
|
+
* The connectedAnchor is automatically calculated, if you want to set it manually, please set automaticConnectedAnchor to false
|
|
34
|
+
*/
|
|
35
|
+
get connectedAnchor(): Vector3;
|
|
36
|
+
set connectedAnchor(value: Vector3);
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not to calculate the connectedAnchor automatically, if true, the connectedAnchor will be calculated automatically to match the global position of the anchor property.
|
|
39
|
+
*/
|
|
40
|
+
get automaticConnectedAnchor(): boolean;
|
|
41
|
+
set automaticConnectedAnchor(value: boolean);
|
|
42
|
+
/**
|
|
43
|
+
* The scale to apply to the mass of collider 0 for resolving this constraint.
|
|
44
|
+
*/
|
|
45
|
+
get connectedMassScale(): number;
|
|
46
|
+
set connectedMassScale(value: number);
|
|
47
|
+
/**
|
|
48
|
+
* The scale to apply to the mass of collider 1 for resolving this constraint.
|
|
49
|
+
*/
|
|
50
|
+
get massScale(): number;
|
|
51
|
+
set massScale(value: number);
|
|
52
|
+
/**
|
|
53
|
+
* The scale to apply to the inertia of collider0 for resolving this constraint.
|
|
54
|
+
*/
|
|
55
|
+
get connectedInertiaScale(): number;
|
|
56
|
+
set connectedInertiaScale(value: number);
|
|
57
|
+
/**
|
|
58
|
+
* The scale to apply to the inertia of collider1 for resolving this constraint.
|
|
59
|
+
*/
|
|
60
|
+
get inertiaScale(): number;
|
|
61
|
+
set inertiaScale(value: number);
|
|
62
|
+
/**
|
|
63
|
+
* The maximum force the joint can apply before breaking.
|
|
64
|
+
*/
|
|
65
|
+
get breakForce(): number;
|
|
66
|
+
set breakForce(value: number);
|
|
67
|
+
/**
|
|
68
|
+
* The maximum torque the joint can apply before breaking.
|
|
69
|
+
*/
|
|
70
|
+
get breakTorque(): number;
|
|
71
|
+
set breakTorque(value: number);
|
|
72
|
+
constructor(entity: Entity);
|
|
73
|
+
protected abstract _createJoint(): void;
|
|
74
|
+
protected _syncNative(): void;
|
|
75
|
+
private _calculateConnectedAnchor;
|
|
76
|
+
private _handleConnectedAnchorChanged;
|
|
77
|
+
private _onSelfTransformChanged;
|
|
78
|
+
private _onConnectedTransformChanged;
|
|
79
|
+
private _updateRotation;
|
|
80
|
+
private _updateActualAnchor;
|
|
81
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { UpdateFlagManager } from "../../UpdateFlagManager";
|
|
2
|
+
/**
|
|
3
|
+
* JointLimits is used to limit the joints angle.
|
|
4
|
+
*/
|
|
5
|
+
export declare class JointLimits {
|
|
6
|
+
/** @internal */
|
|
7
|
+
_updateFlagManager: UpdateFlagManager;
|
|
8
|
+
private _max;
|
|
9
|
+
private _min;
|
|
10
|
+
private _contactDistance;
|
|
11
|
+
private _stiffness;
|
|
12
|
+
private _damping;
|
|
13
|
+
/**
|
|
14
|
+
* The upper angular limit (in degrees) of the joint.
|
|
15
|
+
*/
|
|
16
|
+
get max(): number;
|
|
17
|
+
set max(value: number);
|
|
18
|
+
/**
|
|
19
|
+
* The lower angular limit (in degrees) of the joint.
|
|
20
|
+
*/
|
|
21
|
+
get min(): number;
|
|
22
|
+
set min(value: number);
|
|
23
|
+
/**
|
|
24
|
+
* Distance inside the limit value at which the limit will be considered to be active by the solver.
|
|
25
|
+
* Default is the lesser of 0.1 radians, and 0.49 * (upperLimit - lowerLimit)
|
|
26
|
+
*/
|
|
27
|
+
get contactDistance(): number;
|
|
28
|
+
set contactDistance(value: number);
|
|
29
|
+
/**
|
|
30
|
+
* The spring forces used to reach the target position.
|
|
31
|
+
*/
|
|
32
|
+
get stiffness(): number;
|
|
33
|
+
set stiffness(value: number);
|
|
34
|
+
/**
|
|
35
|
+
* The damper force uses to dampen the spring.
|
|
36
|
+
*/
|
|
37
|
+
get damping(): number;
|
|
38
|
+
set damping(value: number);
|
|
39
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UpdateFlagManager } from "../../UpdateFlagManager";
|
|
2
|
+
/**
|
|
3
|
+
* The JointMotor is used to motorize a joint.
|
|
4
|
+
*/
|
|
5
|
+
export declare class JointMotor {
|
|
6
|
+
/** @internal */
|
|
7
|
+
_updateFlagManager: UpdateFlagManager;
|
|
8
|
+
private _targetVelocity;
|
|
9
|
+
private _forceLimit;
|
|
10
|
+
private _gearRatio;
|
|
11
|
+
private _freeSpin;
|
|
12
|
+
/**
|
|
13
|
+
* The motor will apply a force up to force to achieve targetVelocity.
|
|
14
|
+
*/
|
|
15
|
+
get targetVelocity(): number;
|
|
16
|
+
set targetVelocity(value: number);
|
|
17
|
+
/**
|
|
18
|
+
* The force limit.
|
|
19
|
+
*/
|
|
20
|
+
get forceLimit(): number;
|
|
21
|
+
set forceLimit(value: number);
|
|
22
|
+
/**
|
|
23
|
+
* Gear ration for the motor
|
|
24
|
+
*/
|
|
25
|
+
get gearRatio(): number;
|
|
26
|
+
set gearRatio(value: number);
|
|
27
|
+
/**
|
|
28
|
+
* If freeSpin is enabled the motor will only accelerate but never slow down.
|
|
29
|
+
*/
|
|
30
|
+
get freeSpin(): boolean;
|
|
31
|
+
set freeSpin(value: boolean);
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Joint } from "./Joint";
|
|
2
|
+
/**
|
|
3
|
+
* A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SpringJoint extends Joint {
|
|
6
|
+
private _minDistance;
|
|
7
|
+
private _maxDistance;
|
|
8
|
+
private _tolerance;
|
|
9
|
+
private _stiffness;
|
|
10
|
+
private _damping;
|
|
11
|
+
/**
|
|
12
|
+
* The minimum distance.
|
|
13
|
+
*/
|
|
14
|
+
get minDistance(): number;
|
|
15
|
+
set minDistance(value: number);
|
|
16
|
+
/**
|
|
17
|
+
* The maximum distance.
|
|
18
|
+
*/
|
|
19
|
+
get maxDistance(): number;
|
|
20
|
+
set maxDistance(value: number);
|
|
21
|
+
/**
|
|
22
|
+
* The distance beyond the allowed range at which the joint becomes active.
|
|
23
|
+
*/
|
|
24
|
+
get tolerance(): number;
|
|
25
|
+
set tolerance(value: number);
|
|
26
|
+
/**
|
|
27
|
+
* The spring strength of the joint.
|
|
28
|
+
*/
|
|
29
|
+
get stiffness(): number;
|
|
30
|
+
set stiffness(value: number);
|
|
31
|
+
/**
|
|
32
|
+
* The degree of damping of the joint spring of the joint.
|
|
33
|
+
*/
|
|
34
|
+
get damping(): number;
|
|
35
|
+
set damping(value: number);
|
|
36
|
+
protected _createJoint(): void;
|
|
37
|
+
protected _syncNative(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ColliderShape } from "./ColliderShape";
|
|
2
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
+
/**
|
|
4
|
+
* Physical collider shape for box.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BoxColliderShape extends ColliderShape {
|
|
7
|
+
private _size;
|
|
8
|
+
/**
|
|
9
|
+
* Size of box shape.
|
|
10
|
+
*/
|
|
11
|
+
get size(): Vector3;
|
|
12
|
+
set size(value: Vector3);
|
|
13
|
+
constructor();
|
|
14
|
+
protected _syncNative(): void;
|
|
15
|
+
private _setSize;
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ColliderShape } from "./ColliderShape";
|
|
2
|
+
import { ColliderShapeUpAxis } from "../enums/ColliderShapeUpAxis";
|
|
3
|
+
/**
|
|
4
|
+
* Physical collider shape for capsule.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CapsuleColliderShape extends ColliderShape {
|
|
7
|
+
private _radius;
|
|
8
|
+
private _height;
|
|
9
|
+
private _upAxis;
|
|
10
|
+
/**
|
|
11
|
+
* Radius of capsule.
|
|
12
|
+
*/
|
|
13
|
+
get radius(): number;
|
|
14
|
+
set radius(value: number);
|
|
15
|
+
/**
|
|
16
|
+
* Height of capsule.
|
|
17
|
+
*/
|
|
18
|
+
get height(): number;
|
|
19
|
+
set height(value: number);
|
|
20
|
+
/**
|
|
21
|
+
* Up axis of capsule.
|
|
22
|
+
*/
|
|
23
|
+
get upAxis(): ColliderShapeUpAxis;
|
|
24
|
+
set upAxis(value: ColliderShapeUpAxis);
|
|
25
|
+
constructor();
|
|
26
|
+
protected _syncNative(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { PhysicsMaterial } from "../PhysicsMaterial";
|
|
2
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
+
import { Collider } from "../Collider";
|
|
4
|
+
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
5
|
+
/**
|
|
6
|
+
* Abstract class for collider shapes.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class ColliderShape implements ICustomClone {
|
|
9
|
+
private static _idGenerator;
|
|
10
|
+
protected _id: number;
|
|
11
|
+
protected _material: PhysicsMaterial;
|
|
12
|
+
private _isTrigger;
|
|
13
|
+
private _rotation;
|
|
14
|
+
private _position;
|
|
15
|
+
private _contactOffset;
|
|
16
|
+
/**
|
|
17
|
+
* Collider owner of this shape.
|
|
18
|
+
*/
|
|
19
|
+
get collider(): Collider;
|
|
20
|
+
/**
|
|
21
|
+
* Unique id for this shape.
|
|
22
|
+
*/
|
|
23
|
+
get id(): number;
|
|
24
|
+
/**
|
|
25
|
+
* Contact offset for this shape, the value must be greater than or equal to 0.
|
|
26
|
+
* @defaultValue 0.02
|
|
27
|
+
*/
|
|
28
|
+
get contactOffset(): number;
|
|
29
|
+
set contactOffset(value: number);
|
|
30
|
+
/**
|
|
31
|
+
* Physical material, material can't be null.
|
|
32
|
+
*/
|
|
33
|
+
get material(): PhysicsMaterial;
|
|
34
|
+
set material(value: PhysicsMaterial);
|
|
35
|
+
/**
|
|
36
|
+
* The local rotation of this ColliderShape, in degrees.
|
|
37
|
+
*/
|
|
38
|
+
get rotation(): Vector3;
|
|
39
|
+
set rotation(value: Vector3);
|
|
40
|
+
/**
|
|
41
|
+
* The local position of this ColliderShape.
|
|
42
|
+
*/
|
|
43
|
+
get position(): Vector3;
|
|
44
|
+
set position(value: Vector3);
|
|
45
|
+
/**
|
|
46
|
+
* True for TriggerShape, false for SimulationShape.
|
|
47
|
+
*/
|
|
48
|
+
get isTrigger(): boolean;
|
|
49
|
+
set isTrigger(value: boolean);
|
|
50
|
+
protected constructor();
|
|
51
|
+
/**
|
|
52
|
+
* Get the distance and the closest point on the shape from a point.
|
|
53
|
+
* @param point - Location in world space you want to find the closest point to
|
|
54
|
+
* @param outClosestPoint - The closest point on the shape in world space
|
|
55
|
+
* @returns The distance between the point and the shape
|
|
56
|
+
*/
|
|
57
|
+
getClosestPoint(point: Vector3, outClosestPoint: Vector3): number;
|
|
58
|
+
protected _syncNative(): void;
|
|
59
|
+
private _setPosition;
|
|
60
|
+
private _setRotation;
|
|
61
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { ColliderShape } from "./ColliderShape";
|
|
3
|
+
/**
|
|
4
|
+
* Physical collider shape plane.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PlaneColliderShape extends ColliderShape {
|
|
7
|
+
constructor();
|
|
8
|
+
getClosestPoint(point: Vector3, closestPoint: Vector3): number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ColliderShape } from "./ColliderShape";
|
|
2
|
+
/**
|
|
3
|
+
* Physical collider shape for sphere.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SphereColliderShape extends ColliderShape {
|
|
6
|
+
private _radius;
|
|
7
|
+
/**
|
|
8
|
+
* Radius of sphere shape.
|
|
9
|
+
*/
|
|
10
|
+
get radius(): number;
|
|
11
|
+
set radius(value: number);
|
|
12
|
+
constructor();
|
|
13
|
+
protected _syncNative(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ColliderShape } from "./ColliderShape";
|
|
2
|
+
export { BoxColliderShape } from "./BoxColliderShape";
|
|
3
|
+
export { SphereColliderShape } from "./SphereColliderShape";
|
|
4
|
+
export { PlaneColliderShape } from "./PlaneColliderShape";
|
|
5
|
+
export { CapsuleColliderShape } from "./CapsuleColliderShape";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { Layer } from "../Layer";
|
|
3
|
+
import { PostProcessEffect } from "./PostProcessEffect";
|
|
4
|
+
/**
|
|
5
|
+
* Post Process component can be used for global or local post-processing.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PostProcess extends Component {
|
|
8
|
+
/**
|
|
9
|
+
* The layer to which the PostProcess belongs.
|
|
10
|
+
*/
|
|
11
|
+
layer: Layer;
|
|
12
|
+
/**
|
|
13
|
+
* The outer distance to start blending from, only takes effect when the `isGlobal` is false.
|
|
14
|
+
*/
|
|
15
|
+
blendDistance: number;
|
|
16
|
+
private _priority;
|
|
17
|
+
private _isGlobal;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the PostProcess is global.
|
|
20
|
+
* @remarks
|
|
21
|
+
* Specifies whether to apply the PostProcess to the entire Scene or in Colliders.
|
|
22
|
+
* Only support local PostProcess in physics enabled Scenes.
|
|
23
|
+
*/
|
|
24
|
+
get isGlobal(): boolean;
|
|
25
|
+
set isGlobal(value: boolean);
|
|
26
|
+
/**
|
|
27
|
+
* A value which determines which PostProcess is being used when PostProcess have an equal amount of influence on the Scene.
|
|
28
|
+
* @remarks
|
|
29
|
+
* PostProcess with a higher priority will override lower ones.
|
|
30
|
+
*/
|
|
31
|
+
get priority(): number;
|
|
32
|
+
set priority(value: number);
|
|
33
|
+
/**
|
|
34
|
+
* Get the PostProcessEffect by type.
|
|
35
|
+
* @param type - The type of PostProcessEffect
|
|
36
|
+
* @returns The PostProcessEffect found
|
|
37
|
+
*/
|
|
38
|
+
getEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T>;
|
|
39
|
+
/**
|
|
40
|
+
* Add a PostProcessEffect to the PostProcess.
|
|
41
|
+
* @remarks Only one effect of the same type can be added to the PostProcess.
|
|
42
|
+
* @param type - The type of PostProcessEffect
|
|
43
|
+
* @returns The PostProcessEffect added
|
|
44
|
+
*/
|
|
45
|
+
addEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T>;
|
|
46
|
+
/**
|
|
47
|
+
* Remove a PostProcessEffect from the PostProcess.
|
|
48
|
+
* @param type - The type of PostProcessEffect
|
|
49
|
+
* @returns The PostProcessEffect removed
|
|
50
|
+
*/
|
|
51
|
+
removeEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T>;
|
|
52
|
+
/**
|
|
53
|
+
* @inheritdoc
|
|
54
|
+
*/
|
|
55
|
+
_onEnableInScene(): void;
|
|
56
|
+
/**
|
|
57
|
+
* @inheritdoc
|
|
58
|
+
*/
|
|
59
|
+
_onDisableInScene(): void;
|
|
60
|
+
/**
|
|
61
|
+
* @inheritdoc
|
|
62
|
+
*/
|
|
63
|
+
_onDestroy(): void;
|
|
64
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base class for post process effect.
|
|
3
|
+
*/
|
|
4
|
+
export declare class PostProcessEffect {
|
|
5
|
+
private _enabled;
|
|
6
|
+
private _parameters;
|
|
7
|
+
private _parameterInitialized;
|
|
8
|
+
/**
|
|
9
|
+
* Indicates whether the post process effect is enabled.
|
|
10
|
+
*/
|
|
11
|
+
get enabled(): boolean;
|
|
12
|
+
set enabled(value: boolean);
|
|
13
|
+
/**
|
|
14
|
+
* Whether the post process effect is valid.
|
|
15
|
+
* @remarks
|
|
16
|
+
* This method can be overridden to control the effect's real validity.
|
|
17
|
+
*/
|
|
18
|
+
isValid(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get all parameters of the post process effect.
|
|
21
|
+
* @remarks
|
|
22
|
+
* Only get the parameters that are initialized in the constructor.
|
|
23
|
+
* It will don't take effect if you add a new parameter after the post process effect is created, such as `effect.** = new PostProcessEffectParameter(1)`
|
|
24
|
+
*/
|
|
25
|
+
private _getParameters;
|
|
26
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Color, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { Texture } from "../texture";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a parameter of a post process effect.
|
|
5
|
+
* @remarks
|
|
6
|
+
* The parameter will be mixed to a final value and be used in post process manager.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class PostProcessEffectParameter<T> {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the parameter is enabled.
|
|
11
|
+
*/
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
protected _needLerp: boolean;
|
|
14
|
+
protected _value: T;
|
|
15
|
+
/**
|
|
16
|
+
* The value of the parameter.
|
|
17
|
+
*/
|
|
18
|
+
get value(): T;
|
|
19
|
+
set value(value: T);
|
|
20
|
+
constructor(value: T, needLerp?: boolean);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents a float parameter of a post process effect.
|
|
24
|
+
*/
|
|
25
|
+
export declare class PostProcessEffectFloatParameter extends PostProcessEffectParameter<number> {
|
|
26
|
+
readonly min: number;
|
|
27
|
+
readonly max: number;
|
|
28
|
+
get value(): number;
|
|
29
|
+
set value(v: number);
|
|
30
|
+
/**
|
|
31
|
+
* Create a new float parameter.
|
|
32
|
+
* @param value - The default value of the parameter
|
|
33
|
+
* @param _min - The minimum value of the parameter, default is Number.NEGATIVE_INFINITY
|
|
34
|
+
* @param _max - The maximum value of the parameter, default is Number.POSITIVE_INFINITY
|
|
35
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
36
|
+
*/
|
|
37
|
+
constructor(value: number, min?: number, max?: number, needLerp?: boolean);
|
|
38
|
+
_lerp(to: number, factor: number): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Represents a boolean parameter of a post process effect.
|
|
42
|
+
*/
|
|
43
|
+
export declare class PostProcessEffectBoolParameter extends PostProcessEffectParameter<boolean> {
|
|
44
|
+
/**
|
|
45
|
+
* Create a new boolean parameter.
|
|
46
|
+
* @param value - The default value of the parameter
|
|
47
|
+
*/
|
|
48
|
+
constructor(value: boolean);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Represents a texture parameter of a post process effect.
|
|
52
|
+
*/
|
|
53
|
+
export declare class PostProcessEffectTextureParameter extends PostProcessEffectParameter<Texture> {
|
|
54
|
+
/**
|
|
55
|
+
* Create a new texture parameter.
|
|
56
|
+
* @param value - The default texture of the parameter
|
|
57
|
+
*/
|
|
58
|
+
constructor(value: Texture);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Represents a color parameter of a post process effect.
|
|
62
|
+
*/
|
|
63
|
+
export declare class PostProcessEffectColorParameter extends PostProcessEffectParameter<Color> {
|
|
64
|
+
/**
|
|
65
|
+
* Create a new color parameter.
|
|
66
|
+
* @param value - The default color of the parameter
|
|
67
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
68
|
+
*/
|
|
69
|
+
constructor(value: Color, needLerp?: boolean);
|
|
70
|
+
_lerp(to: Color, factor: number): void;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Represents a vector2 parameter of a post process effect.
|
|
74
|
+
*/
|
|
75
|
+
export declare class PostProcessEffectVector2Parameter extends PostProcessEffectParameter<Vector2> {
|
|
76
|
+
/**
|
|
77
|
+
* Create a new vector2 parameter.
|
|
78
|
+
* @param value - The default vector2 of the parameter
|
|
79
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
80
|
+
*/
|
|
81
|
+
constructor(value: Vector2, needLerp?: boolean);
|
|
82
|
+
_lerp(to: Vector2, factor: number): void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Represents a vector3 parameter of a post process effect.
|
|
86
|
+
*/
|
|
87
|
+
export declare class PostProcessEffectVector3Parameter extends PostProcessEffectParameter<Vector3> {
|
|
88
|
+
/**
|
|
89
|
+
* Create a new vector3 parameter.
|
|
90
|
+
* @param value - The default vector3 of the parameter
|
|
91
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
92
|
+
*/
|
|
93
|
+
constructor(value: Vector3, needLerp?: boolean);
|
|
94
|
+
_lerp(to: Vector3, factor: number): void;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Represents a vector4 parameter of a post process effect.
|
|
98
|
+
*/
|
|
99
|
+
export declare class PostProcessEffectVector4Parameter extends PostProcessEffectParameter<Vector4> {
|
|
100
|
+
/**
|
|
101
|
+
* Create a new vector4 parameter.
|
|
102
|
+
* @param value - The default vector4 of the parameter
|
|
103
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
104
|
+
*/
|
|
105
|
+
constructor(value: Vector4, needLerp?: boolean);
|
|
106
|
+
_lerp(to: Vector4, factor: number): void;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Represents a enum parameter of a post process effect.
|
|
110
|
+
*/
|
|
111
|
+
export declare class PostProcessEffectEnumParameter<T> extends PostProcessEffectParameter<T> {
|
|
112
|
+
readonly enumType: Record<string, number | string>;
|
|
113
|
+
/**
|
|
114
|
+
* Create a new enum parameter.
|
|
115
|
+
* @param enumType - The type of the enum
|
|
116
|
+
* @param value - The default enum value of the parameter
|
|
117
|
+
*/
|
|
118
|
+
constructor(enumType: Record<string, number | string>, value: T);
|
|
119
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Scene } from "../Scene";
|
|
2
|
+
import { PostProcessEffect } from "./PostProcessEffect";
|
|
3
|
+
/**
|
|
4
|
+
* A global manager of the PostProcess.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PostProcessManager {
|
|
7
|
+
readonly scene: Scene;
|
|
8
|
+
private static _tempColliders;
|
|
9
|
+
private static _tempVector3;
|
|
10
|
+
private _activePostProcesses;
|
|
11
|
+
private _swapRenderTarget;
|
|
12
|
+
private _srcRenderTarget;
|
|
13
|
+
private _destRenderTarget;
|
|
14
|
+
private _currentSourceRenderTarget;
|
|
15
|
+
private _currentDestRenderTarget;
|
|
16
|
+
private _blendEffectMap;
|
|
17
|
+
private _defaultEffectMap;
|
|
18
|
+
private _remainActivePassCount;
|
|
19
|
+
private _outputRenderTarget;
|
|
20
|
+
/**
|
|
21
|
+
* Create a PostProcessManager.
|
|
22
|
+
* @param scene - Scene to which the current PostProcessManager belongs
|
|
23
|
+
*/
|
|
24
|
+
constructor(scene: Scene);
|
|
25
|
+
/**
|
|
26
|
+
* Get the blend effect by type.
|
|
27
|
+
* @remarks
|
|
28
|
+
* The blend effect is a post process effect that is used to blend all result of the effects by the type.
|
|
29
|
+
* @param type - The type of PostProcessEffect
|
|
30
|
+
* @returns The PostProcessEffect instance found
|
|
31
|
+
*/
|
|
32
|
+
getBlendEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T>;
|
|
33
|
+
private _sortActivePostProcess;
|
|
34
|
+
private _resetDefaultValue;
|
|
35
|
+
private _initSwapRenderTarget;
|
|
36
|
+
private _swapRT;
|
|
37
|
+
private _getCurrentSourceTexture;
|
|
38
|
+
}
|