@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"types/**/*"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@galacean/engine-math": "1.6.
|
|
21
|
+
"@galacean/engine-math": "1.6.10"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@galacean/engine-design": "1.6.
|
|
24
|
+
"@galacean/engine-design": "1.6.10"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Matrix, Vector2 } from "@galacean/engine-math";
|
|
2
|
+
import { ISpriteRenderer } from "./ISpriteRenderer";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for sprite assembler.
|
|
5
|
+
*/
|
|
6
|
+
export interface ISpriteAssembler {
|
|
7
|
+
resetData(renderer: ISpriteRenderer, vertexCount?: number): void;
|
|
8
|
+
updatePositions(renderer: ISpriteRenderer, worldMatrix: Matrix, width: number, height: number, pivot: Vector2, flipX: boolean, flipY: boolean, referenceResolutionPerUnit?: number): void;
|
|
9
|
+
updateUVs(renderer: ISpriteRenderer): void;
|
|
10
|
+
updateColor(renderer: ISpriteRenderer, alpha: number): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Color } from "@galacean/engine-math";
|
|
2
|
+
import { PrimitiveChunkManager } from "../../RenderPipeline/PrimitiveChunkManager";
|
|
3
|
+
import { SubPrimitiveChunk } from "../../RenderPipeline/SubPrimitiveChunk";
|
|
4
|
+
import { SpriteTileMode } from "../enums/SpriteTileMode";
|
|
5
|
+
import { Sprite } from "../sprite";
|
|
6
|
+
/**
|
|
7
|
+
* Interface for sprite renderer.
|
|
8
|
+
*/
|
|
9
|
+
export interface ISpriteRenderer {
|
|
10
|
+
sprite: Sprite;
|
|
11
|
+
color?: Color;
|
|
12
|
+
tileMode?: SpriteTileMode;
|
|
13
|
+
tiledAdaptiveThreshold?: number;
|
|
14
|
+
_subChunk: SubPrimitiveChunk;
|
|
15
|
+
_getChunkManager(): PrimitiveChunkManager;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Matrix, Vector2 } from "@galacean/engine-math";
|
|
2
|
+
import { ISpriteRenderer } from "./ISpriteRenderer";
|
|
3
|
+
/**
|
|
4
|
+
* Assemble vertex data for the sprite renderer in simple mode.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SimpleSpriteAssembler {
|
|
7
|
+
private static _rectangleTriangles;
|
|
8
|
+
private static _matrix;
|
|
9
|
+
static resetData(renderer: ISpriteRenderer): void;
|
|
10
|
+
static updatePositions(renderer: ISpriteRenderer, worldMatrix: Matrix, width: number, height: number, pivot: Vector2, flipX: boolean, flipY: boolean): void;
|
|
11
|
+
static updateUVs(renderer: ISpriteRenderer): void;
|
|
12
|
+
static updateColor(renderer: ISpriteRenderer, alpha: number): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Matrix, Vector2 } from "@galacean/engine-math";
|
|
2
|
+
import { ISpriteRenderer } from "./ISpriteRenderer";
|
|
3
|
+
/**
|
|
4
|
+
* Assemble vertex data for the sprite renderer in sliced mode.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SlicedSpriteAssembler {
|
|
7
|
+
private static _rectangleTriangles;
|
|
8
|
+
private static _matrix;
|
|
9
|
+
private static _row;
|
|
10
|
+
private static _column;
|
|
11
|
+
static resetData(renderer: ISpriteRenderer): void;
|
|
12
|
+
static updatePositions(renderer: ISpriteRenderer, worldMatrix: Matrix, width: number, height: number, pivot: Vector2, flipX: boolean, flipY: boolean, referenceResolutionPerUnit?: number): void;
|
|
13
|
+
static updateUVs(renderer: ISpriteRenderer): void;
|
|
14
|
+
static updateColor(renderer: ISpriteRenderer, alpha: number): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Matrix, Vector2 } from "@galacean/engine-math";
|
|
2
|
+
import { ISpriteRenderer } from "./ISpriteRenderer";
|
|
3
|
+
/**
|
|
4
|
+
* Assemble vertex data for the sprite renderer in tiled mode.
|
|
5
|
+
*/
|
|
6
|
+
export declare class TiledSpriteAssembler {
|
|
7
|
+
private static _matrix;
|
|
8
|
+
private static _posRow;
|
|
9
|
+
private static _posColumn;
|
|
10
|
+
private static _uvRow;
|
|
11
|
+
private static _uvColumn;
|
|
12
|
+
static resetData(renderer: ISpriteRenderer, vertexCount: number): void;
|
|
13
|
+
static updatePositions(renderer: ISpriteRenderer, worldMatrix: Matrix, width: number, height: number, pivot: Vector2, flipX: boolean, flipY: boolean, referenceResolutionPerUnit?: number): void;
|
|
14
|
+
static updateUVs(renderer: ISpriteRenderer): void;
|
|
15
|
+
static updateColor(renderer: ISpriteRenderer, alpha: number): void;
|
|
16
|
+
private static _calculateDividing;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReferResource } from "../../asset/ReferResource";
|
|
2
|
+
import { Engine } from "../../Engine";
|
|
3
|
+
import { Sprite } from "../sprite/Sprite";
|
|
4
|
+
/**
|
|
5
|
+
* Sprite Atlas.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SpriteAtlas extends ReferResource {
|
|
8
|
+
private _sprites;
|
|
9
|
+
private _spriteNamesToIndex;
|
|
10
|
+
/**
|
|
11
|
+
* All the sprites in the atlas.
|
|
12
|
+
*/
|
|
13
|
+
get sprites(): Readonly<Sprite[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Get the last sprite named 'name' from the atlas.
|
|
16
|
+
* @param name - The name of the sprite you want to find
|
|
17
|
+
* @returns The sprite you want to find
|
|
18
|
+
*/
|
|
19
|
+
getSprite(name: string): Sprite;
|
|
20
|
+
/**
|
|
21
|
+
* Get all the sprite named 'name' from the atlas.
|
|
22
|
+
* @param name - The name of the sprites you want to find
|
|
23
|
+
* @param outSprites - This array holds the sprites found
|
|
24
|
+
* @returns The sprites you want to find
|
|
25
|
+
*/
|
|
26
|
+
getSprites(name: string, outSprites: Sprite[]): Sprite[];
|
|
27
|
+
/**
|
|
28
|
+
* Constructor a SpriteAtlas.
|
|
29
|
+
* @param engine - Engine to which the SpriteAtlas belongs
|
|
30
|
+
*/
|
|
31
|
+
constructor(engine: Engine);
|
|
32
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { AssetType } from "../../asset/AssetType";
|
|
2
|
+
import { TextureFilterMode, TextureFormat, TextureWrapMode } from "../../texture";
|
|
3
|
+
/**
|
|
4
|
+
* The original data type of the atlas.
|
|
5
|
+
*/
|
|
6
|
+
export interface AtlasConfig {
|
|
7
|
+
mipmap?: boolean;
|
|
8
|
+
wrapModeV?: TextureWrapMode;
|
|
9
|
+
wrapModeU?: TextureWrapMode;
|
|
10
|
+
filterMode?: TextureFilterMode;
|
|
11
|
+
anisoLevel?: number;
|
|
12
|
+
/** Version of Atlas. */
|
|
13
|
+
version: number;
|
|
14
|
+
/** Texture format. */
|
|
15
|
+
format: TextureFormat;
|
|
16
|
+
/** The sub atlas array, each sub atlas contains multiple sprites. */
|
|
17
|
+
atlasItems: {
|
|
18
|
+
/** The url of the sub atlas. */
|
|
19
|
+
img: string;
|
|
20
|
+
/** Image type. */
|
|
21
|
+
type: AssetType;
|
|
22
|
+
/** Sprites contained in the sub atlas. */
|
|
23
|
+
sprites: AtlasSprite[];
|
|
24
|
+
}[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The original data type of each sprite.
|
|
28
|
+
*/
|
|
29
|
+
export interface AtlasSprite {
|
|
30
|
+
/** Temp solution. */
|
|
31
|
+
id: number;
|
|
32
|
+
/** The name the sprite. */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Whether to rotate 90 degrees clockwise. */
|
|
35
|
+
atlasRotated: boolean;
|
|
36
|
+
/** The range of the sprites on the big picture. */
|
|
37
|
+
atlasRegion: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
w: number;
|
|
41
|
+
h: number;
|
|
42
|
+
};
|
|
43
|
+
/** If there is trimming, the size of the blank area on the four sides. */
|
|
44
|
+
atlasRegionOffset: {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
z: number;
|
|
48
|
+
w: number;
|
|
49
|
+
};
|
|
50
|
+
region: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
w: number;
|
|
54
|
+
h: number;
|
|
55
|
+
};
|
|
56
|
+
pivot: {
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
};
|
|
60
|
+
border: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
z: number;
|
|
64
|
+
w: number;
|
|
65
|
+
};
|
|
66
|
+
pixelsPerUnit: number;
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprite's drawing mode enumeration.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SpriteDrawMode {
|
|
5
|
+
/** Overall scaling when modifying size. */
|
|
6
|
+
Simple = 0,
|
|
7
|
+
/** When modifying the size of the renderer, it scales to fill the range according to the sprite border settings. */
|
|
8
|
+
Sliced = 1,
|
|
9
|
+
/** When modifying the size of the renderer, it will tile to fill the range according to the sprite border settings. */
|
|
10
|
+
Tiled = 2
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprite mask interaction.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SpriteMaskInteraction {
|
|
5
|
+
/** The sprite will not interact with the masking system. */
|
|
6
|
+
None = 0,
|
|
7
|
+
/** The sprite will be visible only in areas where a mask is present. */
|
|
8
|
+
VisibleInsideMask = 1,
|
|
9
|
+
/** The sprite will be visible only in areas where no mask is present. */
|
|
10
|
+
VisibleOutsideMask = 2
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprite Property Dirty Flag.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SpriteModifyFlags {
|
|
5
|
+
/** The texture of sprite changes. */
|
|
6
|
+
texture = 1,
|
|
7
|
+
/** The size of sprite changes. */
|
|
8
|
+
size = 2,
|
|
9
|
+
/** The rotation of sprite changes. */
|
|
10
|
+
atlasRotate = 4,
|
|
11
|
+
/** The atlasRegion of sprite changes. */
|
|
12
|
+
atlasRegion = 8,
|
|
13
|
+
/** The atlasRegionOffset of sprite changes. */
|
|
14
|
+
atlasRegionOffset = 16,
|
|
15
|
+
/** The region of sprite changes. */
|
|
16
|
+
region = 32,
|
|
17
|
+
/** The pivot of sprite changes. */
|
|
18
|
+
pivot = 64,
|
|
19
|
+
/** The border of sprite changes. */
|
|
20
|
+
border = 128,
|
|
21
|
+
/** The sprite destroyed. */
|
|
22
|
+
destroy = 256
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprite's tiling mode enumeration.
|
|
3
|
+
* Only works in `SpriteDrawMode.tiled` mode.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum SpriteTileMode {
|
|
6
|
+
/** SpriteRenderer will tile continuously. */
|
|
7
|
+
Continuous = 0,
|
|
8
|
+
/** When the fractional part of the tiling multiple is greater than or equal to `SpriteRenderer.tileStretchValue`,
|
|
9
|
+
* a tile will be added,and the number of tiles can only be an integer. */
|
|
10
|
+
Adaptive = 1
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The horizontal alignment of the text.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum TextHorizontalAlignment {
|
|
5
|
+
/** Align left horizontally */
|
|
6
|
+
Left = 0,
|
|
7
|
+
/** Align center horizontally */
|
|
8
|
+
Center = 1,
|
|
9
|
+
/** Align right horizontally */
|
|
10
|
+
Right = 2
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The vertical alignment of the text.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum TextVerticalAlignment {
|
|
16
|
+
/** Align top vertically */
|
|
17
|
+
Top = 0,
|
|
18
|
+
/** Align center vertically */
|
|
19
|
+
Center = 1,
|
|
20
|
+
/** Align bottom vertically */
|
|
21
|
+
Bottom = 2
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The way to handle the situation where wrapped text is too tall to fit in the height.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum OverflowMode {
|
|
5
|
+
/** Overflow when the text is too tall */
|
|
6
|
+
Overflow = 0,
|
|
7
|
+
/** Truncate with height when the text is too tall */
|
|
8
|
+
Truncate = 1
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { ISpriteAssembler } from "./assembler/ISpriteAssembler";
|
|
2
|
+
export type { ISpriteRenderer } from "./assembler/ISpriteRenderer";
|
|
3
|
+
export { SimpleSpriteAssembler } from "./assembler/SimpleSpriteAssembler";
|
|
4
|
+
export { SlicedSpriteAssembler } from "./assembler/SlicedSpriteAssembler";
|
|
5
|
+
export { TiledSpriteAssembler } from "./assembler/TiledSpriteAssembler";
|
|
6
|
+
export { SpriteAtlas } from "./atlas/SpriteAtlas";
|
|
7
|
+
export { FontStyle } from "./enums/FontStyle";
|
|
8
|
+
export { SpriteDrawMode } from "./enums/SpriteDrawMode";
|
|
9
|
+
export { SpriteMaskInteraction } from "./enums/SpriteMaskInteraction";
|
|
10
|
+
export { SpriteModifyFlags } from "./enums/SpriteModifyFlags";
|
|
11
|
+
export { SpriteTileMode } from "./enums/SpriteTileMode";
|
|
12
|
+
export { TextHorizontalAlignment, TextVerticalAlignment } from "./enums/TextAlignment";
|
|
13
|
+
export { OverflowMode } from "./enums/TextOverflow";
|
|
14
|
+
export * from "./sprite/index";
|
|
15
|
+
export * from "./text/index";
|
|
16
|
+
export type { ITextRenderer } from "./text/ITextRenderer";
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Rect, Vector2, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { Engine } from "../../Engine";
|
|
3
|
+
import { ReferResource } from "../../asset/ReferResource";
|
|
4
|
+
import { Texture2D } from "../../texture/Texture2D";
|
|
5
|
+
/**
|
|
6
|
+
* 2D sprite.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Sprite extends ReferResource {
|
|
9
|
+
/** The name of sprite. */
|
|
10
|
+
name: string;
|
|
11
|
+
private _automaticWidth;
|
|
12
|
+
private _automaticHeight;
|
|
13
|
+
private _customWidth;
|
|
14
|
+
private _customHeight;
|
|
15
|
+
private _positions;
|
|
16
|
+
private _uvs;
|
|
17
|
+
private _bounds;
|
|
18
|
+
private _texture;
|
|
19
|
+
private _atlasRotated;
|
|
20
|
+
private _atlasRegion;
|
|
21
|
+
private _atlasRegionOffset;
|
|
22
|
+
private _region;
|
|
23
|
+
private _pivot;
|
|
24
|
+
private _border;
|
|
25
|
+
private _dirtyUpdateFlag;
|
|
26
|
+
/**
|
|
27
|
+
* The reference to the used texture.
|
|
28
|
+
*/
|
|
29
|
+
get texture(): Texture2D;
|
|
30
|
+
set texture(value: Texture2D);
|
|
31
|
+
/**
|
|
32
|
+
* The width of the sprite (in world coordinates).
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* If width is set, return the set value,
|
|
36
|
+
* otherwise return the width calculated according to `Texture.width`, `Sprite.region`, `Sprite.atlasRegion` and `Sprite.atlasRegionOffset`.
|
|
37
|
+
*/
|
|
38
|
+
get width(): number;
|
|
39
|
+
set width(value: number);
|
|
40
|
+
/**
|
|
41
|
+
* The height of the sprite (in world coordinates).
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* If height is set, return the set value,
|
|
45
|
+
* otherwise return the height calculated according to `Texture.height`, `Sprite.region`, `Sprite.atlasRegion` and `Sprite.atlasRegionOffset`.
|
|
46
|
+
*/
|
|
47
|
+
get height(): number;
|
|
48
|
+
set height(value: number);
|
|
49
|
+
/**
|
|
50
|
+
* Is it rotated 90 degrees clockwise when packing.
|
|
51
|
+
*/
|
|
52
|
+
get atlasRotated(): boolean;
|
|
53
|
+
set atlasRotated(value: boolean);
|
|
54
|
+
/**
|
|
55
|
+
* The rectangle region of the original texture on its atlas texture, specified in normalized.
|
|
56
|
+
*/
|
|
57
|
+
get atlasRegion(): Rect;
|
|
58
|
+
set atlasRegion(value: Rect);
|
|
59
|
+
/**
|
|
60
|
+
* The rectangle region offset of the original texture on its atlas texture, specified in normalized.
|
|
61
|
+
*/
|
|
62
|
+
get atlasRegionOffset(): Vector4;
|
|
63
|
+
set atlasRegionOffset(value: Vector4);
|
|
64
|
+
/**
|
|
65
|
+
* The rectangle region of the sprite, specified in normalized.
|
|
66
|
+
*/
|
|
67
|
+
get region(): Rect;
|
|
68
|
+
set region(value: Rect);
|
|
69
|
+
/**
|
|
70
|
+
* Location of the sprite's center point in the rectangle region, specified in normalized.
|
|
71
|
+
* The origin is at the bottom left and the default value is (0.5, 0.5).
|
|
72
|
+
*/
|
|
73
|
+
get pivot(): Vector2;
|
|
74
|
+
set pivot(value: Vector2);
|
|
75
|
+
/**
|
|
76
|
+
* Get the border of the sprite.
|
|
77
|
+
* x y z w
|
|
78
|
+
* | | | |
|
|
79
|
+
* Left, bottom, right, top.
|
|
80
|
+
* @remarks only use in sliced mode.
|
|
81
|
+
*/
|
|
82
|
+
get border(): Vector4;
|
|
83
|
+
set border(value: Vector4);
|
|
84
|
+
/**
|
|
85
|
+
* Constructor a Sprite.
|
|
86
|
+
* @param engine - Engine to which the sprite belongs
|
|
87
|
+
* @param texture - Texture from which to obtain the Sprite
|
|
88
|
+
* @param region - Rectangle region of the texture to use for the Sprite, specified in normalized
|
|
89
|
+
* @param pivot - Sprite's pivot point relative to its graphic rectangle, specified in normalized
|
|
90
|
+
* @param border - Boundaries when using Slice DrawMode, specified in normalized
|
|
91
|
+
* @param name - The name of Sprite
|
|
92
|
+
*/
|
|
93
|
+
constructor(engine: Engine, texture?: Texture2D, region?: Rect, pivot?: Vector2, border?: Vector4, name?: string);
|
|
94
|
+
/**
|
|
95
|
+
* Clone.
|
|
96
|
+
* @returns Cloned sprite
|
|
97
|
+
*/
|
|
98
|
+
clone(): Sprite;
|
|
99
|
+
private _calDefaultSize;
|
|
100
|
+
private _updatePositions;
|
|
101
|
+
private _updateUVs;
|
|
102
|
+
private _dispatchSpriteChange;
|
|
103
|
+
private _onRegionChange;
|
|
104
|
+
private _onPivotChange;
|
|
105
|
+
private _onBorderChange;
|
|
106
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
+
import { RenderContext } from "../../RenderPipeline/RenderContext";
|
|
3
|
+
import { Renderer } from "../../Renderer";
|
|
4
|
+
import { SpriteMaskLayer } from "../../enums/SpriteMaskLayer";
|
|
5
|
+
import { ISpriteRenderer } from "../assembler/ISpriteRenderer";
|
|
6
|
+
import { Sprite } from "./Sprite";
|
|
7
|
+
/**
|
|
8
|
+
* A component for masking Sprites.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SpriteMask extends Renderer implements ISpriteRenderer {
|
|
11
|
+
/** The mask layers the sprite mask influence to. */
|
|
12
|
+
influenceLayers: SpriteMaskLayer;
|
|
13
|
+
private _sprite;
|
|
14
|
+
private _automaticWidth;
|
|
15
|
+
private _automaticHeight;
|
|
16
|
+
private _customWidth;
|
|
17
|
+
private _customHeight;
|
|
18
|
+
private _flipX;
|
|
19
|
+
private _flipY;
|
|
20
|
+
private _alphaCutoff;
|
|
21
|
+
/**
|
|
22
|
+
* Render width (in world coordinates).
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* If width is set, return the set value,
|
|
26
|
+
* otherwise return `SpriteMask.sprite.width`.
|
|
27
|
+
*/
|
|
28
|
+
get width(): number;
|
|
29
|
+
set width(value: number);
|
|
30
|
+
/**
|
|
31
|
+
* Render height (in world coordinates).
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* If height is set, return the set value,
|
|
35
|
+
* otherwise return `SpriteMask.sprite.height`.
|
|
36
|
+
*/
|
|
37
|
+
get height(): number;
|
|
38
|
+
set height(value: number);
|
|
39
|
+
/**
|
|
40
|
+
* Flips the sprite on the X axis.
|
|
41
|
+
*/
|
|
42
|
+
get flipX(): boolean;
|
|
43
|
+
set flipX(value: boolean);
|
|
44
|
+
/**
|
|
45
|
+
* Flips the sprite on the Y axis.
|
|
46
|
+
*/
|
|
47
|
+
get flipY(): boolean;
|
|
48
|
+
set flipY(value: boolean);
|
|
49
|
+
/**
|
|
50
|
+
* The Sprite to render.
|
|
51
|
+
*/
|
|
52
|
+
get sprite(): Sprite;
|
|
53
|
+
set sprite(value: Sprite | null);
|
|
54
|
+
/**
|
|
55
|
+
* The minimum alpha value used by the mask to select the area of influence defined over the mask's sprite. Value between 0 and 1.
|
|
56
|
+
*/
|
|
57
|
+
get alphaCutoff(): number;
|
|
58
|
+
set alphaCutoff(value: number);
|
|
59
|
+
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
60
|
+
/**
|
|
61
|
+
* @inheritdoc
|
|
62
|
+
*/
|
|
63
|
+
protected _render(context: RenderContext): void;
|
|
64
|
+
/**
|
|
65
|
+
* @inheritdoc
|
|
66
|
+
*/
|
|
67
|
+
protected _onDestroy(): void;
|
|
68
|
+
private _calDefaultSize;
|
|
69
|
+
private _onSpriteChange;
|
|
70
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { BoundingBox, Color } from "@galacean/engine-math";
|
|
2
|
+
import { RenderContext } from "../../RenderPipeline/RenderContext";
|
|
3
|
+
import { Renderer } from "../../Renderer";
|
|
4
|
+
import { ISpriteRenderer } from "../assembler/ISpriteRenderer";
|
|
5
|
+
import { SpriteDrawMode } from "../enums/SpriteDrawMode";
|
|
6
|
+
import { SpriteMaskInteraction } from "../enums/SpriteMaskInteraction";
|
|
7
|
+
import { SpriteTileMode } from "../enums/SpriteTileMode";
|
|
8
|
+
import { Sprite } from "./Sprite";
|
|
9
|
+
import { SpriteMaskLayer } from "../../enums/SpriteMaskLayer";
|
|
10
|
+
/**
|
|
11
|
+
* Renders a Sprite for 2D graphics.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SpriteRenderer extends Renderer implements ISpriteRenderer {
|
|
14
|
+
private _drawMode;
|
|
15
|
+
private _assembler;
|
|
16
|
+
private _tileMode;
|
|
17
|
+
private _tiledAdaptiveThreshold;
|
|
18
|
+
private _color;
|
|
19
|
+
private _sprite;
|
|
20
|
+
private _automaticWidth;
|
|
21
|
+
private _automaticHeight;
|
|
22
|
+
private _customWidth;
|
|
23
|
+
private _customHeight;
|
|
24
|
+
private _flipX;
|
|
25
|
+
private _flipY;
|
|
26
|
+
/**
|
|
27
|
+
* The draw mode of the sprite renderer.
|
|
28
|
+
*/
|
|
29
|
+
get drawMode(): SpriteDrawMode;
|
|
30
|
+
set drawMode(value: SpriteDrawMode);
|
|
31
|
+
/**
|
|
32
|
+
* The tiling mode of the sprite renderer. (Only works in tiled mode.)
|
|
33
|
+
*/
|
|
34
|
+
get tileMode(): SpriteTileMode;
|
|
35
|
+
set tileMode(value: SpriteTileMode);
|
|
36
|
+
/**
|
|
37
|
+
* Stretch Threshold in Tile Adaptive Mode, specified in normalized. (Only works in tiled adaptive mode.)
|
|
38
|
+
*/
|
|
39
|
+
get tiledAdaptiveThreshold(): number;
|
|
40
|
+
set tiledAdaptiveThreshold(value: number);
|
|
41
|
+
/**
|
|
42
|
+
* The Sprite to render.
|
|
43
|
+
*/
|
|
44
|
+
get sprite(): Sprite;
|
|
45
|
+
set sprite(value: Sprite | null);
|
|
46
|
+
/**
|
|
47
|
+
* Rendering color for the Sprite graphic.
|
|
48
|
+
*/
|
|
49
|
+
get color(): Color;
|
|
50
|
+
set color(value: Color);
|
|
51
|
+
/**
|
|
52
|
+
* Render width (in world coordinates).
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* If width is set, return the set value,
|
|
56
|
+
* otherwise return `SpriteRenderer.sprite.width`.
|
|
57
|
+
*/
|
|
58
|
+
get width(): number;
|
|
59
|
+
set width(value: number);
|
|
60
|
+
/**
|
|
61
|
+
* Render height (in world coordinates).
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* If height is set, return the set value,
|
|
65
|
+
* otherwise return `SpriteRenderer.sprite.height`.
|
|
66
|
+
*/
|
|
67
|
+
get height(): number;
|
|
68
|
+
set height(value: number);
|
|
69
|
+
/**
|
|
70
|
+
* Flips the sprite on the X axis.
|
|
71
|
+
*/
|
|
72
|
+
get flipX(): boolean;
|
|
73
|
+
set flipX(value: boolean);
|
|
74
|
+
/**
|
|
75
|
+
* Flips the sprite on the Y axis.
|
|
76
|
+
*/
|
|
77
|
+
get flipY(): boolean;
|
|
78
|
+
set flipY(value: boolean);
|
|
79
|
+
/**
|
|
80
|
+
* The mask layer the sprite renderer belongs to.
|
|
81
|
+
*/
|
|
82
|
+
get maskLayer(): SpriteMaskLayer;
|
|
83
|
+
set maskLayer(value: SpriteMaskLayer);
|
|
84
|
+
/**
|
|
85
|
+
* Interacts with the masks.
|
|
86
|
+
*/
|
|
87
|
+
get maskInteraction(): SpriteMaskInteraction;
|
|
88
|
+
set maskInteraction(value: SpriteMaskInteraction);
|
|
89
|
+
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
90
|
+
protected _render(context: RenderContext): void;
|
|
91
|
+
protected _onDestroy(): void;
|
|
92
|
+
private _calDefaultSize;
|
|
93
|
+
private _onSpriteChange;
|
|
94
|
+
private _onColorChanged;
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReferResource } from "../../asset/ReferResource";
|
|
2
|
+
import { Engine } from "../../Engine";
|
|
3
|
+
/**
|
|
4
|
+
* Font.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Font extends ReferResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a system font.
|
|
9
|
+
* @param engine - Engine to which the font belongs
|
|
10
|
+
* @param name - The name of font want to create
|
|
11
|
+
* @returns The font object has been create
|
|
12
|
+
*/
|
|
13
|
+
static createFromOS(engine: Engine, name: string): Font;
|
|
14
|
+
private _name;
|
|
15
|
+
private _subFontMap;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the font object.
|
|
18
|
+
*/
|
|
19
|
+
get name(): string;
|
|
20
|
+
constructor(engine: Engine, name?: string);
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|