@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,79 @@
|
|
|
1
|
+
import { Event } from "./Event";
|
|
2
|
+
/**
|
|
3
|
+
* EventDispatcher, which can be inherited as a base class.
|
|
4
|
+
*/
|
|
5
|
+
export declare class EventDispatcher {
|
|
6
|
+
private _events;
|
|
7
|
+
private _eventCount;
|
|
8
|
+
private _dispatchingListeners;
|
|
9
|
+
/**
|
|
10
|
+
* Determine whether there is event listening.
|
|
11
|
+
* @param event - Event name
|
|
12
|
+
* @returns Returns whether there is a corresponding event
|
|
13
|
+
*/
|
|
14
|
+
hasEvent(event: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the names of all registered events.
|
|
17
|
+
* @returns All event names
|
|
18
|
+
*/
|
|
19
|
+
eventNames(): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Returns the number of listeners with the specified event name.
|
|
22
|
+
* @param event - Event name
|
|
23
|
+
* @returns The count of listeners
|
|
24
|
+
*/
|
|
25
|
+
listenerCount(event: string): number;
|
|
26
|
+
/**
|
|
27
|
+
* Dispatch the event with the specified event name.
|
|
28
|
+
* @param event - Event name
|
|
29
|
+
* @param data - Data
|
|
30
|
+
* @returns - Whether the dispatching is successful
|
|
31
|
+
*/
|
|
32
|
+
dispatch(event: string, data?: any): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Add a listener/
|
|
35
|
+
* @param event - Event name
|
|
36
|
+
* @param fn - Function
|
|
37
|
+
* @returns This
|
|
38
|
+
*/
|
|
39
|
+
on(event: string, fn: Function): EventDispatcher;
|
|
40
|
+
/**
|
|
41
|
+
* Add a one-time listener.
|
|
42
|
+
* @param event - Event name
|
|
43
|
+
* @param fn - Function
|
|
44
|
+
* @returns This
|
|
45
|
+
*/
|
|
46
|
+
once(event: string, fn: Function): EventDispatcher;
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Use `on/once` instead.
|
|
49
|
+
* Add a listener function with the specified event name.
|
|
50
|
+
* @param event - Event name
|
|
51
|
+
* @param fn - Function
|
|
52
|
+
* @param once - Is it a one-time listener
|
|
53
|
+
* @returns this
|
|
54
|
+
*/
|
|
55
|
+
addEventListener(event: string, fn: Function, once?: boolean): EventDispatcher;
|
|
56
|
+
/**
|
|
57
|
+
* Remove the event listener(s) of the specified event name.
|
|
58
|
+
* @param event - Event name
|
|
59
|
+
* @param fn - Function, If is undefined, delete all corresponding event listeners.
|
|
60
|
+
*/
|
|
61
|
+
off(event: string, fn?: Function): EventDispatcher;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use `off` instead.
|
|
64
|
+
* Remove the event listener(s) of the specified event name.
|
|
65
|
+
* @param event - Event name
|
|
66
|
+
* @param fn - Function, If is undefined, delete all corresponding event listeners.
|
|
67
|
+
*/
|
|
68
|
+
removeEventListener(event: string, fn?: Function): EventDispatcher;
|
|
69
|
+
/**
|
|
70
|
+
* Remove all event listeners.
|
|
71
|
+
* @param event - Event name, delete all events if not passed
|
|
72
|
+
*/
|
|
73
|
+
removeAllEventListeners(event?: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated Use `dispatch` instead.
|
|
76
|
+
*/
|
|
77
|
+
trigger(e: Event): void;
|
|
78
|
+
private _clearEvent;
|
|
79
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Logger: {
|
|
2
|
+
debug: (message?: any, ...optionalParams: any[]) => void;
|
|
3
|
+
info: (message?: any, ...optionalParams: any[]) => void;
|
|
4
|
+
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
5
|
+
error: (message?: any, ...optionalParams: any[]) => void;
|
|
6
|
+
isEnabled: boolean;
|
|
7
|
+
/** Turn on log */
|
|
8
|
+
enable(): void;
|
|
9
|
+
/** Turn off log */
|
|
10
|
+
disable(): void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tools for calculating the time per frame.
|
|
3
|
+
*/
|
|
4
|
+
export declare class Time {
|
|
5
|
+
private _clock;
|
|
6
|
+
private _timeScale;
|
|
7
|
+
private _deltaTime;
|
|
8
|
+
private _startTime;
|
|
9
|
+
private _lastTickTime;
|
|
10
|
+
get frameCount(): number;
|
|
11
|
+
/**
|
|
12
|
+
* Constructor of the Time.
|
|
13
|
+
*/
|
|
14
|
+
constructor();
|
|
15
|
+
reset(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Current Time
|
|
18
|
+
*/
|
|
19
|
+
get nowTime(): number;
|
|
20
|
+
/**
|
|
21
|
+
* Time between two ticks
|
|
22
|
+
*/
|
|
23
|
+
get deltaTime(): number;
|
|
24
|
+
/**
|
|
25
|
+
* Scaled delta time.
|
|
26
|
+
*/
|
|
27
|
+
get timeScale(): number;
|
|
28
|
+
set timeScale(s: number);
|
|
29
|
+
/**
|
|
30
|
+
* Unscaled delta time.
|
|
31
|
+
*/
|
|
32
|
+
get unscaledDeltaTime(): number;
|
|
33
|
+
/**
|
|
34
|
+
* The elapsed time, after the clock is initialized.
|
|
35
|
+
*/
|
|
36
|
+
get timeSinceStartup(): number;
|
|
37
|
+
/**
|
|
38
|
+
* Call every frame, update delta time and other data.
|
|
39
|
+
*/
|
|
40
|
+
tick(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const Util: {
|
|
2
|
+
isArray: (value: any) => boolean;
|
|
3
|
+
isArrayLike(x: any): boolean;
|
|
4
|
+
clone<T>(obj: T): T;
|
|
5
|
+
downloadBlob(blob: Blob, fileName?: string): void;
|
|
6
|
+
};
|
|
7
|
+
export declare const isArrayLike: <T>(x: any) => x is ArrayLike<T>;
|
|
8
|
+
/**
|
|
9
|
+
* Fastly remove an element from array.
|
|
10
|
+
* @param array - Array
|
|
11
|
+
* @param item - Element
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeFromArray(array: any[], item: any): boolean;
|
|
14
|
+
export declare function ObjectValues(obj: any): any[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Event } from "./Event";
|
|
2
|
+
export { EventDispatcher } from "./EventDispatcher";
|
|
3
|
+
export { Logger } from "./Logger";
|
|
4
|
+
export { Time } from "./Time";
|
|
5
|
+
export { Util, ObjectValues } from "./Util";
|
|
6
|
+
export { EngineObject } from "./EngineObject";
|
|
7
|
+
export * from "./Constant";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property decorator, ignore the property when cloning.
|
|
3
|
+
*/
|
|
4
|
+
export declare function ignoreClone(target: Object, propertyKey: string): void;
|
|
5
|
+
/**
|
|
6
|
+
* Property decorator, assign value to the property when cloning.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* If it's a primitive type, the value will be copied.
|
|
10
|
+
* If it's a class type, the reference will be copied.
|
|
11
|
+
*/
|
|
12
|
+
export declare function assignmentClone(target: Object, propertyKey: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Property decorator, shallow clone the property when cloning.
|
|
15
|
+
* After cloning, it will keep its own reference independent, and use the method of assignment to clone all its internal properties.
|
|
16
|
+
* if the internal property is a primitive type, the value will be copied, if the internal property is a reference type, its reference address will be copied.。
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Applicable to Object, Array, TypedArray and Class types.
|
|
20
|
+
*/
|
|
21
|
+
export declare function shallowClone(target: Object, propertyKey: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Property decorator, deep clone the property when cloning.
|
|
24
|
+
* After cloning, it will maintain its own reference independence, and all its internal deep properties will remain completely independent.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Applicable to Object, Array, TypedArray and Class types.
|
|
28
|
+
* If Class is encountered during the deep cloning process, the custom cloning function of the object will be called first.
|
|
29
|
+
* Custom cloning requires the object to implement the IClone interface.
|
|
30
|
+
*/
|
|
31
|
+
export declare function deepClone(target: Object, propertyKey: string): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
/**
|
|
3
|
+
* Custom clone interface.
|
|
4
|
+
*/
|
|
5
|
+
export interface ICustomClone {
|
|
6
|
+
}
|
|
7
|
+
export declare class ComponentCloner {
|
|
8
|
+
/**
|
|
9
|
+
* Clone component.
|
|
10
|
+
* @param source - Clone source
|
|
11
|
+
* @param target - Clone target
|
|
12
|
+
*/
|
|
13
|
+
static cloneComponent(source: Component, target: Component): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { Camera } from "../Camera";
|
|
3
|
+
import { Probe } from "./Probe";
|
|
4
|
+
/**
|
|
5
|
+
* Cube probe, generate cubeTexture, used for dynamic environment reflection and other effects.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CubeProbe extends Probe {
|
|
8
|
+
/**
|
|
9
|
+
* The position of the probe can be set, the default is the origin [0,0,0].
|
|
10
|
+
*/
|
|
11
|
+
position: Vector3;
|
|
12
|
+
/**
|
|
13
|
+
* @override
|
|
14
|
+
*/
|
|
15
|
+
protected readonly _isCube: boolean;
|
|
16
|
+
private oriViewMatrix;
|
|
17
|
+
private _oriFieldOfView;
|
|
18
|
+
/**
|
|
19
|
+
* @override
|
|
20
|
+
*/
|
|
21
|
+
onBeginRender(camera: Camera): void;
|
|
22
|
+
/**
|
|
23
|
+
* Store original camera parameters.
|
|
24
|
+
*/
|
|
25
|
+
private _storeCamera;
|
|
26
|
+
/**
|
|
27
|
+
* Restore camera parameters.
|
|
28
|
+
*/
|
|
29
|
+
private _restoreCamera;
|
|
30
|
+
/**
|
|
31
|
+
* Set camera parameters according to the rendering surface.
|
|
32
|
+
*/
|
|
33
|
+
private _setCamera;
|
|
34
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Camera } from "../Camera";
|
|
2
|
+
import { Layer } from "../Layer";
|
|
3
|
+
import { Script } from "../Script";
|
|
4
|
+
import { Texture } from "../texture";
|
|
5
|
+
/**
|
|
6
|
+
* Environmental probes, providing necessary capabilities such as reflection and refraction.
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const probe = cameraEntity.addComponent( CubeProbe )
|
|
10
|
+
* probe.onTextureChange = cubeTexture => {
|
|
11
|
+
* envLight.specularTexture = cubeTexture;
|
|
12
|
+
* skybox.specularTexture = cubeTexture;
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class Probe extends Script {
|
|
17
|
+
/**
|
|
18
|
+
* Probe's layer, render everything by default.
|
|
19
|
+
*/
|
|
20
|
+
probeLayer: Layer;
|
|
21
|
+
/**
|
|
22
|
+
* The width of the probe rendering target.
|
|
23
|
+
*/
|
|
24
|
+
width: number;
|
|
25
|
+
/**
|
|
26
|
+
* The height of the probe rendering target.
|
|
27
|
+
*/
|
|
28
|
+
height: number;
|
|
29
|
+
/**
|
|
30
|
+
* When using WebGL2, you can turn on MSAA at the hardware layer.
|
|
31
|
+
*/
|
|
32
|
+
antiAliasing: number;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the probe is rendered to the cube color texture.
|
|
35
|
+
*/
|
|
36
|
+
protected readonly _isCube: boolean;
|
|
37
|
+
private _oriCameraRenderTarget;
|
|
38
|
+
private _renderTarget;
|
|
39
|
+
private _renderTargetSwap;
|
|
40
|
+
private _activeRenderTarget;
|
|
41
|
+
private _camera;
|
|
42
|
+
private _oriCameraCullingMask;
|
|
43
|
+
private get _texture();
|
|
44
|
+
/**
|
|
45
|
+
* Provide hooks for users to exchange Texture.
|
|
46
|
+
* @remarks Prevent issue: Feedback Loops Between Textures and the Framebuffer.
|
|
47
|
+
*/
|
|
48
|
+
onTextureChange(renderColorTexture: Texture): void;
|
|
49
|
+
/**
|
|
50
|
+
* @override
|
|
51
|
+
*/
|
|
52
|
+
onBeginRender(camera: Camera): void;
|
|
53
|
+
/**
|
|
54
|
+
* @override
|
|
55
|
+
*/
|
|
56
|
+
onEndRender(camera: Camera): void;
|
|
57
|
+
protected _reset(): void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { RefObject } from "../asset/RefObject";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { BufferBindFlag } from "./enums/BufferBindFlag";
|
|
4
|
+
import { BufferUsage } from "./enums/BufferUsage";
|
|
5
|
+
import { SetDataOptions } from "./enums/SetDataOptions";
|
|
6
|
+
/**
|
|
7
|
+
* Buffer.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Buffer extends RefObject {
|
|
10
|
+
_glBindTarget: number;
|
|
11
|
+
_glBufferUsage: number;
|
|
12
|
+
_nativeBuffer: WebGLBuffer;
|
|
13
|
+
private _hardwareRenderer;
|
|
14
|
+
private _type;
|
|
15
|
+
private _byteLength;
|
|
16
|
+
private _bufferUsage;
|
|
17
|
+
/**
|
|
18
|
+
* Buffer binding flag.
|
|
19
|
+
*/
|
|
20
|
+
get type(): BufferBindFlag;
|
|
21
|
+
/**
|
|
22
|
+
* Byte length.
|
|
23
|
+
*/
|
|
24
|
+
get byteLength(): number;
|
|
25
|
+
/**
|
|
26
|
+
* Buffer usage.
|
|
27
|
+
*/
|
|
28
|
+
get bufferUsage(): BufferUsage;
|
|
29
|
+
/**
|
|
30
|
+
* Create Buffer.
|
|
31
|
+
* @param engine - Engine
|
|
32
|
+
* @param type - Buffer binding flag
|
|
33
|
+
* @param byteLength - Byte length
|
|
34
|
+
* @param bufferUsage - Buffer usage
|
|
35
|
+
*/
|
|
36
|
+
constructor(engine: Engine, type: BufferBindFlag, byteLength: number, bufferUsage?: BufferUsage);
|
|
37
|
+
/**
|
|
38
|
+
* Create Buffer.
|
|
39
|
+
* @param engine - Engine
|
|
40
|
+
* @param type - Buffer binding flag
|
|
41
|
+
* @param data - Byte
|
|
42
|
+
* @param bufferUsage - Buffer usage
|
|
43
|
+
*/
|
|
44
|
+
constructor(engine: Engine, type: BufferBindFlag, data: ArrayBuffer | ArrayBufferView, bufferUsage?: BufferUsage);
|
|
45
|
+
/**
|
|
46
|
+
* Bind buffer.
|
|
47
|
+
*/
|
|
48
|
+
bind(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Set buffer data.
|
|
51
|
+
* @param data - Input buffer data
|
|
52
|
+
*/
|
|
53
|
+
setData(data: ArrayBuffer | ArrayBufferView): void;
|
|
54
|
+
/**
|
|
55
|
+
* Set buffer data.
|
|
56
|
+
* @param data - Input buffer data
|
|
57
|
+
* @param bufferByteOffset - buffer byte offset
|
|
58
|
+
*/
|
|
59
|
+
setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* Set buffer data.
|
|
62
|
+
* @param data - Input buffer data
|
|
63
|
+
* @param bufferByteOffset - Buffer byte offset
|
|
64
|
+
* @param dataOffset - Buffer byte offset
|
|
65
|
+
* @param dataLength - Data length
|
|
66
|
+
*/
|
|
67
|
+
setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength?: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* Set buffer data.
|
|
70
|
+
* @param data - Input buffer data
|
|
71
|
+
* @param bufferByteOffset - Buffer byte offset
|
|
72
|
+
* @param dataOffset - Buffer byte offset
|
|
73
|
+
* @param dataLength - Data length
|
|
74
|
+
* @param options - Update strategy: None/Discard/NoOverwrite
|
|
75
|
+
*/
|
|
76
|
+
setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number, options: SetDataOptions): void;
|
|
77
|
+
/**
|
|
78
|
+
* Get buffer data.
|
|
79
|
+
* @param data - Output buffer data
|
|
80
|
+
*/
|
|
81
|
+
getData(data: ArrayBufferView): void;
|
|
82
|
+
/**
|
|
83
|
+
* Get buffer data.
|
|
84
|
+
* @param data - Output buffer data
|
|
85
|
+
* @param bufferByteOffset - Buffer byte offset
|
|
86
|
+
*/
|
|
87
|
+
getData(data: ArrayBufferView, bufferByteOffset: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* Get buffer data.
|
|
90
|
+
* @param data - Output buffer data
|
|
91
|
+
* @param bufferByteOffset - Buffer byte offset
|
|
92
|
+
* @param dataOffset - Output data offset
|
|
93
|
+
* @param dataLength - Output data length
|
|
94
|
+
*/
|
|
95
|
+
getData(data: ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number): void;
|
|
96
|
+
/**
|
|
97
|
+
* @override
|
|
98
|
+
* Destroy.
|
|
99
|
+
*/
|
|
100
|
+
_onDestroy(): void;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated
|
|
103
|
+
*/
|
|
104
|
+
resize(dataLength: number): void;
|
|
105
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataType } from "../base/Constant";
|
|
2
|
+
import { IndexFormat } from "./enums/IndexFormat";
|
|
3
|
+
export interface ElementInfo {
|
|
4
|
+
size: number;
|
|
5
|
+
type: DataType;
|
|
6
|
+
normalized: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class BufferUtil {
|
|
9
|
+
static _getGLIndexType(indexFormat: IndexFormat): DataType;
|
|
10
|
+
static _getGLIndexByteCount(indexFormat: IndexFormat): DataType;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IndexFormat } from "./enums/IndexFormat";
|
|
2
|
+
import { Buffer } from "./Buffer";
|
|
3
|
+
/**
|
|
4
|
+
* Index buffer binding.
|
|
5
|
+
*/
|
|
6
|
+
export declare class IndexBufferBinding {
|
|
7
|
+
/**
|
|
8
|
+
* Index buffer.
|
|
9
|
+
*/
|
|
10
|
+
get buffer(): Buffer;
|
|
11
|
+
/**
|
|
12
|
+
* Index buffer format.
|
|
13
|
+
*/
|
|
14
|
+
get format(): IndexFormat;
|
|
15
|
+
/**
|
|
16
|
+
* Create index buffer binding.
|
|
17
|
+
* @param buffer - Index buffer
|
|
18
|
+
* @param format - Index buffer format
|
|
19
|
+
*/
|
|
20
|
+
constructor(buffer: Buffer, format: IndexFormat);
|
|
21
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
+
import { RefObject } from "../asset/RefObject";
|
|
3
|
+
import { Engine } from "../Engine";
|
|
4
|
+
import { MeshTopology } from "../graphic/enums/MeshTopology";
|
|
5
|
+
import { IndexBufferBinding } from "../graphic/IndexBufferBinding";
|
|
6
|
+
import { SubMesh } from "../graphic/SubMesh";
|
|
7
|
+
import { VertexElement } from "../graphic/VertexElement";
|
|
8
|
+
/**
|
|
9
|
+
* Mesh.
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class Mesh extends RefObject {
|
|
12
|
+
/** Name. */
|
|
13
|
+
name: string;
|
|
14
|
+
private _bounds;
|
|
15
|
+
private _subMeshes;
|
|
16
|
+
/**
|
|
17
|
+
* The bounding volume of the mesh.
|
|
18
|
+
*/
|
|
19
|
+
get bounds(): BoundingBox;
|
|
20
|
+
set bounds(value: BoundingBox);
|
|
21
|
+
/**
|
|
22
|
+
* First sub-mesh. Rendered using the first material.
|
|
23
|
+
*/
|
|
24
|
+
get subMesh(): SubMesh | null;
|
|
25
|
+
/**
|
|
26
|
+
* A collection of sub-mesh, each sub-mesh can be rendered with an independent material.
|
|
27
|
+
*/
|
|
28
|
+
get subMeshes(): Readonly<SubMesh[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Create mesh.
|
|
31
|
+
* @param engine - Engine
|
|
32
|
+
* @param name - Mesh name
|
|
33
|
+
*/
|
|
34
|
+
constructor(engine: Engine, name?: string);
|
|
35
|
+
/**
|
|
36
|
+
* Add sub-mesh, each sub-mesh can correspond to an independent material.
|
|
37
|
+
* @param subMesh - Start drawing offset, if the index buffer is set, it means the offset in the index buffer, if not set, it means the offset in the vertex buffer
|
|
38
|
+
* @returns Sub-mesh
|
|
39
|
+
*/
|
|
40
|
+
addSubMesh(subMesh: SubMesh): SubMesh;
|
|
41
|
+
/**
|
|
42
|
+
* Add sub-mesh, each sub-mesh can correspond to an independent material.
|
|
43
|
+
* @param start - Start drawing offset, if the index buffer is set, it means the offset in the index buffer, if not set, it means the offset in the vertex buffer
|
|
44
|
+
* @param count - Drawing count, if the index buffer is set, it means the count in the index buffer, if not set, it means the count in the vertex buffer
|
|
45
|
+
* @param topology - Drawing topology, default is MeshTopology.Triangles
|
|
46
|
+
* @returns Sub-mesh
|
|
47
|
+
*/
|
|
48
|
+
addSubMesh(start: number, count: number, topology?: MeshTopology): SubMesh;
|
|
49
|
+
/**
|
|
50
|
+
* Remove sub-mesh.
|
|
51
|
+
* @param subMesh - Sub-mesh needs to be removed
|
|
52
|
+
*/
|
|
53
|
+
removeSubMesh(subMesh: SubMesh): void;
|
|
54
|
+
/**
|
|
55
|
+
* Clear all sub-mesh.
|
|
56
|
+
*/
|
|
57
|
+
clearSubMesh(): void;
|
|
58
|
+
/**
|
|
59
|
+
* @override
|
|
60
|
+
*/
|
|
61
|
+
_addRefCount(value: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* @override
|
|
64
|
+
* Destroy.
|
|
65
|
+
*/
|
|
66
|
+
_onDestroy(): void;
|
|
67
|
+
protected _setVertexElements(elements: VertexElement[]): void;
|
|
68
|
+
protected _setIndexBufferBinding(binding: IndexBufferBinding | null): void;
|
|
69
|
+
private _onBoundsChanged;
|
|
70
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MeshTopology } from "./enums/MeshTopology";
|
|
2
|
+
/**
|
|
3
|
+
* Sub-mesh, mainly contains drawing information.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SubMesh {
|
|
6
|
+
/** Start drawing offset. */
|
|
7
|
+
start: number;
|
|
8
|
+
/** Drawing count. */
|
|
9
|
+
count: number;
|
|
10
|
+
/** Drawing topology. */
|
|
11
|
+
topology: MeshTopology;
|
|
12
|
+
/**
|
|
13
|
+
* Create a sub-mesh.
|
|
14
|
+
* @param start - Start drawing offset
|
|
15
|
+
* @param count - Drawing count
|
|
16
|
+
* @param topology - Drawing topology
|
|
17
|
+
*/
|
|
18
|
+
constructor(start?: number, count?: number, topology?: MeshTopology);
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Buffer } from "./Buffer";
|
|
2
|
+
/**
|
|
3
|
+
* Vertex buffer binding.
|
|
4
|
+
*/
|
|
5
|
+
export declare class VertexBufferBinding {
|
|
6
|
+
/**
|
|
7
|
+
* Vertex buffer.
|
|
8
|
+
*/
|
|
9
|
+
get buffer(): Buffer;
|
|
10
|
+
/**
|
|
11
|
+
* Vertex buffer stride.
|
|
12
|
+
*/
|
|
13
|
+
get stride(): number;
|
|
14
|
+
/**
|
|
15
|
+
* Create vertex buffer.
|
|
16
|
+
* @param buffer - Vertex buffer
|
|
17
|
+
* @param stride - Vertex buffer stride
|
|
18
|
+
*/
|
|
19
|
+
constructor(buffer: Buffer, stride: number);
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ElementInfo } from "./BufferUtil";
|
|
2
|
+
import { VertexElementFormat } from "./enums/VertexElementFormat";
|
|
3
|
+
/**
|
|
4
|
+
* Vertex element.
|
|
5
|
+
*/
|
|
6
|
+
export declare class VertexElement {
|
|
7
|
+
_glElementInfo: ElementInfo;
|
|
8
|
+
private _semantic;
|
|
9
|
+
private _offset;
|
|
10
|
+
private _format;
|
|
11
|
+
private _bindingIndex;
|
|
12
|
+
private _instanceStepRate;
|
|
13
|
+
/**
|
|
14
|
+
* Vertex semantic.
|
|
15
|
+
*/
|
|
16
|
+
get semantic(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Vertex data byte offset.
|
|
19
|
+
*/
|
|
20
|
+
get offset(): number;
|
|
21
|
+
set offset(value: number);
|
|
22
|
+
/**
|
|
23
|
+
* Vertex data format.
|
|
24
|
+
*/
|
|
25
|
+
get format(): VertexElementFormat;
|
|
26
|
+
/**
|
|
27
|
+
* Vertex buffer binding index.
|
|
28
|
+
*/
|
|
29
|
+
get bindingIndex(): number;
|
|
30
|
+
set bindingIndex(value: number);
|
|
31
|
+
/**
|
|
32
|
+
* Instance cadence, the number of instances drawn for each vertex in the buffer, non-instance elements must be 0.
|
|
33
|
+
*/
|
|
34
|
+
get instanceStepRate(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Create vertex element.
|
|
37
|
+
* @param semantic - Input vertex semantic
|
|
38
|
+
* @param offset - Vertex data byte offset
|
|
39
|
+
* @param format - Vertex data format
|
|
40
|
+
* @param bindingIndex - Vertex buffer binding index
|
|
41
|
+
* @param instanceStepRate - Instance cadence, the number of instances drawn for each vertex in the buffer, non-instance elements must be 0.
|
|
42
|
+
*/
|
|
43
|
+
constructor(semantic: string, offset: number, format: VertexElementFormat, bindingIndex: number, instanceStepRate?: number);
|
|
44
|
+
}
|