@galacean/engine-core 0.9.0-beta.80
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/main.js +24255 -0
- package/dist/main.js.map +1 -0
- package/dist/miniprogram.js +24255 -0
- package/dist/module.js +24138 -0
- package/dist/module.js.map +1 -0
- package/package.json +26 -0
- package/types/2d/assembler/IAssembler.d.ts +1 -0
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
- package/types/2d/atlas/FontAtlas.d.ts +1 -0
- package/types/2d/atlas/SpriteAtlas.d.ts +36 -0
- package/types/2d/atlas/types.d.ts +53 -0
- package/types/2d/data/RenderData2D.d.ts +1 -0
- package/types/2d/data/VertexData2D.d.ts +1 -0
- package/types/2d/enums/FontStyle.d.ts +11 -0
- package/types/2d/enums/SpriteDrawMode.d.ts +9 -0
- package/types/2d/enums/SpriteMaskInteraction.d.ts +11 -0
- package/types/2d/enums/SpriteMaskLayer.d.ts +71 -0
- package/types/2d/enums/SpriteModifyFlags.d.ts +13 -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 +9 -0
- package/types/2d/sprite/Sprite.d.ts +97 -0
- package/types/2d/sprite/SpriteMask.d.ts +63 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +77 -0
- package/types/2d/sprite/index.d.ts +3 -0
- package/types/2d/text/CharInfo.d.ts +1 -0
- package/types/2d/text/CharRenderData.d.ts +1 -0
- package/types/2d/text/CharRenderDataPool.d.ts +1 -0
- package/types/2d/text/Font.d.ts +26 -0
- package/types/2d/text/SubFont.d.ts +1 -0
- package/types/2d/text/TextRenderer.d.ts +123 -0
- package/types/2d/text/TextUtils.d.ts +1 -0
- package/types/2d/text/index.d.ts +2 -0
- package/types/Background.d.ts +43 -0
- package/types/BoolUpdateFlag.d.ts +12 -0
- package/types/Camera.d.ts +206 -0
- package/types/Canvas.d.ts +9 -0
- package/types/Component.d.ts +32 -0
- package/types/ComponentsDependencies.d.ts +17 -0
- package/types/ComponentsManager.d.ts +46 -0
- package/types/DisorderedArray.d.ts +18 -0
- package/types/Engine.d.ts +140 -0
- package/types/EngineSettings.d.ts +8 -0
- package/types/Entity.d.ts +151 -0
- package/types/Layer.d.ts +73 -0
- package/types/Platform.d.ts +15 -0
- package/types/RenderPipeline/Basic2DBatcher.d.ts +20 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +66 -0
- package/types/RenderPipeline/ClassPool.d.ts +17 -0
- package/types/RenderPipeline/MeshRenderData.d.ts +15 -0
- package/types/RenderPipeline/MeshRenderElement.d.ts +17 -0
- package/types/RenderPipeline/RenderContext.d.ts +1 -0
- package/types/RenderPipeline/RenderData.d.ts +7 -0
- package/types/RenderPipeline/RenderElement.d.ts +11 -0
- package/types/RenderPipeline/RenderPass.d.ts +55 -0
- package/types/RenderPipeline/RenderQueue.d.ts +38 -0
- package/types/RenderPipeline/SpriteBatcher.d.ts +1 -0
- package/types/RenderPipeline/SpriteElement.d.ts +13 -0
- package/types/RenderPipeline/SpriteMaskBatcher.d.ts +10 -0
- package/types/RenderPipeline/SpriteMaskElement.d.ts +10 -0
- package/types/RenderPipeline/SpriteMaskManager.d.ts +1 -0
- package/types/RenderPipeline/SpriteMaskRenderData.d.ts +10 -0
- package/types/RenderPipeline/SpriteRenderData.d.ts +12 -0
- package/types/RenderPipeline/TextRenderData.d.ts +6 -0
- package/types/RenderPipeline/TextRenderElement.d.ts +6 -0
- package/types/RenderPipeline/enums/PipelineStage.d.ts +9 -0
- package/types/RenderPipeline/index.d.ts +4 -0
- package/types/Renderer.d.ts +119 -0
- package/types/Scene.d.ts +142 -0
- package/types/SceneManager.d.ts +28 -0
- package/types/Script.d.ts +118 -0
- package/types/SystemInfo.d.ts +14 -0
- package/types/Transform.d.ts +258 -0
- package/types/UpdateFlag.d.ts +20 -0
- package/types/UpdateFlagManager.d.ts +1 -0
- package/types/Utils.d.ts +3 -0
- package/types/VirtualCamera.d.ts +1 -0
- package/types/animation/AnimationClip.d.ts +58 -0
- package/types/animation/AnimationClipCurveBinding.d.ts +21 -0
- package/types/animation/AnimationEvent.d.ts +11 -0
- package/types/animation/Animator.d.ts +86 -0
- package/types/animation/AnimatorController.d.ts +32 -0
- package/types/animation/AnimatorControllerLayer.d.ts +18 -0
- package/types/animation/AnimatorState.d.ts +60 -0
- package/types/animation/AnimatorStateMachine.d.ts +37 -0
- package/types/animation/AnimatorTransition.d.ts +14 -0
- package/types/animation/Keyframe.d.ts +19 -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 +12 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +7 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +8 -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 +10 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +1 -0
- package/types/animation/enums/AnimatorConditionMode.d.ts +8 -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 +13 -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 +21 -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 +56 -0
- package/types/asset/AssetType.d.ts +52 -0
- package/types/asset/ContentRestorer.d.ts +17 -0
- package/types/asset/GraphicsResource.d.ts +9 -0
- package/types/asset/IRefObject.d.ts +2 -0
- package/types/asset/IReferable.d.ts +2 -0
- package/types/asset/LoadItem.d.ts +33 -0
- package/types/asset/Loader.d.ts +30 -0
- package/types/asset/RefObject.d.ts +27 -0
- package/types/asset/ReferResource.d.ts +27 -0
- package/types/asset/ResourceManager.d.ts +95 -0
- package/types/asset/request.d.ts +25 -0
- package/types/base/Constant.d.ts +110 -0
- package/types/base/EngineObject.d.ts +24 -0
- package/types/base/Event.d.ts +24 -0
- package/types/base/EventDispatcher.d.ts +79 -0
- package/types/base/Logger.d.ts +11 -0
- package/types/base/StaticInterfaceImplement.d.ts +5 -0
- package/types/base/Time.d.ts +41 -0
- package/types/base/Util.d.ts +14 -0
- package/types/base/index.d.ts +7 -0
- package/types/clone/CloneManager.d.ts +31 -0
- package/types/clone/ComponentCloner.d.ts +14 -0
- package/types/clone/enums/CloneMode.d.ts +13 -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/ColorSpace.d.ts +9 -0
- package/types/enums/FogMode.d.ts +13 -0
- package/types/env-probe/CubeProbe.d.ts +34 -0
- package/types/env-probe/Probe.d.ts +58 -0
- package/types/env-probe/index.d.ts +2 -0
- package/types/graphic/Buffer.d.ts +105 -0
- package/types/graphic/BufferUtil.d.ts +11 -0
- package/types/graphic/IndexBufferBinding.d.ts +21 -0
- package/types/graphic/Mesh.d.ts +70 -0
- package/types/graphic/SubMesh.d.ts +19 -0
- package/types/graphic/VertexBufferBinding.d.ts +20 -0
- package/types/graphic/VertexElement.d.ts +44 -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 +13 -0
- package/types/index.d.ts +53 -0
- package/types/input/InputManager.d.ts +67 -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 +5 -0
- package/types/input/interface/IInput.d.ts +18 -0
- package/types/input/keyboard/KeyboardManager.d.ts +1 -0
- package/types/input/pointer/Pointer.d.ts +25 -0
- package/types/input/pointer/PointerManager.d.ts +1 -0
- package/types/input/wheel/WheelManager.d.ts +1 -0
- package/types/lighting/AmbientLight.d.ts +67 -0
- package/types/lighting/DirectLight.d.ts +21 -0
- package/types/lighting/KHR_lights.d.ts +4 -0
- package/types/lighting/Light.d.ts +48 -0
- package/types/lighting/LightManager.d.ts +5 -0
- package/types/lighting/PointLight.d.ts +18 -0
- package/types/lighting/SpotLight.d.ts +36 -0
- package/types/lighting/enums/DiffuseMode.d.ts +13 -0
- package/types/lighting/index.d.ts +6 -0
- package/types/material/BaseMaterial.d.ts +88 -0
- package/types/material/BlinnPhongMaterial.d.ts +71 -0
- package/types/material/Material.d.ts +51 -0
- package/types/material/PBRBaseMaterial.d.ts +101 -0
- package/types/material/PBRMaterial.d.ts +36 -0
- package/types/material/PBRSpecularMaterial.d.ts +38 -0
- package/types/material/UnlitMaterial.d.ts +33 -0
- package/types/material/enums/BlendMode.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 +10 -0
- package/types/mesh/BlendShape.d.ts +39 -0
- package/types/mesh/BlendShapeFrame.d.ts +22 -0
- package/types/mesh/BlendShapeManager.d.ts +1 -0
- package/types/mesh/BufferMesh.d.ts +59 -0
- package/types/mesh/MeshRenderer.d.ts +30 -0
- package/types/mesh/ModelMesh.d.ts +226 -0
- package/types/mesh/PrimitiveMesh.d.ts +86 -0
- package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
- package/types/mesh/Skin.d.ts +16 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +62 -0
- package/types/mesh/enums/VertexAttribute.d.ts +33 -0
- package/types/mesh/index.d.ts +8 -0
- package/types/particle/ParticleRenderer.d.ts +235 -0
- package/types/particle/index.d.ts +1 -0
- package/types/physics/CharacterController.d.ts +53 -0
- package/types/physics/Collider.d.ts +29 -0
- package/types/physics/Collision.d.ts +4 -0
- package/types/physics/DynamicCollider.d.ts +161 -0
- package/types/physics/HitResult.d.ts +15 -0
- package/types/physics/PhysicsManager.d.ts +95 -0
- package/types/physics/PhysicsMaterial.d.ts +37 -0
- package/types/physics/StaticCollider.d.ts +7 -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 +10 -0
- package/types/physics/joint/FixedJoint.d.ts +3 -0
- package/types/physics/joint/HingeJoint.d.ts +57 -0
- package/types/physics/joint/Joint.d.ts +58 -0
- package/types/physics/joint/JointLimits.d.ts +15 -0
- package/types/physics/joint/JointMotor.d.ts +13 -0
- package/types/physics/joint/SpringJoint.d.ts +42 -0
- package/types/physics/joint/index.d.ts +6 -0
- package/types/physics/shape/BoxColliderShape.d.ts +15 -0
- package/types/physics/shape/CapsuleColliderShape.d.ts +26 -0
- package/types/physics/shape/ColliderShape.d.ts +51 -0
- package/types/physics/shape/PlaneColliderShape.d.ts +7 -0
- package/types/physics/shape/SphereColliderShape.d.ts +13 -0
- package/types/physics/shape/index.d.ts +5 -0
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +6 -0
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +8 -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 +72 -0
- package/types/shader/ShaderData.d.ts +350 -0
- package/types/shader/ShaderMacro.d.ts +10 -0
- package/types/shader/ShaderMacroCollection.d.ts +1 -0
- package/types/shader/ShaderPart.d.ts +41 -0
- package/types/shader/ShaderPass.d.ts +9 -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 +13 -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 +19 -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/ShaderDataGroup.d.ts +13 -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 +12 -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 +20 -0
- package/types/shader/state/RenderTargetBlendState.d.ts +24 -0
- package/types/shader/state/StencilState.d.ts +34 -0
- package/types/shaderlib/ShaderFactory.d.ts +17 -0
- package/types/shaderlib/ShaderLib.d.ts +58 -0
- package/types/shaderlib/index.d.ts +1 -0
- package/types/shaderlib/pbr/index.d.ts +9 -0
- package/types/shaderlib/shadow/index.d.ts +8 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +47 -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 +14 -0
- package/types/sky/SkyBoxMaterial.d.ts +25 -0
- package/types/sky/SkyProceduralMaterial.d.ts +72 -0
- package/types/sky/index.d.ts +2 -0
- package/types/texture/RenderTarget.d.ts +95 -0
- package/types/texture/Texture.d.ts +77 -0
- package/types/texture/Texture2D.d.ts +68 -0
- package/types/texture/Texture2DArray.d.ts +81 -0
- package/types/texture/TextureCube.d.ts +70 -0
- package/types/texture/enums/RenderBufferDepthFormat.d.ts +21 -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 +69 -0
- package/types/texture/enums/TextureWrapMode.d.ts +11 -0
- package/types/texture/index.d.ts +11 -0
- package/types/trail/TrailMaterial.d.ts +5 -0
- package/types/trail/TrailRenderer.d.ts +40 -0
- package/types/trail/index.d.ts +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "./internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler";
|
|
2
|
+
import "./internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler";
|
|
3
|
+
import "./internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler";
|
|
4
|
+
import "./internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler";
|
|
5
|
+
export { AnimationClip } from "./AnimationClip";
|
|
6
|
+
export { AnimationClipCurveBinding } from "./AnimationClipCurveBinding";
|
|
7
|
+
export * from "./animationCurve";
|
|
8
|
+
export { AnimationEvent } from "./AnimationEvent";
|
|
9
|
+
export { Animator } from "./Animator";
|
|
10
|
+
export { AnimatorController } from "./AnimatorController";
|
|
11
|
+
export { AnimatorControllerLayer } from "./AnimatorControllerLayer";
|
|
12
|
+
export { AnimatorState } from "./AnimatorState";
|
|
13
|
+
export { AnimatorStateMachine } from "./AnimatorStateMachine";
|
|
14
|
+
export { AnimatorStateTransition } from "./AnimatorTransition";
|
|
15
|
+
export { AnimatorConditionMode } from "./enums/AnimatorConditionMode";
|
|
16
|
+
export { AnimatorLayerBlendingMode } from "./enums/AnimatorLayerBlendingMode";
|
|
17
|
+
export { AnimatorCullingMode } from "./enums/AnimatorCullingMode";
|
|
18
|
+
export { InterpolationType } from "./enums/InterpolationType";
|
|
19
|
+
export { WrapMode } from "./enums/WrapMode";
|
|
20
|
+
export * from "./Keyframe";
|
|
21
|
+
export { StateMachineScript } from "./StateMachineScript";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Loading Promise.
|
|
3
|
+
*/
|
|
4
|
+
export declare class AssetPromise<T> implements PromiseLike<T> {
|
|
5
|
+
/**
|
|
6
|
+
* Return a new resource Promise through the provided asset promise collection.
|
|
7
|
+
* The resolved of the new AssetPromise will be triggered when all the Promises in the provided set are completed.
|
|
8
|
+
* @param - Promise Collection
|
|
9
|
+
* @returns AssetPromise
|
|
10
|
+
*/
|
|
11
|
+
static all<T = any>(promises: (PromiseLike<T> | T)[]): AssetPromise<T[]>;
|
|
12
|
+
/** compatible with Promise */
|
|
13
|
+
get [Symbol.toStringTag](): string;
|
|
14
|
+
private _promise;
|
|
15
|
+
private _state;
|
|
16
|
+
private _onProgressCallback;
|
|
17
|
+
private _onCancelHandler;
|
|
18
|
+
private _reject;
|
|
19
|
+
/**
|
|
20
|
+
* Create an asset loading Promise.
|
|
21
|
+
* @param executor - A callback used to initialize the promise. This callback is passed two arguments:
|
|
22
|
+
* a resolve callback used to resolve the promise with a value or the result of another promise,
|
|
23
|
+
* and a reject callback used to reject the promise with a provided reason or error.
|
|
24
|
+
* and a setProgress callback used to set promise progress with a percent.
|
|
25
|
+
*/
|
|
26
|
+
constructor(executor: AssetPromiseExecutor<T>);
|
|
27
|
+
/**
|
|
28
|
+
* Progress callback.
|
|
29
|
+
* @param callback
|
|
30
|
+
* @returns AssetPromise
|
|
31
|
+
*/
|
|
32
|
+
onProgress(callback: (progress: number) => void): AssetPromise<T>;
|
|
33
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): AssetPromise<TResult1 | TResult2>;
|
|
34
|
+
/**
|
|
35
|
+
* Attaches a callback for only the rejection of the Promise.
|
|
36
|
+
* @param onRejected - The callback to execute when the Promise is rejected.
|
|
37
|
+
* @returns A Promise for the completion of the callback.
|
|
38
|
+
*/
|
|
39
|
+
catch(onRejected: (reason: any) => any): AssetPromise<T>;
|
|
40
|
+
/**
|
|
41
|
+
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
|
|
42
|
+
* resolved value cannot be modified from the callback.
|
|
43
|
+
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
|
44
|
+
* @returns A Promise for the completion of the callback.
|
|
45
|
+
*/
|
|
46
|
+
finally(onFinally?: () => void): Promise<T>;
|
|
47
|
+
/**
|
|
48
|
+
* Cancel promise request.
|
|
49
|
+
* @returns Asset promise
|
|
50
|
+
*/
|
|
51
|
+
cancel(): AssetPromise<T>;
|
|
52
|
+
}
|
|
53
|
+
interface AssetPromiseExecutor<T> {
|
|
54
|
+
(resolve: (value?: T | PromiseLike<T>) => void, reject?: (reason?: any) => void, setProgress?: (progress: number) => void, onCancel?: (callback: () => void) => void): void;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Type.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AssetType {
|
|
5
|
+
/**
|
|
6
|
+
* Plain text.
|
|
7
|
+
* @remarks Will not be cached based on url in ResourceManager.
|
|
8
|
+
*/
|
|
9
|
+
Text = "text",
|
|
10
|
+
/**
|
|
11
|
+
* JSON.
|
|
12
|
+
* @remarks Will not be cached based on url in ResourceManager.
|
|
13
|
+
*/
|
|
14
|
+
JSON = "json",
|
|
15
|
+
/**
|
|
16
|
+
* ArrayBuffer.
|
|
17
|
+
* @remarks Will not be cached based on url in ResourceManager.
|
|
18
|
+
*/
|
|
19
|
+
Buffer = "buffer",
|
|
20
|
+
/** 2D Texture. */
|
|
21
|
+
Texture2D = "texture2d",
|
|
22
|
+
/** Cube Texture. */
|
|
23
|
+
TextureCube = "texture-cube",
|
|
24
|
+
/** Material. */
|
|
25
|
+
Material = "material",
|
|
26
|
+
/** Mesh. */
|
|
27
|
+
Mesh = "mesh",
|
|
28
|
+
/** AnimationClip. */
|
|
29
|
+
AnimationClip = "AnimationClip",
|
|
30
|
+
/** AnimatorController. */
|
|
31
|
+
AnimatorController = "AnimatorController",
|
|
32
|
+
/** Prefab.*/
|
|
33
|
+
Prefab = "prefab",
|
|
34
|
+
/** Compress Texture. */
|
|
35
|
+
KTX = "ktx",
|
|
36
|
+
/** Cube Compress Texture. */
|
|
37
|
+
KTXCube = "ktx-cube",
|
|
38
|
+
/** Sprite. */
|
|
39
|
+
Sprite = "sprite",
|
|
40
|
+
/** Sprite Atlas. */
|
|
41
|
+
SpriteAtlas = "sprite-atlas",
|
|
42
|
+
/** Ambient light. */
|
|
43
|
+
Env = "environment",
|
|
44
|
+
/** Scene. */
|
|
45
|
+
Scene = "scene",
|
|
46
|
+
/** HDR to cube. */
|
|
47
|
+
HDR = "HDR",
|
|
48
|
+
/** Font. */
|
|
49
|
+
Font = "font",
|
|
50
|
+
/** Source Font, include ttf、 otf and woff. */
|
|
51
|
+
SourceFont = "source-font"
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EngineObject } from "../base";
|
|
2
|
+
import { AssetPromise } from "./AssetPromise";
|
|
3
|
+
/**
|
|
4
|
+
* ContentRestorer is a base class for all content restore info classes.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class ContentRestorer<T extends EngineObject> {
|
|
7
|
+
resource: T;
|
|
8
|
+
/**
|
|
9
|
+
* @param resource - The resource object of the content restorer
|
|
10
|
+
*/
|
|
11
|
+
constructor(resource: T);
|
|
12
|
+
/**
|
|
13
|
+
* Restore the content of the resource.
|
|
14
|
+
* @returns The promise of the restored content if the content is restored asynchronously, otherwise returns undefined
|
|
15
|
+
*/
|
|
16
|
+
abstract restoreContent(): AssetPromise<T> | void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used to describe loading asset.
|
|
3
|
+
*/
|
|
4
|
+
export type LoadItem = {
|
|
5
|
+
/**
|
|
6
|
+
* Loading url.
|
|
7
|
+
*/
|
|
8
|
+
url?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Available when AssetType is TextureCube.
|
|
11
|
+
*/
|
|
12
|
+
urls?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Asset Type.
|
|
15
|
+
*/
|
|
16
|
+
type?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Number of retries after failed loading.
|
|
19
|
+
*/
|
|
20
|
+
retryCount?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Timeout.
|
|
23
|
+
*/
|
|
24
|
+
timeout?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Retry interval time.
|
|
27
|
+
*/
|
|
28
|
+
retryInterval?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Additional parameters for specified loader.
|
|
31
|
+
*/
|
|
32
|
+
params?: Record<string, any>;
|
|
33
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AssetPromise } from "./AssetPromise";
|
|
2
|
+
import { LoadItem } from "./LoadItem";
|
|
3
|
+
import { RequestConfig } from "./request";
|
|
4
|
+
import { ResourceManager } from "./ResourceManager";
|
|
5
|
+
/**
|
|
6
|
+
* Loader abstract class.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class Loader<T> {
|
|
9
|
+
readonly useCache: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Register a class with a string name for serialization and deserialization.
|
|
12
|
+
* @param key - class name
|
|
13
|
+
* @param obj - class object
|
|
14
|
+
*/
|
|
15
|
+
static registerClass(className: string, classDefine: {
|
|
16
|
+
new (...args: any): any;
|
|
17
|
+
}): void;
|
|
18
|
+
/**
|
|
19
|
+
* Get the class object by class name.
|
|
20
|
+
* @param key - class name
|
|
21
|
+
* @returns class object
|
|
22
|
+
*/
|
|
23
|
+
static getClass(className: string): {
|
|
24
|
+
new (...args: any): any;
|
|
25
|
+
};
|
|
26
|
+
private static _engineObjects;
|
|
27
|
+
constructor(useCache: boolean);
|
|
28
|
+
request: <U>(url: string, config: RequestConfig) => AssetPromise<U>;
|
|
29
|
+
abstract load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<T> | Record<string, AssetPromise<any>>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EngineObject } from "../base/EngineObject";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { IRefObject } from "./IRefObject";
|
|
4
|
+
/**
|
|
5
|
+
* The base class of assets, with reference counting capability.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class RefObject extends EngineObject implements IRefObject {
|
|
8
|
+
/** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */
|
|
9
|
+
isGCIgnored: boolean;
|
|
10
|
+
private _refCount;
|
|
11
|
+
/**
|
|
12
|
+
* Counted by valid references.
|
|
13
|
+
*/
|
|
14
|
+
get refCount(): number;
|
|
15
|
+
protected constructor(engine: Engine);
|
|
16
|
+
/**
|
|
17
|
+
* Destroy self.
|
|
18
|
+
* @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
|
|
19
|
+
* @returns Whether the release was successful.
|
|
20
|
+
*/
|
|
21
|
+
destroy(force?: boolean): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Called when the resource is destroyed.
|
|
24
|
+
* Subclasses can override this function.
|
|
25
|
+
*/
|
|
26
|
+
protected abstract _onDestroy(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EngineObject } from "../base/EngineObject";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { IReferable } from "./IReferable";
|
|
4
|
+
/**
|
|
5
|
+
* The base class of assets, with reference counting capability.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class ReferResource extends EngineObject implements IReferable {
|
|
8
|
+
/** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */
|
|
9
|
+
isGCIgnored: boolean;
|
|
10
|
+
private _refCount;
|
|
11
|
+
/**
|
|
12
|
+
* Counted by valid references.
|
|
13
|
+
*/
|
|
14
|
+
get refCount(): number;
|
|
15
|
+
protected constructor(engine: Engine);
|
|
16
|
+
/**
|
|
17
|
+
* @override
|
|
18
|
+
* Destroy self.
|
|
19
|
+
* @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
|
|
20
|
+
* @returns Whether the release was successful.
|
|
21
|
+
*/
|
|
22
|
+
destroy(force?: boolean): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @override
|
|
25
|
+
*/
|
|
26
|
+
protected _onDestroy(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Engine } from "..";
|
|
2
|
+
import { AssetPromise } from "./AssetPromise";
|
|
3
|
+
import { Loader } from "./Loader";
|
|
4
|
+
import { LoadItem } from "./LoadItem";
|
|
5
|
+
/**
|
|
6
|
+
* ResourceManager
|
|
7
|
+
*/
|
|
8
|
+
export declare class ResourceManager {
|
|
9
|
+
readonly engine: Engine;
|
|
10
|
+
/** Loader collection. */
|
|
11
|
+
private static _loaders;
|
|
12
|
+
private static _extTypeMapping;
|
|
13
|
+
private static _getTypeByUrl;
|
|
14
|
+
/** The number of retries after failing to load assets. */
|
|
15
|
+
retryCount: number;
|
|
16
|
+
/** Retry delay time after failed to load assets, in milliseconds. */
|
|
17
|
+
retryInterval: number;
|
|
18
|
+
/** The default timeout period for loading assets, in milliseconds. */
|
|
19
|
+
timeout: number;
|
|
20
|
+
/** Asset path pool, key is asset ID, value is asset path */
|
|
21
|
+
private _assetPool;
|
|
22
|
+
/** Asset pool, the key is the asset path and the value is the asset. */
|
|
23
|
+
private _assetUrlPool;
|
|
24
|
+
/** Reference counted object pool, key is the object ID, and reference counted objects are put into this pool. */
|
|
25
|
+
private _refObjectPool;
|
|
26
|
+
/** Loading promises. */
|
|
27
|
+
private _loadingPromises;
|
|
28
|
+
/**
|
|
29
|
+
* Create a ResourceManager.
|
|
30
|
+
* @param engine - Engine to which the current ResourceManager belongs
|
|
31
|
+
*/
|
|
32
|
+
constructor(engine: Engine);
|
|
33
|
+
/**
|
|
34
|
+
* Load asset asynchronously through the path.
|
|
35
|
+
* @param path - Path
|
|
36
|
+
* @returns Asset promise
|
|
37
|
+
*/
|
|
38
|
+
load<T>(path: string): AssetPromise<T>;
|
|
39
|
+
/**
|
|
40
|
+
* Load asset collection asynchronously through urls.
|
|
41
|
+
* @param paths - Path collections
|
|
42
|
+
* @returns Asset Promise
|
|
43
|
+
*/
|
|
44
|
+
load(paths: string[]): AssetPromise<Object[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Load the asset asynchronously by asset item information.
|
|
47
|
+
* @param assetItem - AssetItem
|
|
48
|
+
* @returns AssetPromise
|
|
49
|
+
*/
|
|
50
|
+
load<T>(assetItem: LoadItem): AssetPromise<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Load the asset collection asynchronously by loading the information collection.
|
|
53
|
+
* @param assetItems - Asset collection
|
|
54
|
+
* @returns AssetPromise
|
|
55
|
+
*/
|
|
56
|
+
load(assetItems: LoadItem[]): AssetPromise<Object[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Cancel all assets that have not finished loading.
|
|
59
|
+
*/
|
|
60
|
+
cancelNotLoaded(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Cancel assets whose url has not finished loading.
|
|
63
|
+
* @param url - Resource url
|
|
64
|
+
*/
|
|
65
|
+
cancelNotLoaded(url: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Cancel the incompletely loaded assets in urls.
|
|
68
|
+
* @param urls - Resource urls
|
|
69
|
+
*/
|
|
70
|
+
cancelNotLoaded(urls: string[]): void;
|
|
71
|
+
/**
|
|
72
|
+
* Garbage collection will release resource objects managed by reference counting.
|
|
73
|
+
* @remarks The release principle is that it is not referenced by the components, including direct and indirect reference.
|
|
74
|
+
*/
|
|
75
|
+
gc(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Get asset url from instanceId.
|
|
78
|
+
* @param instanceId - Engine instance id
|
|
79
|
+
* @returns Asset url
|
|
80
|
+
*/
|
|
81
|
+
getAssetPath(instanceId: number): string;
|
|
82
|
+
private _assignDefaultOptions;
|
|
83
|
+
private _loadSingleItem;
|
|
84
|
+
private _gc;
|
|
85
|
+
private _getResolveResource;
|
|
86
|
+
private _parseURL;
|
|
87
|
+
private _getParameterByName;
|
|
88
|
+
private _parseQueryPath;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Declare ResourceLoader's decorator.
|
|
92
|
+
* @param assetType - Type of asset
|
|
93
|
+
* @param extnames - Name of file extension
|
|
94
|
+
*/
|
|
95
|
+
export declare function resourceLoader(assetType: string, extnames: string[], useCache?: boolean): <T extends Loader<any>>(Target: new (useCache: boolean) => T) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AssetPromise } from "./AssetPromise";
|
|
2
|
+
export type RequestConfig = {
|
|
3
|
+
type?: XMLHttpRequestResponseType | "image";
|
|
4
|
+
retryCount?: number;
|
|
5
|
+
retryInterval?: number;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
} & RequestInit;
|
|
8
|
+
/**
|
|
9
|
+
* Web request.
|
|
10
|
+
* @param url - The link
|
|
11
|
+
* @param config - Load configuration
|
|
12
|
+
*/
|
|
13
|
+
export declare function request<T>(url: string, config?: RequestConfig): AssetPromise<T>;
|
|
14
|
+
export declare class MultiExecutor {
|
|
15
|
+
private execFunc;
|
|
16
|
+
private totalCount;
|
|
17
|
+
private interval;
|
|
18
|
+
private _timeoutId;
|
|
19
|
+
private _currentCount;
|
|
20
|
+
constructor(execFunc: (count?: number) => Promise<any>, totalCount: number, interval: number);
|
|
21
|
+
private done;
|
|
22
|
+
start(done?: Function): void;
|
|
23
|
+
stop(): void;
|
|
24
|
+
private exec;
|
|
25
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data type enumeration
|
|
3
|
+
*/
|
|
4
|
+
export declare enum DataType {
|
|
5
|
+
/** Float */
|
|
6
|
+
FLOAT = 5126,
|
|
7
|
+
/** Floating-point two-dimensional vector */
|
|
8
|
+
FLOAT_VEC2 = 35664,
|
|
9
|
+
/** Floating-point three-dimensional vector */
|
|
10
|
+
FLOAT_VEC3 = 35665,
|
|
11
|
+
/** Floating-point four-dimensional vector */
|
|
12
|
+
FLOAT_VEC4 = 35666,
|
|
13
|
+
/** Integer */
|
|
14
|
+
INT = 5124,
|
|
15
|
+
/** Integer two-dimensional vector */
|
|
16
|
+
INT_VEC2 = 35667,
|
|
17
|
+
/** Integer three-dimensional vector */
|
|
18
|
+
INT_VEC3 = 35668,
|
|
19
|
+
/** Integer four-dimensional vector */
|
|
20
|
+
INT_VEC4 = 35669,
|
|
21
|
+
/** Boolean */
|
|
22
|
+
BOOL = 35670,
|
|
23
|
+
/** Boolean two-dimensional vector */
|
|
24
|
+
BOOL_VEC2 = 35671,
|
|
25
|
+
/** Boolean three-dimensional vector */
|
|
26
|
+
BOOL_VEC3 = 35672,
|
|
27
|
+
/** Boolean four-dimensional vector */
|
|
28
|
+
BOOL_VEC4 = 35673,
|
|
29
|
+
/** Second-order matrix */
|
|
30
|
+
FLOAT_MAT2 = 35674,
|
|
31
|
+
/** Third-order matrix */
|
|
32
|
+
FLOAT_MAT3 = 35675,
|
|
33
|
+
/** Fourth-order matrix */
|
|
34
|
+
FLOAT_MAT4 = 35676,
|
|
35
|
+
/** Float array */
|
|
36
|
+
FLOAT_ARRAY = 35677,
|
|
37
|
+
/** Floating-point two-dimensional vector array */
|
|
38
|
+
FLOAT_VEC2_ARRAY = 100000,
|
|
39
|
+
/** Floating-point three-dimensional vector array */
|
|
40
|
+
FLOAT_VEC3_ARRAY = 100001,
|
|
41
|
+
/** Floating-point four-dimensional vector array */
|
|
42
|
+
FLOAT_VEC4_ARRAY = 100002,
|
|
43
|
+
/** Integer array */
|
|
44
|
+
INT_ARRAY = 100003,
|
|
45
|
+
/** Integer two-dimensional vector array */
|
|
46
|
+
INT_VEC2_ARRAY = 100004,
|
|
47
|
+
/** Integer three-dimensional vector array */
|
|
48
|
+
INT_VEC3_ARRAY = 100005,
|
|
49
|
+
/** Integer four-dimensional vector array */
|
|
50
|
+
INT_VEC4_ARRAY = 100006,
|
|
51
|
+
/** Second-order matrix array */
|
|
52
|
+
FLOAT_MAT2_ARRAY = 100007,
|
|
53
|
+
/** Third-order matrix array */
|
|
54
|
+
FLOAT_MAT3_ARRAY = 100008,
|
|
55
|
+
/** Fourth-order matrix array */
|
|
56
|
+
FLOAT_MAT4_ARRAY = 100009,
|
|
57
|
+
/** 2D texture sampler array */
|
|
58
|
+
SAMPLER_2D_ARRAY = 100010,
|
|
59
|
+
/** Cube map texture sampler array */
|
|
60
|
+
SAMPLER_CUBE_ARRAY = 100011,
|
|
61
|
+
/** 2D sampler */
|
|
62
|
+
SAMPLER_2D = 35678,
|
|
63
|
+
/** Cube map Texture sampler */
|
|
64
|
+
SAMPLER_CUBE = 35680,
|
|
65
|
+
/** Byte */
|
|
66
|
+
BYTE = 5120,
|
|
67
|
+
/** Unsigned byte */
|
|
68
|
+
UNSIGNED_BYTE = 5121,
|
|
69
|
+
/** Short */
|
|
70
|
+
SHORT = 5122,
|
|
71
|
+
/** Unsigned short */
|
|
72
|
+
UNSIGNED_SHORT = 5123,
|
|
73
|
+
/** Unsigned int */
|
|
74
|
+
UNSIGNED_INT = 5125
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* GL Capabilities
|
|
78
|
+
* Some capabilities can be smoothed out by extension, and some capabilities must use WebGL 2.0.
|
|
79
|
+
* */
|
|
80
|
+
export declare enum GLCapabilityType {
|
|
81
|
+
shaderVertexID = "shaderVertexID",
|
|
82
|
+
standardDerivatives = "OES_standard_derivatives",
|
|
83
|
+
shaderTextureLod = "EXT_shader_texture_lod",
|
|
84
|
+
elementIndexUint = "OES_element_index_uint",
|
|
85
|
+
depthTexture = "WEBGL_depth_texture",
|
|
86
|
+
drawBuffers = "WEBGL_draw_buffers",
|
|
87
|
+
vertexArrayObject = "OES_vertex_array_object",
|
|
88
|
+
instancedArrays = "ANGLE_instanced_arrays",
|
|
89
|
+
multipleSample = "multipleSampleOnlySupportedInWebGL2",
|
|
90
|
+
textureFloat = "OES_texture_float",
|
|
91
|
+
textureFloatLinear = "OES_texture_float_linear",
|
|
92
|
+
textureHalfFloat = "OES_texture_half_float",
|
|
93
|
+
textureHalfFloatLinear = "OES_texture_half_float_linear",
|
|
94
|
+
WEBGL_colorBufferFloat = "WEBGL_color_buffer_float",
|
|
95
|
+
colorBufferFloat = "EXT_color_buffer_float",
|
|
96
|
+
colorBufferHalfFloat = "EXT_color_buffer_half_float",
|
|
97
|
+
textureFilterAnisotropic = "EXT_texture_filter_anisotropic",
|
|
98
|
+
blendMinMax = "EXT_blend_minmax",
|
|
99
|
+
astc = "WEBGL_compressed_texture_astc",
|
|
100
|
+
astc_webkit = "WEBKIT_WEBGL_compressed_texture_astc",
|
|
101
|
+
etc = "WEBGL_compressed_texture_etc",
|
|
102
|
+
etc_webkit = "WEBKIT_WEBGL_compressed_texture_etc",
|
|
103
|
+
etc1 = "WEBGL_compressed_texture_etc1",
|
|
104
|
+
etc1_webkit = "WEBKIT_WEBGL_compressed_texture_etc1",
|
|
105
|
+
pvrtc = "WEBGL_compressed_texture_pvrtc",
|
|
106
|
+
pvrtc_webkit = "WEBKIT_WEBGL_compressed_texture_pvrtc",
|
|
107
|
+
s3tc = "WEBGL_compressed_texture_s3tc",
|
|
108
|
+
s3tc_webkit = "WEBKIT_WEBGL_compressed_texture_s3tc"
|
|
109
|
+
}
|
|
110
|
+
export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
/**
|
|
3
|
+
* EngineObject.
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class EngineObject {
|
|
6
|
+
private static _instanceIdCounter;
|
|
7
|
+
/** Engine unique id. */
|
|
8
|
+
readonly instanceId: number;
|
|
9
|
+
protected _engine: Engine;
|
|
10
|
+
protected _destroyed: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Get the engine which the object belongs.
|
|
13
|
+
*/
|
|
14
|
+
get engine(): Engine;
|
|
15
|
+
/**
|
|
16
|
+
* Whether it has been destroyed.
|
|
17
|
+
*/
|
|
18
|
+
get destroyed(): boolean;
|
|
19
|
+
constructor(engine: Engine);
|
|
20
|
+
/**
|
|
21
|
+
* Destroy self.
|
|
22
|
+
*/
|
|
23
|
+
destroy(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventDispatcher } from "./EventDispatcher";
|
|
2
|
+
export type Listener = ((e: Event) => any) & {
|
|
3
|
+
once?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/** Event Object. * @class */
|
|
6
|
+
export declare class Event {
|
|
7
|
+
get propagationStopped(): boolean;
|
|
8
|
+
get target(): EventDispatcher;
|
|
9
|
+
set target(t: EventDispatcher);
|
|
10
|
+
get timeStamp(): number;
|
|
11
|
+
get currentTarget(): EventDispatcher;
|
|
12
|
+
set currentTarget(t: EventDispatcher);
|
|
13
|
+
get bubbles(): boolean;
|
|
14
|
+
get type(): string | number;
|
|
15
|
+
data: any;
|
|
16
|
+
private _timeStamp;
|
|
17
|
+
private _target;
|
|
18
|
+
private _currentTarget;
|
|
19
|
+
private _bubbles;
|
|
20
|
+
private _propagationStopped;
|
|
21
|
+
private _type;
|
|
22
|
+
constructor(type: string | number, target?: EventDispatcher, data?: any, bubbles?: boolean);
|
|
23
|
+
stopPropagation(): void;
|
|
24
|
+
}
|